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) {
58 throw cms::Exception(
"BTLBarDeviceSim") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 59 << detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
65 Local3DPoint simscaled(0.1 * pentry.x(), 0.1 * pentry.y(), 0.1 * pentry.z());
68 const auto& thepixel = topo.
pixel(simscaled);
69 uint8_t row(thepixel.first),
col(thepixel.second);
73 << btlid.
column(topo.
nrows()) <<
") is not equal to " 74 <<
"topology (row,column): (" << uint32_t(row) <<
',' << uint32_t(col)
75 <<
"), overriding to detid";
88 float toa = std::get<2>(hitRef);
95 (simHitIt->second).hit_info[0][0] += Npe;
96 (simHitIt->second).hit_info[0][1] += Npe;
112 if ((simHitIt->second).hit_info[1][0] == 0 || tR < (simHitIt->second).hit_info[1][0])
113 (simHitIt->second).hit_info[1][0] = tR;
115 if ((simHitIt->second).hit_info[1][1] == 0 || tL < (simHitIt->second).hit_info[1][1])
116 (simHitIt->second).hit_info[1][1] = tL;
const float LightCollEff_
int modulesPerType(CrysLayout lay) const
BTLBarDeviceSim(const edm::ParameterSet &pset)
virtual const Topology & topology() const
int getMTDTopologyMode() const
constexpr uint32_t rawId() const
get the raw id
std::unordered_map< MTDCellId, MTDCellInfo > MTDSimHitDataAccumulator
std::pair< float, float > pitch() const override
int nrows() const override
Detector identifier base class for the MIP Timing Layer.
const MTDGeomDet * idToDet(DetId) const override
const float LightCollSlopeL_
const MTDGeometry * geom_
Local3DPoint localPosition() const
virtual const PixelTopology & specificTopology() const
const MTDTopology * topo_
std::pair< float, float > pixel(const LocalPoint &p) const override
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
void getEventSetup(const edm::EventSetup &evt)
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
int column(unsigned nrows=16) const
void getHitsResponse(const std::vector< std::tuple< int, uint32_t, float > > &hitRefs, const edm::Handle< edm::PSimHitContainer > &hits, mtd_digitizer::MTDSimHitDataAccumulator *simHitAccumulator, CLHEP::HepRandomEngine *hre)
T const * product() const
Local3DPoint entryPoint() const
Entry point in the local Det frame.
const float LightCollSlopeR_
int row(unsigned nrows=16) const