11 #include "CLHEP/Random/RandGaussQ.h" 15 bxTime_(pset.getParameter<double>(
"bxTime") ),
16 LightYield_(pset.getParameter<double>(
"LightYield")),
17 LightCollEff_(pset.getParameter<double>(
"LightCollectionEff")),
18 LightCollTime_(pset.getParameter<double>(
"LightCollectionTime")),
19 smearLightCollTime_(pset.getParameter<double>(
"smearLightCollectionTime")),
20 PDE_(pset.getParameter<double>(
"PhotonDetectionEff")) { }
33 CLHEP::HepRandomEngine *hre){
36 for (
auto const& hitRef: hitRefs) {
38 const int hitidx = std::get<0>(hitRef);
39 const uint32_t
id = std::get<1>(hitRef);
44 if ( detId.det()!=
DetId::Forward || detId.mtdSubDetector()!=1 )
continue;
53 if( thedet ==
nullptr ) {
54 throw cms::Exception(
"BTLTileDeviceSim") <<
"GeographicalID: " << std::hex
56 <<
" (" << detId.rawId()<<
") is invalid!" <<
std::dec 63 Local3DPoint simscaled(0.1*pentry.x(),0.1*pentry.y(),0.1*pentry.z());
66 const auto& thepixel = topo.
pixel(simscaled);
67 uint8_t row(thepixel.first),
col(thepixel.second);
71 <<
"BTLDetId (row,column): (" << btlid.
row(topo.
nrows()) <<
',' << btlid.
column(topo.
nrows()) <<
") is not equal to " 72 <<
"topology (row,column): (" << uint32_t(row) <<
',' << uint32_t(col) <<
"), overriding to detid";
94 (simHitIt->second).hit_info[0][0] += Npe;
97 if( (simHitIt->second).hit_info[1][0] == 0 ||
98 toa < (simHitIt->second).hit_info[1][0]
100 (simHitIt->second).hit_info[1][0] = toa;
const float LightCollTime_
virtual const Topology & topology() const
void getEventSetup(const edm::EventSetup &evt)
static constexpr std::array< int, 4 > kTypeBoundariesReference
constexpr uint32_t rawId() const
get the raw id
const float LightCollEff_
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
virtual const PixelTopology & specificTopology() const
std::pair< float, float > pixel(const LocalPoint &p) const override
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
const float smearLightCollTime_
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
BTLTileDeviceSim(const edm::ParameterSet &pset)
T const * product() const
const MTDGeometry * geom_
Local3DPoint entryPoint() const
Entry point in the local Det frame.
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)
int row(unsigned nrows=16) const