Belle II Software development
|
Class serving as a storage of observed drift circles to present to the Riemann fitter. More...
#include <CDCObservations2D.h>
Public Member Functions | |
CDCObservations2D (EFitPos fitPos=EFitPos::c_RecoPos, EFitVariance fitVariance=EFitVariance::c_Proper) | |
Constructor taking the flag if the reconstructed position of the hits should be used when they are available The default is to use the wire position and the drift length signed by the right left passage hypotheses. | |
std::size_t | size () const |
Returns the number of observations stored. | |
double * | data () |
Return the pointer to the number buffer. | |
bool | empty () const |
Returns true if there are no observations stored. | |
void | clear () |
Removes all observations stored. | |
void | reserve (std::size_t nObservations) |
Reserves enough space for nObservations. | |
double | getX (int iObservation) const |
Getter for the x value of the observation at the given index. | |
double | getY (int iObservation) const |
Getter for the y value of the observation at the given index. | |
double | getDriftLength (int iObservation) const |
Getter for the signed drift radius of the observation at the given index. | |
double | getWeight (int iObservation) const |
Getter for the weight / inverse variance of the observation at the given index. | |
std::size_t | fill (double x, double y, double signedRadius=0.0, double weight=1.0) |
Appends the observed position. | |
std::size_t | fill (const Vector2D &pos2D, double signedRadius=0.0, double weight=1.0) |
Appends the observed position. | |
std::size_t | append (const CDCWireHit &wireHit, ERightLeft rlInfo=ERightLeft::c_Unknown) |
Appends the hit circle at wire reference position without a right left passage hypotheses. | |
std::size_t | append (const CDCWireHit *wireHit, ERightLeft rlInfo=ERightLeft::c_Unknown) |
Appends the position information of the given wire hit to the stored observations. | |
std::size_t | append (const CDCRLWireHit &rlWireHit) |
Appends the hit circle at wire reference position with a right left passage hypotheses. | |
std::size_t | append (const CDCRLWireHitPair &rlWireHitPair) |
Appends the two observed position. | |
std::size_t | append (const CDCRLWireHitTriple &rlWireHitTriple) |
Appends the three observed position. | |
std::size_t | append (const CDCFacet &facet) |
Appends the three observed position. | |
std::size_t | append (const CDCRecoHit2D &recoHit2D) |
Appends the hit using the reconstructed position if useRecoPos indicates it. | |
std::size_t | append (const CDCRecoHit3D &recoHit3D) |
Appends the observed position. | |
std::size_t | appendRange (const CDCSegment2D &segment2D) |
Appends all reconstructed hits from the two dimensional segment. | |
std::size_t | appendRange (const CDCSegment3D &segment3D) |
Appends all reconstructed hits from the three dimensional segment. | |
std::size_t | appendRange (const CDCAxialSegmentPair &axialSegmentPair) |
Appends all reconstructed hits from the two axial segments,. | |
std::size_t | appendRange (const CDCTrack &track) |
Appends all reconstructed hits from the three dimensional track. | |
std::size_t | appendRange (const std::vector< const CDCWire * > &wires) |
Appends all the reference wire positions. | |
std::size_t | appendRange (const CDCWireHitSegment &wireHits) |
Appends all the wire hit reference positions with the pseudo variance. | |
template<class ARange > | |
std::size_t | appendRange (const ARange &range) |
Append all hits from a generic range. | |
Vector2D | getFrontPos2D () const |
Get the position of the first observation. | |
Vector2D | getBackPos2D () const |
Get the position of the first observation. | |
double | getTotalPerpS (const CDCTrajectory2D &trajectory2D) const |
Calculate the total transverse travel distance traversed by these observations comparing the travel distance of first and last position. | |
bool | isForwardTrajectory (const CDCTrajectory2D &trajectory2D) const |
Checks if the last position of these observations lies at greater travel distance than the first. | |
EForwardBackward | isCoaligned (const CDCTrajectory2D &trajectory2D) const |
Checks if the last observation in the vector lies at greater or lower travel distance than the last observation. | |
Vector2D | getCentralPoint () const |
Extracts the observation center that is at the index in the middle. | |
void | passiveMoveBy (const Vector2D &origin) |
Moves all observations passively such that the given vector becomes to origin of the new coordinate system. | |
Vector2D | centralize () |
Picks one observation as a reference point and transform all observations to that new origin. | |
std::size_t | getNObservationsWithDriftRadius () const |
Returns the number of observations having a drift radius radius. | |
EFitPos | getFitPos () const |
Getter for the indicator that the reconstructed position should be favoured. | |
void | setFitPos (EFitPos fitPos) |
Setter for the indicator that the reconstructed position should be favoured. | |
void | setFitVariance (EFitVariance fitVariance) |
Setter for the indicator that the drift variance should be used. | |
Static Public Member Functions | |
static double | getPseudoDriftLengthVariance (double driftLength, double driftLengthVariance) |
Gets the pseudo variance. | |
static double | getPseudoDriftLengthVariance (const CDCWireHit &wireHit) |
Calculate the pseudo variance from the drift length and its variance. | |
Private Attributes | |
std::vector< double > | m_observations |
Memory for the individual observations. | |
EFitPos | m_fitPos |
Indicator which positional information should preferably be extracted from hits in calls to append. | |
EFitVariance | m_fitVariance |
Indicator which variance information should preferably be extracted from hits in calls to append. | |
Class serving as a storage of observed drift circles to present to the Riemann fitter.
Definition at line 43 of file CDCObservations2D.h.
|
inlineexplicit |
Constructor taking the flag if the reconstructed position of the hits should be used when they are available The default is to use the wire position and the drift length signed by the right left passage hypotheses.
Definition at line 50 of file CDCObservations2D.h.
std::size_t append | ( | const CDCFacet & | facet | ) |
Appends the three observed position.
Definition at line 154 of file CDCObservations2D.cc.
std::size_t append | ( | const CDCRecoHit2D & | recoHit2D | ) |
Appends the hit using the reconstructed position if useRecoPos indicates it.
Definition at line 165 of file CDCObservations2D.cc.
std::size_t append | ( | const CDCRecoHit3D & | recoHit3D | ) |
Appends the observed position.
Definition at line 206 of file CDCObservations2D.cc.
std::size_t append | ( | const CDCRLWireHit & | rlWireHit | ) |
Appends the hit circle at wire reference position with a right left passage hypotheses.
rlWireHit | Hit information to be appended as observation. XY position, signed drift length and inverse variance are taken at the wire reference position. |
Definition at line 107 of file CDCObservations2D.cc.
std::size_t append | ( | const CDCRLWireHitPair & | rlWireHitPair | ) |
Appends the two observed position.
Definition at line 143 of file CDCObservations2D.cc.
std::size_t append | ( | const CDCRLWireHitTriple & | rlWireHitTriple | ) |
Appends the three observed position.
Definition at line 148 of file CDCObservations2D.cc.
std::size_t append | ( | const CDCWireHit & | wireHit, |
ERightLeft | rlInfo = ERightLeft::c_Unknown |
||
) |
Appends the hit circle at wire reference position without a right left passage hypotheses.
wireHit | Hit information to be appended as observation. XY position, drift length and inverse variance are taken at the wire reference position. |
rlInfo | Right left passage information with which the drift length should be signed. |
Definition at line 67 of file CDCObservations2D.cc.
std::size_t append | ( | const CDCWireHit * | wireHit, |
ERightLeft | rlInfo = ERightLeft::c_Unknown |
||
) |
Appends the position information of the given wire hit to the stored observations.
Optionally includes the drift length with the given right left orientation
wireHit | Hit information to be appended as observation. |
rlInfo | Right left passage information with which the drift length should be signed. |
Definition at line 98 of file CDCObservations2D.cc.
|
inline |
Append all hits from a generic range.
Definition at line 252 of file CDCObservations2D.h.
std::size_t appendRange | ( | const CDCAxialSegmentPair & | axialSegmentPair | ) |
Appends all reconstructed hits from the two axial segments,.
Definition at line 258 of file CDCObservations2D.cc.
std::size_t appendRange | ( | const CDCSegment2D & | segment2D | ) |
Appends all reconstructed hits from the two dimensional segment.
Definition at line 240 of file CDCObservations2D.cc.
std::size_t appendRange | ( | const CDCSegment3D & | segment3D | ) |
Appends all reconstructed hits from the three dimensional segment.
Definition at line 249 of file CDCObservations2D.cc.
std::size_t appendRange | ( | const CDCTrack & | track | ) |
Appends all reconstructed hits from the three dimensional track.
Definition at line 275 of file CDCObservations2D.cc.
std::size_t appendRange | ( | const CDCWireHitSegment & | wireHits | ) |
Appends all the wire hit reference positions with the pseudo variance.
Definition at line 298 of file CDCObservations2D.cc.
std::size_t appendRange | ( | const std::vector< const CDCWire * > & | wires | ) |
Appends all the reference wire positions.
Definition at line 284 of file CDCObservations2D.cc.
Vector2D centralize | ( | ) |
Picks one observation as a reference point and transform all observations to that new origin.
Definition at line 352 of file CDCObservations2D.cc.
|
inline |
Removes all observations stored.
Definition at line 96 of file CDCObservations2D.h.
|
inline |
Return the pointer to the number buffer.
Definition at line 84 of file CDCObservations2D.h.
|
inline |
Returns true if there are no observations stored.
Definition at line 90 of file CDCObservations2D.h.
std::size_t fill | ( | const Vector2D & | pos2D, |
double | signedRadius = 0.0 , |
||
double | weight = 1.0 |
||
) |
Appends the observed position.
pos2D | X, Y coordinate of the center of the observed circle. |
signedRadius | The radius of the observed circle signed with right left passage hypotheses. Defaults to 0. |
weight | The relative weight of the observation. In order to generate a unit less chi^2 measure the weight should be chosen as the inverse variance of the drift length. Defaults to 1. |
Definition at line 62 of file CDCObservations2D.cc.
std::size_t fill | ( | double | x, |
double | y, | ||
double | signedRadius = 0.0 , |
||
double | weight = 1.0 |
||
) |
Appends the observed position.
x | X coordinate of the center of the observed circle. |
y | Y coordinate of the center of the observed circle. |
signedRadius | The radius of the observed circle signed with right left passage hypotheses. Defaults to 0. |
weight | The relative weight of the observation. In order to generate a unit less chi^2 measure the weight should be chosen as the inverse variance of the drift length. Defaults to 1. |
Definition at line 39 of file CDCObservations2D.cc.
|
inline |
Get the position of the first observation.
Definition at line 270 of file CDCObservations2D.h.
Vector2D getCentralPoint | ( | ) | const |
Extracts the observation center that is at the index in the middle.
Definition at line 328 of file CDCObservations2D.cc.
|
inline |
Getter for the signed drift radius of the observation at the given index.
Definition at line 120 of file CDCObservations2D.h.
|
inline |
Getter for the indicator that the reconstructed position should be favoured.
Definition at line 314 of file CDCObservations2D.h.
|
inline |
std::size_t getNObservationsWithDriftRadius | ( | ) | const |
Returns the number of observations having a drift radius radius.
Definition at line 314 of file CDCObservations2D.cc.
|
static |
Calculate the pseudo variance from the drift length and its variance.
Definition at line 32 of file CDCObservations2D.cc.
|
inlinestatic |
Gets the pseudo variance.
The pseudo drift length variance is a measure that tries to incorporate the drift length into the fit to drift circles where the right left passage ambiguity could not be resolved. In such situations only the position of an hit can be used, however if only the position that can be determined is the wire position the information of the drift length should at least weaken the gravity of that wire in relation to the fitted trajectory. The pseudo variance is therefore the square of the drift length itself (square for unit conformity) plus its reference drift length variance.
Definition at line 68 of file CDCObservations2D.h.
double getTotalPerpS | ( | const CDCTrajectory2D & | trajectory2D | ) | const |
Calculate the total transverse travel distance traversed by these observations comparing the travel distance of first and last position.
Definition at line 309 of file CDCObservations2D.cc.
|
inline |
Getter for the weight / inverse variance of the observation at the given index.
Definition at line 126 of file CDCObservations2D.h.
|
inline |
Getter for the x value of the observation at the given index.
Definition at line 108 of file CDCObservations2D.h.
|
inline |
Getter for the y value of the observation at the given index.
Definition at line 114 of file CDCObservations2D.h.
|
inline |
Checks if the last observation in the vector lies at greater or lower travel distance than the last observation.
EForwardBackward::c_Forward | if the last observation lies behind the first. |
EForwardBackward::c_Backward | if the last observation lies before the first. |
Definition at line 295 of file CDCObservations2D.h.
|
inline |
Checks if the last position of these observations lies at greater travel distance than the first.
Definition at line 285 of file CDCObservations2D.h.
void passiveMoveBy | ( | const Vector2D & | origin | ) |
Moves all observations passively such that the given vector becomes to origin of the new coordinate system.
Definition at line 345 of file CDCObservations2D.cc.
|
inline |
Reserves enough space for nObservations.
Definition at line 102 of file CDCObservations2D.h.
|
inline |
Setter for the indicator that the reconstructed position should be favoured.
Definition at line 320 of file CDCObservations2D.h.
|
inline |
Setter for the indicator that the drift variance should be used.
Definition at line 326 of file CDCObservations2D.h.
|
inline |
Returns the number of observations stored.
Definition at line 78 of file CDCObservations2D.h.
|
private |
Indicator which positional information should preferably be extracted from hits in calls to append.
Meaning of the constants detailed in EFitPos.
Definition at line 343 of file CDCObservations2D.h.
|
private |
Indicator which variance information should preferably be extracted from hits in calls to append.
Meaning of the constants detailed in EFitVariance.
Definition at line 350 of file CDCObservations2D.h.
|
private |
Memory for the individual observations.
Arrangement of values is x,y, drift radius, weight, x, y, .....
Definition at line 336 of file CDCObservations2D.h.