49 {
50
51 const SiHit& hit = *timed_hit_ptr;
52
54
55
56 float tof_expected = element->
center().norm() / Gaudi::Units::c_light;
57
59 << hit.
meanTime() <<
", tof =" << time_of_flight
60 << ", tof exp =" << tof_expected);
61
62
63
64
66 return;
67 }
68
69
70
75
76
77
78
80 }
81 }
82
85
88
90 ATH_MSG_DEBUG(
"x and y, z are: " << element_center.x() <<
", "
91 << element_center.y() << ", "
92 << element_center.z());
93 float element_r = sqrt(element_center.x() * element_center.x() +
94 element_center.y() * element_center.y());
95
98
102
103 CLHEP::Hep3Vector
direction = end_pos - start_pos;
106
107
108 if (deposit_length > 1.e-10) {
109 direction.setMag(deposit_length /
static_cast<float>(n_steps));
110 }
111
113
114 const float tot_charge = tot_eloss / (3.62 * CLHEP::eV) * Gaudi::Units::eplus;
115
116 float charge_per_step = tot_charge / static_cast<float>(n_steps);
117
118
119
120 ATH_MSG_DEBUG(
">>>>>>> before processing, event_t, t, E, r: "
122 << tot_eloss << ", " << element_r);
123
125 time_of_flight += CLHEP::RandGaussZiggurat::shoot(
126 rndm_engine, 0.0f,
128 0.0));
129 }
130 ATH_MSG_DEBUG(
">>>>>>> after processing, t: " << time_of_flight);
131
132
133
134
135 float xphi_offset = 9.75;
136 float xeta_offset = 19.5;
137
138 float interpad = 50 * CLHEP::micrometer;
139
140 for (int i_step = 0; i_step < n_steps; i_step++) {
141
143
144 CLHEP::Hep3Vector surface_pos = start_pos + i_step *
direction;
146 << ", y=" << surface_pos.y()
147 << ", z=" << surface_pos.z());
151
152
153
154
155
156
157
158
159 float spess =
160 0.5 * sensor_thickness - readout_side * surface_pos[
SiHit::xDep];
161 if (spess < 0) {
162 spess = 0;
163 }
164
165
167
168
169
171 rdif * CLHEP::RandGaussZiggurat::shoot(rndm_engine);
173 rdif * CLHEP::RandGaussZiggurat::shoot(rndm_engine);
174
175
176 if (fabs(surf_pos_xphi) > xphi_offset or
177 fabs(surf_pos_xeta) > xeta_offset) {
179 continue;
180 }
181
182 int bin_xphi = floor(fabs(surf_pos_xphi + xphi_offset) / pixel_size_xphi);
183 int bin_xeta = floor(fabs(surf_pos_xeta + xeta_offset) / pixel_size_xeta);
184
185 float pos_xphi_inpixel =
186 fabs(surf_pos_xphi + xphi_offset) -
float(bin_xphi) * pixel_size_xphi;
187 float pos_xeta_inpixel =
188 fabs(surf_pos_xeta + xeta_offset) -
float(bin_xeta) * pixel_size_xeta;
189
190 bool is_interpad_xphi = (pos_xphi_inpixel < interpad or
191 pos_xphi_inpixel > (pixel_size_xphi - interpad));
192 bool is_interpad_xeta = (pos_xeta_inpixel < interpad or
193 pos_xeta_inpixel > (pixel_size_xeta - interpad));
194
195
196 if (is_interpad_xphi or is_interpad_xeta) {
198 continue;
199 }
200
201 const InDetDD::SiLocalPosition
position(
203
204 SiSurfaceCharge surface_charge(
205 position, SiCharge(charge_per_step, time_of_flight, hitproc,
206 trklink));
207
208 InDetDD::SiCellId cell_id =
212
213 diode_coll->
add(cell_id, surface_charge.charge());
214 }
215 }
216}
ToolHandle< HGTD_TimeResolutionTool > m_hgtd_time_resolution_tool
FloatProperty m_diffusion_constant
FloatProperty m_active_time_window
FloatProperty m_small_step_length
BooleanProperty m_smear_meantime
bool isValid() const
Validity check.
static HepMcParticleLink getRedirectedLink(const HepMcParticleLink &particleLink, uint32_t eventIndex, const EventContext &ctx)
Return a HepMcParticleLink pointing at the same particle, but in a different GenEvent.
virtual double etaPitch() const =0
double thickness() const
Method which returns thickness of the silicon wafer.
virtual double phiPitch() const =0
Pitch in phi direction.
int readoutSide() const
ReadoutSide.
bool isValid() const
Test if its in a valid state.
virtual const DetectorDesign & design() const
access to the local description (inline):
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const
Simulation/Hit local frame to reconstruction local frame.
void add(const InDetDD::SiCellId &diode, const T &charge)
double energyLoss() const
HepGeom::Point3D< double > localStartPosition() const
const HepMcParticleLink & particleLink() const
HepGeom::Point3D< double > localEndPosition() const
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
float eventTime() const
t0 offset of the bunch xing containing the hit in ns.
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
#define CXXUTILS_TRAPPING_FP