Package org.jlab.rec.atof.cluster
Class ATOFCluster
java.lang.Object
org.jlab.rec.atof.cluster.ATOFCluster
The 
ATOFCluster represents clusters in the atof
 Create clusters and compute their basic properties from the hits composing them.
- Author:
- pilleux
- 
Constructor SummaryConstructorsConstructorDescriptionATOFCluster(ArrayList<BarHit> bar_hits, ArrayList<ATOFHit> wedge_hits) Constructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties.Constructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties.
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidCompute the cluster properties.doublegetBeta()Compute the cluster beta from the path length and time.doublegetDistanceStraightInATOF(double vx, double vy, double vz) Computes the distance a straight track goes through the ATOF.doubleComputes the energy deposited in the bars.doubleComputes the energy deposited in the wedges.doubleintdoubleintgetIProj()final ATOFHitRetrieve the hit with maximal energy in the cluster.final ATOFHitComputes the wedge hit with maximal energy in the cluster.doubledoublegetPhi()Compute the cluster phi angle in radians.intgetTdc()Returns the TDC of the maximal hit in the cluster.doublegetTime()intgetTot()Computes the sum of TOT in the cluster.doublegetX()doublegetY()doublegetZ()static voidvoidBuild a straight track from the vertex to this cluster.intmatchTrack(DataEvent event) Matches the current track with ahdc tracks projections that have been written to the banks.voidsetBarHits(ArrayList<BarHit> bar_hits) voidsetEnergy(double energy) voidsetIndexMaxHit(int indexMaxHit) voidsetInPathLength(double inPathLength) voidsetIProj(int iProj) voidsetPathLength(double pathLength) voidsetTime(double time) voidsetTypeMaxHit(String typeMaxHit) voidsetWedgeHits(ArrayList<ATOFHit> wedge_hits) voidsetX(double x) voidsetY(double y) voidsetZ(double z) 
- 
Constructor Details- 
ATOFClusterConstructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties.
- 
ATOFClusterConstructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties.
 
- 
- 
Method Details- 
getBarHits
- 
setBarHits
- 
getWedgeHits
- 
setWedgeHits
- 
getXpublic double getX()
- 
setXpublic void setX(double x) 
- 
getYpublic double getY()
- 
setYpublic void setY(double y) 
- 
getZpublic double getZ()
- 
setZpublic void setZ(double z) 
- 
getTimepublic double getTime()
- 
setTimepublic void setTime(double time) 
- 
getEnergypublic double getEnergy()
- 
setEnergypublic void setEnergy(double energy) 
- 
getPathLengthpublic double getPathLength()
- 
setPathLengthpublic void setPathLength(double pathLength) 
- 
getInPathLengthpublic double getInPathLength()
- 
setInPathLengthpublic void setInPathLength(double inPathLength) 
- 
getTypeMaxHit
- 
setTypeMaxHit
- 
getIProjpublic int getIProj()
- 
setIProjpublic void setIProj(int iProj) 
- 
getIndexMaxHitpublic int getIndexMaxHit()
- 
setIndexMaxHitpublic void setIndexMaxHit(int indexMaxHit) 
- 
computeClusterPropertiespublic final void computeClusterProperties()Compute the cluster properties. Cluster coordinates and time are defined as the coordinates and time of the max energy hit. TO DO: Test other choices for the definitions.
- 
matchTrackMatches the current track with ahdc tracks projections that have been written to the banks. Calculates the match by comparing the hit's azimuthal angle and longitudinal position (z) with the track projection. If a match is found within defined tolerances for phi and z, the path length of the matched hit is updated.- Parameters:
- event- a @link{DataEvent} in which the track projections bank has been written.
 
- 
makeStraightTrackpublic void makeStraightTrack()Build a straight track from the vertex to this cluster. Sets the cluster path length and length through the atof from it.
- 
getDistanceStraightInATOFpublic double getDistanceStraightInATOF(double vx, double vy, double vz) Computes the distance a straight track goes through the ATOF. The intersection point between a straight track from the vertex to the cluster and the ATOF inner cylinder is computed to that end.- Parameters:
- vx- , the x coordinate of the vertex
- vy- , the y coordinate of the vertex
- vz- , the z coordinate of the vertex
- Returns:
- the distance the straight track went through in the ATOF
 
- 
getEdepWedgepublic double getEdepWedge()Computes the energy deposited in the wedges.- Returns:
- the energy deposited in the wedges.
 
- 
getEdepBarpublic double getEdepBar()Computes the energy deposited in the bars.- Returns:
- the energy deposited in the bars.
 
- 
getPhipublic double getPhi()Compute the cluster phi angle in radians.- Returns:
- a double that is angle in radians
 
- 
getBetapublic double getBeta()Compute the cluster beta from the path length and time.- Returns:
- a double that is beta - TO DO: Change to non-hardcoded value for c
 
- 
getMaxHitRetrieve the hit with maximal energy in the cluster. It must have been computed previously.- Returns:
- a ATOFHit that is the maximal energy hit in the cluster
 
- 
getTotpublic int getTot()Computes the sum of TOT in the cluster.- Returns:
- an int representing the summed TOT
 
- 
getTdcpublic int getTdc()Returns the TDC of the maximal hit in the cluster.- Returns:
- an int representing the TDC of the maximal hit.
 
- 
getMaxWedgeHitComputes the wedge hit with maximal energy in the cluster.- Returns:
- a ATOFHit that is the maximal energy hit in the wedges in the cluster.
 
- 
main- Parameters:
- args- the command line arguments
 
 
-