7 CLHEP::HepRandomEngine& eng,
9 : rndEngine_(eng), det_id_(det_id) {
21 if (direction.
z() > 10 || direction.
x() > 200 || direction.
y() > 200) {
31 int pid =
hit.particleType();
32 double momentum =
hit.pabs();
33 double length = direction.
mag();
35 for (
int i = 0;
i < NumberOfSegmentation;
i++) {
37 double((
i + 0.5) / NumberOfSegmentation) * direction);
40 for (
int i = 0;
i < NumberOfSegmentation;
i++) {
42 double((
i + 0.5) / NumberOfSegmentation) * direction);
57 <<
"energy dep. sum=" << sum;
64 double particleMomentum,
68 std::vector<RPixEnergyDepositUnit>& elossVector) {
69 double particleMass = 139.6;
82 double segmentLength = length / NumberOfSegs;
87 double segmentEloss = (eloss * 1000) / NumberOfSegs;
88 for (
int i = 0;
i < NumberOfSegs;
i++) {
91 particleMomentum * 1000, particleMass, deltaCutoff, segmentLength, segmentEloss, &(
rndEngine_)) /
93 elossVector[
i].setEnergy(de);
99 double ratio = eloss / sum;
100 for (
int ii = 0;
ii < NumberOfSegs;
ii++)
103 double averageEloss = eloss / NumberOfSegs;
104 for (
int ii = 0;
ii < NumberOfSegs;
ii++)
105 elossVector[
ii].setEnergy(averageEloss);