CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
GEMDQMSourceDigi Class Reference
Inheritance diagram for GEMDQMSourceDigi:

Public Member Functions

 GEMDQMSourceDigi (const edm::ParameterSet &cfg)
 
 ~GEMDQMSourceDigi () override
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

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
 

Private Member Functions

int findVFAT (float min_, float max_, float x_, int roll_)
 
const GEMGeometryinitGeometry (edm::EventSetup const &iSetup)
 

Private Attributes

std::unordered_map< UInt_t, MonitorElement * > BxVsVFAT
 
std::unordered_map< UInt_t, MonitorElement * > Digi_1D_
 
std::unordered_map< UInt_t, MonitorElement * > Digi_2D_
 
std::vector< GEMChambergemChambers_
 
const GEMGeometryGEMGeometry_
 
edm::EDGetToken tagDigi_
 

Detailed Description

Definition at line 24 of file GEMDQMSourceDigi.cc.

Constructor & Destructor Documentation

◆ GEMDQMSourceDigi()

GEMDQMSourceDigi::GEMDQMSourceDigi ( const edm::ParameterSet cfg)

Definition at line 78 of file GEMDQMSourceDigi.cc.

78  {
79  tagDigi_ = consumes<GEMDigiCollection>(cfg.getParameter<edm::InputTag>("digisInputLabel"));
80 }

References looper::cfg.

◆ ~GEMDQMSourceDigi()

GEMDQMSourceDigi::~GEMDQMSourceDigi ( )
inlineoverride

Definition at line 27 of file GEMDQMSourceDigi.cc.

27 {};

Member Function Documentation

◆ analyze()

void GEMDQMSourceDigi::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 130 of file GEMDQMSourceDigi.cc.

130  {
132  if (GEMGeometry_ == nullptr)
133  return;
134 
136  event.getByToken(this->tagDigi_, gemDigis);
137  for (auto ch : gemChambers_) {
138  GEMDetId cId = ch.id();
139  for (auto roll : ch.etaPartitions()) {
140  GEMDetId rId = roll->id();
141  const auto& digis_in_det = gemDigis->get(rId);
142  for (auto d = digis_in_det.first; d != digis_in_det.second; ++d) {
143  auto nVFAT = findVFAT(1, roll->nstrips(), d->strip(), rId.roll());
144  Digi_2D_[cId]->Fill(d->strip(), rId.roll());
145  Digi_1D_[cId]->Fill(nVFAT);
146  BxVsVFAT[cId]->Fill(d->bx(), nVFAT);
147  }
148  }
149  }
150 }

References ztail::d, options_cfi::eventSetup, and GEMDetId::roll().

◆ bookHistograms()

void GEMDQMSourceDigi::bookHistograms ( DQMStore::IBooker &  ibooker,
edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 88 of file GEMDQMSourceDigi.cc.

88  {
89  GEMGeometry_ = initGeometry(iSetup);
90  if (GEMGeometry_ == nullptr)
91  return;
92 
93  const std::vector<const GEMSuperChamber*>& superChambers_ = GEMGeometry_->superChambers();
94  for (auto sch : superChambers_) {
95  int n_lay = sch->nChambers();
96  for (int l = 0; l < n_lay; l++) {
97  Bool_t bExist = false;
98  for (auto ch : gemChambers_)
99  if (ch.id() == sch->chamber(l + 1)->id())
100  bExist = true;
101  if (bExist)
102  continue;
103 
104  gemChambers_.push_back(*sch->chamber(l + 1));
105  }
106  }
107  ibooker.cd();
108  ibooker.setCurrentFolder("GEM/digi");
109  for (auto ch : gemChambers_) {
110  GEMDetId gid = ch.id();
111 
112  std::string strIdxName = "Gemini_" + to_string(gid.chamber()) + "_GE" + (gid.region() > 0 ? "p" : "m") +
113  to_string(gid.station()) + "_" + to_string(gid.layer());
114  std::string strIdxTitle = "GEMINIm" + to_string(gid.chamber()) + " in GE" + (gid.region() > 0 ? "+" : "-") +
115  to_string(gid.station()) + "/" + to_string(gid.layer());
116 
117  string hName_digi = "Digi_Strips_" + strIdxName;
118  string hTitle_digi = "Digi Strip " + strIdxTitle;
119  string hAxis_digi = ";Strip;iEta";
120  Digi_2D_[ch.id()] = ibooker.book2D(hName_digi, hTitle_digi + hAxis_digi, 384, 1, 385, 8, 0.5, 8.5);
121  Digi_1D_[ch.id()] = ibooker.book1D(hName_digi + "_VFAT", hTitle_digi + " VFAT" + hAxis_digi, 24, 0, 24);
122 
123  string hNameBx = "bx_vs_VFAT_" + strIdxName;
124  string hTitleBx = "bx vs VFAT " + strIdxTitle;
125  hTitleBx += ";Bunch crossing;VFAT";
126  BxVsVFAT[ch.id()] = ibooker.book2D(hNameBx, hTitleBx, 10, -5, 5, 24, 0, 24);
127  }
128 }

References GEMDetId::chamber(), cmsLHEtoEOSManager::l, GEMDetId::layer(), GEMDetId::region(), GEMDetId::station(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ dqmBeginRun()

void GEMDQMSourceDigi::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprotected

Definition at line 31 of file GEMDQMSourceDigi.cc.

31 {};

◆ fillDescriptions()

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

Definition at line 82 of file GEMDQMSourceDigi.cc.

82  {
84  desc.add<edm::InputTag>("digisInputLabel", edm::InputTag("muonGEMDigis", ""));
85  descriptions.add("GEMDQMSourceDigi", desc);
86 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and HLT_2018_cff::InputTag.

◆ findVFAT()

int GEMDQMSourceDigi::findVFAT ( float  min_,
float  max_,
float  x_,
int  roll_ 
)
private

Definition at line 53 of file GEMDQMSourceDigi.cc.

53  {
54  float step = max_ / 3;
55  if (x_ < (min_ + step)) {
56  return 8 - roll_;
57  } else if (x_ < (min_ + 2 * step)) {
58  return 16 - roll_;
59  } else {
60  return 24 - roll_;
61  }
62 }

◆ initGeometry()

const GEMGeometry * GEMDQMSourceDigi::initGeometry ( edm::EventSetup const &  iSetup)
private

Definition at line 64 of file GEMDQMSourceDigi.cc.

64  {
65  const GEMGeometry* GEMGeometry_ = nullptr;
66  try {
68  iSetup.get<MuonGeometryRecord>().get(hGeom);
69  GEMGeometry_ = &*hGeom;
71  edm::LogError("MuonGEMBaseValidation") << "+++ Error : GEM geometry is unavailable on event loop. +++\n";
72  return nullptr;
73  }
74 
75  return GEMGeometry_;
76 }

References MillePedeFileConverter_cfg::e, edm::EventSetup::get(), and get.

Member Data Documentation

◆ BxVsVFAT

std::unordered_map<UInt_t, MonitorElement*> GEMDQMSourceDigi::BxVsVFAT
private

Definition at line 47 of file GEMDQMSourceDigi.cc.

◆ Digi_1D_

std::unordered_map<UInt_t, MonitorElement*> GEMDQMSourceDigi::Digi_1D_
private

Definition at line 46 of file GEMDQMSourceDigi.cc.

◆ Digi_2D_

std::unordered_map<UInt_t, MonitorElement*> GEMDQMSourceDigi::Digi_2D_
private

Definition at line 45 of file GEMDQMSourceDigi.cc.

◆ gemChambers_

std::vector<GEMChamber> GEMDQMSourceDigi::gemChambers_
private

Definition at line 43 of file GEMDQMSourceDigi.cc.

◆ GEMGeometry_

const GEMGeometry* GEMDQMSourceDigi::GEMGeometry_
private

Definition at line 41 of file GEMDQMSourceDigi.cc.

◆ tagDigi_

edm::EDGetToken GEMDQMSourceDigi::tagDigi_
private

Definition at line 36 of file GEMDQMSourceDigi.cc.

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
GEMDQMSourceDigi::GEMGeometry_
const GEMGeometry * GEMGeometry_
Definition: GEMDQMSourceDigi.cc:41
step
step
Definition: StallMonitor.cc:94
GEMDetId::layer
constexpr int layer() const
Definition: GEMDetId.h:184
GEMDetId::region
constexpr int region() const
Definition: GEMDetId.h:165
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle< GEMDigiCollection >
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
GEMDQMSourceDigi::tagDigi_
edm::EDGetToken tagDigi_
Definition: GEMDQMSourceDigi.cc:36
GEMDQMSourceDigi::Digi_1D_
std::unordered_map< UInt_t, MonitorElement * > Digi_1D_
Definition: GEMDQMSourceDigi.cc:46
GEMDQMSourceDigi::BxVsVFAT
std::unordered_map< UInt_t, MonitorElement * > BxVsVFAT
Definition: GEMDQMSourceDigi.cc:47
edm::ESHandle< GEMGeometry >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GEMDetId::chamber
constexpr int chamber() const
Definition: GEMDetId.h:177
GEMDQMSourceDigi::Digi_2D_
std::unordered_map< UInt_t, MonitorElement * > Digi_2D_
Definition: GEMDQMSourceDigi.cc:45
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::LogError
Definition: MessageLogger.h:183
GEMDetId::roll
constexpr int roll() const
Definition: GEMDetId.h:188
GEMDetId
Definition: GEMDetId.h:17
get
#define get
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
looper.cfg
cfg
Definition: looper.py:297
options_cfi.eventSetup
eventSetup
Definition: options_cfi.py:12
GEMDQMSourceDigi::initGeometry
const GEMGeometry * initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMSourceDigi.cc:64
edm::eventsetup::NoProxyException
Definition: NoProxyException.h:31
GEMDetId::station
constexpr int station() const
Definition: GEMDetId.h:173
GEMGeometry
Definition: GEMGeometry.h:24
ztail.d
d
Definition: ztail.py:151
GEMGeometry::superChambers
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
Definition: GEMGeometry.cc:36
GEMDQMSourceDigi::gemChambers_
std::vector< GEMChamber > gemChambers_
Definition: GEMDQMSourceDigi.cc:43
GEMDQMSourceDigi::findVFAT
int findVFAT(float min_, float max_, float x_, int roll_)
Definition: GEMDQMSourceDigi.cc:53
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37