13 #include "CLHEP/Random/RandGaussQ.h" 20 bxTime_(
pset.getParameter<double>(
"bxTime")),
21 LightYield_(
pset.getParameter<double>(
"LightYield")),
22 LightCollEff_(
pset.getParameter<double>(
"LightCollectionEff")),
23 LightCollSlopeR_(
pset.getParameter<double>(
"LightCollectionSlopeR")),
24 LightCollSlopeL_(
pset.getParameter<double>(
"LightCollectionSlopeL")),
25 PDE_(
pset.getParameter<double>(
"PhotonDetectionEff")) {}
35 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);
56 if (thedet ==
nullptr) {
57 throw cms::Exception(
"BTLDeviceSim") <<
"GeographicalID: " << std::hex <<
geoId.rawId() <<
" (" << detId.rawId()
58 <<
") is invalid!" <<
std::dec << std::endl;
63 const auto& pentry =
hit.entryPoint();
67 const auto& thepixel = topo.
pixel(simscaled);
68 uint8_t row(thepixel.first),
col(thepixel.second);
72 << btlid.
column(topo.
nrows()) <<
") is not equal to " 73 <<
"topology (row,column): (" << uint32_t(row) <<
',' << uint32_t(
col)
74 <<
"), overriding to detid";
100 (simHitIt->second).hit_info[0][iBXR] += Npe;
103 if ((simHitIt->second).hit_info[1][iBXR] == 0 || tR < (simHitIt->second).hit_info[1][iBXR])
110 (simHitIt->second).hit_info[2][iBXL] += Npe;
113 if ((simHitIt->second).hit_info[3][iBXL] == 0 || tL < (simHitIt->second).hit_info[3][iBXL])
uint8_t geoId(const VFATFrame &frame)
retrieve the GEO information for this channel
int getMTDTopologyMode() const
const float LightCollSlopeR_
const float LightCollSlopeL_
virtual const Topology & topology() const
const MTDTopology * topo_
virtual const PixelTopology & specificTopology() const
const MTDGeometry * geom_
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > geomToken_
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=kCrystalsPerModuleTdr) const
std::unordered_map< MTDCellId, MTDCellInfo > MTDSimHitDataAccumulator
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
Detector identifier base class for the MIP Timing Layer.
std::pair< float, float > pixel(const LocalPoint &p) const override
constexpr NumType convertGeVToMeV(NumType gev)
const MTDGeomDet * idToDet(DetId) const override
const edm::ESGetToken< MTDTopology, MTDTopologyRcd > topoToken_
int nrows() const override
bool getData(T &iHolder) const
constexpr NumType convertMmToCm(NumType millimeters)
std::pair< float, float > pitch() const override
int column(unsigned nrows=kCrystalsPerModuleTdr) const
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
void getEventSetup(const edm::EventSetup &evt)
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
const float LightCollEff_
Log< level::Warning, false > LogWarning
constexpr int kNumberOfBX
BTLDeviceSim(const edm::ParameterSet &pset, edm::ConsumesCollector iC)
BTLDetId geographicalId(CrysLayout lay) const