CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
GEMDigiSource Class Reference

#include <GEMDigiSource.h>

Inheritance diagram for GEMDigiSource:
GEMDQMBase DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 GEMDigiSource (const edm::ParameterSet &cfg)
 
 ~GEMDigiSource () override
 
- Public Member Functions inherited from GEMDQMBase
 GEMDQMBase (const edm::ParameterSet &cfg)
 
int readGeometryPhiInfoChamber (const GEMStation *station, MEStationInfo &stationInfo)
 
int readGeometryRadiusInfoChamber (const GEMStation *station, MEStationInfo &stationInfo)
 
 ~GEMDQMBase () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void LoadROMap (edm::EventSetup const &iSetup)
 
- Protected Member Functions inherited from GEMDQMBase
template<typename T >
bool checkRefs (const std::vector< T *> &)
 
dqm::impl::MonitorElementCreateSummaryHist (DQMStore::IBooker &ibooker, TString strName)
 
int GenerateMEPerChamber (DQMStore::IBooker &ibooker)
 
int getDetOccXBin (const int, const int, const int)
 
int getIdxModule (const int, const int)
 
int getIEtaFromVFAT (const int station, const int vfat)
 
int getIEtaFromVFATGE0 (const int vfat)
 
int getIEtaFromVFATGE11 (const int vfat)
 
int getIEtaFromVFATGE21 (const int vfat)
 
int getMaxVFAT (const int)
 
std::string getNameDirChamber (ME4IdsKey key4)
 
std::string getNameDirLayer (ME3IdsKey key3)
 
std::string getNameDirLayer (ME4IdsKey key4)
 
int getNumEtaPartitions (const GEMStation *)
 
int getNumModule (const int)
 
int getVFATNumber (const int, const int, const int)
 
int getVFATNumberByDigi (const int, const int, const int)
 
int getVFATNumberGE11 (const int, const int, const int)
 
int initGeometry (edm::EventSetup const &iSetup)
 
ME2IdsKey key3Tokey2 (ME3IdsKey key)
 
ME3IdsKey key4Tokey3 (ME4IdsKey key)
 
ME4IdsKey key5Tokey4 (ME5IdsKey key)
 
int keyToChamber (ME4IdsKey key)
 
int keyToChamber (ME5IdsKey key)
 
int keyToChamber (ME3IdsKey key)
 
int keyToIEta (ME4IdsKey key)
 
int keyToIEta (ME5IdsKey key)
 
int keyToLayer (ME3IdsKey key)
 
int keyToLayer (ME4IdsKey key)
 
int keyToLayer (ME5IdsKey key)
 
int keyToModule (ME4IdsKey key)
 
int keyToModule (ME5IdsKey key)
 
int keyToRegion (ME2IdsKey key)
 
int keyToRegion (ME3IdsKey key)
 
int keyToRegion (ME4IdsKey key)
 
int keyToRegion (ME5IdsKey key)
 
int keyToStation (ME2IdsKey key)
 
int keyToStation (ME3IdsKey key)
 
int keyToStation (ME4IdsKey key)
 
int keyToStation (ME5IdsKey key)
 
int loadChambers ()
 
virtual int ProcessWithMEMap2AbsReWithEta (BookingHelper &bh, ME3IdsKey key)
 
virtual int ProcessWithMEMap2WithChamber (BookingHelper &bh, ME3IdsKey key)
 
virtual int ProcessWithMEMap2WithEtaCh (BookingHelper &bh, ME4IdsKey key)
 
virtual int ProcessWithMEMap4WithChamber (BookingHelper &bh, ME4IdsKey key)
 
virtual int ProcessWithMEMap5 (BookingHelper &bh, ME5IdsKey key)
 
Float_t restrictAngle (const Float_t fTheta, const Float_t fStart)
 
int SortingLayers (std::vector< ME4IdsKey > &listLayers)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

int ProcessWithMEMap2 (BookingHelper &bh, ME2IdsKey key) override
 
int ProcessWithMEMap2WithEta (BookingHelper &bh, ME3IdsKey key) override
 
int ProcessWithMEMap3 (BookingHelper &bh, ME3IdsKey key) override
 
int ProcessWithMEMap4 (BookingHelper &bh, ME4IdsKey key) override
 
int ProcessWithMEMap5WithChamber (BookingHelper &bh, ME5IdsKey key) override
 

Private Attributes

Float_t fRadiusMax_
 
Float_t fRadiusMin_
 
const edm::ESGetToken< GEMChMap, GEMChMapRcdgemChMapToken_
 
edm::EDGetTokenT< LumiScalersCollectionlumiScalers_
 
MEMap2Inf mapBX_
 
std::map< ME4IdsKey, Int_t > mapChamberType_
 
MEMap4Inf mapDigiOcc_ieta_
 
MEMap4Inf mapDigiOcc_phi_
 
MEMap5Inf mapDigiOccPerCh_
 
MEMap3Inf mapDigiWheel_layer_
 
std::map< ME3IdsKey, Int_t > mapStripToVFAT_
 
MEMap4Inf mapTotalDigi_layer_
 
MEMap3Inf mapTotalDigiPerEvtIEta_
 
MEMap4Inf mapTotalDigiPerEvtLayer_
 
Int_t nBXMax_
 
Int_t nBXMin_
 
std::string strFolderMain_
 
edm::EDGetToken tagDigi_
 
Bool_t useDBEMap_
 

Static Private Attributes

static const int nNumBitDigiOcc_ = 16384
 

Additional Inherited Members

- Public Types inherited from GEMDQMBase
enum  {
  GEMDQM_RUNTYPE_ONLINE, GEMDQM_RUNTYPE_OFFLINE, GEMDQM_RUNTYPE_RELVAL, GEMDQM_RUNTYPE_ALLPLOTS,
  GEMDQM_RUNTYPE_NONE = -1
}
 
typedef MEMapInfT< MEMap2Ids, ME2IdsKeyMEMap2Inf
 
typedef MEMapInfT< MEMap3Ids, ME3IdsKeyMEMap3Inf
 
typedef MEMapInfT< MEMap4Ids, ME4IdsKeyMEMap4Inf
 
typedef MEMapInfT< MEMap5Ids, ME5IdsKeyMEMap5Inf
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Attributes inherited from GEMDQMBase
std::string log_category_
 
Int_t nRunType_
 
- Protected Attributes inherited from GEMDQMBase
const GEMGeometryGEMGeometry_
 
edm::ESGetToken< GEMGeometry, MuonGeometryRecordgeomToken_
 
std::vector< GEMDetIdlistChamberId_
 
std::map< GEMDetId, std::vector< const GEMEtaPartition * > > mapEtaPartition_
 
std::map< ME3IdsKey, MEStationInfomapStationInfo_
 
std::map< ME4IdsKey, int > mapStationToIdx_
 
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
 
std::map< ME2IdsKey, bool > MEMap2Check_
 
std::map< ME3IdsKey, bool > MEMap2WithChCheck_
 
std::map< ME4IdsKey, bool > MEMap2WithEtaChCheck_
 
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
 
std::map< ME3IdsKey, bool > MEMap3Check_
 
std::map< ME4IdsKey, bool > MEMap4Check_
 
std::map< ME4IdsKey, bool > MEMap4WithChCheck_
 
std::map< ME5IdsKey, bool > MEMap5Check_
 
std::map< ME5IdsKey, bool > MEMap5WithChCheck_
 
int nMaxNumCh_
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 32 of file GEMDigiSource.h.

Constructor & Destructor Documentation

◆ GEMDigiSource()

GEMDigiSource::GEMDigiSource ( const edm::ParameterSet cfg)
explicit

Definition at line 6 of file GEMDigiSource.cc.

References edm::BeginRun, looper::cfg, ProducerED_cfi::InputTag, lumiScalers_, nBXMax_, nBXMin_, tagDigi_, and useDBEMap_.

7  : GEMDQMBase(cfg), gemChMapToken_(esConsumes<GEMChMap, GEMChMapRcd, edm::Transition::BeginRun>()) {
8  tagDigi_ = consumes<GEMDigiCollection>(cfg.getParameter<edm::InputTag>("digisInputLabel"));
9  lumiScalers_ = consumes<LumiScalersCollection>(
10  cfg.getUntrackedParameter<edm::InputTag>("lumiCollection", edm::InputTag("scalersRawToDigi")));
11  nBXMin_ = cfg.getParameter<int>("bxMin");
12  nBXMax_ = cfg.getParameter<int>("bxMax");
13  useDBEMap_ = cfg.getParameter<bool>("useDBEMap");
14 }
edm::EDGetTokenT< LumiScalersCollection > lumiScalers_
Definition: GEMDigiSource.h:58
edm::EDGetToken tagDigi_
Definition: GEMDigiSource.h:56
const edm::ESGetToken< GEMChMap, GEMChMapRcd > gemChMapToken_
Definition: GEMDigiSource.h:54
GEMDQMBase(const edm::ParameterSet &cfg)
Definition: GEMDQMBase.cc:7
Bool_t useDBEMap_
Definition: GEMDigiSource.h:76

◆ ~GEMDigiSource()

GEMDigiSource::~GEMDigiSource ( )
inlineoverride

Definition at line 35 of file GEMDigiSource.h.

35 {}

Member Function Documentation

◆ analyze()

void GEMDigiSource::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 228 of file GEMDigiSource.cc.

References ztail::d, GEMDQMBase::MEMapInfT< M, K >::Fill(), GEMDQMBase::MEStationInfo::fMinPhi_, l1ScoutingRun3::ugmt::fPhi(), hydjet2DefaultParameters_cff::fR, fRadiusMax_, fRadiusMin_, GEMDQMBase::GEMGeometry_, GEMDQMBase::getIdxModule(), GEMGeometry::idToDet(), l1tPhase2CaloJetEmulator_cfi::iEta, GEMDetId::ieta(), submitPVResolutionJobs::key, GEMDQMBase::listChamberId_, V0Monitor_cfi::lumiScalers, lumiScalers_, M_PI, mapBX_, mapChamberType_, mapDigiOcc_ieta_, mapDigiOcc_phi_, mapDigiOccPerCh_, mapDigiWheel_layer_, GEMDQMBase::mapEtaPartition_, GEMDQMBase::mapStationInfo_, mapStripToVFAT_, mapTotalDigi_layer_, mapTotalDigiPerEvtIEta_, mapTotalDigiPerEvtLayer_, WZElectronSkims53X_cff::max, SiStripPI::min, nBXMax_, nBXMin_, GEMDQMBase::MEStationInfo::nNumEtaPartitions_, GEMDQMBase::MEStationInfo::nNumModules_, PV3DBase< T, PVType, FrameType >::phi(), GEMDQMBase::restrictAngle(), GeomDet::surface(), and tagDigi_.

228  {
230  event.getByToken(this->tagDigi_, gemDigis);
232  event.getByToken(lumiScalers_, lumiScalers);
233 
234  std::map<ME4IdsKey, Int_t> total_digi_layer;
235  std::map<ME3IdsKey, Int_t> total_digi_eta;
236  for (auto gid : listChamberId_) {
237  ME2IdsKey key2{gid.region(), gid.station()};
238  ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
239  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
240  std::map<Int_t, bool> bTagVFAT;
241  bTagVFAT.clear();
242  MEStationInfo& stationInfo = mapStationInfo_[key3];
243  const BoundPlane& surface = GEMGeometry_->idToDet(gid)->surface();
244  for (auto iEta : mapEtaPartition_[gid]) {
245  GEMDetId eId = iEta->id();
246  ME3IdsKey key3IEta{gid.region(), gid.station(), eId.ieta()};
247  if (total_digi_eta.find(key3IEta) == total_digi_eta.end())
248  total_digi_eta[key3IEta] = 0;
249  const auto& digis_in_det = gemDigis->get(eId);
250  auto nChamberType = mapChamberType_[{gid.station(), gid.layer(), gid.chamber(), eId.ieta()}];
251  Int_t nIdxModule = getIdxModule(gid.station(), nChamberType);
252  ME4IdsKey key4{gid.region(), gid.station(), gid.layer(), nIdxModule};
253  ME5IdsKey key5Ch{gid.region(), gid.station(), gid.layer(), nIdxModule, gid.chamber()};
254  if (total_digi_layer.find(key4) == total_digi_layer.end())
255  total_digi_layer[key4] = 0;
256  for (auto d = digis_in_det.first; d != digis_in_det.second; ++d) {
257  // Filling of digi occupancy
258  Int_t nIdxVFAT = mapStripToVFAT_[{nChamberType, eId.ieta(), d->strip()}];
259  mapTotalDigi_layer_.Fill(key4, gid.chamber(), nIdxVFAT);
260 
261  // Filling of digi
262  mapDigiOcc_ieta_.Fill(key4, eId.ieta()); // Eta (partition)
263 
264  GlobalPoint digi_global_pos = surface.toGlobal(iEta->centreOfStrip(d->strip()));
265  Float_t fPhi = (Float_t)digi_global_pos.phi();
266  Float_t fPhiShift = restrictAngle(fPhi, stationInfo.fMinPhi_);
267  Float_t fPhiDeg = fPhiShift * 180.0 / M_PI;
268  mapDigiOcc_phi_.Fill(key4, fPhiDeg); // Phi
269 
270  // Filling of R-Phi occupancy
271  Float_t fR = fRadiusMin_ + (fRadiusMax_ - fRadiusMin_) * (eId.ieta() - 0.5) / stationInfo.nNumEtaPartitions_;
272  mapDigiWheel_layer_.Fill(key3, fPhiShift, fR);
273 
274  Int_t nIEtaInMod = eId.ieta();
275  if (gid.station() == 2) {
276  nIEtaInMod = (eId.ieta() - 1) % stationInfo.nNumModules_ + 1;
277  }
278  mapDigiOccPerCh_.Fill(key5Ch, d->strip(), nIEtaInMod); // Per chamber
279 
280  // For total digis
281  total_digi_layer[key4]++;
282  total_digi_eta[key3IEta]++;
283 
284  // Filling of bx
285  Int_t nBX = std::min(std::max((Int_t)d->bx(), nBXMin_), nBXMax_); // For under/overflow
286  if (bTagVFAT.find(nIdxVFAT) == bTagVFAT.end()) {
287  mapBX_.Fill(key2, nBX);
288  }
289 
290  bTagVFAT[nIdxVFAT] = true;
291  }
292  }
293  }
294  for (auto [key, num_total_digi] : total_digi_layer)
295  mapTotalDigiPerEvtLayer_.Fill(key, num_total_digi);
296  for (auto [key, num_total_digi] : total_digi_eta)
297  mapTotalDigiPerEvtIEta_.Fill(key, num_total_digi);
298 }
MEMap4Inf mapTotalDigi_layer_
Definition: GEMDigiSource.h:65
int getIdxModule(const int, const int)
Definition: GEMDQMBase.h:688
std::tuple< Int_t, Int_t, Int_t, Int_t, Int_t > ME5IdsKey
std::vector< GEMDetId > listChamberId_
Definition: GEMDQMBase.h:632
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:25
Float_t fRadiusMax_
Definition: GEMDigiSource.h:80
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:651
edm::EDGetTokenT< LumiScalersCollection > lumiScalers_
Definition: GEMDigiSource.h:58
int Fill(K key, Double_t x)
Definition: GEMDQMBase.h:395
edm::EDGetToken tagDigi_
Definition: GEMDigiSource.h:56
MEMap3Inf mapTotalDigiPerEvtIEta_
Definition: GEMDigiSource.h:69
MEMap2Inf mapBX_
Definition: GEMDigiSource.h:70
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
Definition: GEMDQMBase.h:740
MEMap4Inf mapTotalDigiPerEvtLayer_
Definition: GEMDigiSource.h:68
key
prepare the HTCondor submission files and eventually submit them
float fPhi(int hwPhi)
Definition: conversion.h:18
d
Definition: ztail.py:151
#define M_PI
constexpr int ieta() const
Definition: GEMDetId.h:199
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:629
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
std::map< ME4IdsKey, Int_t > mapChamberType_
Definition: GEMDigiSource.h:60
MEMap4Inf mapDigiOcc_phi_
Definition: GEMDigiSource.h:67
MEMap4Inf mapDigiOcc_ieta_
Definition: GEMDigiSource.h:66
std::map< GEMDetId, std::vector< const GEMEtaPartition * > > mapEtaPartition_
Definition: GEMDQMBase.h:633
MEMap5Inf mapDigiOccPerCh_
Definition: GEMDigiSource.h:72
std::tuple< Int_t, Int_t > ME2IdsKey
Float_t fRadiusMin_
Definition: GEMDigiSource.h:79
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
MEMap3Inf mapDigiWheel_layer_
Definition: GEMDigiSource.h:63
std::map< ME3IdsKey, Int_t > mapStripToVFAT_
Definition: GEMDigiSource.h:61

◆ bookHistograms()

void GEMDigiSource::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 85 of file GEMDigiSource.cc.

References dqm::implementation::NavigatorBase::cd(), fRadiusMax_, fRadiusMin_, GEMDQMBase::GEMDQM_RUNTYPE_ALLPLOTS, GEMDQMBase::GEMDQM_RUNTYPE_OFFLINE, GEMDQMBase::GEMDQM_RUNTYPE_RELVAL, GEMDQMBase::GEMGeometry_, GEMDQMBase::GenerateMEPerChamber(), GEMDQMBase::initGeometry(), GEMDQMBase::loadChambers(), LoadROMap(), M_PI, mapBX_, mapDigiOcc_ieta_, mapDigiOcc_phi_, mapDigiOccPerCh_, mapDigiWheel_layer_, mapTotalDigi_layer_, mapTotalDigiPerEvtIEta_, mapTotalDigiPerEvtLayer_, nBXMax_, nBXMin_, GEMDQMBase::nRunType_, dqm::implementation::NavigatorBase::setCurrentFolder(), GEMDQMBase::MEMapInfT< M, K >::SetNoUnderOverflowBin(), strFolderMain_, and GEMDQMBase::MEMapInfT< M, K >::TurnOff().

85  {
86  initGeometry(iSetup);
87  if (GEMGeometry_ == nullptr)
88  return;
89  loadChambers();
90  LoadROMap(iSetup);
91 
92  strFolderMain_ = "GEM/Digis";
93 
94  fRadiusMin_ = 120.0;
95  fRadiusMax_ = 250.0;
96  float radS = -5.0 / 180 * M_PI;
97  float radL = 355.0 / 180 * M_PI;
98 
99  mapTotalDigi_layer_ = MEMap4Inf(this, "occ", "Digi Occupancy", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5, "Chamber", "VFAT");
101  this, "occ_rphi", "Digi R-Phi Occupancy", 360, radS, radL, 8, fRadiusMin_, fRadiusMax_, "#phi (rad)", "R [cm]");
102  mapDigiOcc_ieta_ = MEMap4Inf(this, "occ_ieta", "Digi iEta Occupancy", 8, 0.5, 8.5, "iEta", "Number of fired digis");
104  MEMap4Inf(this, "occ_phi", "Digi Phi Occupancy", 72, -5, 355, "#phi (degree)", "Number of fired digis");
106  "digis_per_layer",
107  "Total number of digis per event for each layers",
108  50,
109  -0.5,
110  99.5,
111  "Number of fired digis",
112  "Events");
115  "digis_per_ieta",
116  "Total number of digis per event for each eta partitions",
117  50,
118  -0.5,
119  99.5,
120  "Number of fired digis",
121  "Events");
123 
124  mapBX_ = MEMap2Inf(this, "bx", "Digi Bunch Crossing", 21, nBXMin_ - 0.5, nBXMax_ + 0.5, "Bunch crossing");
125 
126  mapDigiOccPerCh_ = MEMap5Inf(this, "occ", "Digi Occupancy", 1, -0.5, 1.5, 1, 0.5, 1.5, "Digi", "iEta");
127 
130  mapBX_.TurnOff();
131  }
132 
137  }
138 
142  }
143 
147  }
148 
149  ibooker.cd();
151  GenerateMEPerChamber(ibooker);
152 }
MEMap4Inf mapTotalDigi_layer_
Definition: GEMDigiSource.h:65
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
Definition: GEMDQMBase.h:475
Int_t nRunType_
Definition: GEMDQMBase.h:545
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:474
int initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMBase.cc:27
Float_t fRadiusMax_
Definition: GEMDigiSource.h:80
int loadChambers()
Definition: GEMDQMBase.cc:56
std::string strFolderMain_
Definition: GEMDigiSource.h:74
MEMap3Inf mapTotalDigiPerEvtIEta_
Definition: GEMDigiSource.h:69
MEMap2Inf mapBX_
Definition: GEMDigiSource.h:70
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Definition: GEMDQMBase.cc:197
MEMap4Inf mapTotalDigiPerEvtLayer_
Definition: GEMDigiSource.h:68
MEMapInfT< MEMap2Ids, ME2IdsKey > MEMap2Inf
Definition: GEMDQMBase.h:473
#define M_PI
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:629
void LoadROMap(edm::EventSetup const &iSetup)
void SetNoUnderOverflowBin()
Definition: GEMDQMBase.h:247
MEMap4Inf mapDigiOcc_phi_
Definition: GEMDigiSource.h:67
MEMap4Inf mapDigiOcc_ieta_
Definition: GEMDigiSource.h:66
MEMapInfT< MEMap5Ids, ME5IdsKey > MEMap5Inf
Definition: GEMDQMBase.h:476
MEMap5Inf mapDigiOccPerCh_
Definition: GEMDigiSource.h:72
Float_t fRadiusMin_
Definition: GEMDigiSource.h:79
MEMap3Inf mapDigiWheel_layer_
Definition: GEMDigiSource.h:63

◆ dqmBeginRun()

void GEMDigiSource::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 41 of file GEMDigiSource.h.

41 {}

◆ fillDescriptions()

void GEMDigiSource::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 16 of file GEMDigiSource.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

16  {
18  desc.add<edm::InputTag>("digisInputLabel", edm::InputTag("muonGEMDigis", ""));
19  desc.addUntracked<std::string>("runType", "online");
20  desc.addUntracked<std::string>("logCategory", "GEMDigiSource");
21  desc.add<int>("bxMin", -10);
22  desc.add<int>("bxMax", 10);
23  desc.add<bool>("useDBEMap", true);
24  descriptions.add("GEMDigiSource", desc);
25 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ LoadROMap()

void GEMDigiSource::LoadROMap ( edm::EventSetup const &  iSetup)
protected

Definition at line 27 of file GEMDigiSource.cc.

References GEMDetId::chamber(), gemChMapToken_, edm::EventSetup::getData(), hcalRecHitTable_cff::ieta, GEMDetId::layer(), mapChamberType_, mapStripToVFAT_, AlCaHLTBitMon_ParallelJobs::p, GEMDetId::station(), nano_mu_digi_cff::strip, and useDBEMap_.

Referenced by bookHistograms().

27  {
28  if (useDBEMap_) {
29  const auto& chMap = iSetup.getData(gemChMapToken_);
30  auto gemChMap = std::make_unique<GEMChMap>(chMap);
31 
32  std::map<int, bool> mapCheckedType;
33  for (auto const& p : gemChMap->chamberMap()) {
34  auto& dc = p.second;
35  GEMDetId gemChId(dc.detId);
36  for (Int_t ieta = 1; ieta <= 24; ieta++) {
37  if (!gemChMap->isValidStrip(dc.chamberType, ieta, 1))
38  continue;
39  mapChamberType_[{gemChId.station(), gemChId.layer(), gemChId.chamber(), ieta}] = dc.chamberType;
40  if (mapCheckedType[dc.chamberType])
41  continue;
42  for (Int_t strip = 0; strip <= 3 * 128; strip++) {
43  if (!gemChMap->isValidStrip(dc.chamberType, ieta, strip))
44  continue;
45  auto& stripInfo = gemChMap->getChannel(dc.chamberType, ieta, strip);
46  mapStripToVFAT_[{dc.chamberType, ieta, strip}] = stripInfo.vfatAdd;
47  }
48  }
49  mapCheckedType[dc.chamberType] = true;
50  }
51  } else {
52  // no EMap in DB, using dummy
53  auto gemChMap = std::make_unique<GEMChMap>();
54  gemChMap->setDummy();
55 
56  std::map<int, bool> mapCheckedType;
57  for (auto const& p : gemChMap->chamberMap()) {
58  auto& dc = p.second;
59  GEMDetId gemChId(dc.detId);
60 
61  for (Int_t ieta = 1; ieta <= 24; ieta++) {
62  if (!gemChMap->isValidStrip(dc.chamberType, ieta, 1))
63  continue;
64  Int_t nChamberType = dc.chamberType;
65  if (gemChId.station() == 1) {
66  nChamberType = 13 - gemChId.layer();
67  } else if (gemChId.station() == 2) {
68  nChamberType = 24 - (ieta - 1) / 4;
69  }
70  mapChamberType_[{gemChId.station(), gemChId.layer(), gemChId.chamber(), ieta}] = nChamberType;
71  if (mapCheckedType[nChamberType])
72  continue;
73  mapCheckedType[nChamberType] = true;
74  for (Int_t strip = 0; strip <= 3 * 128; strip++) {
75  if (!gemChMap->isValidStrip(nChamberType, ieta, strip))
76  continue;
77  auto& stripInfo = gemChMap->getChannel(nChamberType, ieta, strip);
78  mapStripToVFAT_[{nChamberType, ieta, strip}] = stripInfo.vfatAdd;
79  }
80  }
81  }
82  }
83 }
const edm::ESGetToken< GEMChMap, GEMChMapRcd > gemChMapToken_
Definition: GEMDigiSource.h:54
std::map< ME4IdsKey, Int_t > mapChamberType_
Definition: GEMDigiSource.h:60
Bool_t useDBEMap_
Definition: GEMDigiSource.h:76
std::map< ME3IdsKey, Int_t > mapStripToVFAT_
Definition: GEMDigiSource.h:61

◆ ProcessWithMEMap2()

int GEMDigiSource::ProcessWithMEMap2 ( BookingHelper bh,
ME2IdsKey  key 
)
overrideprivatevirtual

Reimplemented from GEMDQMBase.

Definition at line 154 of file GEMDigiSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), submitPVResolutionJobs::key, and mapBX_.

154  {
155  mapBX_.bookND(bh, key);
156 
157  return 0;
158 }
MEMap2Inf mapBX_
Definition: GEMDigiSource.h:70
key
prepare the HTCondor submission files and eventually submit them
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307

◆ ProcessWithMEMap2WithEta()

int GEMDigiSource::ProcessWithMEMap2WithEta ( BookingHelper bh,
ME3IdsKey  key 
)
overrideprivatevirtual

Reimplemented from GEMDQMBase.

Definition at line 160 of file GEMDigiSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), submitPVResolutionJobs::key, and mapTotalDigiPerEvtIEta_.

160  {
162 
163  return 0;
164 }
MEMap3Inf mapTotalDigiPerEvtIEta_
Definition: GEMDigiSource.h:69
key
prepare the HTCondor submission files and eventually submit them
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307

◆ ProcessWithMEMap3()

int GEMDigiSource::ProcessWithMEMap3 ( BookingHelper bh,
ME3IdsKey  key 
)
overrideprivatevirtual

Reimplemented from GEMDQMBase.

Definition at line 166 of file GEMDigiSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), GEMDQMBase::MEStationInfo::fMinPhi_, submitPVResolutionJobs::key, M_PI, mapDigiWheel_layer_, GEMDQMBase::mapStationInfo_, GEMDQMBase::MEStationInfo::nMaxVFAT_, GEMDQMBase::MEStationInfo::nNumChambers_, GEMDQMBase::MEStationInfo::nNumEtaPartitions_, GEMDQMBase::MEMapInfT< M, K >::SetBinHighEdgeX(), GEMDQMBase::MEMapInfT< M, K >::SetBinLowEdgeX(), GEMDQMBase::MEMapInfT< M, K >::SetNbinsX(), and GEMDQMBase::MEMapInfT< M, K >::SetNbinsY().

166  {
167  MEStationInfo& stationInfo = mapStationInfo_[key];
168 
169  int nNumVFATPerEta = stationInfo.nMaxVFAT_ / stationInfo.nNumEtaPartitions_;
170 
171  mapDigiWheel_layer_.SetBinLowEdgeX(stationInfo.fMinPhi_);
172  mapDigiWheel_layer_.SetBinHighEdgeX(stationInfo.fMinPhi_ + 2 * M_PI);
173  mapDigiWheel_layer_.SetNbinsX(nNumVFATPerEta * stationInfo.nNumChambers_);
174  mapDigiWheel_layer_.SetNbinsY(stationInfo.nNumEtaPartitions_);
176 
177  return 0;
178 }
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:651
void SetBinHighEdgeX(Double_t dXH)
Definition: GEMDQMBase.h:266
void SetBinLowEdgeX(Double_t dXL)
Definition: GEMDQMBase.h:264
key
prepare the HTCondor submission files and eventually submit them
void SetNbinsY(Int_t nBinsY)
Definition: GEMDQMBase.h:270
#define M_PI
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
void SetNbinsX(Int_t nBinsX)
Definition: GEMDQMBase.h:262
MEMap3Inf mapDigiWheel_layer_
Definition: GEMDigiSource.h:63

◆ ProcessWithMEMap4()

int GEMDigiSource::ProcessWithMEMap4 ( BookingHelper bh,
ME4IdsKey  key 
)
overrideprivatevirtual

Reimplemented from GEMDQMBase.

Definition at line 180 of file GEMDigiSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), GEMDQMBase::MEStationInfo::fMinPhi_, submitPVResolutionJobs::key, GEMDQMBase::key4Tokey3(), M_PI, mapDigiOcc_ieta_, mapDigiOcc_phi_, GEMDQMBase::mapStationInfo_, mapTotalDigi_layer_, mapTotalDigiPerEvtLayer_, GEMDQMBase::MEStationInfo::nMaxIdxChamber_, GEMDQMBase::MEStationInfo::nMaxVFAT_, GEMDQMBase::MEStationInfo::nMinIdxChamber_, GEMDQMBase::MEStationInfo::nNumEtaPartitions_, GEMDQMBase::MEStationInfo::nNumModules_, GEMDQMBase::MEMapInfT< M, K >::SetBinConfX(), GEMDQMBase::MEMapInfT< M, K >::SetBinConfY(), GEMDQMBase::MEMapInfT< M, K >::SetBinHighEdgeX(), GEMDQMBase::MEMapInfT< M, K >::SetBinLowEdgeX(), GEMDQMBase::MEMapInfT< M, K >::SetLabelForChambers(), GEMDQMBase::MEMapInfT< M, K >::SetLabelForIEta(), and GEMDQMBase::MEMapInfT< M, K >::SetLabelForVFATs().

180  {
181  ME3IdsKey key3 = key4Tokey3(key);
182  MEStationInfo& stationInfo = mapStationInfo_[key3];
183 
184  Int_t nNewNumCh = stationInfo.nMaxIdxChamber_ - stationInfo.nMinIdxChamber_ + 1;
185  Int_t nNewMinIdxChamber = (stationInfo.nMinIdxChamber_ - 1) + 1;
186  Int_t nNewMaxIdxChamber = stationInfo.nMaxIdxChamber_;
187 
188  Int_t nNumVFATPerModule = stationInfo.nMaxVFAT_ / stationInfo.nNumModules_;
189 
190  mapTotalDigi_layer_.SetBinConfX(nNewNumCh, nNewMinIdxChamber - 0.5, nNewMaxIdxChamber + 0.5);
191  mapTotalDigi_layer_.SetBinConfY(nNumVFATPerModule, -0.5);
193  mapTotalDigi_layer_.SetLabelForChambers(key, 1, -1, nNewMinIdxChamber);
194  mapTotalDigi_layer_.SetLabelForVFATs(key, stationInfo.nNumEtaPartitions_, 2);
195 
196  mapDigiOcc_ieta_.SetBinConfX(stationInfo.nNumEtaPartitions_);
199 
200  mapDigiOcc_phi_.SetBinLowEdgeX(stationInfo.fMinPhi_ * 180 / M_PI);
201  mapDigiOcc_phi_.SetBinHighEdgeX(stationInfo.fMinPhi_ * 180 / M_PI + 360);
204 
205  return 0;
206 }
MEMap4Inf mapTotalDigi_layer_
Definition: GEMDigiSource.h:65
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1, Int_t nIdxStart=1)
Definition: GEMDQMBase.h:337
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:359
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:651
void SetBinHighEdgeX(Double_t dXH)
Definition: GEMDQMBase.h:266
void SetBinLowEdgeX(Double_t dXL)
Definition: GEMDQMBase.h:264
MEMap4Inf mapTotalDigiPerEvtLayer_
Definition: GEMDigiSource.h:68
key
prepare the HTCondor submission files and eventually submit them
#define M_PI
MEMap4Inf mapDigiOcc_phi_
Definition: GEMDigiSource.h:67
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:357
MEMap4Inf mapDigiOcc_ieta_
Definition: GEMDigiSource.h:66
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:596
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:281
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:289

◆ ProcessWithMEMap5WithChamber()

int GEMDigiSource::ProcessWithMEMap5WithChamber ( BookingHelper bh,
ME5IdsKey  key 
)
overrideprivatevirtual

Reimplemented from GEMDQMBase.

Definition at line 208 of file GEMDigiSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), GEMDQMBase::BookingHelper::getBooker(), GEMDQMBase::getNameDirLayer(), submitPVResolutionJobs::key, GEMDQMBase::key4Tokey3(), GEMDQMBase::key5Tokey4(), mapDigiOccPerCh_, GEMDQMBase::mapStationInfo_, GEMDQMBase::MEStationInfo::nFirstStrip_, GEMDQMBase::MEStationInfo::nMaxVFAT_, GEMDQMBase::MEStationInfo::nNumDigi_, GEMDQMBase::MEStationInfo::nNumEtaPartitions_, GEMDQMBase::MEStationInfo::nNumModules_, GEMDQMBase::MEMapInfT< M, K >::SetBinConfX(), GEMDQMBase::MEMapInfT< M, K >::SetBinConfY(), dqm::implementation::NavigatorBase::setCurrentFolder(), GEMDQMBase::MEMapInfT< M, K >::SetLabelForIEta(), and strFolderMain_.

208  {
209  ME4IdsKey key4 = key5Tokey4(key);
210  ME3IdsKey key3 = key4Tokey3(key4);
211  MEStationInfo& stationInfo = mapStationInfo_[key3];
212 
213  bh.getBooker()->setCurrentFolder(strFolderMain_ + "/occupancy_" + getNameDirLayer(key4));
214 
215  int nNumVFATPerEta = stationInfo.nMaxVFAT_ / stationInfo.nNumEtaPartitions_;
216  int nNumCh = stationInfo.nNumDigi_;
217 
218  mapDigiOccPerCh_.SetBinConfX(nNumCh * nNumVFATPerEta, stationInfo.nFirstStrip_ - 0.5);
219  mapDigiOccPerCh_.SetBinConfY(stationInfo.nNumEtaPartitions_ / stationInfo.nNumModules_);
222 
223  bh.getBooker()->setCurrentFolder(strFolderMain_);
224 
225  return 0;
226 }
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:651
std::string strFolderMain_
Definition: GEMDigiSource.h:74
key
prepare the HTCondor submission files and eventually submit them
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:357
std::string getNameDirLayer(ME3IdsKey key3)
Definition: GEMDQMBase.h:746
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:596
MEMap5Inf mapDigiOccPerCh_
Definition: GEMDigiSource.h:72
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:281
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:289
ME4IdsKey key5Tokey4(ME5IdsKey key)
Definition: GEMDQMBase.h:601

Member Data Documentation

◆ fRadiusMax_

Float_t GEMDigiSource::fRadiusMax_
private

Definition at line 80 of file GEMDigiSource.h.

Referenced by analyze(), and bookHistograms().

◆ fRadiusMin_

Float_t GEMDigiSource::fRadiusMin_
private

Definition at line 79 of file GEMDigiSource.h.

Referenced by analyze(), and bookHistograms().

◆ gemChMapToken_

const edm::ESGetToken<GEMChMap, GEMChMapRcd> GEMDigiSource::gemChMapToken_
private

Definition at line 54 of file GEMDigiSource.h.

Referenced by LoadROMap().

◆ lumiScalers_

edm::EDGetTokenT<LumiScalersCollection> GEMDigiSource::lumiScalers_
private

Definition at line 58 of file GEMDigiSource.h.

Referenced by analyze(), and GEMDigiSource().

◆ mapBX_

MEMap2Inf GEMDigiSource::mapBX_
private

Definition at line 70 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap2().

◆ mapChamberType_

std::map<ME4IdsKey, Int_t> GEMDigiSource::mapChamberType_
private

Definition at line 60 of file GEMDigiSource.h.

Referenced by analyze(), and LoadROMap().

◆ mapDigiOcc_ieta_

MEMap4Inf GEMDigiSource::mapDigiOcc_ieta_
private

Definition at line 66 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap4().

◆ mapDigiOcc_phi_

MEMap4Inf GEMDigiSource::mapDigiOcc_phi_
private

Definition at line 67 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap4().

◆ mapDigiOccPerCh_

MEMap5Inf GEMDigiSource::mapDigiOccPerCh_
private

Definition at line 72 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap5WithChamber().

◆ mapDigiWheel_layer_

MEMap3Inf GEMDigiSource::mapDigiWheel_layer_
private

Definition at line 63 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap3().

◆ mapStripToVFAT_

std::map<ME3IdsKey, Int_t> GEMDigiSource::mapStripToVFAT_
private

Definition at line 61 of file GEMDigiSource.h.

Referenced by analyze(), and LoadROMap().

◆ mapTotalDigi_layer_

MEMap4Inf GEMDigiSource::mapTotalDigi_layer_
private

Definition at line 65 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap4().

◆ mapTotalDigiPerEvtIEta_

MEMap3Inf GEMDigiSource::mapTotalDigiPerEvtIEta_
private

Definition at line 69 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap2WithEta().

◆ mapTotalDigiPerEvtLayer_

MEMap4Inf GEMDigiSource::mapTotalDigiPerEvtLayer_
private

Definition at line 68 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and ProcessWithMEMap4().

◆ nBXMax_

Int_t GEMDigiSource::nBXMax_
private

Definition at line 78 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and GEMDigiSource().

◆ nBXMin_

Int_t GEMDigiSource::nBXMin_
private

Definition at line 78 of file GEMDigiSource.h.

Referenced by analyze(), bookHistograms(), and GEMDigiSource().

◆ nNumBitDigiOcc_

const int GEMDigiSource::nNumBitDigiOcc_ = 16384
staticprivate

Definition at line 52 of file GEMDigiSource.h.

◆ strFolderMain_

std::string GEMDigiSource::strFolderMain_
private

Definition at line 74 of file GEMDigiSource.h.

Referenced by bookHistograms(), and ProcessWithMEMap5WithChamber().

◆ tagDigi_

edm::EDGetToken GEMDigiSource::tagDigi_
private

Definition at line 56 of file GEMDigiSource.h.

Referenced by analyze(), and GEMDigiSource().

◆ useDBEMap_

Bool_t GEMDigiSource::useDBEMap_
private

Definition at line 76 of file GEMDigiSource.h.

Referenced by GEMDigiSource(), and LoadROMap().