#include <RPixLinearChargeDivider.h>
Definition at line 13 of file RPixLinearChargeDivider.h.
◆ RPixLinearChargeDivider()
RPixLinearChargeDivider::RPixLinearChargeDivider |
( |
const edm::ParameterSet & |
params, |
|
|
CLHEP::HepRandomEngine & |
eng, |
|
|
uint32_t |
det_id |
|
) |
| |
◆ ~RPixLinearChargeDivider()
RPixLinearChargeDivider::~RPixLinearChargeDivider |
( |
| ) |
|
◆ divide()
Definition at line 19 of file RPixLinearChargeDivider.cc.
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);
56 edm::LogInfo(
"RPixLinearChargeDivider") <<
"energy dep. sum=" << sum;
References chargedivisions_, det_id_, simKBmtfDigis_cfi::eLoss, fluctuateCharge_, FluctuateEloss(), mps_fire::i, PV3DBase< T, PVType, FrameType >::mag(), the_energy_path_distribution_, verbosity_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
◆ FluctuateEloss()
void RPixLinearChargeDivider::FluctuateEloss |
( |
int |
pid, |
|
|
double |
particleMomentum, |
|
|
double |
eloss, |
|
|
double |
length, |
|
|
int |
NumberOfSegs, |
|
|
std::vector< RPixEnergyDepositUnit > & |
elossVector |
|
) |
| |
|
private |
Definition at line 62 of file RPixLinearChargeDivider.cc.
68 double particleMass = 139.6;
81 double segmentLength = length / NumberOfSegs;
86 double segmentEloss = (eloss * 1000) / NumberOfSegs;
87 for (
int i = 0;
i < NumberOfSegs;
i++) {
90 particleMomentum * 1000, particleMass, deltaCutoff, segmentLength, segmentEloss, &(
rndEngine_)) /
92 elossVector[
i].setEnergy(de);
98 double ratio = eloss / sum;
99 for (
int ii = 0;
ii < NumberOfSegs;
ii++)
102 double averageEloss = eloss / NumberOfSegs;
103 for (
int ii = 0;
ii < NumberOfSegs;
ii++)
104 elossVector[
ii].setEnergy(averageEloss);
References funct::abs(), deltaCut_, EcalCondDBWriter_cfi::Energy, fluctuate, mps_fire::i, cuy::ii, particleFlowDisplacedVertex_cfi::ratio, rndEngine_, and SiG4UniversalFluctuation::SampleFluctuations().
Referenced by divide().
◆ chargedivisions_
int RPixLinearChargeDivider::chargedivisions_ |
|
private |
◆ deltaCut_
double RPixLinearChargeDivider::deltaCut_ |
|
private |
◆ det_id_
uint32_t RPixLinearChargeDivider::det_id_ |
|
private |
◆ fluctuate
◆ fluctuateCharge_
bool RPixLinearChargeDivider::fluctuateCharge_ |
|
private |
◆ pitch_
double RPixLinearChargeDivider::pitch_ |
|
private |
◆ rndEngine_
CLHEP::HepRandomEngine& RPixLinearChargeDivider::rndEngine_ |
|
private |
◆ the_energy_path_distribution_
◆ thickness_
double RPixLinearChargeDivider::thickness_ |
|
private |
◆ verbosity_
int RPixLinearChargeDivider::verbosity_ |
|
private |