Belle II Software  release-08-01-10
CDCRecoHit3D Class Reference

Class representing a three dimensional reconstructed hit. More...

#include <CDCRecoHit3D.h>

Collaboration diagram for CDCRecoHit3D:

Public Member Functions

 CDCRecoHit3D ()=default
 Default constructor for ROOT.
 
 CDCRecoHit3D (const CDCRLWireHit &rlWireHit, const Vector3D &recoPos3D, double arcLength2D=0)
 Constructor taking all stored variables of the reconstructed hit.
 
void reverse ()
 Turns the orientation in place. More...
 
CDCRecoHit3D reversed () const
 Returns the recohit with the opposite right left information.
 
 operator const Belle2::CDCHit * () const
 Make the wire hit automatically castable to its underlying cdcHit.
 
bool operator== (const CDCRecoHit3D &other) const
 Equality comparision based on wire hit, right left passage information and reconstructed position.
 
bool operator< (const CDCRecoHit3D &other) const
 Total ordering relation based on wire hit, right left passage information and position information in this order of importance.
 
EStereoKind getStereoKind () const
 Getter for the stereo type of the underlying wire.
 
bool isAxial () const
 Indicator if the underlying wire is axial.
 
ISuperLayer getISuperLayer () const
 Getter for the superlayer id.
 
const CDCWiregetWire () const
 Getter for the wire.
 
bool isOnWire (const CDCWire &wire) const
 Checks if the reconstructed hit is assoziated with the give wire.
 
const CDCWireHitgetWireHit () const
 Getter for the wire hit.
 
bool hasWireHit (const CDCWireHit &wireHit) const
 Checks if the reconstructed hit is assoziated with the give wire hit.
 
const CDCRLWireHitgetRLWireHit () const
 Getter for the oriented wire hit.
 
void setRLWireHit (const CDCRLWireHit &rlWireHit)
 Setter for the oriented wire hit assoziated with the reconstructed hit.
 
ERightLeft getRLInfo () const
 Getter for the right left passage information. More...
 
void setRLInfo (ERightLeft rlInfo)
 Setter the right left passage information.
 
const Vector2DgetRefPos2D () const
 Getter for the reference position of the wire.
 
const Vector3DgetRecoPos3D () const
 Getter for the 3d position of the hit.
 
void setRecoPos3D (const Vector3D &recoPos3D)
 Setter for the 3d position of the hit.
 
const Vector2DgetRecoPos2D () const
 Getter for the 2d position of the hit.
 
double getRecoZ () const
 Getter for the z coordinate of the reconstructed position.
 
Vector2D getRecoDisp2D () const
 Gets the displacement from the wire position in the xy plain at the reconstructed position.
 
Vector2D getFlightDirection2D () const
 Getter for the direction of flight.
 
double getAlpha () const
 Getter for the direction of flight relative to the position.
 
CDCRecoHit2D getRecoHit2D () const
 Constructs a two dimensional reconstructed hit by carrying out the stereo ! projection to the wire reference postion.
 
CDCRecoHit2D stereoProjectToRef () const
 Constructs a two dimensional reconstructed hit by carrying out the stereo ! projection to the wire reference postion.
 
Vector2D getRecoWirePos2D () const
 Returns the position of the wire in the xy plain the reconstructed position is located in.
 
void snapToDriftCircle (bool switchSide=false)
 Scales the displacement vector in place to lie on the dirft circle.
 
double getSignedRecoDriftLength () const
 Returns the drift length next to the reconstructed position. More...
 
void setRecoDriftLength (double driftLength, bool snapRecoPos)
 Setter to update the drift length of the hit.
 
double getRecoDriftLengthVariance () const
 Returns the drift length variance next to the reconstructed position. More...
 
void shiftArcLength2D (double arcLength2DOffSet)
 Adjust the travel distance by the given value.
 
double getArcLength2D () const
 Getter for the travel distance in the xy projection.
 
void setArcLength2D (const double arcLength2D)
 Setter for the travel distance in the xy projection.
 
bool isInCellZBounds (const double factor=1) const
 Indicator if the hit is in the cdc (scaled by the factor) or already outside its boundaries. More...
 

Static Public Member Functions

static CDCRecoHit3D fromSimHit (const CDCWireHit *wireHit, const CDCSimHit &simHit)
 Constructs a three dimensional reconstructed hit from a sim hit and the assoziated wirehit. More...
 
static CDCRecoHit3D reconstruct (const CDCRecoHit2D &recoHit2D, const CDCTrajectory2D &trajectory2D)
 Reconstructs the three dimensional hit from the two dimensional and the two dimensional trajectory. More...
 
static CDCRecoHit3D reconstruct (const CDCRLWireHit &rlWireHit, const CDCTrajectory2D &trajectory2D)
 Reconstructs the three dimensional hit from the wire hit and the given right left passage information by shifting it to a z coordinate, where it touches the two dimensional trajectory from the side indicated by the right left passage.
 
static CDCRecoHit3D reconstruct (const CDCWireHit *wireHit, ERightLeft rlInfo, const CDCTrajectory2D &trajectory2D)
 Reconstructs the three dimensional hit from the wire hit and the given right left passage information by shifting it to a z coordinate, where it touches the two dimensional trajectory from the side indicated by the right left passage.
 
static CDCRecoHit3D reconstructNearest (const CDCWireHit *axialWireHit, const CDCTrajectory2D &trajectory2D)
 Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)), but this time use a wire hit without a right-left information as an input. More...
 
static CDCRecoHit3D reconstruct (const CDCRecoHit2D &recoHit, const CDCTrajectory3D &trajectory3D)
 Convenience function to call the other reconstruct method with the sz- and 2d-trajectory contained in the 3d one.
 
static CDCRecoHit3D reconstruct (const CDCRecoHit2D &recoHit2D, const CDCTrajectory2D &trajectory2D, const CDCTrajectorySZ &trajectorySZ)
 Deprecated - try to use the method above for the same purpose. More...
 
static CDCRecoHit3D average (const CDCRecoHit3D &first, const CDCRecoHit3D &second)
 Constructs the average of two reconstructed hit positions. More...
 

Private Attributes

CDCRLWireHit m_rlWireHit
 Memory for the oriented wire hit reference.
 
Vector3D m_recoPos3D
 Memory for the reconstructed hit position.
 
double m_arcLength2D = 0
 Memory for the travel distance as see in the xy projection.
 

Friends

bool operator< (const CDCRecoHit3D &recoHit3D, const CDCWire &wire)
 Defines wires and the three dimensional reconstructed hits as coaligned.
 
bool operator< (const CDCWire &wire, const CDCRecoHit3D &recoHit3D)
 Defines wires and the three dimensional reconstructed hits as coaligned.
 
bool operator< (const CDCRecoHit3D &recoHit3D, const CDCWireHit &wireHit)
 Defines wire hits and the three dimensional reconstructed hits as coaligned.
 
bool operator< (const CDCWireHit &wireHit, const CDCRecoHit3D &recoHit3D)
 Defines wire hits and the three dimensional reconstructed hits as coaligned.
 

Detailed Description

Class representing a three dimensional reconstructed hit.

A recohit represents a likely point where the particle went through. It is always assoziated with a wire hit it seeks to reconstruct. The reconstructed point is stored as an absolut position from the origin / interaction point. In addition the reconstructed hit takes a right left passage information which indicates if the hit wire lies to the right or to the left of the particle trajectory causing the hit. The later readily indicates a flight direction from the reconstructed hit, if a tangential approch of the trajectory to the drift circle is assumed.

Finally we want to estimate the travel distance to z coordinate relation of the particle trajectory. Therefore the three dimensional reconstructed hit stores the travel distance as seen from the xy projection ( arcLength2D ) it took to get to hit. This variable can be calculated from the trajectory circle fitted in the two dimensional tracking as the arc length.

Definition at line 52 of file CDCRecoHit3D.h.

Member Function Documentation

◆ average()

CDCRecoHit3D average ( const CDCRecoHit3D first,
const CDCRecoHit3D second 
)
static

Constructs the average of two reconstructed hit positions.

Averages the hit positions and the travel distance. The function averages only reconstructed hits assoziated with the same wire hit. If not all recostructed hits are on the same wire hit, the first hit is returned unchanged. Also averages the right left passage information with averageInfo().

Definition at line 139 of file CDCRecoHit3D.cc.

140 {
141  if (first.getRLWireHit() == second.getRLWireHit()) {
142  return CDCRecoHit3D(first.getRLWireHit(),
143  Vector3D::average(first.getRecoPos3D(), second.getRecoPos3D()),
144  (first.getArcLength2D() + second.getArcLength2D()) / 2);
145  } else {
146  B2ERROR("Averaging three dimensional hits which are on different oriented wire hits. Return "
147  "first one unchanged");
148  return first;
149  }
150 }
CDCRecoHit3D()=default
Default constructor for ROOT.
static Vector3D average(const Vector3D &one, const Vector3D &two)
Constructs the average of two vectors.
Definition: Vector3D.h:87

◆ fromSimHit()

CDCRecoHit3D fromSimHit ( const CDCWireHit wireHit,
const CDCSimHit simHit 
)
static

Constructs a three dimensional reconstructed hit from a sim hit and the assoziated wirehit.

This translates the sim hit to a reconstructed hit mainly to be able to compare the reconstructed values from the algorithm with the Monte Carlo information. It merely takes the position from the sim hit and calculates the right left passage information. Since only the time is present in the sim hit but not the travel distance this parameter is just set NAN!

Definition at line 46 of file CDCRecoHit3D.cc.

◆ getRecoDriftLengthVariance()

double getRecoDriftLengthVariance ( ) const
inline

Returns the drift length variance next to the reconstructed position.

Dummy implemented as the reference drift length.

Definition at line 358 of file CDCRecoHit3D.h.

359  {
361  }
double getRefDriftLengthVariance() const
Getter for the variance of the drift length at the reference position of the wire.
Definition: CDCRLWireHit.h:222
const CDCRLWireHit & getRLWireHit() const
Getter for the oriented wire hit.
Definition: CDCRecoHit3D.h:250

◆ getRLInfo()

ERightLeft getRLInfo ( ) const
inline

Getter for the right left passage information.

Returns the right left passage information as see in the xy projection. It gives if the wire lies on the right or on the left side of the track
as you at the xy projection.

Definition at line 267 of file CDCRecoHit3D.h.

◆ getSignedRecoDriftLength()

double getSignedRecoDriftLength ( ) const
inline

Returns the drift length next to the reconstructed position.

Dummy implemented as the reference drift length.

Definition at line 346 of file CDCRecoHit3D.h.

◆ isInCellZBounds()

bool isInCellZBounds ( const double  factor = 1) const

Indicator if the hit is in the cdc (scaled by the factor) or already outside its boundaries.

Checks for z to be in the range of the wire.

Definition at line 212 of file CDCRecoHit3D.cc.

◆ reconstruct() [1/2]

CDCRecoHit3D reconstruct ( const CDCRecoHit2D recoHit2D,
const CDCTrajectory2D trajectory2D 
)
static

Reconstructs the three dimensional hit from the two dimensional and the two dimensional trajectory.

For two dimensional reconstructed hits on axial wires this reconstructs the xy position and the transvers travel distance. The z coordinate cannot be determined since the projection can not show any information about it. It is always set to NAN for axial hits.

For two dimensional reconstructed hits on stereo wires however the deviation of the xy position can be used to get z information. The reconstucted hit lies exactly on the fitted trajectory as seen from the xy plane. Hence also xy position and transvers travel distance are available. Only the stereo hits have then the full information to go head and make the sz trajectory.

Definition at line 56 of file CDCRecoHit3D.cc.

◆ reconstruct() [2/2]

CDCRecoHit3D reconstruct ( const CDCRecoHit2D recoHit2D,
const CDCTrajectory2D trajectory2D,
const CDCTrajectorySZ trajectorySZ 
)
static

Deprecated - try to use the method above for the same purpose.

Reconstructs the three dimensional hit from the two dimensional, the two dimensional trajectory and sz trajectory. For two dimensional reconstructed hits on axial wires this reconstructs

the xy position and the transvers travel distance. The z coordinate is then determined by evaluating the sz trajectory at the just calculated travel distance. Note that it is important that both circle trajectory and sz trajectory share a common reference point.

For two dimensional reconstructed hits on stereo wires the transerse travel distance is obtained as in the reconstuct() method before. However the z coordinate is set to the value of the sz trajectory at just calculated the transvers travel distance, since the trajectory should be more exact than the shifting along the wire.

Definition at line 92 of file CDCRecoHit3D.cc.

◆ reconstructNearest()

CDCRecoHit3D reconstructNearest ( const CDCWireHit axialWireHit,
const CDCTrajectory2D trajectory2D 
)
static

Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)), but this time use a wire hit without a right-left information as an input.

The right-left information is chosen to be consistent with the reference position of the wire and the trajectory passed in to that function (by checking the sign of trackTrajectory2D.getDist2D(wireHit.getRefPos2D())).

This function is only sensible for axial hits (and asserts this).

Definition at line 130 of file CDCRecoHit3D.cc.

◆ reverse()

void reverse ( )

Turns the orientation in place.

Changes the sign of the right left passage information, since the position remains the same by this reversion.

Definition at line 162 of file CDCRecoHit3D.cc.


The documentation for this class was generated from the following files: