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

Class serving as a storage of observed sz positions to present to the sz line fitters. More...

#include <CDCSZObservations.h>

Collaboration diagram for CDCSZObservations:

Public Member Functions

 CDCSZObservations (EFitVariance fitVariance=EFitVariance::c_Proper, bool onlyStereo=false)
 Constructor taking in prefered variance quanity be taken from the various hit objects if present. More...
 
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 getS (int iObservation) const
 Getter for the arc length value of the observation at the given index.
 
double getZ (int iObservation) const
 Getter for the z value 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 s, double z, double weight=1.0)
 Appends the observed position. More...
 
std::size_t append (const CDCRecoHit3D &recoHit3D)
 Appends the observed position.
 
std::size_t appendRange (const std::vector< CDCRecoHit3D > &recoHit3Ds)
 Appends all reconstructed hits from the three dimensional track. More...
 
std::size_t appendRange (const CDCSegment3D &segment3D)
 Appends all reconstructed hits from the three dimensional segment. More...
 
std::size_t appendRange (const CDCTrack &track)
 Appends all reconstructed hits from the three dimensional track. More...
 
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.
 
void setFitVariance (EFitVariance fitVariance)
 Setter for the indicator that the drift variance should be used.
 

Private Attributes

std::vector< double > m_szObservations
 Memory for the individual observations. More...
 
EFitVariance m_fitVariance
 Indicator which variance information should preferably be extracted from hits in calls to append. More...
 
bool m_onlyStereo
 Switch to only use information from stereo hits.
 

Detailed Description

Class serving as a storage of observed sz positions to present to the sz line fitters.

Definition at line 26 of file CDCSZObservations.h.

Constructor & Destructor Documentation

◆ CDCSZObservations()

CDCSZObservations ( EFitVariance  fitVariance = EFitVariance::c_Proper,
bool  onlyStereo = false 
)
inlineexplicit

Constructor taking in prefered variance quanity be taken from the various hit objects if present.

Parameters
fitVarianceVariance information to be used Currently only c_Unit and c_Proper are supported.
onlyStereoSwitch to only use the information of stereo hits.

Definition at line 36 of file CDCSZObservations.h.

38  : m_fitVariance(fitVariance)
39  , m_onlyStereo(onlyStereo)
40  {
41  }
bool m_onlyStereo
Switch to only use information from stereo hits.
EFitVariance m_fitVariance
Indicator which variance information should preferably be extracted from hits in calls to append.

Member Function Documentation

◆ appendRange() [1/3]

std::size_t appendRange ( const CDCSegment3D segment3D)

Appends all reconstructed hits from the three dimensional segment.

Returns
Number of added hits

Definition at line 82 of file CDCSZObservations.cc.

83 {
84  const std::vector<CDCRecoHit3D> recoHit3Ds = segment3D;
85  return this->appendRange(recoHit3Ds);
86 }
std::size_t appendRange(const std::vector< CDCRecoHit3D > &recoHit3Ds)
Appends all reconstructed hits from the three dimensional track.

◆ appendRange() [2/3]

std::size_t appendRange ( const CDCTrack track)

Appends all reconstructed hits from the three dimensional track.

Returns
Number of added hits

Definition at line 88 of file CDCSZObservations.cc.

◆ appendRange() [3/3]

std::size_t appendRange ( const std::vector< CDCRecoHit3D > &  recoHit3Ds)

Appends all reconstructed hits from the three dimensional track.

Returns
Number of added hits

Definition at line 73 of file CDCSZObservations.cc.

◆ fill()

std::size_t fill ( double  s,
double  z,
double  weight = 1.0 
)

Appends the observed position.

Note
Observations are skipped, if one of the given variables is NAN.
Parameters
sS coordinate of the center of the observed position.
zZ coordinate of the center of the observed position.
weightThe 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.
Returns
Number of observations added. One if the observation was added. Zero if one of the given variables is NAN.

Definition at line 23 of file CDCSZObservations.cc.

Member Data Documentation

◆ m_fitVariance

EFitVariance m_fitVariance
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 154 of file CDCSZObservations.h.

◆ m_szObservations

std::vector<double> m_szObservations
private

Memory for the individual observations.

Arrangement of values is s, z, weight, s, z, .....

Definition at line 147 of file CDCSZObservations.h.


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