LDMX Software
ldmx::HcalHit Class Reference

Stores reconstructed hit information from the HCAL. More...

#include <HcalHit.h>

Public Member Functions

 HcalHit ()=default
 Class constructor.
 
virtual ~HcalHit ()=default
 Class destructor.
 
void Clear ()
 Clear the data in the object.
 
void Print () const
 Print out the object.
 
float getPE () const
 Get the number of photoelectrons estimated for this hit.
 
float getMinPE () const
 Get the minimum number of photoelectrons estimated for this hit if two sided readout.
 
int getSection () const
 Get the section for this hit.
 
int getLayer () const
 Get the layer for this hit.
 
int getStrip () const
 Get the strip for this hit.
 
int getEnd () const
 Get end for this hit.
 
int getIsADC () const
 Get if hit was reconstructed using ADC.
 
int getToaPos () const
 Get the toa of the positive end.
 
int getToaNeg () const
 Get the toa of the negative end.
 
int getAmplitudePos () const
 Get the amplitude of the positive end.
 
int getAmplitudeNeg () const
 Get the amplitude of the negative end.
 
double getPosition () const
 Get the position of the hit.
 
bool isOrientationX () const
 Get if bar is oriented in X.
 
bool isOrientationY () const
 Get if bar is oriented in Y.
 
bool isOrientationZ () const
 Get if bar is oriented in Z.
 
double getTimeDiff () const
 Get the time difference between the two ends Note: only applies for double ended readout.
 
void setPE (float pe)
 Set the number of photoelectrons estimated for this hit.
 
void setMinPE (float minpe)
 Set the minimum number of photoelectrons estimated for this hit.
 
void setSection (int section)
 Set the section for this hit.
 
void setLayer (int layer)
 Set the layer for this hit.
 
void setStrip (int strip)
 Set the strip for this hit.
 
void setEnd (int end)
 Set the end (0 neg, 1 pos side).
 
void setIsADC (int isADC)
 Set if the hit is reconstructed using ADC.
 
void setTimeDiff (double timeDiff)
 Set time difference (uncorrected)
 
void setToaPos (double toaPos)
 Set toa of the positive end.
 
void setToaNeg (double toaNeg)
 Set toa of the negative end.
 
void setAmplitudePos (double amplitudePos)
 Set amplitude of the positive end.
 
void setAmplitudeNeg (double amplitudeNeg)
 Set amplitude of the negative end.
 
void setPositionUnchanged (double position, int orientation)
 Set original position.
 
void setOrientation (int orientation)
 Set if the bar is orientied in X / Y / Z meanig 0 / 1 / 2, respectively.
 
- Public Member Functions inherited from ldmx::CalorimeterHit
 CalorimeterHit ()
 Class constructor.
 
virtual ~CalorimeterHit ()=default
 Class destructor.
 
void Clear ()
 Clear the data in the object.
 
void Print () const
 Print out the object.
 
int getID () const
 Get the detector ID.
 
void setID (int id)
 Set the detector ID.
 
float getAmplitude () const
 Get the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sampling factor corrections.
 
void setAmplitude (float amplitude)
 Set the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sampling factor corrections.
 
float getEnergy () const
 Get the calorimetric energy of the hit, corrected for sampling factors [MeV].
 
void setEnergy (float energy)
 Set the calorimetric energy of the hit, corrected for sampling factors [MeV].
 
float getTime () const
 Get the time of the hit [ns].
 
void setTime (float time)
 Set the time of the hit [ns].
 
float getXPos () const
 Get the X position of the hit [mm].
 
void setXPos (float xpos)
 Set the X position of the hit [mm].
 
float getYPos () const
 Get the Y position of the hit [mm].
 
void setYPos (float ypos)
 Set the Y position of the hit [mm].
 
float getZPos () const
 Get the Z position of the hit [mm].
 
void setZPos (float zpos)
 Set the Z position of the hit [mm].
 
bool isNoise () const
 Is this hit a noise hit?
 
void setNoise (bool yes)
 Set if this hit is a noise hit.
 
bool operator< (const CalorimeterHit &rhs) const
 Sort by time of hit.
 

Private Member Functions

 ClassDef (HcalHit, 5)
 The ROOT class definition.
 

Private Attributes

float pe_ {0.0}
 The number of PE estimated for this hit.
 
float minpe_ {-99.0}
 The minimum number of PE estimated for this hit, different from pe_ when you have two ended readout.
 
int section_ {-99}
 section, layer, strip and end
 
int layer_ {-99}
 
int strip_ {-99}
 
int end_ {-99}
 
int isADC_ {-99}
 isADC
 
double timeDiff_ {-9999.}
 
double position_ {-9999.}
 
int orientation_ {-9999}
 
double toaPos_ {-9999.}
 
double toaNeg_ {-9999.}
 
double amplitudePos_ {-9999.}
 
double amplitudeNeg_ {-9999.}
 

Detailed Description

Stores reconstructed hit information from the HCAL.

Note
This class represents the reconstructed hit information from the HCAL, providing particular information for the HCAL, above and beyond what is available in the CalorimeterHit.

Definition at line 24 of file HcalHit.h.

Member Function Documentation

◆ Clear()

void ldmx::HcalHit::Clear ( )

Clear the data in the object.

Definition at line 9 of file HcalHit.cxx.

9 {
11 pe_ = 0;
12 minpe_ = -99;
13}
void Clear()
Clear the data in the object.
float minpe_
The minimum number of PE estimated for this hit, different from pe_ when you have two ended readout.
Definition HcalHit.h:242
float pe_
The number of PE estimated for this hit.
Definition HcalHit.h:238

References ldmx::CalorimeterHit::Clear(), minpe_, and pe_.

Referenced by hcal::HcalVetoProcessor::configure().

◆ getAmplitudeNeg()

int ldmx::HcalHit::getAmplitudeNeg ( ) const
inline

Get the amplitude of the negative end.

Returns
amplitudeNeg

Definition at line 113 of file HcalHit.h.

113{ return amplitudeNeg_; }

◆ getAmplitudePos()

int ldmx::HcalHit::getAmplitudePos ( ) const
inline

Get the amplitude of the positive end.

Returns
amplitudePos

Definition at line 107 of file HcalHit.h.

107{ return amplitudePos_; }

◆ getEnd()

int ldmx::HcalHit::getEnd ( ) const
inline

Get end for this hit.

Returns
end

Definition at line 83 of file HcalHit.h.

83{ return end_; }

◆ getIsADC()

int ldmx::HcalHit::getIsADC ( ) const
inline

Get if hit was reconstructed using ADC.

Returns
isADC

Definition at line 89 of file HcalHit.h.

89{ return isADC_; }
int isADC_
isADC
Definition HcalHit.h:251

References isADC_.

◆ getLayer()

int ldmx::HcalHit::getLayer ( ) const
inline

Get the layer for this hit.

Returns
layer number

Definition at line 71 of file HcalHit.h.

71{ return layer_; }

◆ getMinPE()

float ldmx::HcalHit::getMinPE ( ) const
inline

Get the minimum number of photoelectrons estimated for this hit if two sided readout.

Returns
Minimum number of photoelectrons, including noise which affects the estimate.

Definition at line 59 of file HcalHit.h.

59{ return minpe_; }

References minpe_.

◆ getPE()

float ldmx::HcalHit::getPE ( ) const
inline

Get the number of photoelectrons estimated for this hit.

Returns
Number of photoelectrons, including noise which affects the estimate.

Definition at line 51 of file HcalHit.h.

51{ return pe_; }

References pe_.

Referenced by Print().

◆ getPosition()

double ldmx::HcalHit::getPosition ( ) const
inline

Get the position of the hit.

Returns
position

Definition at line 119 of file HcalHit.h.

119{ return position_; }

◆ getSection()

int ldmx::HcalHit::getSection ( ) const
inline

Get the section for this hit.

Returns
section number

Definition at line 65 of file HcalHit.h.

65{ return section_; }
int section_
section, layer, strip and end
Definition HcalHit.h:245

References section_.

◆ getStrip()

int ldmx::HcalHit::getStrip ( ) const
inline

Get the strip for this hit.

Returns
strip number

Definition at line 77 of file HcalHit.h.

77{ return strip_; }

◆ getTimeDiff()

double ldmx::HcalHit::getTimeDiff ( ) const
inline

Get the time difference between the two ends Note: only applies for double ended readout.

Returns
timeDiff

Definition at line 144 of file HcalHit.h.

144{ return timeDiff_; }

◆ getToaNeg()

int ldmx::HcalHit::getToaNeg ( ) const
inline

Get the toa of the negative end.

Returns
toaNeg

Definition at line 101 of file HcalHit.h.

101{ return toaNeg_; }

◆ getToaPos()

int ldmx::HcalHit::getToaPos ( ) const
inline

Get the toa of the positive end.

Returns
toaPos

Definition at line 95 of file HcalHit.h.

95{ return toaPos_; }

◆ isOrientationX()

bool ldmx::HcalHit::isOrientationX ( ) const
inline

Get if bar is oriented in X.

Returns
true if oriented in X

Definition at line 125 of file HcalHit.h.

125{ return orientation_ == 0; }

◆ isOrientationY()

bool ldmx::HcalHit::isOrientationY ( ) const
inline

Get if bar is oriented in Y.

Returns
true if oriented in Y

Definition at line 131 of file HcalHit.h.

131{ return orientation_ == 1; }

◆ isOrientationZ()

bool ldmx::HcalHit::isOrientationZ ( ) const
inline

Get if bar is oriented in Z.

Returns
true if oriented in Z

Definition at line 137 of file HcalHit.h.

137{ return orientation_ == 2; }

◆ Print()

void ldmx::HcalHit::Print ( ) const

Print out the object.

Definition at line 15 of file HcalHit.cxx.

15 {
16 std::cout << "HcalHit { "
17 << "id: " << std::hex << getID() << std::dec
18 << ", energy: " << getEnergy() << "MeV, time: " << getTime()
19 << "ns, amplitude: " << getAmplitude() << ", pe: " << getPE() << "}"
20 << std::endl;
21}
float getEnergy() const
Get the calorimetric energy of the hit, corrected for sampling factors [MeV].
float getTime() const
Get the time of the hit [ns].
int getID() const
Get the detector ID.
float getAmplitude() const
Get the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sam...
float getPE() const
Get the number of photoelectrons estimated for this hit.
Definition HcalHit.h:51

References ldmx::CalorimeterHit::getAmplitude(), ldmx::CalorimeterHit::getEnergy(), ldmx::CalorimeterHit::getID(), getPE(), and ldmx::CalorimeterHit::getTime().

Referenced by ldmx::HcalVetoResult::Print().

◆ setAmplitudeNeg()

void ldmx::HcalHit::setAmplitudeNeg ( double amplitudeNeg)
inline

Set amplitude of the negative end.

Parameters
amplitude

Definition at line 220 of file HcalHit.h.

220{ amplitudeNeg_ = amplitudeNeg; }

Referenced by hcal::HcalVetoProcessor::configure(), and hcal::HcalDoubleEndRecProducer::produce().

◆ setAmplitudePos()

void ldmx::HcalHit::setAmplitudePos ( double amplitudePos)
inline

Set amplitude of the positive end.

Parameters
amplitude

Definition at line 214 of file HcalHit.h.

214{ amplitudePos_ = amplitudePos; }

Referenced by hcal::HcalVetoProcessor::configure(), and hcal::HcalDoubleEndRecProducer::produce().

◆ setEnd()

void ldmx::HcalHit::setEnd ( int end)
inline

Set the end (0 neg, 1 pos side).

Parameters
end

Definition at line 184 of file HcalHit.h.

184{ end_ = end; }

Referenced by hcal::HcalVetoProcessor::configure(), and hcal::HcalSingleEndRecProducer::produce().

◆ setIsADC()

void ldmx::HcalHit::setIsADC ( int isADC)
inline

Set if the hit is reconstructed using ADC.

Parameters
isADCint

Definition at line 190 of file HcalHit.h.

190{ isADC_ = isADC; }

References isADC_.

Referenced by hcal::HcalSingleEndRecProducer::produce().

◆ setLayer()

void ldmx::HcalHit::setLayer ( int layer)
inline

◆ setMinPE()

void ldmx::HcalHit::setMinPE ( float minpe)
inline

Set the minimum number of photoelectrons estimated for this hit.

Parameters
peMinimum number of photoelectrons, including noise which affects the estimate.

Definition at line 160 of file HcalHit.h.

160{ minpe_ = minpe; }

References minpe_.

Referenced by hcal::HcalVetoProcessor::configure(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSimpleDigiAndRecProducer::produce(), hcal::HcalSingleEndRecProducer::produce(), and trigscint::TrigScintDigiProducer::produce().

◆ setOrientation()

void ldmx::HcalHit::setOrientation ( int orientation)
inline

Set if the bar is orientied in X / Y / Z meanig 0 / 1 / 2, respectively.

Definition at line 234 of file HcalHit.h.

234{ orientation_ = orientation; }

Referenced by hcal::HcalRecProducer::produce(), and hcal::HcalSimpleDigiAndRecProducer::produce().

◆ setPE()

void ldmx::HcalHit::setPE ( float pe)
inline

Set the number of photoelectrons estimated for this hit.

Parameters
peNumber of photoelectrons, including noise which affects the estimate.

Definition at line 153 of file HcalHit.h.

153{ pe_ = pe; }

References pe_.

Referenced by hcal::HcalVetoProcessor::configure(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSimpleDigiAndRecProducer::produce(), and hcal::HcalSingleEndRecProducer::produce().

◆ setPositionUnchanged()

void ldmx::HcalHit::setPositionUnchanged ( double position,
int orientation )
inline

Set original position.

Definition at line 225 of file HcalHit.h.

225 {
226 position_ = position;
227 orientation_ = orientation;
228 }

Referenced by hcal::HcalDoubleEndRecProducer::produce().

◆ setSection()

void ldmx::HcalHit::setSection ( int section)
inline

◆ setStrip()

void ldmx::HcalHit::setStrip ( int strip)
inline

◆ setTimeDiff()

void ldmx::HcalHit::setTimeDiff ( double timeDiff)
inline

Set time difference (uncorrected)

Parameters
time

Definition at line 196 of file HcalHit.h.

196{ timeDiff_ = timeDiff; }

Referenced by hcal::HcalVetoProcessor::configure(), and hcal::HcalDoubleEndRecProducer::produce().

◆ setToaNeg()

void ldmx::HcalHit::setToaNeg ( double toaNeg)
inline

Set toa of the negative end.

Parameters
time

Definition at line 208 of file HcalHit.h.

208{ toaNeg_ = toaNeg; }

Referenced by hcal::HcalVetoProcessor::configure(), and hcal::HcalDoubleEndRecProducer::produce().

◆ setToaPos()

void ldmx::HcalHit::setToaPos ( double toaPos)
inline

Set toa of the positive end.

Parameters
time

Definition at line 202 of file HcalHit.h.

202{ toaPos_ = toaPos; }

Referenced by hcal::HcalVetoProcessor::configure(), and hcal::HcalDoubleEndRecProducer::produce().

Member Data Documentation

◆ amplitudeNeg_

double ldmx::HcalHit::amplitudeNeg_ {-9999.}
private

Definition at line 260 of file HcalHit.h.

260{-9999.};

◆ amplitudePos_

double ldmx::HcalHit::amplitudePos_ {-9999.}
private

Definition at line 259 of file HcalHit.h.

259{-9999.};

◆ end_

int ldmx::HcalHit::end_ {-99}
private

Definition at line 248 of file HcalHit.h.

248{-99};

◆ isADC_

int ldmx::HcalHit::isADC_ {-99}
private

isADC

Definition at line 251 of file HcalHit.h.

251{-99};

Referenced by getIsADC(), and setIsADC().

◆ layer_

int ldmx::HcalHit::layer_ {-99}
private

Definition at line 246 of file HcalHit.h.

246{-99};

◆ minpe_

float ldmx::HcalHit::minpe_ {-99.0}
private

The minimum number of PE estimated for this hit, different from pe_ when you have two ended readout.

Definition at line 242 of file HcalHit.h.

242{-99.0};

Referenced by Clear(), getMinPE(), and setMinPE().

◆ orientation_

int ldmx::HcalHit::orientation_ {-9999}
private

Definition at line 255 of file HcalHit.h.

255{-9999};

◆ pe_

float ldmx::HcalHit::pe_ {0.0}
private

The number of PE estimated for this hit.

Definition at line 238 of file HcalHit.h.

238{0.0};

Referenced by Clear(), getPE(), and setPE().

◆ position_

double ldmx::HcalHit::position_ {-9999.}
private

Definition at line 254 of file HcalHit.h.

254{-9999.};

◆ section_

int ldmx::HcalHit::section_ {-99}
private

section, layer, strip and end

Definition at line 245 of file HcalHit.h.

245{-99};

Referenced by getSection(), and setSection().

◆ strip_

int ldmx::HcalHit::strip_ {-99}
private

Definition at line 247 of file HcalHit.h.

247{-99};

◆ timeDiff_

double ldmx::HcalHit::timeDiff_ {-9999.}
private

Definition at line 253 of file HcalHit.h.

253{-9999.};

◆ toaNeg_

double ldmx::HcalHit::toaNeg_ {-9999.}
private

Definition at line 258 of file HcalHit.h.

258{-9999.};

◆ toaPos_

double ldmx::HcalHit::toaPos_ {-9999.}
private

Definition at line 257 of file HcalHit.h.

257{-9999.};

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