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

Represents a reconstructed hit in a calorimeter cell within the detector. More...

#include <CalorimeterHit.h>

Public Member Functions

 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 (CalorimeterHit, 2)
 The ROOT class definition.
 

Private Attributes

int id_ {0}
 The detector ID of the hit.
 
float amplitude_ {0}
 The amplitude value before sampling corrections.
 
float energy_ {0}
 The energy of the hit corrected by a sampling fraction.
 
float time_ {0}
 The time of the hit.
 
float xpos_ {-9999.}
 X Position of the hit.
 
float ypos_ {-9999.}
 Y Position of the hit.
 
float zpos_ {-9999.}
 Z Position of the hit.
 
bool isNoise_ {false}
 Is this a noise hit?
 

Detailed Description

Represents a reconstructed hit in a calorimeter cell within the detector.

Note
This class represents the reconstructed hit information from a calorimeter including detector ID, raw amplitude, corrected energy and time.

Definition at line 25 of file CalorimeterHit.h.

Constructor & Destructor Documentation

◆ CalorimeterHit()

ldmx::CalorimeterHit::CalorimeterHit ( )
inline

Class constructor.

Definition at line 30 of file CalorimeterHit.h.

30{}

Member Function Documentation

◆ Clear()

void ldmx::CalorimeterHit::Clear ( )

Clear the data in the object.

Definition at line 9 of file CalorimeterHit.cxx.

9 {
10 id_ = 0;
11 amplitude_ = 0;
12 energy_ = 0;
13 time_ = 0;
14 xpos_ = 0;
15 ypos_ = 0;
16 zpos_ = 0;
17 isNoise_ = false;
18}
float time_
The time of the hit.
float xpos_
X Position of the hit.
int id_
The detector ID of the hit.
float energy_
The energy of the hit corrected by a sampling fraction.
float ypos_
Y Position of the hit.
bool isNoise_
Is this a noise hit?
float zpos_
Z Position of the hit.
float amplitude_
The amplitude value before sampling corrections.

References amplitude_, energy_, id_, isNoise_, time_, xpos_, ypos_, and zpos_.

Referenced by ldmx::HcalHit::Clear().

◆ getAmplitude()

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

Get the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sampling factor corrections.

Units depend on the calorimeter.

Returns
The amplitude of the hit

Definition at line 65 of file CalorimeterHit.h.

65{ return amplitude_; }

References amplitude_.

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

◆ getEnergy()

float ldmx::CalorimeterHit::getEnergy ( ) const
inline

Get the calorimetric energy of the hit, corrected for sampling factors [MeV].

Returns
The energy of the hit

Definition at line 80 of file CalorimeterHit.h.

80{ return energy_; }

References energy_.

Referenced by ecal::WorkingCluster::add(), trigscint::TrigScintClusterProducer::addHit(), trigscint::TestBeamClusterProducer::addHit(), ldmx::HcalHit::Print(), recon::PFEcalClusterProducer::produce(), recon::PFHcalClusterProducer::produce(), and hcal::HcalWABVetoProcessor::produce().

◆ getID()

int ldmx::CalorimeterHit::getID ( ) const
inline

Get the detector ID.

Returns
The detector ID.

Definition at line 51 of file CalorimeterHit.h.

51{ return id_; }

References id_.

Referenced by ecal::WorkingCluster::add(), eventdisplay::DetectorGeometry::getBoundingBox(), and ldmx::HcalHit::Print().

◆ getTime()

float ldmx::CalorimeterHit::getTime ( ) const
inline

Get the time of the hit [ns].

Returns
The time of the hit

Definition at line 93 of file CalorimeterHit.h.

93{ return time_; }

References time_.

Referenced by trigscint::TrigScintClusterProducer::addHit(), trigscint::TestBeamClusterProducer::addHit(), operator<(), and ldmx::HcalHit::Print().

◆ getXPos()

float ldmx::CalorimeterHit::getXPos ( ) const
inline

Get the X position of the hit [mm].

Returns
the x position of the hit

Definition at line 105 of file CalorimeterHit.h.

105{ return xpos_; }

References xpos_.

Referenced by eventdisplay::DetectorGeometry::getBoundingBox().

◆ getYPos()

float ldmx::CalorimeterHit::getYPos ( ) const
inline

Get the Y position of the hit [mm].

Returns
the y position of the hit

Definition at line 117 of file CalorimeterHit.h.

117{ return ypos_; }

References ypos_.

Referenced by eventdisplay::DetectorGeometry::getBoundingBox().

◆ getZPos()

float ldmx::CalorimeterHit::getZPos ( ) const
inline

Get the Z position of the hit [mm].

Returns
the z position of the hit

Definition at line 129 of file CalorimeterHit.h.

129{ return zpos_; }

References zpos_.

◆ isNoise()

bool ldmx::CalorimeterHit::isNoise ( ) const
inline

Is this hit a noise hit?

Returns
true if this hit is a noise hit

Definition at line 141 of file CalorimeterHit.h.

141{ return isNoise_; }

References isNoise_.

◆ operator<()

bool ldmx::CalorimeterHit::operator< ( const CalorimeterHit rhs) const
inline

Sort by time of hit.

Definition at line 152 of file CalorimeterHit.h.

152 {
153 return this->getTime() < rhs.getTime();
154 }
float getTime() const
Get the time of the hit [ns].

References getTime().

◆ Print()

void ldmx::CalorimeterHit::Print ( ) const

Print out the object.

Definition at line 20 of file CalorimeterHit.cxx.

20 {
21 std::cout << "CalorimeterHit { "
22 << "id: " << std::hex << id_ << std::dec << ", energy: " << energy_
23 << "MeV, time: " << time_ << "ns, amplitude: " << amplitude_ << "}"
24 << std::endl;
25}

References amplitude_, energy_, id_, and time_.

◆ setAmplitude()

void ldmx::CalorimeterHit::setAmplitude ( float  amplitude)
inline

Set the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sampling factor corrections.

Units depend on the calorimeter.

Parameters
amplitudeThe amplitude of the hit

Definition at line 73 of file CalorimeterHit.h.

73{ amplitude_ = amplitude; }

References amplitude_.

Referenced by ecal::EcalRecProducer::produce(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSingleEndRecProducer::produce(), trigscint::TestBeamHitProducer::produce(), trigscint::TrigScintDigiProducer::produce(), and trigscint::TrigScintRecHitProducer::produce().

◆ setEnergy()

void ldmx::CalorimeterHit::setEnergy ( float  energy)
inline

Set the calorimetric energy of the hit, corrected for sampling factors [MeV].

Parameters
energyThe energy of the hit

Definition at line 87 of file CalorimeterHit.h.

87{ energy_ = energy; }

References energy_.

Referenced by ecal::EcalRecProducer::produce(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSingleEndRecProducer::produce(), trigscint::TestBeamHitProducer::produce(), trigscint::TrigScintDigiProducer::produce(), and trigscint::TrigScintRecHitProducer::produce().

◆ setID()

void ldmx::CalorimeterHit::setID ( int  id)
inline

◆ setNoise()

void ldmx::CalorimeterHit::setNoise ( bool  yes)
inline

Set if this hit is a noise hit.

Parameters
yestrue if this hit is a noise hit

Definition at line 147 of file CalorimeterHit.h.

147{ isNoise_ = yes; }

References isNoise_.

Referenced by trigscint::TrigScintDigiProducer::produce().

◆ setTime()

void ldmx::CalorimeterHit::setTime ( float  time)
inline

◆ setXPos()

void ldmx::CalorimeterHit::setXPos ( float  xpos)
inline

Set the X position of the hit [mm].

Parameters
xposthe x position of the hit

Definition at line 111 of file CalorimeterHit.h.

111{ xpos_ = xpos; }

References xpos_.

Referenced by ecal::EcalRecProducer::produce(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSingleEndRecProducer::produce(), and trigscint::TrigScintDigiProducer::produce().

◆ setYPos()

void ldmx::CalorimeterHit::setYPos ( float  ypos)
inline

Set the Y position of the hit [mm].

Parameters
yposthe y position of the hit

Definition at line 123 of file CalorimeterHit.h.

123{ ypos_ = ypos; }

References ypos_.

Referenced by ecal::EcalRecProducer::produce(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSingleEndRecProducer::produce(), and trigscint::TrigScintDigiProducer::produce().

◆ setZPos()

void ldmx::CalorimeterHit::setZPos ( float  zpos)
inline

Set the Z position of the hit [mm].

Parameters
zposthe z position of the hit

Definition at line 135 of file CalorimeterHit.h.

135{ zpos_ = zpos; }

References zpos_.

Referenced by ecal::EcalRecProducer::produce(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSingleEndRecProducer::produce(), and trigscint::TrigScintDigiProducer::produce().

Member Data Documentation

◆ amplitude_

float ldmx::CalorimeterHit::amplitude_ {0}
private

The amplitude value before sampling corrections.

Definition at line 161 of file CalorimeterHit.h.

161{0};

Referenced by Clear(), getAmplitude(), Print(), and setAmplitude().

◆ energy_

float ldmx::CalorimeterHit::energy_ {0}
private

The energy of the hit corrected by a sampling fraction.

Definition at line 164 of file CalorimeterHit.h.

164{0};

Referenced by Clear(), getEnergy(), Print(), and setEnergy().

◆ id_

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

The detector ID of the hit.

Definition at line 158 of file CalorimeterHit.h.

158{0};

Referenced by Clear(), getID(), Print(), and setID().

◆ isNoise_

bool ldmx::CalorimeterHit::isNoise_ {false}
private

Is this a noise hit?

Definition at line 179 of file CalorimeterHit.h.

179{false};

Referenced by Clear(), isNoise(), and setNoise().

◆ time_

float ldmx::CalorimeterHit::time_ {0}
private

The time of the hit.

Definition at line 167 of file CalorimeterHit.h.

167{0};

Referenced by Clear(), getTime(), Print(), and setTime().

◆ xpos_

float ldmx::CalorimeterHit::xpos_ {-9999.}
private

X Position of the hit.

Definition at line 170 of file CalorimeterHit.h.

170{-9999.};

Referenced by Clear(), getXPos(), and setXPos().

◆ ypos_

float ldmx::CalorimeterHit::ypos_ {-9999.}
private

Y Position of the hit.

Definition at line 173 of file CalorimeterHit.h.

173{-9999.};

Referenced by Clear(), getYPos(), and setYPos().

◆ zpos_

float ldmx::CalorimeterHit::zpos_ {-9999.}
private

Z Position of the hit.

Definition at line 176 of file CalorimeterHit.h.

176{-9999.};

Referenced by Clear(), getZPos(), and setZPos().


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