Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN | |||
StereoPair.java | +91 | added 1.1 |
Class used to couple a pair of sensors composing a stereo layer. This class was pulled out from HelicalTrackHitDriver.
diff -N StereoPair.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ StereoPair.java 24 Jul 2013 22:36:34 -0000 1.1 @@ -0,0 +1,91 @@
+package org.lcsim.hps.recon.tracking; + +import org.lcsim.detector.tracker.silicon.SiSensor; + +/** + * + * @author Per Hansson <[log in to unmask]> + * @version $Id: StereoPair.java,v 1.1 2013/07/24 22:36:34 omoreno Exp $ + */ +public class StereoPair { + + + // Layer number to which the stereo pair belongs to + private int layerNumber = -1; + + // The axial and stereo sensors + private SiSensor axialSensor = null; + private SiSensor stereoSensor = null; + + /** + * Default Ctor + * + * @param layerNumber : Layer number to which the stereo pair belongs to + */ + public StereoPair(int layerNumber){ + this.layerNumber = layerNumber; + } + + + /** + * Set the axial sensor of stereo pair + * + * @param axialSensor + */ + public void setAxialSensor(SiSensor axialSensor){ + this.axialSensor = axialSensor; + } + + /** + * Set the stereo sensor of the stereo pair + * + * @param stereoSensor + */ + public void setStereoSensor(SiSensor stereoSensor){ + this.stereoSensor = stereoSensor; + } + + /** + * Get the axial sensor of the stereo pair + * + * @return Axial sensor. Returns null if it hasn't been set yet. + */ + public SiSensor getAxialSensor(){ + return axialSensor; + } + + /** + * Get the stereo sensor of the stereo pair + * + * @return Stereo sensor. Returns null if it hasn't been set yet. + */ + public SiSensor getStereoSensor(){ + return stereoSensor; + } + + /** + * Get the layer number to which the stereo pair belongs to + * + * @return layer number + */ + public int getLayerNumber(){ + return layerNumber; + } + + /** + * Return a string describing the stereo pair + * + * @return stereo pair description + */ + @Override + public String toString(){ + String axialName = axialSensor == null ? "None" : axialSensor.getName(); + String stereoName = stereoSensor == null ? "None" : stereoSensor.getName(); + String description = "Stereo Pair:\n"; + description += "\tLayer Number: " + this.getLayerNumber(); + description += "\t\tAxial Sensor: " + axialName; + description += "\t\tStereo Sensor: " + stereoName; + return description; + + } +}
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1