8 CLHEP::HepRandomEngine& eng,
10 : params_(
params), rndEngine_(eng), det_id_(det_id) {
13 fluctuate_ = std::make_unique<SiG4UniversalFluctuation>();
33 pitch_ = rp_det_topol.DetPitch();
41 if (direction.
z() > 10 || direction.
x() > 200 || direction.
y() > 200) {
48 int NumberOfSegmentation =
std::max(NumberOfSegmentation_y, NumberOfSegmentation_z);
55 int pid =
hit.particleType();
56 double momentum =
hit.pabs();
57 double length = direction.
mag();
59 for (
int i = 0;
i < NumberOfSegmentation;
i++) {
61 double((
i + 0.5) / NumberOfSegmentation) * direction);
64 for (
int i = 0;
i < NumberOfSegmentation;
i++) {
66 double((
i + 0.5) / NumberOfSegmentation) * direction);
81 edm::LogInfo(
"RPLinearChargeDivider") <<
"energy dep. sum=" << sum <<
"\n";
88 double particleMomentum,
93 double particleMass = 139.6;
101 particleMass = 493.7;
102 else if (pid == 2212)
103 particleMass = 938.3;
106 double segmentLength = length / NumberOfSegs;
111 double segmentEloss = (eloss * 1000) / NumberOfSegs;
112 for (
int i = 0;
i < NumberOfSegs;
i++) {
118 particleMomentum * 1000, particleMass, deltaCutoff, segmentLength, segmentEloss, &(
rndEngine_)) /
120 elossVector[
i].setEnergy(de);
126 double ratio = eloss / sum;
127 for (
int ii = 0;
ii < NumberOfSegs;
ii++)
130 double averageEloss = eloss / NumberOfSegs;
131 for (
int ii = 0;
ii < NumberOfSegs;
ii++)
132 elossVector[
ii].setEnergy(averageEloss);