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);
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++)
128 elossVector[
ii].setEnergy(ratio * elossVector[
ii].Energy());
130 double averageEloss = eloss / NumberOfSegs;
131 for (
int ii = 0;
ii < NumberOfSegs;
ii++)
132 elossVector[
ii].setEnergy(averageEloss);
simromanpot::energy_path_distribution the_energy_path_distribution_
std::unique_ptr< SiG4UniversalFluctuation > fluctuate_
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Abs< T >::type abs(const T &t)
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
simromanpot::energy_path_distribution divide(const PSimHit &hit)
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
float energyLoss() const
The energy deposit in the PSimHit, in ???.
int chargedivisionsPerThickness_
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
RPLinearChargeDivider(const edm::ParameterSet ¶ms, CLHEP::HepRandomEngine &eng, RPDetId det_id)
void FluctuateEloss(int pid, double particleMomentum, double eloss, double length, int NumberOfSegs, simromanpot::energy_path_distribution &elossVector)
int chargedivisionsPerStrip_
Local3DPoint entryPoint() const
Entry point in the local Det frame.
std::vector< RPEnergyDepositUnit > energy_path_distribution
CLHEP::HepRandomEngine & rndEngine_