LDMX Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ldmx::Measurement Class Reference

Public Member Functions

 Measurement ()=default
 Default constructor.
 
 Measurement (const ldmx::SimTrackerHit &hit, const float &cov_uu=0.05, const float &cov_vv=1.0)
 Constructor that uses a SimTrackerHit to populate the global position, deposited energy, ID and measurement time.
 
virtual ~Measurement ()=default
 Default destructor.
 
void setGlobalPosition (const float &x, const float &y, const float &z)
 Set the global position i.e.
 
std::array< float, 3 > getGlobalPosition () const
 
void setLocalPosition (const float &u, const float &v)
 Set the local position i.e.
 
std::array< float, 2 > getLocalPosition () const
 
void setLocalCovariance (const float &cov_uu, const float &cov_vv)
 Set cov(U,U) and cov(V, V).
 
std::array< float, 2 > getLocalCovariance () const
 
void setTime (const float &t)
 Set the measurement time in ns.
 
float getTime () const
 
void setLayerID (const int &layerid)
 Set the layer ID of the sensor where this measurement took place.
 
int getLayerID () const
 
int getLayer () const
 
void addTrackId (int trkId)
 Add a trackId to the internal vector.
 
std::vector< unsigned int > getTrackIds ()
 

Private Member Functions

 ClassDef (Measurement, 1)
 

Private Attributes

float x_ {0.}
 The global position in x (mm).
 
float y_ {0.}
 The global position in x (mm).
 
float z_ {0.}
 The global position in x (mm).
 
float t_ {0.}
 Measurement time (ns).
 
float u_ {0.}
 Local position in u (mm).
 
float v_ {0.}
 Local position in v (mm).
 
int layerid_ {0}
 The ID of the sensor where the measurement took place.
 
int layer_ {0}
 The layer number internal to the tracker.
 
float edep_ {0.}
 The energy deposited in the sensor where the measurement took place.
 
float cov_uu_ {0.}
 cov(U, U)
 
float cov_vv_ {0.}
 cov(V, V)
 
int id_ {0}
 The ID of the hit.
 
std::vector< unsigned int > trackIds_ {}
 TrackIDs the vector of TrackIDs that form the measurement.
 

Friends

std::ostream & operator<< (std::ostream &output, const Measurement &measurement)
 Overload the stream insertion operator to output a string representation of this Measurement.
 

Detailed Description

Definition at line 12 of file Measurement.h.

Constructor & Destructor Documentation

◆ Measurement()

ldmx::Measurement::Measurement ( const ldmx::SimTrackerHit hit,
const float &  cov_uu = 0.05,
const float &  cov_vv = 1.0 
)

Constructor that uses a SimTrackerHit to populate the global position, deposited energy, ID and measurement time.

The cov(U, U) and cov(V, V) are optional.

Parameters
hitThe SimTrackerHit used to set the initial Measurement values.
cov_uucov(U, U)
cov_vvcov(V, V)

Member Function Documentation

◆ addTrackId()

void ldmx::Measurement::addTrackId ( int  trkId)
inline

Add a trackId to the internal vector.

Definition at line 112 of file Measurement.h.

112{ trackIds_.push_back(trkId); };
std::vector< unsigned int > trackIds_
TrackIDs the vector of TrackIDs that form the measurement.

References trackIds_.

◆ getGlobalPosition()

std::array< float, 3 > ldmx::Measurement::getGlobalPosition ( ) const
inline
Returns
The global position of the measurement as an array.

Definition at line 47 of file Measurement.h.

47 {
48 return std::array<float, 3>{x_, y_, z_};
49 };
float z_
The global position in x (mm).
float x_
The global position in x (mm).
float y_
The global position in x (mm).

References x_, y_, and z_.

Referenced by tracking::dqm::TrackerDigiDQM::analyze(), and tracking::reco::DigitizationProcessor::digitizeHits().

◆ getLayer()

int ldmx::Measurement::getLayer ( ) const
inline
Returns
The layer number internal to the tracker.

Definition at line 109 of file Measurement.h.

109{ return layer_; }
int layer_
The layer number internal to the tracker.

References layer_.

◆ getLayerID()

int ldmx::Measurement::getLayerID ( ) const
inline
Returns
The layer ID of the sensor associated with this measurement.

Definition at line 106 of file Measurement.h.

106{ return layerid_; };
int layerid_
The ID of the sensor where the measurement took place.

References layerid_.

◆ getLocalCovariance()

std::array< float, 2 > ldmx::Measurement::getLocalCovariance ( ) const
inline
Returns
The covariance of the local coordinates as an array { cov(U, U), cov(V, V) }.

Definition at line 81 of file Measurement.h.

81 {
82 return std::array<float, 2>{cov_uu_, cov_vv_};
83 };
float cov_vv_
cov(V, V)
float cov_uu_
cov(U, U)

References cov_uu_, and cov_vv_.

◆ getLocalPosition()

std::array< float, 2 > ldmx::Measurement::getLocalPosition ( ) const
inline
Returns
The local position of the measurement as an array.

Definition at line 64 of file Measurement.h.

64 {
65 return std::array<float, 2>{u_, v_};
66 };
float v_
Local position in v (mm).
float u_
Local position in u (mm).

References u_, and v_.

◆ getTime()

float ldmx::Measurement::getTime ( ) const
inline
Returns
The hit time in ns.

Definition at line 93 of file Measurement.h.

93{ return t_; };
float t_
Measurement time (ns).

References t_.

◆ getTrackIds()

std::vector< unsigned int > ldmx::Measurement::getTrackIds ( )
inline
Returns
the sim particle IDs that compose the measurement

Definition at line 114 of file Measurement.h.

114{ return trackIds_; };

References trackIds_.

◆ setGlobalPosition()

void ldmx::Measurement::setGlobalPosition ( const float &  x,
const float &  y,
const float &  z 
)
inline

Set the global position i.e.

position of the measurement in the detector frame.

Parameters
xPosition in x in mm.
yPosition in y in mm.
zPosition in z in mm.

Definition at line 40 of file Measurement.h.

40 {
41 x_ = x;
42 y_ = y;
43 z_ = z;
44 };

References x_, y_, and z_.

Referenced by tracking::reco::DigitizationProcessor::digitizeHits(), and tracking::reco::SeedFinderProcessor::produce().

◆ setLayerID()

void ldmx::Measurement::setLayerID ( const int &  layerid)
inline

Set the layer ID of the sensor where this measurement took place.

Parameters
layeridThe layer ID of the sensor associated with this measurement.

Definition at line 100 of file Measurement.h.

100 {
101 layerid_ = layerid;
102 layer_ = ((layerid_ / 100) % 10 - 1) * 2 + layerid % 2;
103 };

References layer_, and layerid_.

Referenced by tracking::reco::DigitizationProcessor::digitizeHits().

◆ setLocalCovariance()

void ldmx::Measurement::setLocalCovariance ( const float &  cov_uu,
const float &  cov_vv 
)
inline

Set cov(U,U) and cov(V, V).

Parameters
cov_uucov(U, U).
cov_vvcov(V, V).

Definition at line 74 of file Measurement.h.

74 {
75 cov_uu_ = cov_uu;
76 cov_vv_ = cov_vv;
77 }

References cov_uu_, and cov_vv_.

Referenced by tracking::reco::DigitizationProcessor::digitizeHits(), and tracking::reco::SeedFinderProcessor::produce().

◆ setLocalPosition()

void ldmx::Measurement::setLocalPosition ( const float &  u,
const float &  v 
)
inline

Set the local position i.e.

position of the measurement in the reference frame of the surface where the hit was created.

Parameters
uPosition in U in mm.
vPosition in V in mm.

Definition at line 58 of file Measurement.h.

58 {
59 u_ = u;
60 v_ = v;
61 };

References u_, and v_.

Referenced by tracking::reco::DigitizationProcessor::digitizeHits(), and tracking::reco::SeedFinderProcessor::produce().

◆ setTime()

void ldmx::Measurement::setTime ( const float &  t)
inline

Set the measurement time in ns.

Parameters
tThe time in ns.

Definition at line 90 of file Measurement.h.

90{ t_ = t; };

References t_.

Referenced by tracking::reco::SeedFinderProcessor::produce().

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  output,
const Measurement measurement 
)
friend

Overload the stream insertion operator to output a string representation of this Measurement.

Parameters
[in]outputThe output stream where the string representation will be inserted.
[in]measurementThe Measurement object to print.
Returns
[out] An ostream object with the string representation of Measurement.

Member Data Documentation

◆ cov_uu_

float ldmx::Measurement::cov_uu_ {0.}
private

cov(U, U)

Definition at line 151 of file Measurement.h.

151{0.};

Referenced by getLocalCovariance(), and setLocalCovariance().

◆ cov_vv_

float ldmx::Measurement::cov_vv_ {0.}
private

cov(V, V)

Definition at line 153 of file Measurement.h.

153{0.};

Referenced by getLocalCovariance(), and setLocalCovariance().

◆ edep_

float ldmx::Measurement::edep_ {0.}
private

The energy deposited in the sensor where the measurement took place.

Definition at line 149 of file Measurement.h.

149{0.};

◆ id_

int ldmx::Measurement::id_ {0}
private

The ID of the hit.

Definition at line 155 of file Measurement.h.

155{0};

◆ layer_

int ldmx::Measurement::layer_ {0}
private

The layer number internal to the tracker.

Definition at line 147 of file Measurement.h.

147{0};

Referenced by getLayer(), and setLayerID().

◆ layerid_

int ldmx::Measurement::layerid_ {0}
private

The ID of the sensor where the measurement took place.

Definition at line 145 of file Measurement.h.

145{0};

Referenced by getLayerID(), and setLayerID().

◆ t_

float ldmx::Measurement::t_ {0.}
private

Measurement time (ns).

Definition at line 139 of file Measurement.h.

139{0.};

Referenced by getTime(), and setTime().

◆ trackIds_

std::vector<unsigned int> ldmx::Measurement::trackIds_ {}
private

TrackIDs the vector of TrackIDs that form the measurement.

Definition at line 157 of file Measurement.h.

157{};

Referenced by addTrackId(), and getTrackIds().

◆ u_

float ldmx::Measurement::u_ {0.}
private

Local position in u (mm).

Definition at line 141 of file Measurement.h.

141{0.};

Referenced by getLocalPosition(), and setLocalPosition().

◆ v_

float ldmx::Measurement::v_ {0.}
private

Local position in v (mm).

Definition at line 143 of file Measurement.h.

143{0.};

Referenced by getLocalPosition(), and setLocalPosition().

◆ x_

float ldmx::Measurement::x_ {0.}
private

The global position in x (mm).

Definition at line 133 of file Measurement.h.

133{0.};

Referenced by getGlobalPosition(), and setGlobalPosition().

◆ y_

float ldmx::Measurement::y_ {0.}
private

The global position in x (mm).

Definition at line 135 of file Measurement.h.

135{0.};

Referenced by getGlobalPosition(), and setGlobalPosition().

◆ z_

float ldmx::Measurement::z_ {0.}
private

The global position in x (mm).

Definition at line 137 of file Measurement.h.

137{0.};

Referenced by getGlobalPosition(), and setGlobalPosition().


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