#include <CSCChamberMasker.cc>
|
template<typename T , typename C = MuonDigiCollection<CSCDetId, T>> |
void | ageDigis (edm::Event &event, edm::EDGetTokenT< C > &digiToken, CLHEP::HepRandomEngine &randGen, std::unique_ptr< C > &filteredDigis) |
|
void | beginRun (edm::Run const &, edm::EventSetup const &) override |
|
template<typename T , typename C = MuonDigiCollection<CSCDetId, T>> |
void | copyDigis (edm::Event &event, edm::EDGetTokenT< C > &digiToken, std::unique_ptr< C > &filteredDigis) |
|
void | produce (edm::Event &, const edm::EventSetup &) override |
|
SimMuon/CSCDigitizer/plugins/CSCChamberMasker.cc
Description: Class to mask CSC digis on a chamber by chamber basis
Definition at line 69 of file CSCChamberMasker.cc.
◆ CSCChamberMasker()
Definition at line 112 of file CSCChamberMasker.cc.
119 produces<CSCStripDigiCollection>(
"MuonCSCStripDigi");
120 produces<CSCWireDigiCollection>(
"MuonCSCWireDigi");
121 produces<CSCCLCTDigiCollection>(
"MuonCSCCLCTDigi");
122 produces<CSCALCTDigiCollection>(
"MuonCSCALCTDigi");
T getParameter(std::string const &) const
edm::EDGetTokenT< CSCWireDigiCollection > m_wireDigiToken
edm::EDGetTokenT< CSCStripDigiCollection > m_stripDigiToken
edm::EDGetTokenT< CSCCLCTDigiCollection > m_clctDigiToken
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_cscGeomToken
edm::ESGetToken< MuonSystemAging, MuonSystemAgingRcd > m_agingObjToken
edm::EDGetTokenT< CSCALCTDigiCollection > m_alctDigiToken
◆ ~CSCChamberMasker()
CSCChamberMasker::~CSCChamberMasker |
( |
| ) |
|
|
override |
◆ ageDigis()
template<typename T , typename C >
void CSCChamberMasker::ageDigis |
( |
edm::Event & |
event, |
|
|
edm::EDGetTokenT< C > & |
digiToken, |
|
|
CLHEP::HepRandomEngine & |
randGen, |
|
|
std::unique_ptr< C > & |
filteredDigis |
|
) |
| |
|
private |
Definition at line 176 of file CSCChamberMasker.cc.
References CSCDetId::chamber(), EFF_CHAMBER, EFF_STRIPS, EFF_WIRES, CSCDetId::endcap(), edm::EDGetTokenT< T >::isUninitialized(), dqmiolumiharvest::j, dqmdumpme::last, CSCDetId::layer(), phase1PixelTopology::layer, m_CSCEffs, CSCDetId::ring(), CSCDetId::station(), and relativeConstraints::value.
182 event.getByToken(digiToken, digis);
184 for (
const auto &
j : (*digis)) {
185 auto digiItr =
j.second.first;
186 auto last =
j.second.second;
193 for (; digiItr !=
last; ++digiItr) {
197 std::pair<unsigned int, float> typeEff = chEffIt->second;
198 int type = typeEff.first % 10;
199 int layer = typeEff.first / 10;
201 bool doRandomize =
false;
207 if (!doRandomize || (randGen.flat() <= typeEff.second)) {
208 filteredDigis->insertDigi(cscDetId, *digiItr);
constexpr bool isUninitialized() const noexcept
constexpr std::array< uint8_t, layerIndexSize > layer
std::map< CSCDetId, std::pair< unsigned int, float > > m_CSCEffs
◆ beginRun()
Definition at line 217 of file CSCChamberMasker.cc.
References CSCDetId::chamber(), CSCGeometry::chambers(), chambers, CSCDetId::endcap(), edm::EventSetup::getHandle(), m_agingObjToken, MuonSystemAging::m_CSCChambEffs, m_CSCEffs, m_cscGeomToken, CSCDetId::rawIdMaker(), CSCDetId::ring(), and CSCDetId::station().
232 if (agingPair.first != rawId)
235 type = agingPair.second.first;
236 eff = agingPair.second.second;
static int rawIdMaker(int iendcap, int istation, int iring, int ichamber, int ilayer)
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_cscGeomToken
edm::ESGetToken< MuonSystemAging, MuonSystemAgingRcd > m_agingObjToken
std::map< CSCDetId, std::pair< unsigned int, float > > m_CSCEffs
std::map< unsigned int, std::pair< unsigned int, float > > m_CSCChambEffs
const ChamberContainer & chambers() const
Return a vector of all chambers.
static char chambers[264][20]
◆ copyDigis()
template<typename T , typename C >
◆ fillDescriptions()
◆ produce()
Definition at line 132 of file CSCChamberMasker.cc.
References edmPickEvents::event, edm::RandomNumberGenerator::getEngine(), m_alctDigiToken, m_clctDigiToken, m_stripDigiToken, m_wireDigiToken, and eostools::move().
134 CLHEP::HepRandomEngine &randGen = randGenService->
getEngine(
event.streamID());
149 event.put(
std::move(filteredStripDigis),
"MuonCSCStripDigi");
150 event.put(
std::move(filteredWireDigis),
"MuonCSCWireDigi");
151 event.put(
std::move(filteredCLCTDigis),
"MuonCSCCLCTDigi");
152 event.put(
std::move(filteredALCTDigis),
"MuonCSCALCTDigi");
edm::EDGetTokenT< CSCWireDigiCollection > m_wireDigiToken
MuonDigiCollection< CSCDetId, CSCStripDigi > CSCStripDigiCollection
edm::EDGetTokenT< CSCStripDigiCollection > m_stripDigiToken
MuonDigiCollection< CSCDetId, CSCCLCTDigi > CSCCLCTDigiCollection
edm::EDGetTokenT< CSCCLCTDigiCollection > m_clctDigiToken
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
edm::EDGetTokenT< CSCALCTDigiCollection > m_alctDigiToken
MuonDigiCollection< CSCDetId, CSCWireDigi > CSCWireDigiCollection
MuonDigiCollection< CSCDetId, CSCALCTDigi > CSCALCTDigiCollection
◆ m_agingObjToken
◆ m_alctDigiToken
◆ m_clctDigiToken
◆ m_CSCEffs
std::map<CSCDetId, std::pair<unsigned int, float> > CSCChamberMasker::m_CSCEffs |
|
private |
◆ m_cscGeomToken
◆ m_stripDigiToken
◆ m_wireDigiToken