ATLAS Offline Software
TGCSimHit.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONSIMEVENT_TGCSimHit_H
6 #define MUONSIMEVENT_TGCSimHit_H 1
7 
10 
11 #include <string>
12 
13 //---------------------
14 // back to the situation of tag MuonSimEvent-00-00-25 to avoid
15 // uncompatibility between 8.0.2 and 8.2.0 ----->
16 // redundant time methods are present (globalTime() and meanTime() return the
17 // same time) --->NOT TO BE FIXED!!<----
18 
19 class TGCSimHit{
20 
21 public:
22  //
23  // construction/destruction
24  //
25  // needed by athenaRoot
26  TGCSimHit();
27 
28  // Destructor:
30  TGCSimHit(const int id, const double time, const Amg::Vector3D& position, const Amg::Vector3D& direcos);
31  TGCSimHit(const int id, const double time, const Amg::Vector3D& position, const Amg::Vector3D& direcos,
32  const int truthBarcode, const double energyDeposit, const double stepLength,
33  const int particleEncoding=0, const double kineticEnergy=-9999.);
34  TGCSimHit(const int id, const double time, const Amg::Vector3D& position, const Amg::Vector3D& direcos,
35  const HepMcParticleLink& hmpl, const double energyDeposit, const double stepLength,
36  const int particleEncoding=0, const double kineticEnergy=-9999.);
37 
38 
39  //
40  // member functions
41  //
42  double globalTime() const { return static_cast<double>(m_globalTime); }
43  const Amg::Vector3D& localPosition() const { return m_localPosition; }
44  const Amg::Vector3D& localDireCos() const { return m_localDireCos; }
45  int TGCid() const { return m_TGCid; }
46  double energyDeposit() const { return static_cast<double>(m_energyDeposit); }
47  double stepLength() const { return static_cast<double>(m_stepLength); }
48  int particleEncoding() const { return m_particleEncoding; }
49  double kineticEnergy() const { return static_cast<double>(m_kineticEnergy); }
50 
51  std::string print() const;
52  bool operator< (const TGCSimHit& rhs) const
53  { return m_TGCid < rhs.m_TGCid; }
54  double meanTime() const;
55 
56  // truth barcode of the track which released this energy:
57  int truthBarcode() const;
58 
59  // GenParticle::id of the track which released this energy:
60  int truthID() const;
61 
62 // link to the particle generating the hit
63  const HepMcParticleLink& particleLink() const;
64 
65  void setGlobalTime( const double time ) { m_globalTime = time; }
66 
67 private:
68  //
69  // member data
70  //
71  int m_TGCid;
72  float m_globalTime;
77  float m_stepLength;
78  int m_particleEncoding; // PDG id
79  float m_kineticEnergy; // kinetic energy of the particle
80 
81 };
82 //inline methods
83 
84 inline double TGCSimHit::meanTime() const
85  { return (double) m_globalTime; }
86 
88  { return m_partLink; }
89 
90 
91 // open functions
92 
93 inline float hitTime(const TGCSimHit& hit)
94  { return (float) hit.meanTime(); }
95 
96 
97 #endif
TGCSimHit::~TGCSimHit
~TGCSimHit()
TGCSimHit::energyDeposit
double energyDeposit() const
Definition: TGCSimHit.h:46
TGCSimHit::TGCSimHit
TGCSimHit()
Definition: TGCSimHit.cxx:10
TGCSimHit::m_kineticEnergy
float m_kineticEnergy
Definition: TGCSimHit.h:79
TGCSimHit::print
std::string print() const
Definition: TGCSimHit.cxx:90
TGCSimHit::particleLink
const HepMcParticleLink & particleLink() const
Definition: TGCSimHit.h:87
TGCSimHit::truthID
int truthID() const
Definition: TGCSimHit.cxx:114
hitTime
float hitTime(const TGCSimHit &hit)
Definition: TGCSimHit.h:93
TGCSimHit::m_particleEncoding
int m_particleEncoding
Definition: TGCSimHit.h:78
TGCSimHit::m_TGCid
int m_TGCid
Definition: TGCSimHit.h:71
TGCSimHit::localPosition
const Amg::Vector3D & localPosition() const
Definition: TGCSimHit.h:43
GeoPrimitives.h
TGCSimHit::particleEncoding
int particleEncoding() const
Definition: TGCSimHit.h:48
TGCSimHit::m_localDireCos
Amg::Vector3D m_localDireCos
Definition: TGCSimHit.h:74
TGCSimHit::meanTime
double meanTime() const
Definition: TGCSimHit.h:84
TGCSimHit::truthBarcode
int truthBarcode() const
Definition: TGCSimHit.cxx:111
TGCSimHit::m_partLink
HepMcParticleLink m_partLink
Definition: TGCSimHit.h:75
TGCSimHit::TGCid
int TGCid() const
Definition: TGCSimHit.h:45
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TGCSimHit
Definition: TGCSimHit.h:19
TGCSimHit::operator<
bool operator<(const TGCSimHit &rhs) const
Definition: TGCSimHit.h:52
TGCSimHit::globalTime
double globalTime() const
Definition: TGCSimHit.h:42
TGCSimHit::m_stepLength
float m_stepLength
Definition: TGCSimHit.h:77
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
TGCSimHit::m_energyDeposit
float m_energyDeposit
Definition: TGCSimHit.h:76
TGCSimHit::localDireCos
const Amg::Vector3D & localDireCos() const
Definition: TGCSimHit.h:44
TGCSimHit::setGlobalTime
void setGlobalTime(const double time)
Definition: TGCSimHit.h:65
TGCSimHit::m_localPosition
Amg::Vector3D m_localPosition
Definition: TGCSimHit.h:73
TGCSimHit::kineticEnergy
double kineticEnergy() const
Definition: TGCSimHit.h:49
TGCSimHit::stepLength
double stepLength() const
Definition: TGCSimHit.h:47
TGCSimHit::m_globalTime
float m_globalTime
Definition: TGCSimHit.h:72