Package org.jlab.rec.dc.hit
Class FittedHit
java.lang.Object
org.jlab.rec.dc.hit.Hit
org.jlab.rec.dc.hit.FittedHit
- All Implemented Interfaces:
Comparable<Hit>
A hit that was used in a fitted cluster. It extends the Hit class and
contains local and sector coordinate information at the MidPlane. An estimate
for the Left-right Ambiguity is assigned based on the linear fit to the wire
position residual.
- Author:
- ziegler
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFittedHit
(int sector, int superlayer, int layer, int wire, int TDC, int jitter, int id) -
Method Summary
Modifier and TypeMethodDescriptionvoid
calc_GeomCorr
(DCGeant4Factory DcDetector, double y) double
calc_SignalPropagAlongWire
(double X, double Y, DCGeant4Factory DcDetector) double
calc_SignalPropagAlongWire
(DCGeant4Factory DcDetector) double
calcDeltaDocaBeta
(double doca, IndexedTable tab, double beta) double
calcDeltaTimeBetaTFCN
(double t, IndexedTable tab, double beta) clone()
int
double
corrForMidPlaneProjection
(double trkAngle, Line3D wireLine, FittedHit hit) void
fix_TimeToDistance
(double cellSize) int
int
int
double
get_Beta()
double
double
double
double
double
get_Doca()
int
get_Id()
int
double
get_lX()
double
get_lY()
boolean
double
get_PosErr
(DataEvent event, double B, IndexedTable constants0, IndexedTable constants1, TimeToDistanceEstimator tde) int
double
double
get_Time()
double
double
double
int
double
double
double
double
get_X()
double
double
get_Z()
double
getAlpha()
double
getB()
double
getCorrectedTime
(double t, double dbt) double
double
double
double
double
getT0()
double
double
getTProp()
double
boolean
void
set_AssociatedClusterID
(int _AssociatedClusterID) void
set_AssociatedHBTrackID
(int _id) void
set_AssociatedTBTrackID
(int _id) void
set_Beta
(double beta) void
set_ClusFitDoca
(double _ClusFitDoca) void
set_DeltaDocaBeta
(double deltadoca_beta) void
set_DeltaTimeBeta
(double deltatime_beta) void
set_Doca
(double _Doca) void
set_Id
(int _Id) Sets the hit ID.void
set_LeftRightAmb
(int leftRightAmb) final void
set_lX
(double layerValue) final void
set_lY
(int layer, int wire) void
set_OutOfTimeFlag
(boolean b) void
set_QualityFac
(int _QualityFac) void
set_Residual
(double _Residual) void
set_Time
(double _Time) Sets the timevoid
set_TimeResidual
(double _TimeResidual) void
set_TimeToDistance
(DataEvent event, double trkAngle, double B, IndexedTable tab, TimeToDistanceEstimator tde) sets the calculated distance (in cm) from the time (in ns)void
set_TrkFitDoca
(double _TrkFitDoca) void
set_TrkgStatus
(int trkgStatus) void
set_TrkResid
(double _TrkResid) void
set_WireLength
(double _WireLength) void
set_WireLine
(Line3D _WireLine) void
set_WireMaxSag
(double _WireMaxSag) void
set_X
(double _X) void
set_XWire
(double _XMP) void
set_Z
(double _Z) void
setAlpha
(double _alpha) void
setAssociatedStateVec
(StateVec _AssociatedStateVec) void
setB
(double _B) void
setCrossDirIntersWire
(Point3D CrossDirIntersWire) void
setDAFWeight
(double weight) void
setSignalPropagAlongWire
(DCGeant4Factory DcDetector) void
setSignalPropagTimeAlongWire
(double X, double Y, DCGeant4Factory DcDetector) void
setSignalPropagTimeAlongWire
(DCGeant4Factory DcDetector) void
sets signal time of flight to the track doca to the hit wire in nsvoid
setT0
(double T0) void
setTFlight
(double tFlight) void
setTProp
(double tProp) void
setTStart
(double tStart) void
updateHitfromSV
(StateVec st, DCGeant4Factory DcDetector) void
updateHitPosition
(DCGeant4Factory DcDetector) A method to update the hit position information after the fit to the local coord.sys.wire positionsvoid
updateHitPositionWithTime
(DataEvent event, double trkAngle, double B, IndexedTable tab, DCGeant4Factory DcDetector, TimeToDistanceEstimator tde) A method to update the hit position information after the fit to the wire positions employing hit-based tracking algorithms has been performed.Methods inherited from class org.jlab.rec.dc.hit.Hit
calc_CellSize, calcLocY, compareTo, get_CellSize, get_DocaErr, get_IndexTDC, get_Layer, get_Region, get_RegionSlayer, get_Sector, get_Superlayer, get_TDC, get_Wire, getJitter, set_CellSize, set_DocaErr, set_IndexTDC, set_Layer, set_Sector, set_Superlayer, set_TDC, set_Wire
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
_lr
public int _lr -
RemoveFlag
public boolean RemoveFlag -
betaFlag
public int betaFlag
-
-
Constructor Details
-
FittedHit
public FittedHit(int sector, int superlayer, int layer, int wire, int TDC, int jitter, int id) - Parameters:
sector
- (1...6)superlayer
- (1...6)layer
- (1...6)wire
- (1...112)TDC
-id
-
-
-
Method Details
-
getB
public double getB()- Returns:
- B at location along wire
-
setB
public void setB(double _B) - Parameters:
_B
- B field intensity in T
-
get_Id
public int get_Id() -
set_Id
public void set_Id(int _Id) Sets the hit ID. The ID corresponds to the hit index in the EvIO column. -
get_Doca
public double get_Doca()- Returns:
- calc doca in cm
-
set_Doca
public void set_Doca(double _Doca) - Parameters:
_Doca
- doca in cm
-
get_lX
public double get_lX()- Returns:
- the local hit x-position in the local superlayer coordinate system; used in cluster-finding algo. to fit the hit-based wire positions
-
set_lX
public final void set_lX(double layerValue) - Parameters:
layerValue
- layer number from 1 to 6
-
get_lY
public double get_lY()- Returns:
- the local hit y-position in the local superlayer coordinate system; used in cluster-finding algo. to fit the hit-based wire positions
-
set_lY
public final void set_lY(int layer, int wire) - Parameters:
layer
- layer number from 1 to 6wire
- wire number from 1 to 112 sets the center of the cell as a function of wire number in the local superlayer coordinate system.
-
get_PosErr
public double get_PosErr(DataEvent event, double B, IndexedTable constants0, IndexedTable constants1, TimeToDistanceEstimator tde) - Parameters:
event
-B
-constants0
-constants1
-tde
-- Returns:
- The approximate uncertainty on the hit position using the inverse of the gemc smearing function
-
get_TimeResidual
public double get_TimeResidual()- Returns:
- the time residual |trkDoca| - |Doca| from the fit to the wire positions in the superlayer
-
set_TimeResidual
public void set_TimeResidual(double _TimeResidual) - Parameters:
_TimeResidual
- the residual |fit| - |y| from the fit to the hit positions in the superlayer
-
get_Residual
public double get_Residual()- Returns:
- the residual from the fit to the wire positions in the superlayer
-
set_Residual
public void set_Residual(double _Residual) - Parameters:
_Residual
- the residual from the fit to the hit positions in the superlayer
-
get_LeftRightAmb
public int get_LeftRightAmb()- Returns:
- an integer representative of the estimate of the left-right ambiguity obtained from pattern recognition. -1(+1): the track went to the left(right) of the wire; 0: the left-right ambiguity could not be resolved.
-
set_LeftRightAmb
public void set_LeftRightAmb(int leftRightAmb) - Parameters:
leftRightAmb
- an integer representative of the estimate of the left-right ambiguity obtained from pattern recognition. -1(+1): the track went to the left(right) of the wire; 0: the left-right ambiguity could not be resolved.
-
get_QualityFac
public int get_QualityFac()- Returns:
- a quality factor representative of the quality of the fit to the hit
-
set_QualityFac
public void set_QualityFac(int _QualityFac) - Parameters:
_QualityFac
- is a quality factor representative of the quality of the fit to the hit
-
get_TrkgStatus
public int get_TrkgStatus()- Returns:
- an integer representative of the stage of the pattern recognition and subsequent KF fit for that hit. -1: the hit has not yet been fit and is the input of hit-based tracking; 0: the hit has been successfully involved in hit-based tracking and has a well-defined time-to-distance value; 1: the hit has been successfully involved in track fitting.
-
set_TrkgStatus
public void set_TrkgStatus(int trkgStatus) - Parameters:
trkgStatus
- is an integer representative of the stage of the pattern recognition and subsequent KF fit for that hit. -1: the hit has not yet been fit and is the input of hit-based tracking; 0: the hit has been successfully involved in hit-based tracking and has a well-defined time-to-distance value; 1: the hit has been successfully involved in track fitting.
-
get_TimeToDistance
public double get_TimeToDistance()- Returns:
- the calculated distance (in cm) from the time (in ns)
-
getAssociatedStateVec
- Returns:
- state vector associated with the hit
-
setAssociatedStateVec
- Parameters:
_AssociatedStateVec
- state vector (x,y,tx,ty,q/p) associated with the hit
-
set_TimeToDistance
public void set_TimeToDistance(DataEvent event, double trkAngle, double B, IndexedTable tab, TimeToDistanceEstimator tde) sets the calculated distance (in cm) from the time (in ns)- Parameters:
event
-trkAngle
-B
-tab
-tde
-
-
getCorrectedTime
public double getCorrectedTime(double t, double dbt) -
calcDeltaDocaBeta
-
calcDeltaTimeBetaTFCN
-
get_ClusFitDoca
public double get_ClusFitDoca()- Returns:
- doca to cluster fit line (cm)
-
set_ClusFitDoca
public void set_ClusFitDoca(double _ClusFitDoca) - Parameters:
_ClusFitDoca
- doca to cluster fit line (cm)
-
get_TrkFitDoca
public double get_TrkFitDoca()- Returns:
- doca to track trajectory at hit layer plane (cm)
-
set_TrkFitDoca
public void set_TrkFitDoca(double _TrkFitDoca) - Parameters:
_TrkFitDoca
- doca to track trajectory at hit layer plane (cm)
-
fix_TimeToDistance
public void fix_TimeToDistance(double cellSize) - Parameters:
cellSize
- the cell size in cm
-
get_X
public double get_X()- Returns:
- the hit x-position at the mid-plane (y=0) in the tilted sector coordinate system
-
set_X
public void set_X(double _X) - Parameters:
_X
- is the hit x-position at the mid-plane (y=0) in the tilted sector coordinate system
-
get_XWire
public double get_XWire() -
set_XWire
public void set_XWire(double _XMP) -
get_Z
public double get_Z()- Returns:
- the hit z-position at the mid-plane (y=0) in the tilted sector coordinate system
-
set_Z
public void set_Z(double _Z) - Parameters:
_Z
- is the hit z-position at the mid-plane (y=0) in the tilted sector coordinate system
-
updateHitPosition
A method to update the hit position information after the fit to the local coord.sys.wire positions- Parameters:
DcDetector
-
-
updateHitPositionWithTime
public void updateHitPositionWithTime(DataEvent event, double trkAngle, double B, IndexedTable tab, DCGeant4Factory DcDetector, TimeToDistanceEstimator tde) A method to update the hit position information after the fit to the wire positions employing hit-based tracking algorithms has been performed.- Parameters:
event
-trkAngle
-B
-tab
-DcDetector
-tde
-
-
corrForMidPlaneProjection
-
get_WireLength
public double get_WireLength() -
set_WireLength
public void set_WireLength(double _WireLength) -
get_WireMaxSag
public double get_WireMaxSag() -
set_WireMaxSag
public void set_WireMaxSag(double _WireMaxSag) -
get_WireLine
-
set_WireLine
-
get_TrkResid
public double get_TrkResid() -
set_TrkResid
public void set_TrkResid(double _TrkResid) -
calc_GeomCorr
-
isSameAs
- Parameters:
otherHit
-- Returns:
- a boolean comparing 2 hits based on basic descriptors; returns true if the hits are the same
-
compareTo
- Parameters:
arg0
- the other hit- Returns:
- an int used to sort a collection of hits by layer number
-
printInfo
-
get_AssociatedClusterID
public int get_AssociatedClusterID()- Returns:
- cluster ID associated with the hit
-
set_AssociatedClusterID
public void set_AssociatedClusterID(int _AssociatedClusterID) - Parameters:
_AssociatedClusterID
- associated cluster ID
-
set_AssociatedHBTrackID
public void set_AssociatedHBTrackID(int _id) - Parameters:
_id
- associated track id for Hit-Based tracking
-
get_AssociatedHBTrackID
public int get_AssociatedHBTrackID()- Returns:
- track id associated with the hit for Hit-Based tracking
-
set_AssociatedTBTrackID
public void set_AssociatedTBTrackID(int _id) - Parameters:
_id
- associated track id for Time-Based tracking
-
get_AssociatedTBTrackID
public int get_AssociatedTBTrackID()- Returns:
- track id associated with the hit for Time-Based tracking
-
getCrossDirIntersWire
- Returns:
-
setCrossDirIntersWire
-
get_Beta
public double get_Beta()- Returns:
- beta of track at the hit location
-
set_Beta
public void set_Beta(double beta) - Parameters:
beta
- beta of the track at the hit location (position of the track closest to the wire)
-
calc_SignalPropagAlongWire
- Parameters:
DcDetector
- detector geometry- Returns:
- signal propagation time along the wire in ns
-
calc_SignalPropagAlongWire
-
getSignalPropagAlongWire
public double getSignalPropagAlongWire()- Returns:
- signal propagation time along the wire in ns
-
setSignalPropagAlongWire
- Parameters:
DcDetector
- DC detector geometry
-
getSignalPropagTimeAlongWire
public double getSignalPropagTimeAlongWire()- Returns:
- signal propagation time along the wire in ns
-
setSignalPropagTimeAlongWire
- Parameters:
DcDetector
- DC detector geometry
-
setSignalPropagTimeAlongWire
- Parameters:
X
-Y
-DcDetector
- DC detector geometry
-
getSignalTimeOfFlight
public double getSignalTimeOfFlight()- Returns:
- signal time of flight to the track doca to the hit wire in ns
-
setSignalTimeOfFlight
public void setSignalTimeOfFlight()sets signal time of flight to the track doca to the hit wire in ns -
getTStart
public double getTStart()- Returns:
- start time from EB bank (ns)
-
setTStart
public void setTStart(double tStart) - Parameters:
tStart
- start time in ns
-
getT0
public double getT0()- Returns:
- T0 calibration constant in ns
-
setT0
public void setT0(double T0) - Parameters:
T0
- calibration constant in ns
-
getTFlight
public double getTFlight()- Returns:
- Flight time to the track's closest point to the hit wire in ns
-
setTFlight
public void setTFlight(double tFlight) - Parameters:
tFlight
- Flight time to the track's closest point to the hit wire in ns
-
getTProp
public double getTProp()- Returns:
- propagation time along the wire in ns
-
setTProp
public void setTProp(double tProp) - Parameters:
tProp
- propagation time along the wire in ns
-
get_Time
public double get_Time()- Returns:
- the time in ns
-
set_Time
public void set_Time(double _Time) Sets the time- Parameters:
_Time
-
-
set_OutOfTimeFlag
public void set_OutOfTimeFlag(boolean b) - Parameters:
b
- boolean to flag out-of-time hits
-
get_OutOfTimeFlag
public boolean get_OutOfTimeFlag()- Returns:
- boolean to flag out-of-time hits
-
set_DeltaTimeBeta
public void set_DeltaTimeBeta(double deltatime_beta) -
get_DeltaTimeBeta
public double get_DeltaTimeBeta() -
set_DeltaDocaBeta
public void set_DeltaDocaBeta(double deltadoca_beta) -
get_DeltaDocaBeta
public double get_DeltaDocaBeta() -
getAlpha
public double getAlpha()- Returns:
- the _alpha
-
setAlpha
public void setAlpha(double _alpha) - Parameters:
_alpha
- the _alpha to set
-
get_Beta0to1
public double get_Beta0to1()- Returns:
- a value <=1 resetting beta to 1 for overflows
-
getDAFWeight
public double getDAFWeight()- Returns:
- _DAFWeight
-
setDAFWeight
public void setDAFWeight(double weight) - Parameters:
weight
- the _DAFWeight to set
-
updateHitfromSV
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-