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")) { }
39 CLHEP::HepRandomEngine *hre){
42 for (
auto const& hitRef: hitRefs) {
44 const int hitidx = std::get<0>(hitRef);
45 const uint32_t
id = std::get<1>(hitRef);
50 if ( detId.det()!=
DetId::Forward || detId.mtdSubDetector()!=1 )
continue;
59 if( thedet ==
nullptr ) {
60 throw cms::Exception(
"BTLBarDeviceSim") <<
"GeographicalID: " << std::hex
62 <<
" (" << detId.rawId()<<
") is invalid!" <<
std::dec 69 Local3DPoint simscaled(0.1*pentry.x(),0.1*pentry.y(),0.1*pentry.z());
72 const auto& thepixel = topo.
pixel(simscaled);
73 uint8_t row(thepixel.first),
col(thepixel.second);
77 <<
"BTLDetId (row,column): (" << btlid.
row(topo.
nrows()) <<
',' << btlid.
column(topo.
nrows()) <<
") is not equal to " 78 <<
"topology (row,column): (" << uint32_t(row) <<
',' << uint32_t(col) <<
"), overriding to detid";
92 float toa = std::get<2>(hitRef);
99 (simHitIt->second).hit_info[0][0] += Npe;
100 (simHitIt->second).hit_info[0][1] += Npe;
118 if ( (simHitIt->second).hit_info[1][0] == 0
119 || tR < (simHitIt->second).hit_info[1][0] )
120 (simHitIt->second).hit_info[1][0] = tR;
122 if ( (simHitIt->second).hit_info[1][1] == 0
123 || tL < (simHitIt->second).hit_info[1][1] )
124 (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
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
std::pair< float, float > pitch() const override
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