ATLAS Offline Software
Loading...
Searching...
No Matches
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
18class CSCSimHit final{
19
20public:
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
72private:
73 //
74 // member data
75 //
84
85
86};
87
88//inline methods
89
90inline double CSCSimHit::meanTime() const
91 { return (double) m_globalTime; }
92
94 { return m_partLink; }
95
96// open functions
97
98inline float hitTime(const CSCSimHit& hit)
99 { return (float) hit.meanTime(); }
100
101#endif
float hitTime(const CSCSimHit &hit)
Definition CSCSimHit.h:98
float m_globalTime
Definition CSCSimHit.h:77
const HepMcParticleLink & particleLink() const
Definition CSCSimHit.h:93
float m_kineticEnergy
Definition CSCSimHit.h:83
int truthID() const
const Amg::Vector3D & getHitEnd() const
Definition CSCSimHit.h:52
int m_particleID
Definition CSCSimHit.h:81
double globalTime() const
Definition CSCSimHit.h:49
Amg::Vector3D m_hitStart
Definition CSCSimHit.h:79
int CSCid() const
Definition CSCSimHit.h:54
void setGlobalTime(const double time)
Definition CSCSimHit.h:70
int particleID() const
Definition CSCSimHit.h:53
float m_energyDeposit
Definition CSCSimHit.h:78
int truthBarcode() const
int m_CSCid
Definition CSCSimHit.h:76
const Amg::Vector3D & getHitStart() const
Definition CSCSimHit.h:51
double meanTime() const
Definition CSCSimHit.h:90
HepMcParticleLink m_partLink
Definition CSCSimHit.h:82
Amg::Vector3D m_hitEnd
Definition CSCSimHit.h:80
bool operator<(const CSCSimHit &rhs) const
Definition CSCSimHit.h:56
double energyDeposit() const
Definition CSCSimHit.h:50
double kineticEnergy() const
Definition CSCSimHit.h:64
std::string print() const
Eigen::Matrix< double, 3, 1 > Vector3D