ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
LArHit Class Reference

Class to store hit energy and time in LAr cell from G4 simulation. More...

#include <LArHit.h>

Collaboration diagram for LArHit:

Public Member Functions

 LArHit (Identifier l_cell, double l_energy, double l_time)
 LArHit Constructor. More...
 
 LArHit ()
 Default constructor for persistency. More...
 
 ~LArHit ()
 Destructor. More...
 
Identifier cellID () const
 
double energy () const
 
double time () const
 
bool Less (LArHit *const &h) const
 Operator Less than this for hit ordering. More...
 
bool Equals (LArHit *const &h) const
 Operator Equals this. More...
 
void Add (LArHit *const &h)
 Add another hit ot this hit. More...
 
void finalize ()
 The method to be called at the end of event by SD. More...
 

Private Attributes

Identifier m_ID
 identifier of the cell in which this hit occured. More...
 
double m_energy
 energy (in MeV) deposited in this hit More...
 
double m_time
 time (in ns) More...
 

Detailed Description

Class to store hit energy and time in LAr cell from G4 simulation.

Definition at line 21 of file LArHit.h.

Constructor & Destructor Documentation

◆ LArHit() [1/2]

LArHit::LArHit ( Identifier  l_cell,
double  l_energy,
double  l_time 
)
inline

LArHit Constructor.

inlines

Parameters
[in]l_cellIdentifier of the cell in which the hit occured.
[in]l_energyEnergy (in MeV) deposited in the cell.
[in]l_timeTime (in ns) of the hit.
energy and time should be double in transient memory to have proper rounding accuracy in accumulating sum(E) and sum(E.t) from G4 steps

Definition at line 86 of file LArHit.h.

87  :
88  m_ID(l_cell),
89  m_energy(l_energy),
90  m_time( (l_time*l_energy) )
91 {}

◆ LArHit() [2/2]

LArHit::LArHit ( )
inline

Default constructor for persistency.

Should never be used

Definition at line 95 of file LArHit.h.

96  :
97  m_ID(Identifier()),
98  m_energy(0.),
99  m_time(0.)
100 {}

◆ ~LArHit()

LArHit::~LArHit ( )
inline

Destructor.

Definition at line 103 of file LArHit.h.

104 { }

Member Function Documentation

◆ Add()

void LArHit::Add ( LArHit *const h)
inline

Add another hit ot this hit.

Parameters
[in]hhit to add

Definition at line 133 of file LArHit.h.

134 {
135  m_energy += h->m_energy;
136  m_time += h->m_time;
137 }

◆ cellID()

Identifier LArHit::cellID ( ) const
inline
Returns
cell identifier of this hit

Definition at line 108 of file LArHit.h.

109 { return m_ID; }

◆ energy()

double LArHit::energy ( ) const
inline
Returns
energy in MeV of this hit

Definition at line 113 of file LArHit.h.

114 { return (double) m_energy; }

◆ Equals()

bool LArHit::Equals ( LArHit *const h) const
inline

Operator Equals this.

Definition at line 128 of file LArHit.h.

129 { return m_ID == h->m_ID; }

◆ finalize()

void LArHit::finalize ( )
inline

The method to be called at the end of event by SD.

Finalize time computation time = Sum(E.t)/Sum(E)

Definition at line 143 of file LArHit.h.

◆ Less()

bool LArHit::Less ( LArHit *const h) const
inline

Operator Less than this for hit ordering.

Definition at line 123 of file LArHit.h.

124 { return m_ID < h->m_ID; }

◆ time()

double LArHit::time ( ) const
inline
Returns
time in ns of this hit
Time is defined as the g4 time minus the time of flight at speed of light from the center of Atlas

Definition at line 118 of file LArHit.h.

119 { return m_time; }

Member Data Documentation

◆ m_energy

double LArHit::m_energy
private

energy (in MeV) deposited in this hit

Definition at line 76 of file LArHit.h.

◆ m_ID

Identifier LArHit::m_ID
private

identifier of the cell in which this hit occured.

Definition at line 73 of file LArHit.h.

◆ m_time

double LArHit::m_time
private

time (in ns)

Definition at line 79 of file LArHit.h.


The documentation for this class was generated from the following file:
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
LArHit::m_time
double m_time
time (in ns)
Definition: LArHit.h:79
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
h
LArHit::m_ID
Identifier m_ID
identifier of the cell in which this hit occured.
Definition: LArHit.h:73
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
LArHit::m_energy
double m_energy
energy (in MeV) deposited in this hit
Definition: LArHit.h:76
Identifier
Definition: IdentifierFieldParser.cxx:14