ATLAS Offline Software
Loading...
Searching...
No Matches
LUCID_SimHit.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include <sstream>
8
10
11 m_tubeID = 0;
12 m_pdgCode = 0;
13 m_genVolume = 0;
17 m_stepEndPosX = 0;
18 m_stepEndPosY = 0;
19 m_stepEndPosZ = 0;
20 m_preStepTime = 0;
22 m_wavelength = 0;
23 m_energy = 0;
24}
25
26LUCID_SimHit::LUCID_SimHit(const LUCID_SimHit& simhit) { *this = simhit; }
27
29 int pdgCode,
30 int truthBarcode,
31 int genVolume,
32 float stepStartPosX,
33 float stepStartPosY,
34 float stepStartPosZ,
35 float stepEndPosX,
36 float stepEndPosY,
37 float stepEndPosZ,
38 float preStepTime,
39 float postStepTime,
40 float wavelength,
41 float energy):
42
43 m_tubeID (tubeID),
44 m_pdgCode (pdgCode),
45 m_partLink (truthBarcode, 0, HepMcParticleLink::IS_POSITION, HepMcParticleLink::IS_BARCODE), // FIXME barcode-based
46 m_genVolume (genVolume),
47 m_stepStartPosX(stepStartPosX),
48 m_stepStartPosY(stepStartPosY),
49 m_stepStartPosZ(stepStartPosZ),
50 m_stepEndPosX (stepEndPosX),
51 m_stepEndPosY (stepEndPosY),
52 m_stepEndPosZ (stepEndPosZ),
53 m_preStepTime (preStepTime),
54 m_postStepTime (postStepTime),
55 m_wavelength (wavelength),
56 m_energy (energy) {}
57
59 int pdgCode,
60 const HepMcParticleLink& partLink,
61 int genVolume,
62 float stepStartPosX,
63 float stepStartPosY,
64 float stepStartPosZ,
65 float stepEndPosX,
66 float stepEndPosY,
67 float stepEndPosZ,
68 float preStepTime,
69 float postStepTime,
70 float wavelength,
71 float energy):
72
73 m_tubeID (tubeID),
74 m_pdgCode (pdgCode),
75 m_partLink (partLink),
76 m_genVolume (genVolume),
77 m_stepStartPosX(stepStartPosX),
78 m_stepStartPosY(stepStartPosY),
79 m_stepStartPosZ(stepStartPosZ),
80 m_stepEndPosX (stepEndPosX),
81 m_stepEndPosY (stepEndPosY),
82 m_stepEndPosZ (stepEndPosZ),
83 m_preStepTime (preStepTime),
84 m_postStepTime (postStepTime),
85 m_wavelength (wavelength),
86 m_energy (energy) {}
87
88std::string LUCID_SimHit::print() const {
89
90 std::stringstream ss;
91
92 ss << "LUCID_SimHit:";
93 ss << " tubeID: " << m_tubeID;
94 ss << " preStepTime: " << m_preStepTime;
95 ss << " postStepTime: " << m_postStepTime;
96 ss << " energy: " << m_energy;
97 ss << " wavelength : " << m_wavelength;
98 ss << " position: (" << m_stepStartPosX
99 << "," << m_stepStartPosY
100 << "," << m_stepStartPosZ
101 << ")";
102
103 return ss.str();
104}
105
107
108 m_tubeID = simhit.m_tubeID;
109 m_pdgCode = simhit.m_pdgCode;
110 m_partLink = simhit.m_partLink;
111 m_genVolume = simhit.m_genVolume;
120 m_wavelength = simhit.m_wavelength;
121 m_energy = simhit.m_energy;
122
123 return *this;
124}
125
126bool LUCID_SimHit::isDetected(CLHEP::HepRandomEngine* rndEngine) const {
127
129 double ran = CLHEP::RandFlat::shoot(rndEngine, 0., 1.);
130 bool det = (ran<qef);
131
132 return det;
133}
134
135int LUCID_SimHit::operator == (const LUCID_SimHit& simhit) const { return (this==&simhit) ? 1 : 0; }
136
137bool LUCID_SimHit::operator < (const LUCID_SimHit& rhs) const { return m_tubeID < rhs.m_tubeID; }
double GetQuantumEfficiencyR762(double lambda)
static Double_t ss
float m_preStepTime
bool isDetected(CLHEP::HepRandomEngine *rndEngine) const
const LUCID_SimHit & operator=(const LUCID_SimHit &t)
float m_stepStartPosX
int operator==(const LUCID_SimHit &) const
bool operator<(const LUCID_SimHit &) const
HepMcParticleLink m_partLink
float m_postStepTime
float m_stepStartPosZ
float m_stepEndPosZ
int truthBarcode() const
float m_stepEndPosX
float m_wavelength
float m_stepStartPosY
std::string print() const
float m_stepEndPosY