Belle II Software development
|
Class representing a three dimensional reconstructed hit. More...
#include <CDCRecoHit3D.h>
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. | |
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 comparison 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 CDCWire & | getWire () const |
Getter for the wire. | |
bool | isOnWire (const CDCWire &wire) const |
Checks if the reconstructed hit is associated with the give wire. | |
const CDCWireHit & | getWireHit () const |
Getter for the wire hit. | |
bool | hasWireHit (const CDCWireHit &wireHit) const |
Checks if the reconstructed hit is associated with the give wire hit. | |
const CDCRLWireHit & | getRLWireHit () const |
Getter for the oriented wire hit. | |
void | setRLWireHit (const CDCRLWireHit &rlWireHit) |
Setter for the oriented wire hit associated with the reconstructed hit. | |
ERightLeft | getRLInfo () const |
Getter for the right left passage information. | |
void | setRLInfo (ERightLeft rlInfo) |
Setter the right left passage information. | |
const Vector2D & | getRefPos2D () const |
Getter for the reference position of the wire. | |
const Vector3D & | getRecoPos3D () const |
Getter for the 3d position of the hit. | |
void | setRecoPos3D (const Vector3D &recoPos3D) |
Setter for the 3d position of the hit. | |
const Vector2D & | getRecoPos2D () 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 position. | |
CDCRecoHit2D | stereoProjectToRef () const |
Constructs a two dimensional reconstructed hit by carrying out the stereo ! projection to the wire reference position. | |
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 drift circle. | |
double | getSignedRecoDriftLength () const |
Returns the drift length next to the reconstructed position. | |
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. | |
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. | |
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 associated wirehit. | |
static CDCRecoHit3D | reconstruct (const CDCRecoHit2D &recoHit2D, const CDCTrajectory2D &trajectory2D) |
Reconstructs the three dimensional hit from the two dimensional and the two dimensional trajectory. | |
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. | |
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. | |
static CDCRecoHit3D | average (const CDCRecoHit3D &first, const CDCRecoHit3D &second) |
Constructs the average of two reconstructed hit positions. | |
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. | |
Class representing a three dimensional reconstructed hit.
A recohit represents a likely point where the particle went through. It is always associated with a wire hit it seeks to reconstruct. The reconstructed point is stored as an absolute 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 approach 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.
CDCRecoHit3D | ( | const CDCRLWireHit & | rlWireHit, |
const Vector3D & | recoPos3D, | ||
double | arcLength2D = 0 |
||
) |
Constructor taking all stored variables of the reconstructed hit.
Definition at line 37 of file CDCRecoHit3D.cc.
|
static |
Constructs the average of two reconstructed hit positions.
Averages the hit positions and the travel distance. The function averages only reconstructed hits associated with the same wire hit. If not all reconstructed 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.
|
static |
Constructs a three dimensional reconstructed hit from a sim hit and the associated 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.
|
inline |
Getter for the direction of flight relative to the position.
Definition at line 319 of file CDCRecoHit3D.h.
|
inline |
Getter for the travel distance in the xy projection.
Definition at line 370 of file CDCRecoHit3D.h.
|
inline |
Getter for the direction of flight.
Definition at line 312 of file CDCRecoHit3D.h.
|
inline |
Getter for the superlayer id.
Definition at line 220 of file CDCRecoHit3D.h.
Vector2D getRecoDisp2D | ( | ) | const |
Gets the displacement from the wire position in the xy plain at the reconstructed position.
Definition at line 152 of file CDCRecoHit3D.cc.
|
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.
CDCRecoHit2D getRecoHit2D | ( | ) | const |
Constructs a two dimensional reconstructed hit by carrying out the stereo ! projection to the wire reference position.
Definition at line 197 of file CDCRecoHit3D.cc.
|
inline |
Getter for the 2d position of the hit.
Definition at line 297 of file CDCRecoHit3D.h.
|
inline |
Getter for the 3d position of the hit.
Definition at line 285 of file CDCRecoHit3D.h.
Vector2D getRecoWirePos2D | ( | ) | const |
Returns the position of the wire in the xy plain the reconstructed position is located in.
Definition at line 207 of file CDCRecoHit3D.cc.
|
inline |
Getter for the z coordinate of the reconstructed position.
Definition at line 303 of file CDCRecoHit3D.h.
|
inline |
Getter for the reference position of the wire.
Definition at line 279 of file CDCRecoHit3D.h.
|
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.
|
inline |
Getter for the oriented wire hit.
Definition at line 250 of file CDCRecoHit3D.h.
|
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.
|
inline |
Getter for the stereo type of the underlying wire.
Definition at line 208 of file CDCRecoHit3D.h.
|
inline |
Getter for the wire.
Definition at line 226 of file CDCRecoHit3D.h.
|
inline |
Getter for the wire hit.
Definition at line 238 of file CDCRecoHit3D.h.
|
inline |
Checks if the reconstructed hit is associated with the give wire hit.
Definition at line 244 of file CDCRecoHit3D.h.
|
inline |
Indicator if the underlying wire is axial.
Definition at line 214 of file CDCRecoHit3D.h.
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.
|
inline |
Checks if the reconstructed hit is associated with the give wire.
Definition at line 232 of file CDCRecoHit3D.h.
|
inline |
Make the wire hit automatically castable to its underlying cdcHit.
Definition at line 159 of file CDCRecoHit3D.h.
|
inline |
Total ordering relation based on wire hit, right left passage information and position information in this order of importance.
Definition at line 176 of file CDCRecoHit3D.h.
|
inline |
Equality comparison based on wire hit, right left passage information and reconstructed position.
Definition at line 165 of file CDCRecoHit3D.h.
|
static |
Convenience function to call the other reconstruct method with the sz- and 2d-trajectory contained in the 3d one.
Definition at line 82 of file CDCRecoHit3D.cc.
|
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 transverse 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 reconstructed hit lies exactly on the fitted trajectory as seen from the xy plane. Hence also xy position and transverse 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.
|
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 transverse 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 transverse travel distance is obtained as in the reconstruct() method before. However the z coordinate is set to the value of the sz trajectory at just calculated the transverse travel distance, since the trajectory should be more exact than the shifting along the wire.
Definition at line 92 of file CDCRecoHit3D.cc.
|
static |
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.
Definition at line 74 of file CDCRecoHit3D.cc.
|
static |
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.
Definition at line 64 of file CDCRecoHit3D.cc.
|
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.
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.
CDCRecoHit3D reversed | ( | ) | const |
Returns the recohit with the opposite right left information.
Definition at line 167 of file CDCRecoHit3D.cc.
|
inline |
Setter for the travel distance in the xy projection.
Definition at line 376 of file CDCRecoHit3D.h.
void setRecoDriftLength | ( | double | driftLength, |
bool | snapRecoPos | ||
) |
Setter to update the drift length of the hit.
Definition at line 187 of file CDCRecoHit3D.cc.
|
inline |
Setter for the 3d position of the hit.
Definition at line 291 of file CDCRecoHit3D.h.
|
inline |
Setter the right left passage information.
Definition at line 273 of file CDCRecoHit3D.h.
|
inline |
Setter for the oriented wire hit associated with the reconstructed hit.
Definition at line 256 of file CDCRecoHit3D.h.
|
inline |
Adjust the travel distance by the given value.
Definition at line 364 of file CDCRecoHit3D.h.
void snapToDriftCircle | ( | bool | switchSide = false | ) |
Scales the displacement vector in place to lie on the drift circle.
Definition at line 172 of file CDCRecoHit3D.cc.
CDCRecoHit2D stereoProjectToRef | ( | ) | const |
Constructs a two dimensional reconstructed hit by carrying out the stereo ! projection to the wire reference position.
Definition at line 202 of file CDCRecoHit3D.cc.
|
friend |
Defines wires and the three dimensional reconstructed hits as coaligned.
Definition at line 184 of file CDCRecoHit3D.h.
|
friend |
Defines wire hits and the three dimensional reconstructed hits as coaligned.
Definition at line 196 of file CDCRecoHit3D.h.
|
friend |
Defines wires and the three dimensional reconstructed hits as coaligned.
Definition at line 190 of file CDCRecoHit3D.h.
|
friend |
Defines wire hits and the three dimensional reconstructed hits as coaligned.
Definition at line 202 of file CDCRecoHit3D.h.
|
private |
Memory for the travel distance as see in the xy projection.
Definition at line 395 of file CDCRecoHit3D.h.
|
private |
Memory for the reconstructed hit position.
Definition at line 392 of file CDCRecoHit3D.h.
|
private |
Memory for the oriented wire hit reference.
Definition at line 389 of file CDCRecoHit3D.h.