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

#include <TileSimHit.h>

Collaboration diagram for TileSimHit:

Public Member Functions

 TileSimHit ()
 Default constructor needed for POOL. More...
 
 TileSimHit (Identifier &id, double energy, double time, double deltaT)
 Constructor with time rounding to the center of nearest deltaT bin. More...
 
 ~TileSimHit ()
 Default destructor. More...
 
int add (double energy, double time, double deltaT)
 Add sub-hit to a given hit with time rounding to the center of nearest deltaT bin. More...
 
Identifier identify (void) const
 Return logical ID of the pmt. More...
 
double energy (int ind=0) const
 Return energy of ind-th sub-hit
More...
 
double time (int ind=0) const
 Return time of ind-th sub-hit
More...
 
int size (void) const
 Return length of energy/time vectors
More...
 

Private Attributes

Identifier m_pmt_id
 Logical ID of the pmt
More...
 
std::vector< double > m_energy
 Energy deposited in scint, as seen by pmt in sepatate time bins
More...
 
std::vector< double > m_time
 Time of the energy deposition relative to BC
More...
 

Detailed Description

Definition at line 30 of file TileSimHit.h.

Constructor & Destructor Documentation

◆ TileSimHit() [1/2]

TileSimHit::TileSimHit ( )
inline

Default constructor needed for POOL.

Definition at line 35 of file TileSimHit.h.

35 { }

◆ TileSimHit() [2/2]

TileSimHit::TileSimHit ( Identifier id,
double  energy,
double  time,
double  deltaT 
)

Constructor with time rounding to the center of nearest deltaT bin.

Definition at line 26 of file TileSimHit.cxx.

27  : m_pmt_id( id )
28  , m_energy(1)
29  , m_time(1)
30 {
31  m_energy[0] = energy;
32  if(delta>0){
33  m_time[0] = delta*nearbyint(time/delta);
34  }
35  else{
36  // ignore time completely if delta is zero
37  m_time[0]=0.0;
38  }
39 }

◆ ~TileSimHit()

TileSimHit::~TileSimHit ( )
inline

Default destructor.

Definition at line 41 of file TileSimHit.h.

41 { }

Member Function Documentation

◆ add()

int TileSimHit::add ( double  energy,
double  time,
double  deltaT 
)

Add sub-hit to a given hit with time rounding to the center of nearest deltaT bin.

Definition at line 41 of file TileSimHit.cxx.

42 {
43  if(delta>0) {
44  int size=m_time.size();
45  for (int i=0; i<size; ++i) {
46  double dt = time-m_time[i];
47  if (fabs(dt)<delta/2.) {
48  m_energy[i]+=energy;
49  //if ( (m_energy[i] += energy) > 0.0)
50  // m_time[i] += dt * energy / m_energy[i];
51  return 0;
52  }
53  }
54 
55  m_energy.push_back(energy);
56  m_time.push_back(delta*nearbyint(time/delta));
57 
58  } else{
59  // ignore time completely if delta is zero
60  m_energy[0] += energy;
61  return 0;
62  }
63 
64  return 1;
65 }

◆ energy()

double TileSimHit::energy ( int  ind = 0) const
inline

Return energy of ind-th sub-hit

Definition at line 51 of file TileSimHit.h.

51 { return m_energy[ind]; }

◆ identify()

Identifier TileSimHit::identify ( void  ) const
inline

Return logical ID of the pmt.

Definition at line 49 of file TileSimHit.h.

49 { return m_pmt_id; }

◆ size()

int TileSimHit::size ( void  ) const
inline

Return length of energy/time vectors

Definition at line 55 of file TileSimHit.h.

55 { return m_energy.size(); }

◆ time()

double TileSimHit::time ( int  ind = 0) const
inline

Return time of ind-th sub-hit

Definition at line 53 of file TileSimHit.h.

53 { return m_time[ind]; }

Member Data Documentation

◆ m_energy

std::vector<double> TileSimHit::m_energy
private

Energy deposited in scint, as seen by pmt in sepatate time bins

Definition at line 62 of file TileSimHit.h.

◆ m_pmt_id

Identifier TileSimHit::m_pmt_id
private

Logical ID of the pmt

Definition at line 60 of file TileSimHit.h.

◆ m_time

std::vector<double> TileSimHit::m_time
private

Time of the energy deposition relative to BC

Definition at line 64 of file TileSimHit.h.


The documentation for this class was generated from the following files:
TileSimHit::m_pmt_id
Identifier m_pmt_id
Logical ID of the pmt
Definition: TileSimHit.h:60
TileSimHit::m_energy
std::vector< double > m_energy
Energy deposited in scint, as seen by pmt in sepatate time bins
Definition: TileSimHit.h:62
TileSimHit::m_time
std::vector< double > m_time
Time of the energy deposition relative to BC
Definition: TileSimHit.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
TileSimHit::time
double time(int ind=0) const
Return time of ind-th sub-hit
Definition: TileSimHit.h:53
TileSimHit::energy
double energy(int ind=0) const
Return energy of ind-th sub-hit
Definition: TileSimHit.h:51
TileSimHit::size
int size(void) const
Return length of energy/time vectors
Definition: TileSimHit.h:55
checkFileSG.ind
list ind
Definition: checkFileSG.py:118