12 #include "CLHEP/Random/RandGaussQ.h"
17 bxTime_(
pset.getParameter<double>(
"bxTime")),
18 LightYield_(
pset.getParameter<double>(
"LightYield")),
19 LightCollEff_(
pset.getParameter<double>(
"LightCollectionEff")),
20 LightCollSlopeR_(
pset.getParameter<double>(
"LightCollectionSlopeR")),
21 LightCollSlopeL_(
pset.getParameter<double>(
"LightCollectionSlopeL")),
22 PDE_(
pset.getParameter<double>(
"PhotonDetectionEff")) {}
37 CLHEP::HepRandomEngine* hre) {
39 for (
auto const& hitRef : hitRefs) {
40 const int hitidx = std::get<0>(hitRef);
41 const uint32_t
id = std::get<1>(hitRef);
57 if (thedet ==
nullptr) {
59 <<
") is invalid!" <<
std::dec << std::endl;
64 const auto& pentry =
hit.entryPoint();
65 Local3DPoint simscaled(0.1 * pentry.x(), 0.1 * pentry.y(), 0.1 * pentry.z());
67 simscaled = topo.pixelToModuleLocalPoint(simscaled, btlid.
row(topo.nrows()), btlid.
column(topo.nrows()));
68 const auto& thepixel = topo.pixel(simscaled);
69 uint8_t row(thepixel.first),
col(thepixel.second);
71 if (btlid.
row(topo.nrows()) != row || btlid.
column(topo.nrows()) !=
col) {
72 edm::LogWarning(
"BTLDeviceSim") <<
"BTLDetId (row,column): (" << btlid.
row(topo.nrows()) <<
','
73 << btlid.
column(topo.nrows()) <<
") is not equal to "
74 <<
"topology (row,column): (" << uint32_t(row) <<
',' << uint32_t(
col)
75 <<
"), overriding to detid";
76 row = btlid.
row(topo.nrows());
88 double distR = 0.5 * topo.pitch().first - 0.1 *
hit.localPosition().
x();
89 double distL = 0.5 * topo.pitch().first + 0.1 *
hit.localPosition().
x();
101 (simHitIt->second).hit_info[0][iBXR] += Npe;
104 if ((simHitIt->second).hit_info[1][iBXR] == 0 || tR < (simHitIt->second).hit_info[1][iBXR])
111 (simHitIt->second).hit_info[2][iBXL] += Npe;
114 if ((simHitIt->second).hit_info[3][iBXL] == 0 || tL < (simHitIt->second).hit_info[3][iBXL])