![]() |
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 TrackingUtilities::Vector2D &pos2D, double signedRadius=0.0, double weight=1.0) |
| Appends the observed position. | |
| std::size_t | append (const TrackingUtilities::CDCWireHit &wireHit, TrackingUtilities::ERightLeft rlInfo=TrackingUtilities::ERightLeft::c_Unknown) |
| Appends the hit circle at wire reference position without a right left passage hypotheses. | |
| std::size_t | append (const TrackingUtilities::CDCWireHit *wireHit, TrackingUtilities::ERightLeft rlInfo=TrackingUtilities::ERightLeft::c_Unknown) |
| Appends the position information of the given wire hit to the stored observations. | |
| std::size_t | append (const TrackingUtilities::CDCRLWireHit &rlWireHit) |
| Appends the hit circle at wire reference position with a right left passage hypotheses. | |
| std::size_t | append (const TrackingUtilities::CDCRLWireHitPair &rlWireHitPair) |
| Appends the two observed position. | |
| std::size_t | append (const TrackingUtilities::CDCRLWireHitTriple &rlWireHitTriple) |
| Appends the three observed position. | |
| std::size_t | append (const TrackingUtilities::CDCFacet &facet) |
| Appends the three observed position. | |
| std::size_t | append (const TrackingUtilities::CDCRecoHit2D &recoHit2D) |
| Appends the hit using the reconstructed position if useRecoPos indicates it. | |
| std::size_t | append (const TrackingUtilities::CDCRecoHit3D &recoHit3D) |
| Appends the observed position. | |
| std::size_t | appendRange (const TrackingUtilities::CDCSegment2D &segment2D) |
| Appends all reconstructed hits from the two dimensional segment. | |
| std::size_t | appendRange (const TrackingUtilities::CDCSegment3D &segment3D) |
| Appends all reconstructed hits from the three dimensional segment. | |
| std::size_t | appendRange (const TrackingUtilities::CDCAxialSegmentPair &axialSegmentPair) |
| Appends all reconstructed hits from the two axial segments,. | |
| std::size_t | appendRange (const TrackingUtilities::CDCTrack &track) |
| Appends all reconstructed hits from the three dimensional track. | |
| std::size_t | appendRange (const std::vector< const CDC::CDCWire * > &wires) |
| Appends all the reference wire positions. | |
| std::size_t | appendRange (const TrackingUtilities::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. | |
| TrackingUtilities::Vector2D | getFrontPos2D () const |
| Get the position of the first observation. | |
| TrackingUtilities::Vector2D | getBackPos2D () const |
| Get the position of the first observation. | |
| double | getTotalPerpS (const TrackingUtilities::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 TrackingUtilities::CDCTrajectory2D &trajectory2D) const |
| Checks if the last position of these observations lies at greater travel distance than the first. | |
| TrackingUtilities::EForwardBackward | isCoaligned (const TrackingUtilities::CDCTrajectory2D &trajectory2D) const |
| Checks if the last observation in the vector lies at greater or lower travel distance than the last observation. | |
| TrackingUtilities::Vector2D | getCentralPoint () const |
| Extracts the observation center that is at the index in the middle. | |
| void | passiveMoveBy (const TrackingUtilities::Vector2D &origin) |
| Moves all observations passively such that the given vector becomes to origin of the new coordinate system. | |
| TrackingUtilities::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 TrackingUtilities::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 48 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 55 of file CDCObservations2D.h.
| std::size_t append | ( | const TrackingUtilities::CDCFacet & | facet | ) |
Appends the three observed position.
Definition at line 156 of file CDCObservations2D.cc.
| std::size_t append | ( | const TrackingUtilities::CDCRecoHit2D & | recoHit2D | ) |
Appends the hit using the reconstructed position if useRecoPos indicates it.
Definition at line 167 of file CDCObservations2D.cc.
| std::size_t append | ( | const TrackingUtilities::CDCRecoHit3D & | recoHit3D | ) |
Appends the observed position.
Definition at line 208 of file CDCObservations2D.cc.
| std::size_t append | ( | const TrackingUtilities::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 109 of file CDCObservations2D.cc.
| std::size_t append | ( | const TrackingUtilities::CDCRLWireHitPair & | rlWireHitPair | ) |
Appends the two observed position.
Definition at line 145 of file CDCObservations2D.cc.
| std::size_t append | ( | const TrackingUtilities::CDCRLWireHitTriple & | rlWireHitTriple | ) |
Appends the three observed position.
Definition at line 150 of file CDCObservations2D.cc.
| std::size_t append | ( | const TrackingUtilities::CDCWireHit & | wireHit, |
| TrackingUtilities::ERightLeft | rlInfo = TrackingUtilities::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 69 of file CDCObservations2D.cc.
| std::size_t append | ( | const TrackingUtilities::CDCWireHit * | wireHit, |
| TrackingUtilities::ERightLeft | rlInfo = TrackingUtilities::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 100 of file CDCObservations2D.cc.
|
inline |
Append all hits from a generic range.
Definition at line 259 of file CDCObservations2D.h.
| std::size_t appendRange | ( | const std::vector< const CDC::CDCWire * > & | wires | ) |
Appends all the reference wire positions.
Definition at line 286 of file CDCObservations2D.cc.
| std::size_t appendRange | ( | const TrackingUtilities::CDCAxialSegmentPair & | axialSegmentPair | ) |
Appends all reconstructed hits from the two axial segments,.
Definition at line 260 of file CDCObservations2D.cc.
| std::size_t appendRange | ( | const TrackingUtilities::CDCSegment2D & | segment2D | ) |
Appends all reconstructed hits from the two dimensional segment.
Definition at line 242 of file CDCObservations2D.cc.
| std::size_t appendRange | ( | const TrackingUtilities::CDCSegment3D & | segment3D | ) |
Appends all reconstructed hits from the three dimensional segment.
Definition at line 251 of file CDCObservations2D.cc.
| std::size_t appendRange | ( | const TrackingUtilities::CDCTrack & | track | ) |
Appends all reconstructed hits from the three dimensional track.
Definition at line 277 of file CDCObservations2D.cc.
| std::size_t appendRange | ( | const TrackingUtilities::CDCWireHitSegment & | wireHits | ) |
Appends all the wire hit reference positions with the pseudo variance.
Definition at line 300 of file CDCObservations2D.cc.
| Vector2D centralize | ( | ) |
Picks one observation as a reference point and transform all observations to that new origin.
Definition at line 354 of file CDCObservations2D.cc.
|
inline |
Removes all observations stored.
Definition at line 101 of file CDCObservations2D.h.
|
inline |
Return the pointer to the number buffer.
Definition at line 89 of file CDCObservations2D.h.
|
inline |
Returns true if there are no observations stored.
Definition at line 95 of file CDCObservations2D.h.
| std::size_t fill | ( | const TrackingUtilities::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 64 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 41 of file CDCObservations2D.cc.
|
inline |
Get the position of the first observation.
Definition at line 277 of file CDCObservations2D.h.
| Vector2D getCentralPoint | ( | ) | const |
Extracts the observation center that is at the index in the middle.
Definition at line 330 of file CDCObservations2D.cc.
|
inline |
Getter for the signed drift radius of the observation at the given index.
Definition at line 125 of file CDCObservations2D.h.
|
inline |
Getter for the indicator that the reconstructed position should be favoured.
Definition at line 321 of file CDCObservations2D.h.
|
inline |
Get the position of the first observation.
Definition at line 271 of file CDCObservations2D.h.
| std::size_t getNObservationsWithDriftRadius | ( | ) | const |
Returns the number of observations having a drift radius radius.
Definition at line 316 of file CDCObservations2D.cc.
|
static |
Calculate the pseudo variance from the drift length and its variance.
Definition at line 34 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 73 of file CDCObservations2D.h.
| double getTotalPerpS | ( | const TrackingUtilities::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 311 of file CDCObservations2D.cc.
|
inline |
Getter for the weight / inverse variance of the observation at the given index.
Definition at line 131 of file CDCObservations2D.h.
|
inline |
Getter for the x value of the observation at the given index.
Definition at line 113 of file CDCObservations2D.h.
|
inline |
Getter for the y value of the observation at the given index.
Definition at line 119 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 302 of file CDCObservations2D.h.
|
inline |
Checks if the last position of these observations lies at greater travel distance than the first.
Definition at line 292 of file CDCObservations2D.h.
| void passiveMoveBy | ( | const TrackingUtilities::Vector2D & | origin | ) |
Moves all observations passively such that the given vector becomes to origin of the new coordinate system.
Definition at line 347 of file CDCObservations2D.cc.
|
inline |
Reserves enough space for nObservations.
Definition at line 107 of file CDCObservations2D.h.
|
inline |
Setter for the indicator that the reconstructed position should be favoured.
Definition at line 327 of file CDCObservations2D.h.
|
inline |
Setter for the indicator that the drift variance should be used.
Definition at line 333 of file CDCObservations2D.h.
|
inline |
Returns the number of observations stored.
Definition at line 83 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 350 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 357 of file CDCObservations2D.h.
|
private |
Memory for the individual observations.
Arrangement of values is x,y, drift radius, weight, x, y, .....
Definition at line 343 of file CDCObservations2D.h.