LDMX Software
ldmx::FittedSiStripHit Class Reference

Result of fitting a pulse shape to the ADC samples of a single readout strip. More...

#include <FittedSiStripHit.h>

Public Member Functions

 FittedSiStripHit (int layer_id, int strip_id, float amplitude, float t0, float chi2, int ndf, int track_id=-1, int pdg_id=0, int sim_hit_id=-1, float edep=0.f)
 
void clear ()
 
int getLayerID () const
 
int getStripID () const
 
float getAmplitude () const
 Fitted pedestal-subtracted peak amplitude [ADC counts].
 
float getT0 () const
 Fitted hit arrival time [ns] in the sample-window reference frame.
 
float getChi2 () const
 
int getNDF () const
 
float getReducedChi2 () const
 
int getTrackID () const
 Geant4 track ID of the particle that created this hit (-1 if unknown).
 
int getPdgID () const
 PDG particle ID of the particle that created this hit (0 if unknown).
 
int getSimHitID () const
 Detector ID of the originating SimTrackerHit (-1 if unknown).
 
float getEdep () const
 Energy deposited by the parent SimTrackerHit [MeV] (0 if unknown).
 
void setLayerID (int v)
 
void setStripID (int v)
 
void setAmplitude (float v)
 
void setT0 (float v)
 
void setChi2 (float v)
 
void setNDF (int v)
 
void setTrackID (int v)
 
void setPdgID (int v)
 
void setSimHitID (int v)
 
void setEdep (float v)
 

Protected Member Functions

 ClassDef (FittedSiStripHit, 1)
 

Protected Attributes

int layer_id_ {-1}
 
int strip_id_ {-1}
 
float amplitude_
 Fitted peak amplitude [ADC counts], pedestal-subtracted.
 
float t0_ {0}
 Fitted hit time [ns] in sample-window frame.
 
float chi2_ {0}
 
int ndf_ {0}
 
int track_id_ {-1}
 Geant4 track ID of the particle that created this hit.
 
int pdg_id_ {0}
 PDG particle ID of the particle that created this hit.
 
int sim_hit_id_ {-1}
 Detector ID of the originating SimTrackerHit.
 
float edep_ {0.f}
 Energy deposited by the parent SimTrackerHit [MeV].
 

Friends

std::ostream & operator<< (std::ostream &o, const FittedSiStripHit &h)
 

Detailed Description

Result of fitting a pulse shape to the ADC samples of a single readout strip.

Stores the fitted amplitude and hit time extracted from the N-sample ADC waveform, along with the goodness-of-fit. Downstream clustering combines adjacent strips into a Measurement (local position + covariance).

Coordinate convention

amplitude : fitted peak ADC counts (pedestal-subtracted). t0 : fitted hit arrival time [ns] in the sample-window reference frame (i.e., t0 = 0 means the hit peaked at sample 0). chi2 / ndf : goodness of fit (ndf = n_samples − 2).

Definition at line 23 of file FittedSiStripHit.h.

Constructor & Destructor Documentation

◆ FittedSiStripHit()

ldmx::FittedSiStripHit::FittedSiStripHit ( int layer_id,
int strip_id,
float amplitude,
float t0,
float chi2,
int ndf,
int track_id = -1,
int pdg_id = 0,
int sim_hit_id = -1,
float edep = 0.f )
inline

Definition at line 27 of file FittedSiStripHit.h.

30 : layer_id_(layer_id),
31 strip_id_(strip_id),
32 amplitude_(amplitude),
33 t0_(t0),
34 chi2_(chi2),
35 ndf_(ndf),
36 track_id_(track_id),
37 pdg_id_(pdg_id),
38 sim_hit_id_(sim_hit_id),
39 edep_(edep) {}
int track_id_
Geant4 track ID of the particle that created this hit.
float edep_
Energy deposited by the parent SimTrackerHit [MeV].
float t0_
Fitted hit time [ns] in sample-window frame.
int pdg_id_
PDG particle ID of the particle that created this hit.
int sim_hit_id_
Detector ID of the originating SimTrackerHit.
float amplitude_
Fitted peak amplitude [ADC counts], pedestal-subtracted.

Member Function Documentation

◆ clear()

void ldmx::FittedSiStripHit::clear ( )
inline

Definition at line 43 of file FittedSiStripHit.h.

43 {
44 layer_id_ = -1;
45 strip_id_ = -1;
46 amplitude_ = 0;
47 t0_ = 0;
48 chi2_ = 0;
49 ndf_ = 0;
50 track_id_ = -1;
51 pdg_id_ = 0;
52 sim_hit_id_ = -1;
53 edep_ = 0.f;
54 }

◆ getAmplitude()

float ldmx::FittedSiStripHit::getAmplitude ( ) const
inline

Fitted pedestal-subtracted peak amplitude [ADC counts].

Definition at line 60 of file FittedSiStripHit.h.

60{ return amplitude_; }

References amplitude_.

Referenced by tracking::digitization::StripClusterer::findClusters().

◆ getChi2()

float ldmx::FittedSiStripHit::getChi2 ( ) const
inline

Definition at line 63 of file FittedSiStripHit.h.

63{ return chi2_; }

◆ getEdep()

float ldmx::FittedSiStripHit::getEdep ( ) const
inline

Energy deposited by the parent SimTrackerHit [MeV] (0 if unknown).

Definition at line 73 of file FittedSiStripHit.h.

73{ return edep_; }

References edep_.

◆ getLayerID()

int ldmx::FittedSiStripHit::getLayerID ( ) const
inline

Definition at line 57 of file FittedSiStripHit.h.

57{ return layer_id_; }

◆ getNDF()

int ldmx::FittedSiStripHit::getNDF ( ) const
inline

Definition at line 64 of file FittedSiStripHit.h.

64{ return ndf_; }

◆ getPdgID()

int ldmx::FittedSiStripHit::getPdgID ( ) const
inline

PDG particle ID of the particle that created this hit (0 if unknown).

Definition at line 69 of file FittedSiStripHit.h.

69{ return pdg_id_; }

References pdg_id_.

◆ getReducedChi2()

float ldmx::FittedSiStripHit::getReducedChi2 ( ) const
inline

Definition at line 65 of file FittedSiStripHit.h.

65{ return (ndf_ > 0) ? chi2_ / ndf_ : 0.f; }

◆ getSimHitID()

int ldmx::FittedSiStripHit::getSimHitID ( ) const
inline

Detector ID of the originating SimTrackerHit (-1 if unknown).

Definition at line 71 of file FittedSiStripHit.h.

71{ return sim_hit_id_; }

References sim_hit_id_.

◆ getStripID()

int ldmx::FittedSiStripHit::getStripID ( ) const
inline

Definition at line 58 of file FittedSiStripHit.h.

58{ return strip_id_; }

◆ getT0()

float ldmx::FittedSiStripHit::getT0 ( ) const
inline

Fitted hit arrival time [ns] in the sample-window reference frame.

Definition at line 62 of file FittedSiStripHit.h.

62{ return t0_; }

References t0_.

Referenced by tracking::digitization::StripClusterer::findClusters().

◆ getTrackID()

int ldmx::FittedSiStripHit::getTrackID ( ) const
inline

Geant4 track ID of the particle that created this hit (-1 if unknown).

Definition at line 67 of file FittedSiStripHit.h.

67{ return track_id_; }

References track_id_.

◆ setAmplitude()

void ldmx::FittedSiStripHit::setAmplitude ( float v)
inline

Definition at line 78 of file FittedSiStripHit.h.

78{ amplitude_ = v; }

◆ setChi2()

void ldmx::FittedSiStripHit::setChi2 ( float v)
inline

Definition at line 80 of file FittedSiStripHit.h.

80{ chi2_ = v; }

◆ setEdep()

void ldmx::FittedSiStripHit::setEdep ( float v)
inline

Definition at line 85 of file FittedSiStripHit.h.

85{ edep_ = v; }

◆ setLayerID()

void ldmx::FittedSiStripHit::setLayerID ( int v)
inline

Definition at line 76 of file FittedSiStripHit.h.

76{ layer_id_ = v; }

◆ setNDF()

void ldmx::FittedSiStripHit::setNDF ( int v)
inline

Definition at line 81 of file FittedSiStripHit.h.

81{ ndf_ = v; }

◆ setPdgID()

void ldmx::FittedSiStripHit::setPdgID ( int v)
inline

Definition at line 83 of file FittedSiStripHit.h.

83{ pdg_id_ = v; }

◆ setSimHitID()

void ldmx::FittedSiStripHit::setSimHitID ( int v)
inline

Definition at line 84 of file FittedSiStripHit.h.

84{ sim_hit_id_ = v; }

◆ setStripID()

void ldmx::FittedSiStripHit::setStripID ( int v)
inline

Definition at line 77 of file FittedSiStripHit.h.

77{ strip_id_ = v; }

◆ setT0()

void ldmx::FittedSiStripHit::setT0 ( float v)
inline

Definition at line 79 of file FittedSiStripHit.h.

79{ t0_ = v; }

◆ setTrackID()

void ldmx::FittedSiStripHit::setTrackID ( int v)
inline

Definition at line 82 of file FittedSiStripHit.h.

82{ track_id_ = v; }

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const FittedSiStripHit & h )
friend

Definition at line 87 of file FittedSiStripHit.h.

87 {
88 o << "[ FittedSiStripHit ]: layer=" << h.layer_id_
89 << " strip=" << h.strip_id_ << " amp=" << h.amplitude_ << " ADC"
90 << " t0=" << h.t0_ << " ns" << " chi2/ndf=" << h.chi2_ << "/" << h.ndf_
91 << " track_id=" << h.track_id_ << " pdg_id=" << h.pdg_id_
92 << " sim_hit_id=" << h.sim_hit_id_ << " edep=" << h.edep_ << " MeV";
93 return o;
94 }

Member Data Documentation

◆ amplitude_

float ldmx::FittedSiStripHit::amplitude_
protected
Initial value:
{
0}

Fitted peak amplitude [ADC counts], pedestal-subtracted.

Definition at line 99 of file FittedSiStripHit.h.

99 {
100 0};

Referenced by getAmplitude().

◆ chi2_

float ldmx::FittedSiStripHit::chi2_ {0}
protected

Definition at line 102 of file FittedSiStripHit.h.

102{0};

◆ edep_

float ldmx::FittedSiStripHit::edep_ {0.f}
protected

Energy deposited by the parent SimTrackerHit [MeV].

Definition at line 113 of file FittedSiStripHit.h.

113{0.f};

Referenced by getEdep().

◆ layer_id_

int ldmx::FittedSiStripHit::layer_id_ {-1}
protected

Definition at line 97 of file FittedSiStripHit.h.

97{-1};

◆ ndf_

int ldmx::FittedSiStripHit::ndf_ {0}
protected

Definition at line 103 of file FittedSiStripHit.h.

103{0};

◆ pdg_id_

int ldmx::FittedSiStripHit::pdg_id_ {0}
protected

PDG particle ID of the particle that created this hit.

Definition at line 109 of file FittedSiStripHit.h.

109{0};

Referenced by getPdgID().

◆ sim_hit_id_

int ldmx::FittedSiStripHit::sim_hit_id_ {-1}
protected

Detector ID of the originating SimTrackerHit.

Definition at line 111 of file FittedSiStripHit.h.

111{-1};

Referenced by getSimHitID().

◆ strip_id_

int ldmx::FittedSiStripHit::strip_id_ {-1}
protected

Definition at line 98 of file FittedSiStripHit.h.

98{-1};

◆ t0_

float ldmx::FittedSiStripHit::t0_ {0}
protected

Fitted hit time [ns] in sample-window frame.

Definition at line 101 of file FittedSiStripHit.h.

101{0};

Referenced by getT0().

◆ track_id_

int ldmx::FittedSiStripHit::track_id_ {-1}
protected

Geant4 track ID of the particle that created this hit.

Definition at line 107 of file FittedSiStripHit.h.

107{-1};

Referenced by getTrackID().


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