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) {
36 using namespace geant_units::operators;
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;
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])
const float LightCollSlopeR_
const float LightCollSlopeL_
virtual const Topology & topology() const
const MTDTopology * topo_
const MTDGeometry * geom_
int getMTDTopologyMode() const
constexpr uint32_t rawId() const
get the raw id
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)
std::unordered_map< MTDCellId, MTDCellInfo > MTDSimHitDataAccumulator
constexpr NumType convertGeVToMeV(NumType gev)
Detector identifier base class for the MIP Timing Layer.
bool getData(T &iHolder) const
BTLDetId geographicalId(CrysLayout lay) const
std::pair< float, float > pixel(const LocalPoint &p) const override
Local3DPoint localPosition() const
virtual const PixelTopology & specificTopology() const
const MTDGeomDet * idToDet(DetId) const override
const edm::ESGetToken< MTDTopology, MTDTopologyRcd > topoToken_
int nrows() const override
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
std::pair< float, float > pitch() const override
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...
void getEventSetup(const edm::EventSetup &evt)
constexpr NumType convertMmToCm(NumType millimeters)
int column(unsigned nrows=16) const
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)
Local3DPoint entryPoint() const
Entry point in the local Det frame.
int row(unsigned nrows=16) const