ATLAS Offline Software
Loading...
Searching...
No Matches
RPCSimHit.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 MUONG4SIMEVENT_RPCSimHit_H
6#define MUONG4SIMEVENT_RPCSimHit_H
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
19class RPCSimHit final{
20
21public:
22 //
23 // construction/destruction
24 //
25 // needed by athenaRoot
26 RPCSimHit();
27
28 // Destructor:
30 RPCSimHit(int id, double time, const Amg::Vector3D& position);
31 RPCSimHit(int id, double time, const Amg::Vector3D& position, const int truthBarcode);
32 RPCSimHit(int id, double time,
33 const Amg::Vector3D& prePosition,
34 const int truthBarcode,
35 const Amg::Vector3D& postPosition,
36 const double energyDeposit,
37 const double stepLength,
38 const int particleEncoding,
39 const double kineticEnergy);
40 RPCSimHit(int id, double time,
41 const Amg::Vector3D& prePosition,
42 const HepMcParticleLink& hmpl,
43 const Amg::Vector3D& postPosition,
44 const double energyDeposit,
45 const double stepLength,
46 const int particleEncoding,
47 const double kineticEnergy);
48
49
50
51 //
52 // member functions
53 //
54 double globalTime() const { return (double) m_globalTime; }
55 const Amg::Vector3D& localPosition() const { return m_localPosition; }
58 double energyDeposit() const { return static_cast<double>(m_energyDeposit); }
60 double stepLength() const { return m_stepLength; }
61 int particleEncoding() const { return m_particleEncoding; }
62 double kineticEnergy() const { return static_cast<double>(m_kineticEnergy); }
63 int RPCid() const { return m_RPCid; }
64 std::string print() const;
65 bool operator< (const RPCSimHit& rhs) const
66 { return m_RPCid < rhs.m_RPCid; }
67 double meanTime() const;
68
69 // truth barcode of the track which released this energy:
70 int truthBarcode() const;
71
72 // GenParticle::id of the track which released this energy:
73 int truthID() const;
74
75// link to the particle generating the hit
76 const HepMcParticleLink& particleLink() const;
77
78 void setGlobalTime( const double time ) { m_globalTime = time; }
79
80private:
81 //
82 // member data
83 //
86 Amg::Vector3D m_localPosition; // pre-step position
89 float m_energyDeposit; //Geant4 de/dx
90 float m_stepLength; //Geant4 stepLength
91 int m_particleEncoding; // PDG id
92 float m_kineticEnergy; // kinetic energy of the particle
93
94
95};
96//inline methods
97
98inline double RPCSimHit::meanTime() const
99 { return (double) m_globalTime; }
100
102 { return m_partLink; }
103
104// open functions
105
106inline float hitTime(const RPCSimHit& hit)
107 { return (float) hit.meanTime(); }
108
109#endif
110
float hitTime(const RPCSimHit &hit)
Definition RPCSimHit.h:106
const HepMcParticleLink & particleLink() const
Definition RPCSimHit.h:101
Amg::Vector3D m_localPosition
Definition RPCSimHit.h:86
float m_kineticEnergy
Definition RPCSimHit.h:92
double meanTime() const
Definition RPCSimHit.h:98
int particleEncoding() const
Definition RPCSimHit.h:61
double stepLength() const
Definition RPCSimHit.h:60
void setGlobalTime(const double time)
Definition RPCSimHit.h:78
const Amg::Vector3D & preLocalPosition() const
Definition RPCSimHit.h:56
int truthID() const
bool operator<(const RPCSimHit &rhs) const
Definition RPCSimHit.h:65
Amg::Vector3D m_localPostStepPosition
Definition RPCSimHit.h:88
std::string print() const
Definition RPCSimHit.cxx:96
float m_energyDeposit
Definition RPCSimHit.h:89
int m_RPCid
Definition RPCSimHit.h:84
int truthBarcode() const
const Amg::Vector3D & postLocalPosition() const
Definition RPCSimHit.h:57
int m_particleEncoding
Definition RPCSimHit.h:91
int RPCid() const
Definition RPCSimHit.h:63
const Amg::Vector3D & localPosition() const
Definition RPCSimHit.h:55
float m_globalTime
Definition RPCSimHit.h:85
double prePostStepDistance() const
Definition RPCSimHit.h:59
double kineticEnergy() const
Definition RPCSimHit.h:62
float m_stepLength
Definition RPCSimHit.h:90
HepMcParticleLink m_partLink
Definition RPCSimHit.h:87
double globalTime() const
Definition RPCSimHit.h:54
double energyDeposit() const
Definition RPCSimHit.h:58
Eigen::Matrix< double, 3, 1 > Vector3D