|
|
Go to the documentation of this file.
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) {
58 <<
") is invalid!" <<
std::dec << std::endl;
63 const auto& pentry =
hit.entryPoint();
66 simscaled = topo.pixelToModuleLocalPoint(simscaled, btlid.
row(topo.nrows()), btlid.
column(topo.nrows()));
67 const auto& thepixel = topo.pixel(simscaled);
68 uint8_t row(thepixel.first),
col(thepixel.second);
70 if (btlid.
row(topo.nrows()) != row || btlid.
column(topo.nrows()) !=
col) {
71 edm::LogWarning(
"BTLDeviceSim") <<
"BTLDetId (row,column): (" << btlid.
row(topo.nrows()) <<
','
72 << btlid.
column(topo.nrows()) <<
") is not equal to "
73 <<
"topology (row,column): (" << uint32_t(row) <<
',' << uint32_t(
col)
74 <<
"), overriding to detid";
75 row = btlid.
row(topo.nrows());
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 MTDGeometry * geom_
constexpr Detector det() const
get the detector field from this detid
virtual const PixelTopology & specificTopology() const
virtual const Topology & topology() const
Log< level::Warning, false > LogWarning
int getMTDTopologyMode() const
BTLDeviceSim(const edm::ParameterSet &pset, edm::ConsumesCollector iC)
constexpr NumType convertGeVToMeV(NumType gev)
constexpr int kNumberOfBX
const MTDGeomDet * idToDet(DetId) const override
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0,...
const float LightCollSlopeR_
const MTDTopology * topo_
int row(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)
int mtdSubDetector() const
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
const float LightCollSlopeL_
void getEventSetup(const edm::EventSetup &evt)
bool getData(T &iHolder) const
constexpr uint32_t rawId() const
get the raw id
Detector identifier base class for the MIP Timing Layer.
std::unordered_map< MTDCellId, MTDCellInfo > MTDSimHitDataAccumulator
const float LightCollEff_
constexpr NumType convertMmToCm(NumType millimeters)
const edm::ESGetToken< MTDTopology, MTDTopologyRcd > topoToken_
BTLDetId geographicalId(CrysLayout lay) const
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > geomToken_
int column(unsigned nrows=16) const