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 getNameDirLayer (ME3IdsKey key3)
 
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)
 
int keyToChamber (ME4IdsKey key)
 
int keyToIEta (ME3IdsKey key)
 
int keyToIEta (ME4IdsKey key)
 
int keyToLayer (ME3IdsKey key)
 
int keyToLayer (ME4IdsKey key)
 
int keyToRegion (ME2IdsKey key)
 
int keyToRegion (ME3IdsKey key)
 
int keyToRegion (ME4IdsKey key)
 
int keyToStation (ME2IdsKey key)
 
int keyToStation (ME3IdsKey key)
 
int keyToStation (ME4IdsKey key)
 
int loadChambers ()
 
virtual int ProcessWithMEMap2AbsReWithEta (BookingHelper &bh, ME3IdsKey key)
 
virtual int ProcessWithMEMap4 (BookingHelper &bh, ME4IdsKey key)
 
Float_t restrictAngle (const Float_t fTheta, const Float_t fStart)
 
int SortingLayers (std::vector< ME3IdsKey > &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 ProcessWithMEMap3WithChamber (BookingHelper &bh, ME4IdsKey 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_
 
MEMap3Inf mapDigiOcc_ieta_
 
MEMap3Inf mapDigiOcc_phi_
 
MEMap4Inf mapDigiOccPerCh_
 
MEMap3Inf mapDigiWheel_layer_
 
std::map< ME3IdsKey, Int_t > mapStripToVFAT_
 
MEMap3Inf mapTotalDigi_layer_
 
MEMap3Inf mapTotalDigiPerEvtIEta_
 
MEMap3Inf mapTotalDigiPerEvtLayer_
 
Int_t nBXMax_
 
Int_t nBXMin_
 
std::string strFolderMain_
 
edm::EDGetToken tagDigi_
 

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
 
- 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< ME3IdsKey, int > mapStationToIdx_
 
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
 
std::map< ME2IdsKey, bool > MEMap2Check_
 
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
 
std::map< ME3IdsKey, bool > MEMap3Check_
 
std::map< ME4IdsKey, bool > MEMap3WithChCheck_
 
std::map< ME4IdsKey, bool > MEMap4Check_
 
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_, and tagDigi_.

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 }
edm::EDGetTokenT< LumiScalersCollection > lumiScalers_
Definition: GEMDigiSource.h:57
edm::EDGetToken tagDigi_
Definition: GEMDigiSource.h:55
const edm::ESGetToken< GEMChMap, GEMChMapRcd > gemChMapToken_
Definition: GEMDigiSource.h:53
GEMDQMBase(const edm::ParameterSet &cfg)
Definition: GEMDQMBase.cc:7

◆ ~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 215 of file GEMDigiSource.cc.

References ztail::d, GEMDQMBase::MEMapInfT< M, K >::Fill(), GEMDQMBase::MEStationInfo::fMinPhi_, cms::cuda::for(), hydjet2DefaultParameters_cff::fR, fRadiusMax_, fRadiusMin_, GEMDQMBase::GEMGeometry_, GEMDQMBase::getIdxModule(), GEMGeometry::idToDet(), l1tTowerCalibrationProducer_cfi::iEta, GEMDetId::ieta(), crabWrapper::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_, SiStripPI::max, SiStripPI::min, nBXMax_, nBXMin_, GEMDQMBase::MEStationInfo::nNumEtaPartitions_, GEMDQMBase::MEStationInfo::nNumModules_, PV3DBase< T, PVType, FrameType >::phi(), GEMDQMBase::restrictAngle(), GeomDet::surface(), and tagDigi_.

215  {
217  event.getByToken(this->tagDigi_, gemDigis);
219  event.getByToken(lumiScalers_, lumiScalers);
220 
221  std::map<ME3IdsKey, Int_t> total_digi_layer;
222  std::map<ME3IdsKey, Int_t> total_digi_eta;
223  for (auto gid : listChamberId_) {
224  ME2IdsKey key2{gid.region(), gid.station()};
225  ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
226  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
227  std::map<Int_t, bool> bTagVFAT;
228  bTagVFAT.clear();
229  MEStationInfo& stationInfo = mapStationInfo_[key3];
230  const BoundPlane& surface = GEMGeometry_->idToDet(gid)->surface();
231  if (total_digi_layer.find(key3) == total_digi_layer.end())
232  total_digi_layer[key3] = 0;
233  for (auto iEta : mapEtaPartition_[gid]) {
234  GEMDetId eId = iEta->id();
235  ME3IdsKey key3IEta{gid.region(), gid.station(), eId.ieta()};
236  if (total_digi_eta.find(key3IEta) == total_digi_eta.end())
237  total_digi_eta[key3IEta] = 0;
238  const auto& digis_in_det = gemDigis->get(eId);
239  auto nChamberType = mapChamberType_[{gid.station(), gid.layer(), gid.chamber(), eId.ieta()}];
240  Int_t nIdxModule = getIdxModule(gid.station(), nChamberType);
241  Int_t nCh = (gid.chamber() - 1) * stationInfo.nNumModules_ + nIdxModule;
242  for (auto d = digis_in_det.first; d != digis_in_det.second; ++d) {
243  // Filling of digi occupancy
244  Int_t nIdxVFAT = mapStripToVFAT_[{nChamberType, eId.ieta(), d->strip()}];
245  mapTotalDigi_layer_.Fill(key3, nCh, nIdxVFAT);
246 
247  // Filling of digi
248  mapDigiOcc_ieta_.Fill(key3, eId.ieta()); // Eta (partition)
249 
250  GlobalPoint digi_global_pos = surface.toGlobal(iEta->centreOfStrip(d->strip()));
251  Float_t fPhi = (Float_t)digi_global_pos.phi();
252  Float_t fPhiShift = restrictAngle(fPhi, stationInfo.fMinPhi_);
253  Float_t fPhiDeg = fPhiShift * 180.0 / M_PI;
254  mapDigiOcc_phi_.Fill(key3, fPhiDeg); // Phi
255 
256  // Filling of R-Phi occupancy
257  Float_t fR = fRadiusMin_ + (fRadiusMax_ - fRadiusMin_) * (eId.ieta() - 0.5) / stationInfo.nNumEtaPartitions_;
258  mapDigiWheel_layer_.Fill(key3, fPhiShift, fR);
259 
260  mapDigiOccPerCh_.Fill(key4Ch, d->strip(), eId.ieta()); // Per chamber
261 
262  // For total digis
263  total_digi_layer[key3]++;
264  total_digi_eta[key3IEta]++;
265 
266  // Filling of bx
267  Int_t nBX = std::min(std::max((Int_t)d->bx(), nBXMin_), nBXMax_); // For under/overflow
268  if (bTagVFAT.find(nIdxVFAT) == bTagVFAT.end()) {
269  mapBX_.Fill(key2, nBX);
270  }
271 
272  bTagVFAT[nIdxVFAT] = true;
273  }
274  }
275  }
276  for (auto [key, num_total_digi] : total_digi_layer)
277  mapTotalDigiPerEvtLayer_.Fill(key, num_total_digi);
278  for (auto [key, num_total_digi] : total_digi_eta)
279  mapTotalDigiPerEvtIEta_.Fill(key, num_total_digi);
280 }
int getIdxModule(const int, const int)
Definition: GEMDQMBase.h:660
MEMap3Inf mapTotalDigiPerEvtLayer_
Definition: GEMDigiSource.h:66
std::vector< GEMDetId > listChamberId_
Definition: GEMDQMBase.h:612
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
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:76
MEMap3Inf mapDigiOcc_ieta_
Definition: GEMDigiSource.h:64
MEMap4Inf mapDigiOccPerCh_
Definition: GEMDigiSource.h:70
MEMap3Inf mapDigiOcc_phi_
Definition: GEMDigiSource.h:65
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:624
edm::EDGetTokenT< LumiScalersCollection > lumiScalers_
Definition: GEMDigiSource.h:57
int Fill(K key, Double_t x)
Definition: GEMDQMBase.h:401
edm::EDGetToken tagDigi_
Definition: GEMDigiSource.h:55
MEMap3Inf mapTotalDigiPerEvtIEta_
Definition: GEMDigiSource.h:67
MEMap3Inf mapTotalDigi_layer_
Definition: GEMDigiSource.h:62
MEMap2Inf mapBX_
Definition: GEMDigiSource.h:68
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
Definition: GEMDQMBase.h:712
d
Definition: ztail.py:151
#define M_PI
constexpr int ieta() const
Definition: GEMDetId.h:199
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:609
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
std::map< ME4IdsKey, Int_t > mapChamberType_
Definition: GEMDigiSource.h:59
std::map< GEMDetId, std::vector< const GEMEtaPartition * > > mapEtaPartition_
Definition: GEMDQMBase.h:613
std::tuple< Int_t, Int_t > ME2IdsKey
Float_t fRadiusMin_
Definition: GEMDigiSource.h:75
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:60

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 78 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().

78  {
79  initGeometry(iSetup);
80  if (GEMGeometry_ == nullptr)
81  return;
82  loadChambers();
83  LoadROMap(iSetup);
84 
85  strFolderMain_ = "GEM/Digis";
86 
87  fRadiusMin_ = 120.0;
88  fRadiusMax_ = 250.0;
89  float radS = -5.0 / 180 * M_PI;
90  float radL = 355.0 / 180 * M_PI;
91 
92  mapTotalDigi_layer_ = MEMap3Inf(this, "occ", "Digi Occupancy", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5, "Chamber", "VFAT");
94  this, "occ_rphi", "Digi R-Phi Occupancy", 360, radS, radL, 8, fRadiusMin_, fRadiusMax_, "#phi (rad)", "R [cm]");
95  mapDigiOcc_ieta_ = MEMap3Inf(this, "occ_ieta", "Digi iEta Occupancy", 8, 0.5, 8.5, "iEta", "Number of fired digis");
97  MEMap3Inf(this, "occ_phi", "Digi Phi Occupancy", 72, -5, 355, "#phi (degree)", "Number of fired digis");
99  "digis_per_layer",
100  "Total number of digis per event for each layers",
101  50,
102  -0.5,
103  99.5,
104  "Number of fired digis",
105  "Events");
108  "digis_per_ieta",
109  "Total number of digis per event for each eta partitions",
110  50,
111  -0.5,
112  99.5,
113  "Number of fired digis",
114  "Events");
116 
117  mapBX_ = MEMap2Inf(this, "bx", "Digi Bunch Crossing", 21, nBXMin_ - 0.5, nBXMax_ + 0.5, "Bunch crossing");
118 
119  mapDigiOccPerCh_ = MEMap4Inf(this, "occ", "Digi Occupancy", 1, -0.5, 1.5, 1, 0.5, 1.5, "Digi", "iEta");
120 
123  mapBX_.TurnOff();
124  }
125 
130  }
131 
135  }
136 
140  }
141 
142  ibooker.cd();
144  GenerateMEPerChamber(ibooker);
145 }
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
Definition: GEMDQMBase.h:481
Int_t nRunType_
Definition: GEMDQMBase.h:550
MEMap3Inf mapTotalDigiPerEvtLayer_
Definition: GEMDigiSource.h:66
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:480
int initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMBase.cc:27
Float_t fRadiusMax_
Definition: GEMDigiSource.h:76
MEMap3Inf mapDigiOcc_ieta_
Definition: GEMDigiSource.h:64
MEMap4Inf mapDigiOccPerCh_
Definition: GEMDigiSource.h:70
MEMap3Inf mapDigiOcc_phi_
Definition: GEMDigiSource.h:65
int loadChambers()
Definition: GEMDQMBase.cc:56
std::string strFolderMain_
Definition: GEMDigiSource.h:72
MEMap3Inf mapTotalDigiPerEvtIEta_
Definition: GEMDigiSource.h:67
MEMap3Inf mapTotalDigi_layer_
Definition: GEMDigiSource.h:62
MEMap2Inf mapBX_
Definition: GEMDigiSource.h:68
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Definition: GEMDQMBase.cc:180
MEMapInfT< MEMap2Ids, ME2IdsKey > MEMap2Inf
Definition: GEMDQMBase.h:479
#define M_PI
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:609
void LoadROMap(edm::EventSetup const &iSetup)
void SetNoUnderOverflowBin()
Definition: GEMDQMBase.h:247
Float_t fRadiusMin_
Definition: GEMDigiSource.h:75
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 15 of file GEMDigiSource.cc.

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

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

◆ LoadROMap()

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

Definition at line 25 of file GEMDigiSource.cc.

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

Referenced by bookHistograms().

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

◆ ProcessWithMEMap2()

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

Reimplemented from GEMDQMBase.

Definition at line 147 of file GEMDigiSource.cc.

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

147  {
148  mapBX_.bookND(bh, key);
149 
150  return 0;
151 }
MEMap2Inf mapBX_
Definition: GEMDigiSource.h:68
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 153 of file GEMDigiSource.cc.

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

153  {
155 
156  return 0;
157 }
MEMap3Inf mapTotalDigiPerEvtIEta_
Definition: GEMDigiSource.h:67
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 159 of file GEMDigiSource.cc.

References GEMDQMBase::MEMapInfT< M, K >::bookND(), GEMDQMBase::MEStationInfo::fMinPhi_, crabWrapper::key, M_PI, mapDigiOcc_ieta_, mapDigiOcc_phi_, mapDigiWheel_layer_, GEMDQMBase::mapStationInfo_, mapTotalDigi_layer_, mapTotalDigiPerEvtLayer_, GEMDQMBase::MEStationInfo::nMaxIdxChamber_, GEMDQMBase::MEStationInfo::nMaxVFAT_, GEMDQMBase::MEStationInfo::nMinIdxChamber_, GEMDQMBase::MEStationInfo::nNumChambers_, 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(), GEMDQMBase::MEMapInfT< M, K >::SetLabelForVFATs(), GEMDQMBase::MEMapInfT< M, K >::SetNbinsX(), and GEMDQMBase::MEMapInfT< M, K >::SetNbinsY().

159  {
160  MEStationInfo& stationInfo = mapStationInfo_[key];
161 
162  Int_t nNewNumCh = stationInfo.nMaxIdxChamber_ - stationInfo.nMinIdxChamber_ + 1;
163  Int_t nNewMinIdxChamber = stationInfo.nNumModules_ * (stationInfo.nMinIdxChamber_ - 1) + 1;
164  Int_t nNewMaxIdxChamber = stationInfo.nNumModules_ * stationInfo.nMaxIdxChamber_;
165 
166  nNewNumCh *= stationInfo.nNumModules_;
167 
168  Int_t nNumVFATPerModule = stationInfo.nMaxVFAT_ / stationInfo.nNumModules_;
169 
170  int nNumVFATPerEta = stationInfo.nMaxVFAT_ / stationInfo.nNumEtaPartitions_;
171 
172  mapTotalDigi_layer_.SetBinConfX(nNewNumCh, nNewMinIdxChamber - 0.5, nNewMaxIdxChamber + 0.5);
173  mapTotalDigi_layer_.SetBinConfY(nNumVFATPerModule, -0.5);
175  mapTotalDigi_layer_.SetLabelForChambers(key, 1, -1, nNewMinIdxChamber, stationInfo.nNumModules_);
176  mapTotalDigi_layer_.SetLabelForVFATs(key, stationInfo.nNumEtaPartitions_, 2);
177 
178  mapDigiWheel_layer_.SetBinLowEdgeX(stationInfo.fMinPhi_);
179  mapDigiWheel_layer_.SetBinHighEdgeX(stationInfo.fMinPhi_ + 2 * M_PI);
180  mapDigiWheel_layer_.SetNbinsX(nNumVFATPerEta * stationInfo.nNumChambers_);
181  mapDigiWheel_layer_.SetNbinsY(stationInfo.nNumEtaPartitions_);
183 
184  mapDigiOcc_ieta_.SetBinConfX(stationInfo.nNumEtaPartitions_);
187 
188  mapDigiOcc_phi_.SetBinLowEdgeX(stationInfo.fMinPhi_ * 180 / M_PI);
189  mapDigiOcc_phi_.SetBinHighEdgeX(stationInfo.fMinPhi_ * 180 / M_PI + 360);
192 
193  return 0;
194 }
MEMap3Inf mapTotalDigiPerEvtLayer_
Definition: GEMDigiSource.h:66
MEMap3Inf mapDigiOcc_ieta_
Definition: GEMDigiSource.h:64
MEMap3Inf mapDigiOcc_phi_
Definition: GEMDigiSource.h:65
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:365
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:624
void SetBinHighEdgeX(Double_t dXH)
Definition: GEMDQMBase.h:266
MEMap3Inf mapTotalDigi_layer_
Definition: GEMDigiSource.h:62
void SetBinLowEdgeX(Double_t dXL)
Definition: GEMDQMBase.h:264
void SetNbinsY(Int_t nBinsY)
Definition: GEMDQMBase.h:270
#define M_PI
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:363
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
void SetNbinsX(Int_t nBinsX)
Definition: GEMDQMBase.h:262
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
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1, Int_t nIdxStart=1, Int_t nNumModules=1)
Definition: GEMDQMBase.h:337
MEMap3Inf mapDigiWheel_layer_
Definition: GEMDigiSource.h:63

◆ ProcessWithMEMap3WithChamber()

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

Reimplemented from GEMDQMBase.

Definition at line 196 of file GEMDigiSource.cc.

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

196  {
197  ME3IdsKey key3 = key4Tokey3(key);
198  MEStationInfo& stationInfo = mapStationInfo_[key3];
199 
200  bh.getBooker()->setCurrentFolder(strFolderMain_ + "/occupancy_" + getNameDirLayer(key3));
201 
202  int nNumVFATPerEta = stationInfo.nMaxVFAT_ / stationInfo.nNumEtaPartitions_;
203  int nNumCh = stationInfo.nNumDigi_;
204 
205  mapDigiOccPerCh_.SetBinConfX(nNumCh * nNumVFATPerEta, stationInfo.nFirstStrip_ - 0.5);
206  mapDigiOccPerCh_.SetBinConfY(stationInfo.nNumEtaPartitions_);
209 
210  bh.getBooker()->setCurrentFolder(strFolderMain_);
211 
212  return 0;
213 }
MEMap4Inf mapDigiOccPerCh_
Definition: GEMDigiSource.h:70
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:624
std::string strFolderMain_
Definition: GEMDigiSource.h:72
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:363
std::string getNameDirLayer(ME3IdsKey key3)
Definition: GEMDQMBase.h:718
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:583
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

Member Data Documentation

◆ fRadiusMax_

Float_t GEMDigiSource::fRadiusMax_
private

Definition at line 76 of file GEMDigiSource.h.

Referenced by analyze(), and bookHistograms().

◆ fRadiusMin_

Float_t GEMDigiSource::fRadiusMin_
private

Definition at line 75 of file GEMDigiSource.h.

Referenced by analyze(), and bookHistograms().

◆ gemChMapToken_

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

Definition at line 53 of file GEMDigiSource.h.

Referenced by LoadROMap().

◆ lumiScalers_

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

Definition at line 57 of file GEMDigiSource.h.

Referenced by analyze(), and GEMDigiSource().

◆ mapBX_

MEMap2Inf GEMDigiSource::mapBX_
private

Definition at line 68 of file GEMDigiSource.h.

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

◆ mapChamberType_

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

Definition at line 59 of file GEMDigiSource.h.

Referenced by analyze(), and LoadROMap().

◆ mapDigiOcc_ieta_

MEMap3Inf GEMDigiSource::mapDigiOcc_ieta_
private

Definition at line 64 of file GEMDigiSource.h.

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

◆ mapDigiOcc_phi_

MEMap3Inf GEMDigiSource::mapDigiOcc_phi_
private

Definition at line 65 of file GEMDigiSource.h.

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

◆ mapDigiOccPerCh_

MEMap4Inf GEMDigiSource::mapDigiOccPerCh_
private

Definition at line 70 of file GEMDigiSource.h.

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

◆ 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 60 of file GEMDigiSource.h.

Referenced by analyze(), and LoadROMap().

◆ mapTotalDigi_layer_

MEMap3Inf GEMDigiSource::mapTotalDigi_layer_
private

Definition at line 62 of file GEMDigiSource.h.

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

◆ mapTotalDigiPerEvtIEta_

MEMap3Inf GEMDigiSource::mapTotalDigiPerEvtIEta_
private

Definition at line 67 of file GEMDigiSource.h.

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

◆ mapTotalDigiPerEvtLayer_

MEMap3Inf GEMDigiSource::mapTotalDigiPerEvtLayer_
private

Definition at line 66 of file GEMDigiSource.h.

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

◆ nBXMax_

Int_t GEMDigiSource::nBXMax_
private

Definition at line 74 of file GEMDigiSource.h.

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

◆ nBXMin_

Int_t GEMDigiSource::nBXMin_
private

Definition at line 74 of file GEMDigiSource.h.

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

◆ nNumBitDigiOcc_

const int GEMDigiSource::nNumBitDigiOcc_ = 16384
staticprivate

Definition at line 51 of file GEMDigiSource.h.

◆ strFolderMain_

std::string GEMDigiSource::strFolderMain_
private

Definition at line 72 of file GEMDigiSource.h.

Referenced by bookHistograms(), and ProcessWithMEMap3WithChamber().

◆ tagDigi_

edm::EDGetToken GEMDigiSource::tagDigi_
private

Definition at line 55 of file GEMDigiSource.h.

Referenced by analyze(), and GEMDigiSource().