Package cnuphys.snr
Class SNRCluster
java.lang.Object
cnuphys.snr.SNRCluster
- Author:
- heddle A cluster candidate is a list of wires with the requirement that there are no more than two wires in a given layer
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal intThe number of layers, probably 6final intThe number of wires, probably 112final SegmentStartLista list for the segment starting points.final WireList[]one wirelist for each layer
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(int layer, int wire) Add a wire to the wire list for a given layer.voidaddSegmentStart(int wire) Add a segment (candidate) start wirevoidclean()This removes wires from the wire list if there are more than two in a given layer.voidclear()Clear the wire lists.voidThis computes slope and intercept a line using the layer as the X value and the average wire number as the Y so a slope of 0 looks "vertical".doublegetSlope()Get the slope of the linear fitdoublegetWirePosition(int layer) Used to draw a linear fit to the clusterbooleanThe given cluster is a subset of this cluster if all wirelists are subsetsvoidpackData(NoiseReductionParameters params) toString()String representation
- 
Field Details- 
numLayerspublic final int numLayersThe number of layers, probably 6
- 
numWirespublic final int numWiresThe number of wires, probably 112
- 
segmentStartLista list for the segment starting points.
- 
wireListsone wirelist for each layer
 
- 
- 
Constructor Details- 
SNRClusterpublic SNRCluster(int numLayers, int numWires) - Parameters:
- numLayers- the number of layers, for CLAS12 6
- numWires- the number of wires, for CLAS12 112
 
 
- 
- 
Method Details- 
addpublic void add(int layer, int wire) Add a wire to the wire list for a given layer. The wireList will enforce no duplicates, but will keep repeat count- Parameters:
- layer- the zero-based layer, for CLAS12 [0..5]
- wire- the zero-based wire, for CLAS12 [0..111]
 
- 
addSegmentStartpublic void addSegmentStart(int wire) Add a segment (candidate) start wire- Parameters:
- wire- the zero-based wire, for CLAS12 [0..111]
- numMissing- the number of missing layers required
 
- 
clearpublic void clear()Clear the wire lists. So the object can be reused, but only for the same sector, superlayer, and numLayers
- 
toStringString representation
- 
packData
- 
getSlopepublic double getSlope()Get the slope of the linear fit- Returns:
 
- 
cleanpublic void clean()This removes wires from the wire list if there are more than two in a given layer.
- 
computeLinepublic void computeLine()This computes slope and intercept a line using the layer as the X value and the average wire number as the Y so a slope of 0 looks "vertical". We do it this way to avoid the possibility of an infinite slope.
- 
getWirePositionpublic double getWirePosition(int layer) Used to draw a linear fit to the cluster- Parameters:
- layer- the layer
- Returns:
- the wire position as a real (with fractional part)
 
- 
hasSubsetThe given cluster is a subset of this cluster if all wirelists are subsets- Parameters:
- c- the given cluster
- Returns:
- trueif the given cluster is a subset of this cluster
 
 
-