ATLAS Offline Software
CSCSimHit.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_CSCHIT_H
6 #define MUONSIMEVENT_CSCHIT_H 1
7 
10 #include <string>
11 
12 //---------------------
13 // back to the situation of tag MuonSimEvent-00-00-25 to avoid
14 // uncompatibility between 8.0.2 and 8.2.0 ----->
15 // redundant time methods are present (globalTime() and meanTime() return the
16 // same time) --->NOT TO BE FIXED!!<----
17 
18 class CSCSimHit final{
19 
20 public:
21  //
22  // construction/destruction
23  //
24  // needed by athenaRoot
25  CSCSimHit();
26 
27  // Destructor:
29 
30  CSCSimHit(int id, double time, double energy,
31  const Amg::Vector3D& HitStart, const Amg::Vector3D& HitEnd, int particleID);
32 
33  CSCSimHit(int id, double time, double energy,
34  const Amg::Vector3D& HitStart, const Amg::Vector3D& HitEnd, int particleID,
35  const int truthBarcode);
36 
37  CSCSimHit(int id, double time, double energy,
38  const Amg::Vector3D& HitStart, const Amg::Vector3D& HitEnd, int particleID,
39  const int truthBarcode, double kineticEnergy);
40 
41  CSCSimHit(int id, double time, double energy,
42  const Amg::Vector3D& HitStart, const Amg::Vector3D& HitEnd, int particleID,
43  const HepMcParticleLink& hmpl, double kineticEnergy);
44 
45 
46  //
47  // member functions
48  //
49  double globalTime() const { return (double) m_globalTime; }
50  double energyDeposit() const { return (double) m_energyDeposit; }
51  const Amg::Vector3D& getHitStart() const { return m_hitStart; }
52  const Amg::Vector3D& getHitEnd() const { return m_hitEnd; }
53  int particleID() const { return m_particleID; }
54  int CSCid() const { return m_CSCid; }
55  std::string print() const;
56  bool operator< (const CSCSimHit& rhs) const
57  { return m_CSCid < rhs.m_CSCid; }
58  double meanTime() const;
59 
60  // truth barcode of the track which released this energy:
61  int truthBarcode() const;
62  // GenParticle::id of the track which released this energy:
63  int truthID() const;
64  double kineticEnergy() const { return static_cast<double>(m_kineticEnergy); }
65 
66 
67 // link to the particle generating the hit
68  const HepMcParticleLink& particleLink() const;
69 
70  void setGlobalTime( const double time ) { m_globalTime = time; }
71 
72 private:
73  //
74  // member data
75  //
76  int m_CSCid;
77  float m_globalTime;
84 
85 
86 };
87 
88 //inline methods
89 
90 inline double CSCSimHit::meanTime() const
91  { return (double) m_globalTime; }
92 
94  { return m_partLink; }
95 
96 // open functions
97 
98 inline float hitTime(const CSCSimHit& hit)
99  { return (float) hit.meanTime(); }
100 
101 #endif
CSCSimHit::getHitEnd
const Amg::Vector3D & getHitEnd() const
Definition: CSCSimHit.h:52
hitTime
float hitTime(const CSCSimHit &hit)
Definition: CSCSimHit.h:98
CSCSimHit::~CSCSimHit
~CSCSimHit()
CSCSimHit::CSCid
int CSCid() const
Definition: CSCSimHit.h:54
CSCSimHit::kineticEnergy
double kineticEnergy() const
Definition: CSCSimHit.h:64
CSCSimHit::m_energyDeposit
float m_energyDeposit
Definition: CSCSimHit.h:78
CSCSimHit::globalTime
double globalTime() const
Definition: CSCSimHit.h:49
CSCSimHit::m_hitEnd
Amg::Vector3D m_hitEnd
Definition: CSCSimHit.h:80
CSCSimHit::m_partLink
HepMcParticleLink m_partLink
Definition: CSCSimHit.h:82
CSCSimHit::setGlobalTime
void setGlobalTime(const double time)
Definition: CSCSimHit.h:70
CSCSimHit::energyDeposit
double energyDeposit() const
Definition: CSCSimHit.h:50
CSCSimHit::truthBarcode
int truthBarcode() const
Definition: CSCSimHit.cxx:135
GeoPrimitives.h
CSCSimHit::operator<
bool operator<(const CSCSimHit &rhs) const
Definition: CSCSimHit.h:56
CSCSimHit
Definition: CSCSimHit.h:18
CSCSimHit::particleID
int particleID() const
Definition: CSCSimHit.h:53
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
CSCSimHit::m_particleID
int m_particleID
Definition: CSCSimHit.h:81
CSCSimHit::m_globalTime
float m_globalTime
Definition: CSCSimHit.h:77
CSCSimHit::particleLink
const HepMcParticleLink & particleLink() const
Definition: CSCSimHit.h:93
CSCSimHit::meanTime
double meanTime() const
Definition: CSCSimHit.h:90
CSCSimHit::m_kineticEnergy
float m_kineticEnergy
Definition: CSCSimHit.h:83
CSCSimHit::CSCSimHit
CSCSimHit()
Definition: CSCSimHit.cxx:13
CSCSimHit::m_CSCid
int m_CSCid
Definition: CSCSimHit.h:76
CSCSimHit::m_hitStart
Amg::Vector3D m_hitStart
Definition: CSCSimHit.h:79
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
CSCSimHit::getHitStart
const Amg::Vector3D & getHitStart() const
Definition: CSCSimHit.h:51
CSCSimHit::truthID
int truthID() const
Definition: CSCSimHit.cxx:138
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CSCSimHit::print
std::string print() const
Definition: CSCSimHit.cxx:101