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 Summary
ConstructorsConstructorDescriptionATOFCluster
(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.ATOFCluster
(ArrayList<BarHit> bar_hits, ArrayList<ATOFHit> wedge_hits, org.jlab.io.base.DataEvent event) Constructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Compute the cluster properties.double
getBeta()
Compute the cluster beta from the path length and time.double
getDistanceStraightInATOF
(double vx, double vy, double vz) Computes the distance a straight track goes through the ATOF.double
Computes the energy deposited in the bars.double
Computes the energy deposited in the wedges.double
int
double
int
getIProj()
final ATOFHit
Retrieve the hit with maximal energy in the cluster.final ATOFHit
Computes the wedge hit with maximal energy in the cluster.double
double
getPhi()
Compute the cluster phi angle in radians.int
getTdc()
Returns the TDC of the maximal hit in the cluster.double
getTime()
int
getTot()
Computes the sum of TOT in the cluster.double
getX()
double
getY()
double
getZ()
static void
void
Build a straight track from the vertex to this cluster.int
matchTrack
(org.jlab.io.base.DataEvent event) Matches the current track with ahdc tracks projections that have been written to the banks.void
setBarHits
(ArrayList<BarHit> bar_hits) void
setEnergy
(double energy) void
setIndexMaxHit
(int indexMaxHit) void
setInPathLength
(double inPathLength) void
setIProj
(int iProj) void
setPathLength
(double pathLength) void
setTime
(double time) void
setTypeMaxHit
(String typeMaxHit) void
setWedgeHits
(ArrayList<ATOFHit> wedge_hits) void
setX
(double x) void
setY
(double y) void
setZ
(double z)
-
Constructor Details
-
ATOFCluster
Constructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties. -
ATOFCluster
public ATOFCluster(ArrayList<BarHit> bar_hits, ArrayList<ATOFHit> wedge_hits, org.jlab.io.base.DataEvent event) Constructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties.
-
-
Method Details
-
getBarHits
-
setBarHits
-
getWedgeHits
-
setWedgeHits
-
getX
public double getX() -
setX
public void setX(double x) -
getY
public double getY() -
setY
public void setY(double y) -
getZ
public double getZ() -
setZ
public void setZ(double z) -
getTime
public double getTime() -
setTime
public void setTime(double time) -
getEnergy
public double getEnergy() -
setEnergy
public void setEnergy(double energy) -
getPathLength
public double getPathLength() -
setPathLength
public void setPathLength(double pathLength) -
getInPathLength
public double getInPathLength() -
setInPathLength
public void setInPathLength(double inPathLength) -
getTypeMaxHit
-
setTypeMaxHit
-
getIProj
public int getIProj() -
setIProj
public void setIProj(int iProj) -
getIndexMaxHit
public int getIndexMaxHit() -
setIndexMaxHit
public void setIndexMaxHit(int indexMaxHit) -
computeClusterProperties
public 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. -
matchTrack
public int matchTrack(org.jlab.io.base.DataEvent event) Matches 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.
-
makeStraightTrack
public void makeStraightTrack()Build a straight track from the vertex to this cluster. Sets the cluster path length and length through the atof from it. -
getDistanceStraightInATOF
public 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 vertexvy
- , the y coordinate of the vertexvz
- , the z coordinate of the vertex- Returns:
- the distance the straight track went through in the ATOF
-
getEdepWedge
public double getEdepWedge()Computes the energy deposited in the wedges.- Returns:
- the energy deposited in the wedges.
-
getEdepBar
public double getEdepBar()Computes the energy deposited in the bars.- Returns:
- the energy deposited in the bars.
-
getPhi
public double getPhi()Compute the cluster phi angle in radians.- Returns:
- a double that is angle in radians
-
getBeta
public 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
-
getMaxHit
Retrieve 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
-
getTot
public int getTot()Computes the sum of TOT in the cluster.- Returns:
- an int representing the summed TOT
-
getTdc
public int getTdc()Returns the TDC of the maximal hit in the cluster.- Returns:
- an int representing the TDC of the maximal hit.
-
getMaxWedgeHit
Computes 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
-