73 if (!p_design.
is3D()) {
74 return StatusCode::SUCCESS;
79 return StatusCode::SUCCESS;
82 return StatusCode::SUCCESS;
86 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
92 return StatusCode::SUCCESS;
97 if (initialConditions.size() != 8) {
98 ATH_MSG_ERROR(
"Starting coordinates were not filled correctly in EnergyDepositionSvc.");
99 return StatusCode::FAILURE;
102 double eta_0 = initialConditions[0];
103 double phi_0 = initialConditions[1];
104 double depth_0 = initialConditions[2];
105 double dEta = initialConditions[3];
106 double dPhi = initialConditions[4];
107 double dDepth = initialConditions[5];
108 double ncharges = initialConditions[6];
109 double iTotalLength = initialConditions[7];
119 const double x_bin_size = 0.001;
120 const double y_bin_size = 0.001;
124 double pixel_size_x = Module.
width() / p_design.
rows();
126 double module_size_x = Module.
width();
127 double module_size_y = Module.
length();
130 const double pHitTime =
hitTime(phit);
158 std::vector<double> DtElectron (ncharges, 0.);
159 std::vector<double> DtHole (ncharges, 0.);
160 std::vector<double> rdifElectron (ncharges, 0.);
161 std::vector<double> rdifHole (ncharges, 0.);
163 for (
auto & iHitRecord : trfHitRecord) {
164 double eta_i = eta_0;
165 double phi_i = phi_0;
166 double depth_i = depth_0;
169 eta_i += 1.0 * iHitRecord.first / iTotalLength *
dEta;
170 phi_i += 1.0 * iHitRecord.first / iTotalLength *
dPhi;
171 depth_i += 1.0 * iHitRecord.first / iTotalLength * dDepth;
174 const double energy_per_step = 1.0 * iHitRecord.second / 1.E+6 / ncharges;
175 ATH_MSG_DEBUG(
"es_current: " << energy_per_step <<
" split between " << ncharges <<
" charges");
177 double dist_electrode = 0.5 * sensorThickness - Module.
design().
readoutSide() * depth_i;
178 if (dist_electrode < 0) dist_electrode = 0;
180 CLHEP::Hep3Vector chargepos;
181 chargepos.setX(phi_i);
182 chargepos.setY(eta_i);
183 chargepos.setZ(dist_electrode);
188 "ismoduleframe " <<
coord <<
" -- startPosition (x,y,z) = " << chargepos.x() <<
", " << chargepos.y() <<
", " <<
192 double x_new = chargepos.x() + 0.5*module_size_x;
193 double y_new = chargepos.y() + 0.5*module_size_y;
196 int nPixX =
int(x_new / pixel_size_x);
197 int nPixY =
int(y_new / pixel_size_y);
198 ATH_MSG_DEBUG(
" -- nPixX = " << nPixX <<
" nPixY = " << nPixY);
201 double x_pix = x_new - pixel_size_x * (nPixX);
202 double y_pix = y_new - pixel_size_y * (nPixY);
204 double x_pix_center = x_pix - pixel_size_x / 2;
205 double y_pix_center = y_pix - pixel_size_y / 2;
206 ATH_MSG_DEBUG(
" -- current hit position w.r.t. pixel corner = " << x_pix <<
" " << y_pix);
207 ATH_MSG_DEBUG(
" -- current hit position w.r.t. pixel center = " << x_pix_center <<
" " << y_pix_center);
214 ATH_MSG_DEBUG(
"Skipping since efield = 0 for x_pix = " << x_pix <<
" y_pix = " << y_pix);
218 const double mobilityElectron =
getMobility(efield,
false);
219 const double mobilityHole =
getMobility(efield,
true);
220 auto driftTimeElectron =
getDriftTime(
false, ncharges, rndmEngine);
221 auto driftTimeHole =
getDriftTime(
true, ncharges, rndmEngine);
223 double chunk_size = energy_per_step * eleholePairEnergy;
225 if (chunk_size < 1) chunk_size = 1;
226 const double kappa = 1. / std::sqrt(chunk_size);
234 const auto prefactor_e = mobilityElectron*0.024*
m_temperature / 273.;
235 const auto prefactor_h = mobilityHole*0.024*
m_temperature / 273.;
237 for(
size_t i = 0;
i < ncharges; ++
i) {
238 DtElectron[
i] = prefactor_e *
std::min(driftTimeElectron[
i], timeToElectrodeElectron);
239 DtHole[
i] = prefactor_h *
std::min(driftTimeHole[
i], timeToElectrodeHole);
240 rdifElectron[
i] = 1
e-3*std::sqrt(DtElectron[
i]);
241 rdifHole[
i] = 1
e-3*std::sqrt(DtHole[
i]);
254 const std::size_t ramo_init_bin_y_pi = ramoPotentialMap.
getBinY(1000*(x_pix + pixel_size_x * 2));
255 const std::size_t ramo_init_bin_y_zi = ramoPotentialMap.
getBinY(1000*(x_pix + pixel_size_x * 3));
256 const std::size_t ramo_init_bin_y_mi = ramoPotentialMap.
getBinY(1000*(x_pix + pixel_size_x * 4));
259 const std::size_t ramo_init_bin_x_pj = ramoPotentialMap.
getBinX(1000*(y_pix - 0.5*pixel_size_y));
260 const std::size_t ramo_init_bin_x_zj = ramoPotentialMap.
getBinX(1000*(y_pix + 0.5*pixel_size_y));
261 const std::size_t ramo_init_bin_x_mj = ramoPotentialMap.
getBinX(1000*(y_pix + 1.5*pixel_size_y));
264 float ramoInit_pipj = ramoPotentialMap.
getContent(ramo_init_bin_x_pj, ramo_init_bin_y_pi);
265 float ramoInit_pizj = ramoPotentialMap.
getContent(ramo_init_bin_x_zj, ramo_init_bin_y_pi);
266 float ramoInit_pimj = ramoPotentialMap.
getContent(ramo_init_bin_x_mj, ramo_init_bin_y_pi);
267 float ramoInit_zipj = ramoPotentialMap.
getContent(ramo_init_bin_x_pj, ramo_init_bin_y_zi);
268 float ramoInit_zizj = ramoPotentialMap.
getContent(ramo_init_bin_x_zj, ramo_init_bin_y_zi);
269 float ramoInit_zimj = ramoPotentialMap.
getContent(ramo_init_bin_x_mj, ramo_init_bin_y_zi);
270 float ramoInit_mipj = ramoPotentialMap.
getContent(ramo_init_bin_x_pj, ramo_init_bin_y_mi);
271 float ramoInit_mizj = ramoPotentialMap.
getContent(ramo_init_bin_x_zj, ramo_init_bin_y_mi);
272 float ramoInit_mimj = ramoPotentialMap.
getContent(ramo_init_bin_x_mj, ramo_init_bin_y_mi);
274 const auto hit_time =
hitTime(phit);
277 for (
int j = 0; j < ncharges; j++) {
279 int extraNPixXElectron = nPixX;
280 int extraNPixYElectron = nPixY;
281 int extraNPixXHole = nPixX;
282 int extraNPixYHole = nPixY;
285 std::array<double, 4> randomNumbers{};
286 CLHEP::RandGaussZiggurat::shootArray(rndmEngine, 4, randomNumbers.data());
288 double xposDiffElectron = x_pix + rdifElectron[j] * randomNumbers[0];
289 double yposDiffElectron = y_pix + rdifElectron[j] * randomNumbers[1];
290 double xposDiffHole = x_pix + rdifHole[j] * randomNumbers[2];
291 double yposDiffHole = y_pix + rdifHole[j] * randomNumbers[3];
294 while (xposDiffElectron > pixel_size_x) {
295 extraNPixXElectron++;
296 xposDiffElectron -= pixel_size_x;
298 while (xposDiffElectron < 0) {
299 extraNPixXElectron--;
300 xposDiffElectron += pixel_size_x;
302 while (yposDiffElectron > pixel_size_y) {
303 extraNPixYElectron++;
304 yposDiffElectron -= pixel_size_y;
306 while (yposDiffElectron < 0) {
307 extraNPixYElectron--;
308 yposDiffElectron += pixel_size_y;
312 while (xposDiffHole > pixel_size_x) {
314 xposDiffHole -= pixel_size_x;
316 while (xposDiffHole < 0) {
318 xposDiffHole += pixel_size_x;
320 while (yposDiffHole > pixel_size_y) {
322 yposDiffHole -= pixel_size_y;
324 while (yposDiffHole < 0) {
326 yposDiffHole += pixel_size_y;
328 auto xposFinalElectron = yPositionMap_e.
getContent(
329 yPositionMap_e.
getBinX(1
e3*yposDiffElectron),
330 yPositionMap_e.
getBinY(1
e3*xposDiffElectron),
331 yPositionMap_e.
getBinZ(
std::min(driftTimeElectron[j],timeToElectrodeElectron))
333 auto yposFinalElectron = xPositionMap_e.
getContent(
334 xPositionMap_e.
getBinX(1
e3*yposDiffElectron),
335 xPositionMap_e.
getBinY(1
e3*xposDiffElectron),
336 xPositionMap_e.
getBinZ(
std::min(driftTimeElectron[j],timeToElectrodeElectron))
339 auto xposFinalHole = yPositionMap_h.
getContent(
340 yPositionMap_h.
getBinX(1
e3*yposDiffHole),
341 yPositionMap_h.
getBinY(1
e3*xposDiffHole),
344 auto yposFinalHole = xPositionMap_h.
getContent(
345 xPositionMap_h.
getBinX(1
e3*yposDiffHole),
346 xPositionMap_h.
getBinY(1
e3*xposDiffHole),
352 const std::size_t ramo_final_bin_y_pi_electrons = ramoPotentialMap.
getBinY(1000*(xposFinalElectron + pixel_size_x * 2));
353 const std::size_t ramo_final_bin_y_pi_holes = ramoPotentialMap.
getBinY(1000*(xposFinalHole + pixel_size_x * 2));
354 const std::size_t ramo_final_bin_y_zi_electrons = ramoPotentialMap.
getBinY(1000*(xposFinalElectron + pixel_size_x * 3));
355 const std::size_t ramo_final_bin_y_zi_holes = ramoPotentialMap.
getBinY(1000*(xposFinalHole + pixel_size_x * 3));
356 const std::size_t ramo_final_bin_y_mi_electrons = ramoPotentialMap.
getBinY(1000*(xposFinalElectron + pixel_size_x * 4));
357 const std::size_t ramo_final_bin_y_mi_holes = ramoPotentialMap.
getBinY(1000*(xposFinalHole + pixel_size_x * 4));
359 const std::size_t ramo_final_bin_x_pj_electrons = ramoPotentialMap.
getBinX(1000*(yposFinalElectron - 0.5*pixel_size_y));
360 const std::size_t ramo_final_bin_x_pj_holes = ramoPotentialMap.
getBinX(1000*(yposFinalHole - 0.5*pixel_size_y));
361 const std::size_t ramo_final_bin_x_zj_electrons = ramoPotentialMap.
getBinX(1000*(yposFinalElectron + 0.5*pixel_size_y));
362 const std::size_t ramo_final_bin_x_zj_holes = ramoPotentialMap.
getBinX(1000*(yposFinalHole + 0.5*pixel_size_y));
363 const std::size_t ramo_final_bin_x_mj_electrons = ramoPotentialMap.
getBinX(1000*(yposFinalElectron + 1.5*pixel_size_y));
364 const std::size_t ramo_final_bin_x_mj_holes = ramoPotentialMap.
getBinX(1000*(yposFinalHole + 1.5*pixel_size_y));
366 float ramoFinal_pipj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_pj_electrons, ramo_final_bin_y_pi_electrons);
367 float ramoFinal_pizj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_zj_electrons, ramo_final_bin_y_pi_electrons);
368 float ramoFinal_pimj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_mj_electrons, ramo_final_bin_y_pi_electrons);
369 float ramoFinal_zipj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_pj_electrons, ramo_final_bin_y_zi_electrons);
370 float ramoFinal_zizj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_zj_electrons, ramo_final_bin_y_zi_electrons);
371 float ramoFinal_zimj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_mj_electrons, ramo_final_bin_y_zi_electrons);
372 float ramoFinal_mipj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_pj_electrons, ramo_final_bin_y_mi_electrons);
373 float ramoFinal_mizj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_zj_electrons, ramo_final_bin_y_mi_electrons);
374 float ramoFinal_mimj_electrons = ramoPotentialMap.
getContent(ramo_final_bin_x_mj_electrons, ramo_final_bin_y_mi_electrons);
376 float ramoFinal_pipj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_pj_holes, ramo_final_bin_y_pi_holes);
377 float ramoFinal_pizj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_zj_holes, ramo_final_bin_y_pi_holes);
378 float ramoFinal_pimj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_mj_holes, ramo_final_bin_y_pi_holes);
379 float ramoFinal_zipj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_pj_holes, ramo_final_bin_y_zi_holes);
380 float ramoFinal_zizj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_zj_holes, ramo_final_bin_y_zi_holes);
381 float ramoFinal_zimj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_mj_holes, ramo_final_bin_y_zi_holes);
382 float ramoFinal_mipj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_pj_holes, ramo_final_bin_y_mi_holes);
383 float ramoFinal_mizj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_zj_holes, ramo_final_bin_y_mi_holes);
384 float ramoFinal_mimj_holes = ramoPotentialMap.
getContent(ramo_final_bin_x_mj_holes, ramo_final_bin_y_mi_holes);
387 double eHitRamo_pipj_electrons = energy_per_step * (ramoFinal_pipj_electrons - ramoInit_pipj);
388 double eHitRamo_pipj_holes = -1. * energy_per_step * (ramoFinal_pipj_holes - ramoInit_pipj);
389 double eHitRamo_pizj_electrons = energy_per_step * (ramoFinal_pizj_electrons - ramoInit_pizj);
390 double eHitRamo_pizj_holes = -1. * energy_per_step * (ramoFinal_pizj_holes - ramoInit_pizj);
391 double eHitRamo_pimj_electrons = energy_per_step * (ramoFinal_pimj_electrons - ramoInit_pimj);
392 double eHitRamo_pimj_holes = -1. * energy_per_step * (ramoFinal_pimj_holes - ramoInit_pimj);
393 double eHitRamo_zipj_electrons = energy_per_step * (ramoFinal_zipj_electrons - ramoInit_zipj);
394 double eHitRamo_zipj_holes = -1. * energy_per_step * (ramoFinal_zipj_holes - ramoInit_zipj);
395 double eHitRamo_zizj_electrons = energy_per_step * (ramoFinal_zizj_electrons - ramoInit_zizj);
396 double eHitRamo_zizj_holes = -1. * energy_per_step * (ramoFinal_zizj_holes - ramoInit_zizj);
397 double eHitRamo_zimj_electrons = energy_per_step * (ramoFinal_zimj_electrons - ramoInit_zimj);
398 double eHitRamo_zimj_holes = -1. * energy_per_step * (ramoFinal_zimj_holes - ramoInit_zimj);
399 double eHitRamo_mipj_electrons = energy_per_step * (ramoFinal_mipj_electrons - ramoInit_mipj);
400 double eHitRamo_mipj_holes = -1. * energy_per_step * (ramoFinal_mipj_holes - ramoInit_mipj);
401 double eHitRamo_mizj_electrons = energy_per_step * (ramoFinal_mizj_electrons - ramoInit_mizj);
402 double eHitRamo_mizj_holes = -1. * energy_per_step * (ramoFinal_mizj_holes - ramoInit_mizj);
403 double eHitRamo_mimj_electrons = energy_per_step * (ramoFinal_mimj_electrons - ramoInit_mimj);
404 double eHitRamo_mimj_holes = -1. * energy_per_step * (ramoFinal_mimj_holes - ramoInit_mimj);
406 if(doChunkCorrection) {
407 eHitRamo_pipj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_pipj_electrons - energy_per_step * average_chargeElectron);
408 eHitRamo_pipj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pipj_holes - energy_per_step * average_chargeHole);
409 eHitRamo_pizj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_pizj_electrons - energy_per_step * average_chargeElectron);
410 eHitRamo_pizj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pizj_holes - energy_per_step * average_chargeHole);
411 eHitRamo_pimj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_pimj_electrons - energy_per_step * average_chargeElectron);
412 eHitRamo_pimj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pimj_holes - energy_per_step * average_chargeHole);
413 eHitRamo_zipj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_zipj_electrons - energy_per_step * average_chargeElectron);
414 eHitRamo_zipj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_zipj_holes - energy_per_step * average_chargeHole);
415 eHitRamo_zizj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_zizj_electrons - energy_per_step * average_chargeElectron);
416 eHitRamo_zizj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_zizj_holes - energy_per_step * average_chargeHole);
417 eHitRamo_zimj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_zimj_electrons - energy_per_step * average_chargeElectron);
418 eHitRamo_pimj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_pimj_holes - energy_per_step * average_chargeHole);
419 eHitRamo_mipj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_mipj_electrons - energy_per_step * average_chargeElectron);
420 eHitRamo_mipj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_mipj_holes - energy_per_step * average_chargeHole);
421 eHitRamo_mizj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_mizj_electrons - energy_per_step * average_chargeElectron);
422 eHitRamo_mizj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_mizj_holes - energy_per_step * average_chargeHole);
423 eHitRamo_mimj_electrons = energy_per_step * average_chargeElectron + kappa * (eHitRamo_mimj_electrons - energy_per_step * average_chargeElectron);
424 eHitRamo_mimj_holes = energy_per_step * average_chargeHole + kappa * (eHitRamo_mimj_holes - energy_per_step * average_chargeHole);
430 double x_mod_pi_electrons = x_pix + pixel_size_x * extraNPixXElectron - 0.5*module_size_x + pixel_size_x;
431 double y_mod_pj_electrons = y_pix + pixel_size_y * extraNPixYElectron - 0.5*module_size_y + pixel_size_y;
432 double x_mod_pi_holes = x_pix + pixel_size_x * extraNPixXHole - 0.5*module_size_x + pixel_size_x;
433 double y_mod_pj_holes = y_pix + pixel_size_y * extraNPixYHole - 0.5*module_size_y + pixel_size_y;
434 double x_mod_zi_electrons = x_pix + pixel_size_x * extraNPixXElectron - 0.5*module_size_x;
435 double y_mod_zj_electrons = y_pix + pixel_size_y * extraNPixYElectron - 0.5*module_size_y;
436 double x_mod_zi_holes = x_pix + pixel_size_x * extraNPixXHole - 0.5*module_size_x;
437 double y_mod_zj_holes = y_pix + pixel_size_y * extraNPixYHole - 0.5*module_size_y;
438 double x_mod_mi_electrons = x_pix + pixel_size_x * extraNPixXElectron - 0.5*module_size_x - pixel_size_x;
439 double y_mod_mj_electrons = y_pix + pixel_size_y * extraNPixYElectron - 0.5*module_size_y - pixel_size_y;
440 double x_mod_mi_holes = x_pix + pixel_size_x * extraNPixXHole - 0.5*module_size_x - pixel_size_x;
441 double y_mod_mj_holes = y_pix + pixel_size_y * extraNPixYHole - 0.5*module_size_y - pixel_size_y;
485 auto addCharge = [&Module, &chargedDiodes](
SiSurfaceCharge const & scharge) {
493 addCharge(scharge_pipj_electrons);
494 addCharge(scharge_pizj_electrons);
495 addCharge(scharge_pimj_electrons);
496 addCharge(scharge_zipj_electrons);
497 addCharge(scharge_zizj_electrons);
498 addCharge(scharge_zimj_electrons);
499 addCharge(scharge_mipj_electrons);
500 addCharge(scharge_mizj_electrons);
501 addCharge(scharge_mimj_electrons);
502 addCharge(scharge_pipj_holes);
503 addCharge(scharge_pizj_holes);
504 addCharge(scharge_pimj_holes);
505 addCharge(scharge_zipj_holes);
506 addCharge(scharge_zizj_holes);
507 addCharge(scharge_zimj_holes);
508 addCharge(scharge_mipj_holes);
509 addCharge(scharge_mizj_holes);
510 addCharge(scharge_mimj_holes);
517 for (
auto iHitRecord : trfHitRecord) {
518 double eta_i = eta_0;
519 double phi_i = phi_0;
520 double depth_i = depth_0;
523 eta_i += 1.0 * iHitRecord.first / iTotalLength *
dEta;
524 phi_i += 1.0 * iHitRecord.first / iTotalLength *
dPhi;
525 depth_i += 1.0 * iHitRecord.first / iTotalLength * dDepth;
528 double es_current = 1.0 * iHitRecord.second / 1.E+6;
530 double dist_electrode = 0.5 * sensorThickness - Module.
design().
readoutSide() * depth_i;
531 if (dist_electrode < 0) dist_electrode = 0;
533 CLHEP::Hep3Vector chargepos;
534 chargepos.setX(phi_i);
535 chargepos.setY(eta_i);
536 chargepos.setZ(dist_electrode);
541 "ismoduleframe " <<
coord <<
" -- startPosition (x,y,z) = " << chargepos.x() <<
", " << chargepos.y() <<
", " <<
545 double x_new = chargepos.x() + 0.5*module_size_x;
546 double y_new = chargepos.y() + 0.5*module_size_y;
549 int nPixX =
int(x_new / pixel_size_x);
550 int nPixY =
int(y_new / pixel_size_y);
551 ATH_MSG_DEBUG(
" -- nPixX = " << nPixX <<
" nPixY = " << nPixY);
552 double x_pix = x_new - pixel_size_x * (nPixX);
553 double y_pix = y_new - pixel_size_y * (nPixY);
555 double x_pix_center = x_pix - pixel_size_x / 2;
556 double y_pix_center = y_pix - pixel_size_y / 2;
557 ATH_MSG_DEBUG(
" -- current hit position w.r.t. pixel center = " << x_pix_center <<
" " << y_pix_center);
561 CLHEP::Hep3Vector pos_neighbor;
564 for (
int i = -1;
i <= 1;
i++) {
565 x_neighbor = x_pix_center -
i * pixel_size_x;
567 for (
int j = -1; j <= 1; j++) {
568 y_neighbor = y_pix_center - j * pixel_size_y;
571 if ((std::abs(x_neighbor) < pixel_size_x) && (std::abs(y_neighbor) < pixel_size_y)) {
574 double x_neighbor_map = x_neighbor + pixel_size_x;
575 double y_neighbor_map = y_neighbor + pixel_size_y;
577 int x_bin_cc_map = x_neighbor_map / x_bin_size;
578 int y_bin_cc_map = y_neighbor_map / y_bin_size;
583 if (ccprob_neighbor == -1.)
return StatusCode::FAILURE;
585 double ed = es_current * eleholePairEnergy * ccprob_neighbor;
588 double x_mod = x_neighbor + 0.5*pixel_size_x + pixel_size_x * nPixX - 0.5*module_size_x;
589 double y_mod = y_neighbor + 0.5*pixel_size_y + pixel_size_y * nPixY - 0.5*module_size_y;
605 return StatusCode::SUCCESS;