48 {
49
50 const SiHit& hit = *timed_hit_ptr;
51
53
54
55 float tof_expected = element->
center().norm() / Gaudi::Units::c_light;
56
58 << hit.
meanTime() <<
", tof =" << time_of_flight
59 << ", tof exp =" << tof_expected);
60
61
62
63
65 return;
66 }
67
68
69
74
75
76
77
79 }
80 }
81
84
87
89 ATH_MSG_DEBUG(
"x and y, z are: " << element_center.x() <<
", "
90 << element_center.y() << ", "
91 << element_center.z());
92 float element_r = sqrt(element_center.x() * element_center.x() +
93 element_center.y() * element_center.y());
94
97
101
102 CLHEP::Hep3Vector direction = end_pos - start_pos;
103 float deposit_length = direction.mag();
105
106
107 if (deposit_length > 1.e-10) {
108 direction.setMag(deposit_length / static_cast<float>(n_steps));
109 }
110
112
113 const float tot_charge = tot_eloss / (3.62 * CLHEP::eV) * Gaudi::Units::eplus;
114
115 float charge_per_step = tot_charge / static_cast<float>(n_steps);
116
117
118
119 ATH_MSG_DEBUG(
">>>>>>> before processing, event_t, t, E, r: "
121 << tot_eloss << ", " << element_r);
122
124 time_of_flight += CLHEP::RandGaussZiggurat::shoot(
125 rndm_engine, 0.0f,
127 0.0));
128 }
129 ATH_MSG_DEBUG(
">>>>>>> after processing, t: " << time_of_flight);
130
131
132
133
134 float xphi_offset = 9.75;
135 float xeta_offset = 19.5;
136
137 float interpad = 50 * CLHEP::micrometer;
138
139 for (int i_step = 0; i_step < n_steps; i_step++) {
140 CLHEP::Hep3Vector surface_pos = start_pos + i_step * direction;
142 << ", y=" << surface_pos.y()
143 << ", z=" << surface_pos.z());
147
148
149
150
151
152
153
154
155 float spess =
156 0.5 * sensor_thickness - readout_side * surface_pos[
SiHit::xDep];
157 if (spess < 0) {
158 spess = 0;
159 }
160
161
163
164
165
167 rdif * CLHEP::RandGaussZiggurat::shoot(rndm_engine);
169 rdif * CLHEP::RandGaussZiggurat::shoot(rndm_engine);
170
171
172 if (fabs(surf_pos_xphi) > xphi_offset or
173 fabs(surf_pos_xeta) > xeta_offset) {
175 continue;
176 }
177
178 int bin_xphi = floor(fabs(surf_pos_xphi + xphi_offset) / pixel_size_xphi);
179 int bin_xeta = floor(fabs(surf_pos_xeta + xeta_offset) / pixel_size_xeta);
180
181 float pos_xphi_inpixel =
182 fabs(surf_pos_xphi + xphi_offset) -
float(bin_xphi) * pixel_size_xphi;
183 float pos_xeta_inpixel =
184 fabs(surf_pos_xeta + xeta_offset) -
float(bin_xeta) * pixel_size_xeta;
185
186 bool is_interpad_xphi = (pos_xphi_inpixel < interpad or
187 pos_xphi_inpixel > (pixel_size_xphi - interpad));
188 bool is_interpad_xeta = (pos_xeta_inpixel < interpad or
189 pos_xeta_inpixel > (pixel_size_xeta - interpad));
190
191
192 if (is_interpad_xphi or is_interpad_xeta) {
194 continue;
195 }
196
197 const InDetDD::SiLocalPosition position(
199
200 SiSurfaceCharge surface_charge(
201 position, SiCharge(charge_per_step, time_of_flight, hitproc,
202 trklink));
203
204 InDetDD::SiCellId cell_id =
208
209 diode_coll->
add(cell_id, surface_charge.charge());
210 }
211 }
212}
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