CMS 3D CMS Logo

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

#include <L1TStage2MuonComp.h>

Inheritance diagram for L1TStage2MuonComp:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 L1TStage2MuonComp (const edm::ParameterSet &ps)
 
 ~L1TStage2MuonComp () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 

Private Types

enum  ratioVariables {
  RBXRANGE =1, RNMUON, RMUON, RPT,
  RETA, RPHI, RETAATVTX, RPHIATVTX,
  RCHARGE, RCHARGEVAL, RQUAL, RISO,
  RIDX
}
 
enum  variables {
  BXRANGEGOOD =1, BXRANGEBAD, NMUONGOOD, NMUONBAD,
  MUONALL, MUONGOOD, PTBAD, ETABAD,
  PHIBAD, ETAATVTXBAD, PHIATVTXBAD, CHARGEBAD,
  CHARGEVALBAD, QUALBAD, ISOBAD, IDXBAD
}
 

Private Attributes

bool enable2DComp
 
MonitorElementerrorSummaryDen
 
MonitorElementerrorSummaryNum
 
std::vector< int > ignoreBin
 
bool incBin [RIDX+1]
 
std::string monitorDir
 
MonitorElementmuColl1BxRange
 
MonitorElementmuColl1EtaPhimap
 
MonitorElementmuColl1hwCharge
 
MonitorElementmuColl1hwChargeValid
 
MonitorElementmuColl1hwEta
 
MonitorElementmuColl1hwEtaAtVtx
 
MonitorElementmuColl1hwIso
 
MonitorElementmuColl1hwPhi
 
MonitorElementmuColl1hwPhiAtVtx
 
MonitorElementmuColl1hwPt
 
MonitorElementmuColl1hwQual
 
MonitorElementmuColl1Index
 
MonitorElementmuColl1nMu
 
MonitorElementmuColl2BxRange
 
MonitorElementmuColl2EtaPhimap
 
MonitorElementmuColl2hwCharge
 
MonitorElementmuColl2hwChargeValid
 
MonitorElementmuColl2hwEta
 
MonitorElementmuColl2hwEtaAtVtx
 
MonitorElementmuColl2hwIso
 
MonitorElementmuColl2hwPhi
 
MonitorElementmuColl2hwPhiAtVtx
 
MonitorElementmuColl2hwPt
 
MonitorElementmuColl2hwQual
 
MonitorElementmuColl2Index
 
MonitorElementmuColl2nMu
 
std::string muonColl1Title
 
std::string muonColl2Title
 
edm::EDGetTokenT< l1t::MuonBxCollectionmuonToken1
 
edm::EDGetTokenT< l1t::MuonBxCollectionmuonToken2
 
MonitorElementsummary
 
std::string summaryTitle
 
bool verbose
 

Detailed Description

Definition at line 17 of file L1TStage2MuonComp.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1TStage2MuonComp::L1TStage2MuonComp ( const edm::ParameterSet ps)

Definition at line 4 of file L1TStage2MuonComp.cc.

References mps_fire::i, ignoreBin, incBin, and RIDX.

5  : muonToken1(consumes<l1t::MuonBxCollection>(ps.getParameter<edm::InputTag>("muonCollection1"))),
6  muonToken2(consumes<l1t::MuonBxCollection>(ps.getParameter<edm::InputTag>("muonCollection2"))),
8  muonColl1Title(ps.getUntrackedParameter<std::string>("muonCollection1Title")),
9  muonColl2Title(ps.getUntrackedParameter<std::string>("muonCollection2Title")),
10  summaryTitle(ps.getUntrackedParameter<std::string>("summaryTitle")),
11  ignoreBin(ps.getUntrackedParameter<std::vector<int>>("ignoreBin")),
12  verbose(ps.getUntrackedParameter<bool>("verbose")),
13  enable2DComp(ps.getUntrackedParameter<bool>("enable2DComp")) // When true eta-phi comparison plots are also produced
14 {
15  // First include all bins
16  for (unsigned int i = 1; i <= RIDX; i++) {
17  incBin[i] = true;
18  }
19  // Then check the list of bins to ignore
20  for (const auto& i : ignoreBin) {
21  if (i > 0 && i <= RIDX) {
22  incBin[i] = false;
23  }
24  }
25 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string monitorDir
edm::EDGetTokenT< l1t::MuonBxCollection > muonToken1
std::string muonColl2Title
std::vector< int > ignoreBin
std::string summaryTitle
std::string muonColl1Title
edm::EDGetTokenT< l1t::MuonBxCollection > muonToken2
L1TStage2MuonComp::~L1TStage2MuonComp ( )
override

Definition at line 27 of file L1TStage2MuonComp.cc.

27 {}

Member Function Documentation

void L1TStage2MuonComp::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 169 of file L1TStage2MuonComp.cc.

References BXVector< T >::begin(), BXRANGEBAD, BXRANGEGOOD, CHARGEBAD, CHARGEVALBAD, enable2DComp, BXVector< T >::end(), errorSummaryDen, errorSummaryNum, ETAATVTXBAD, ETABAD, MonitorElement::Fill(), edm::Event::getByToken(), BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), mps_fire::i, IDXBAD, incBin, ISOBAD, muColl1BxRange, muColl1EtaPhimap, muColl1hwCharge, muColl1hwChargeValid, muColl1hwEta, muColl1hwEtaAtVtx, muColl1hwIso, muColl1hwPhi, muColl1hwPhiAtVtx, muColl1hwPt, muColl1hwQual, muColl1Index, muColl1nMu, muColl2BxRange, muColl2EtaPhimap, muColl2hwCharge, muColl2hwChargeValid, muColl2hwEta, muColl2hwEtaAtVtx, muColl2hwIso, muColl2hwPhi, muColl2hwPhiAtVtx, muColl2hwPt, muColl2hwQual, muColl2Index, muColl2nMu, MUONALL, MUONGOOD, muonToken1, muonToken2, NMUONBAD, NMUONGOOD, PHIATVTXBAD, PHIBAD, PTBAD, QUALBAD, RBXRANGE, RCHARGE, RCHARGEVAL, RETA, RETAATVTX, RIDX, RISO, RMUON, RNMUON, RPHI, RPHIATVTX, RPT, RQUAL, BXVector< T >::size(), and summary.

169  {
170 
171  if (verbose) edm::LogInfo("L1TStage2MuonComp") << "L1TStage2MuonComp: analyze..." << std::endl;
172 
175  e.getByToken(muonToken1, muonBxColl1);
176  e.getByToken(muonToken2, muonBxColl2);
177 
179  int bxRange1 = muonBxColl1->getLastBX() - muonBxColl1->getFirstBX() + 1;
180  int bxRange2 = muonBxColl2->getLastBX() - muonBxColl2->getFirstBX() + 1;
181  if (bxRange1 != bxRange2) {
183  if (incBin[RBXRANGE]) errorSummaryNum->Fill(RBXRANGE);
184  int bx;
185  for (bx = muonBxColl1->getFirstBX(); bx <= muonBxColl1->getLastBX(); ++bx) {
186  muColl1BxRange->Fill(bx);
187  }
188  for (bx = muonBxColl2->getFirstBX(); bx <= muonBxColl2->getLastBX(); ++bx) {
189  muColl2BxRange->Fill(bx);
190  }
191  } else {
193  }
194 
195  for (int iBx = muonBxColl1->getFirstBX(); iBx <= muonBxColl1->getLastBX(); ++iBx) {
196  // don't analyse if this BX does not exist in the second collection
197  if (iBx < muonBxColl2->getFirstBX() || iBx > muonBxColl2->getLastBX()) continue;
198 
201 
203  // check number of muons
204  if (muonBxColl1->size(iBx) != muonBxColl2->size(iBx)) {
206  if (incBin[RNMUON]) errorSummaryNum->Fill(RNMUON);
207  muColl1nMu->Fill(muonBxColl1->size(iBx));
208  muColl2nMu->Fill(muonBxColl2->size(iBx));
209 
210  if (muonBxColl1->size(iBx) > muonBxColl2->size(iBx)) {
211  muonIt1 = muonBxColl1->begin(iBx) + muonBxColl2->size(iBx);
212  for (; muonIt1 != muonBxColl1->end(iBx); ++muonIt1) {
213  muColl1hwPt->Fill(muonIt1->hwPt());
214  muColl1hwEta->Fill(muonIt1->hwEta());
215  muColl1hwPhi->Fill(muonIt1->hwPhi());
216  muColl1hwEtaAtVtx->Fill(muonIt1->hwEtaAtVtx());
217  muColl1hwPhiAtVtx->Fill(muonIt1->hwPhiAtVtx());
218  muColl1hwCharge->Fill(muonIt1->hwCharge());
219  muColl1hwChargeValid->Fill(muonIt1->hwChargeValid());
220  muColl1hwQual->Fill(muonIt1->hwQual());
221  muColl1hwIso->Fill(muonIt1->hwIso());
222  muColl1Index->Fill(muonIt1->tfMuonIndex());
223  if(enable2DComp) muColl1EtaPhimap->Fill(muonIt1->eta(),muonIt1->phi());
224  }
225  } else {
226  muonIt2 = muonBxColl2->begin(iBx) + muonBxColl1->size(iBx);
227  for (; muonIt2 != muonBxColl2->end(iBx); ++muonIt2) {
228  muColl2hwPt->Fill(muonIt2->hwPt());
229  muColl2hwEta->Fill(muonIt2->hwEta());
230  muColl2hwPhi->Fill(muonIt2->hwPhi());
231  muColl2hwEtaAtVtx->Fill(muonIt2->hwEtaAtVtx());
232  muColl2hwPhiAtVtx->Fill(muonIt2->hwPhiAtVtx());
233  muColl2hwCharge->Fill(muonIt2->hwCharge());
234  muColl2hwChargeValid->Fill(muonIt2->hwChargeValid());
235  muColl2hwQual->Fill(muonIt2->hwQual());
236  muColl2hwIso->Fill(muonIt2->hwIso());
237  muColl2Index->Fill(muonIt2->tfMuonIndex());
238  if(enable2DComp) muColl2EtaPhimap->Fill(muonIt2->eta(), muonIt2->phi());
239  }
240  }
241  } else {
243  }
244 
245  muonIt1 = muonBxColl1->begin(iBx);
246  muonIt2 = muonBxColl2->begin(iBx);
247  while(muonIt1 != muonBxColl1->end(iBx) && muonIt2 != muonBxColl2->end(iBx)) {
248  summary->Fill(MUONALL);
249  for (int i = RMUON; i <= RIDX; ++i) {
251  }
252 
253  bool muonMismatch = false; // All muon mismatches
254  bool muonSelMismatch = false; // Muon mismatches excluding ignored bins
255  if (muonIt1->hwPt() != muonIt2->hwPt()) {
256  muonMismatch = true;
257  summary->Fill(PTBAD);
258  if (incBin[RPT]) {
259  muonSelMismatch = true;
260  errorSummaryNum->Fill(RPT);
261  }
262  }
263  if (muonIt1->hwEta() != muonIt2->hwEta()) {
264  muonMismatch = true;
265  summary->Fill(ETABAD);
266  if (incBin[RETA]) {
267  muonSelMismatch = true;
268  errorSummaryNum->Fill(RETA);
269  }
270  }
271  if (muonIt1->hwPhi() != muonIt2->hwPhi()) {
272  muonMismatch = true;
273  summary->Fill(PHIBAD);
274  if (incBin[RPHI]) {
275  muonSelMismatch = true;
276  errorSummaryNum->Fill(RPHI);
277  }
278  }
279  if (muonIt1->hwEtaAtVtx() != muonIt2->hwEtaAtVtx()) {
280  muonMismatch = true;
282  if (incBin[RETAATVTX]) {
283  muonSelMismatch = true;
284  errorSummaryNum->Fill(RETAATVTX);
285  }
286  }
287  if (muonIt1->hwPhiAtVtx() != muonIt2->hwPhiAtVtx()) {
288  muonMismatch = true;
290  if (incBin[RPHIATVTX]) {
291  muonSelMismatch = true;
292  errorSummaryNum->Fill(RPHIATVTX);
293  }
294  }
295  if (muonIt1->hwCharge() != muonIt2->hwCharge()) {
296  muonMismatch = true;
298  if (incBin[RCHARGE]) {
299  muonSelMismatch = true;
300  errorSummaryNum->Fill(RCHARGE);
301  }
302  }
303  if (muonIt1->hwChargeValid() != muonIt2->hwChargeValid()) {
304  muonMismatch = true;
306  if (incBin[RCHARGEVAL]) {
307  muonSelMismatch = true;
308  errorSummaryNum->Fill(RCHARGEVAL);
309  }
310  }
311  if (muonIt1->hwQual() != muonIt2->hwQual()) {
312  muonMismatch = true;
313  summary->Fill(QUALBAD);
314  if (incBin[RQUAL]) {
315  muonSelMismatch = true;
316  errorSummaryNum->Fill(RQUAL);
317  }
318  }
319  if (muonIt1->hwIso() != muonIt2->hwIso()) {
320  muonMismatch = true;
321  summary->Fill(ISOBAD);
322  if (incBin[RISO]) {
323  muonSelMismatch = true;
324  errorSummaryNum->Fill(RISO);
325  }
326  }
327  if (muonIt1->tfMuonIndex() != muonIt2->tfMuonIndex()) {
328  muonMismatch = true;
329  summary->Fill(IDXBAD);
330  if (incBin[RIDX]) {
331  muonSelMismatch = true;
332  errorSummaryNum->Fill(RIDX);
333  }
334  }
335 
336  if (incBin[RMUON] && muonSelMismatch) {
338  }
339 
340  if (muonMismatch) {
341 
342  muColl1hwPt->Fill(muonIt1->hwPt());
343  muColl1hwEta->Fill(muonIt1->hwEta());
344  muColl1hwPhi->Fill(muonIt1->hwPhi());
345  muColl1hwEtaAtVtx->Fill(muonIt1->hwEtaAtVtx());
346  muColl1hwPhiAtVtx->Fill(muonIt1->hwPhiAtVtx());
347  muColl1hwCharge->Fill(muonIt1->hwCharge());
348  muColl1hwChargeValid->Fill(muonIt1->hwChargeValid());
349  muColl1hwQual->Fill(muonIt1->hwQual());
350  muColl1hwIso->Fill(muonIt1->hwIso());
351  muColl1Index->Fill(muonIt1->tfMuonIndex());
352  if(enable2DComp) muColl1EtaPhimap->Fill(muonIt1->eta(),muonIt1->phi());
353 
354  muColl2hwPt->Fill(muonIt2->hwPt());
355  muColl2hwEta->Fill(muonIt2->hwEta());
356  muColl2hwPhi->Fill(muonIt2->hwPhi());
357  muColl2hwEtaAtVtx->Fill(muonIt2->hwEtaAtVtx());
358  muColl2hwPhiAtVtx->Fill(muonIt2->hwPhiAtVtx());
359  muColl2hwCharge->Fill(muonIt2->hwCharge());
360  muColl2hwChargeValid->Fill(muonIt2->hwChargeValid());
361  muColl2hwQual->Fill(muonIt2->hwQual());
362  muColl2hwIso->Fill(muonIt2->hwIso());
363  muColl2Index->Fill(muonIt2->tfMuonIndex());
364  if(enable2DComp) muColl2EtaPhimap->Fill(muonIt2->eta(),muonIt2->phi());
365 
366  }
367  else {
369  }
370 
371  ++muonIt1;
372  ++muonIt2;
373  }
374  }
375 }
const_iterator end(int bx) const
MonitorElement * muColl2hwPt
MonitorElement * muColl1hwPt
MonitorElement * muColl2Index
unsigned size(int bx) const
MonitorElement * muColl2hwIso
MonitorElement * muColl1hwEtaAtVtx
MonitorElement * muColl2hwPhi
MonitorElement * errorSummaryNum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * errorSummaryDen
MonitorElement * muColl1hwCharge
MonitorElement * muColl1hwEta
MonitorElement * muColl2hwQual
void Fill(long long x)
edm::EDGetTokenT< l1t::MuonBxCollection > muonToken1
MonitorElement * muColl2hwEtaAtVtx
MonitorElement * muColl1hwIso
MonitorElement * muColl2EtaPhimap
MonitorElement * summary
MonitorElement * muColl2hwPhiAtVtx
MonitorElement * muColl1EtaPhimap
MonitorElement * muColl2BxRange
MonitorElement * muColl2nMu
int getFirstBX() const
MonitorElement * muColl2hwEta
int getLastBX() const
MonitorElement * muColl1hwQual
MonitorElement * muColl2hwChargeValid
MonitorElement * muColl1hwPhi
MonitorElement * muColl1hwChargeValid
MonitorElement * muColl1nMu
MonitorElement * muColl1hwPhiAtVtx
MonitorElement * muColl2hwCharge
const_iterator begin(int bx) const
MonitorElement * muColl1BxRange
MonitorElement * muColl1Index
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:20
edm::EDGetTokenT< l1t::MuonBxCollection > muonToken2
void L1TStage2MuonComp::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run ,
const edm::EventSetup  
)
overrideprotected

Definition at line 46 of file L1TStage2MuonComp.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), BXRANGEBAD, BXRANGEGOOD, CHARGEBAD, CHARGEVALBAD, enable2DComp, errorSummaryDen, errorSummaryNum, ETAATVTXBAD, ETABAD, MonitorElement::getTH1F(), mps_fire::i, IDXBAD, incBin, ISOBAD, monitorDir, muColl1BxRange, muColl1EtaPhimap, muColl1hwCharge, muColl1hwChargeValid, muColl1hwEta, muColl1hwEtaAtVtx, muColl1hwIso, muColl1hwPhi, muColl1hwPhiAtVtx, muColl1hwPt, muColl1hwQual, muColl1Index, muColl1nMu, muColl2BxRange, muColl2EtaPhimap, muColl2hwCharge, muColl2hwChargeValid, muColl2hwEta, muColl2hwEtaAtVtx, muColl2hwIso, muColl2hwPhi, muColl2hwPhiAtVtx, muColl2hwPt, muColl2hwQual, muColl2Index, muColl2nMu, MUONALL, muonColl1Title, muonColl2Title, MUONGOOD, NMUONBAD, NMUONGOOD, PHIATVTXBAD, PHIBAD, PTBAD, QUALBAD, RBXRANGE, RCHARGE, RCHARGEVAL, RETA, RETAATVTX, RIDX, RISO, RMUON, RNMUON, RPHI, RPHIATVTX, RPT, RQUAL, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), summary, and summaryTitle.

46  {
47 
48  // Subsystem Monitoring and Muon Output
50 
51  summary = ibooker.book1D("summary", summaryTitle.c_str(), 16, 1, 17); // range to match bin numbering
52  summary->setBinLabel(BXRANGEGOOD, "BX range match", 1);
53  summary->setBinLabel(BXRANGEBAD, "BX range mismatch", 1);
54  summary->setBinLabel(NMUONGOOD, "muon collection size match", 1);
55  summary->setBinLabel(NMUONBAD, "muon collection size mismatch", 1);
56  summary->setBinLabel(MUONALL, "# muons", 1);
57  summary->setBinLabel(MUONGOOD, "# matching muons", 1);
58  summary->setBinLabel(PTBAD, "p_{T} mismatch", 1);
59  summary->setBinLabel(ETABAD, "#eta mismatch", 1);
60  summary->setBinLabel(PHIBAD, "#phi mismatch", 1);
61  summary->setBinLabel(ETAATVTXBAD, "#eta at vertex mismatch", 1);
62  summary->setBinLabel(PHIATVTXBAD, "#phi at vertex mismatch", 1);
63  summary->setBinLabel(CHARGEBAD, "charge mismatch", 1);
64  summary->setBinLabel(CHARGEVALBAD, "charge valid mismatch", 1);
65  summary->setBinLabel(QUALBAD, "quality mismatch", 1);
66  summary->setBinLabel(ISOBAD, "iso mismatch", 1);
67  summary->setBinLabel(IDXBAD, "index mismatch", 1);
68 
69  errorSummaryNum = ibooker.book1D("errorSummaryNum", summaryTitle.c_str(), 13, 1, 14); // range to match bin numbering
70  errorSummaryNum->setBinLabel(RBXRANGE, "BX range mismatch", 1);
71  errorSummaryNum->setBinLabel(RNMUON, "muon collection size mismatch", 1);
72  errorSummaryNum->setBinLabel(RMUON, "mismatching muons", 1);
73  errorSummaryNum->setBinLabel(RPT, "p_{T} mismatch", 1);
74  errorSummaryNum->setBinLabel(RETA, "#eta mismatch", 1);
75  errorSummaryNum->setBinLabel(RPHI, "#phi mismatch", 1);
76  errorSummaryNum->setBinLabel(RETAATVTX, "#eta at vertex mismatch", 1);
77  errorSummaryNum->setBinLabel(RPHIATVTX, "#phi at vertex mismatch", 1);
78  errorSummaryNum->setBinLabel(RCHARGE, "charge mismatch", 1);
79  errorSummaryNum->setBinLabel(RCHARGEVAL, "charge valid mismatch", 1);
80  errorSummaryNum->setBinLabel(RQUAL, "quality mismatch", 1);
81  errorSummaryNum->setBinLabel(RISO, "iso mismatch", 1);
82  errorSummaryNum->setBinLabel(RIDX, "index mismatch", 1);
83 
84  // Change the label for those bins that will be ignored
85  for (unsigned int i = 1; i <= RIDX; i++) {
86  if (incBin[i]==false) {
87  errorSummaryNum->setBinLabel(i, "Ignored", 1);
88  }
89  }
90  // Setting canExtend to false is needed to get the correct behaviour when running multithreaded.
91  // Otherwise, when merging the histgrams of the threads, TH1::Merge sums bins that have the same label in one bin.
92  // This needs to come after the calls to setBinLabel.
93  errorSummaryNum->getTH1F()->GetXaxis()->SetCanExtend(false);
94 
95  errorSummaryDen = ibooker.book1D("errorSummaryDen", "denominators", 13, 1, 14); // range to match bin numbering
96  errorSummaryDen->setBinLabel(RBXRANGE, "# events", 1);
97  errorSummaryDen->setBinLabel(RNMUON, "# muon collections", 1);
98  for (int i = RMUON; i <= RIDX; ++i) {
99  errorSummaryDen->setBinLabel(i, "# muons", 1);
100  }
101  // Needed for correct histogram summing in multithreaded running.
102  errorSummaryDen->getTH1F()->GetXaxis()->SetCanExtend(false);
103 
104  muColl1BxRange = ibooker.book1D("muBxRangeColl1", (muonColl1Title+" mismatching BX range").c_str(), 5, -2.5, 2.5);
105  muColl1BxRange->setAxisTitle("BX range", 1);
106  muColl1nMu = ibooker.book1D("nMuColl1", (muonColl1Title+" mismatching muon multiplicity").c_str(), 9, -0.5, 8.5);
107  muColl1nMu->setAxisTitle("Muon multiplicity", 1);
108  muColl1hwPt = ibooker.book1D("muHwPtColl1", (muonColl1Title+" mismatching muon p_{T}").c_str(), 512, -0.5, 511.5);
109  muColl1hwPt->setAxisTitle("Hardware p_{T}", 1);
110  muColl1hwEta = ibooker.book1D("muHwEtaColl1", (muonColl1Title+" mismatching muon #eta").c_str(), 461, -230.5, 230.5);
111  muColl1hwEta->setAxisTitle("Hardware #eta", 1);
112  muColl1hwPhi = ibooker.book1D("muHwPhiColl1", (muonColl1Title+" mismatching muon #phi").c_str(), 576, -0.5, 575.5);
113  muColl1hwPhi->setAxisTitle("Hardware #phi", 1);
114  muColl1hwEtaAtVtx = ibooker.book1D("muHwEtaAtVtxColl1", (muonColl1Title+" mismatching muon #eta at vertex").c_str(), 461, -230.5, 230.5);
115  muColl1hwEtaAtVtx->setAxisTitle("Hardware #eta at vertex", 1);
116  muColl1hwPhiAtVtx = ibooker.book1D("muHwPhiAtVtxColl1", (muonColl1Title+" mismatching muon #phi at vertex").c_str(), 576, -0.5, 575.5);
117  muColl1hwPhiAtVtx->setAxisTitle("Hardware #phi at vertex", 1);
118  muColl1hwCharge = ibooker.book1D("muHwChargeColl1", (muonColl1Title+" mismatching muon charge").c_str(), 2, -0.5, 1.5);
119  muColl1hwCharge->setAxisTitle("Hardware charge", 1);
120  muColl1hwChargeValid = ibooker.book1D("muHwChargeValidColl1", (muonColl1Title+" mismatching muon charge valid").c_str(), 2, -0.5, 1.5);
121  muColl1hwChargeValid->setAxisTitle("Hardware charge valid", 1);
122  muColl1hwQual = ibooker.book1D("muHwQualColl1", (muonColl1Title+" mismatching muon quality").c_str(), 16, -0.5, 15.5);
123  muColl1hwQual->setAxisTitle("Hardware quality", 1);
124  muColl1hwIso = ibooker.book1D("muHwIsoColl1", (muonColl1Title+" mismatching muon isolation").c_str(), 4, -0.5, 3.5);
125  muColl1hwIso->setAxisTitle("Hardware isolation", 1);
126  muColl1Index = ibooker.book1D("muIndexColl1", (muonColl1Title+" mismatching Input muon index").c_str(), 108, -0.5, 107.5);
127  muColl1Index->setAxisTitle("Index", 1);
128 
129  // if enable2DComp variable is True, book also the eta-phi map
130  if(enable2DComp){
131  muColl1EtaPhimap = ibooker.book2D("muEtaPhimapColl1", (muonColl1Title+" mismatching muon #eta-#phi map").c_str(),25,-2.5,2.5,25,-3.2,3.2);
132  muColl1EtaPhimap->setAxisTitle("#eta", 1);
133  muColl1EtaPhimap->setAxisTitle("#phi", 2);
134  }
135 
136  muColl2BxRange = ibooker.book1D("muBxRangeColl2", (muonColl2Title+" mismatching BX range").c_str(), 5, -2.5, 2.5);
137  muColl2BxRange->setAxisTitle("BX range", 1);
138  muColl2nMu = ibooker.book1D("nMuColl2", (muonColl2Title+" mismatching muon multiplicity").c_str(), 9, -0.5, 8.5);
139  muColl2nMu->setAxisTitle("Muon multiplicity", 1);
140  muColl2hwPt = ibooker.book1D("muHwPtColl2", (muonColl2Title+" mismatching muon p_{T}").c_str(), 512, -0.5, 511.5);
141  muColl2hwPt->setAxisTitle("Hardware p_{T}", 1);
142  muColl2hwEta = ibooker.book1D("muHwEtaColl2", (muonColl2Title+" mismatching muon #eta").c_str(), 461, -230.5, 230.5);
143  muColl2hwEta->setAxisTitle("Hardware #eta", 1);
144  muColl2hwPhi = ibooker.book1D("muHwPhiColl2", (muonColl2Title+" mismatching muon #phi").c_str(), 576, -0.5, 575.5);
145  muColl2hwPhi->setAxisTitle("Hardware #phi", 1);
146  muColl2hwEtaAtVtx = ibooker.book1D("muHwEtaAtVtxColl2", (muonColl2Title+" mismatching muon #eta at vertex").c_str(), 461, -230.5, 230.5);
147  muColl2hwEtaAtVtx->setAxisTitle("Hardware #eta at vertex", 1);
148  muColl2hwPhiAtVtx = ibooker.book1D("muHwPhiAtVtxColl2", (muonColl2Title+" mismatching muon #phi at vertex").c_str(), 576, -0.5, 575.5);
149  muColl2hwPhiAtVtx->setAxisTitle("Hardware #phi at vertex", 1);
150  muColl2hwCharge = ibooker.book1D("muHwChargeColl2", (muonColl2Title+" mismatching muon charge").c_str(), 2, -0.5, 1.5);
151  muColl2hwCharge->setAxisTitle("Hardware charge", 1);
152  muColl2hwChargeValid = ibooker.book1D("muHwChargeValidColl2", (muonColl2Title+" mismatching muon charge valid").c_str(), 2, -0.5, 1.5);
153  muColl2hwChargeValid->setAxisTitle("Hardware charge valid", 1);
154  muColl2hwQual = ibooker.book1D("muHwQualColl2", (muonColl2Title+" mismatching muon quality").c_str(), 16, -0.5, 15.5);
155  muColl2hwQual->setAxisTitle("Hardware quality", 1);
156  muColl2hwIso = ibooker.book1D("muHwIsoColl2", (muonColl2Title+" mismatching muon isolation").c_str(), 4, -0.5, 3.5);
157  muColl2hwIso->setAxisTitle("Hardware isolation", 1);
158  muColl2Index = ibooker.book1D("muIndexColl2", (muonColl2Title+" mismatching Input muon index").c_str(), 108, -0.5, 107.5);
159  muColl2Index->setAxisTitle("Index", 1);
160 
161  // if enable2DdeMu variable is True, book also the eta-phi map
162  if(enable2DComp){
163  muColl2EtaPhimap = ibooker.book2D("muEtaPhimapColl2", (muonColl2Title+" mismatching muon #eta-#phi map").c_str(),25,-2.5,2.5,25,-3.2,3.2);
164  muColl2EtaPhimap->setAxisTitle("#eta", 1);
165  muColl2EtaPhimap->setAxisTitle("#phi", 2);
166  }
167 }
MonitorElement * muColl2hwPt
MonitorElement * muColl1hwPt
MonitorElement * muColl2Index
MonitorElement * muColl2hwIso
MonitorElement * muColl1hwEtaAtVtx
MonitorElement * muColl2hwPhi
MonitorElement * errorSummaryNum
TH1F * getTH1F() const
MonitorElement * errorSummaryDen
MonitorElement * muColl1hwCharge
MonitorElement * muColl1hwEta
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * muColl2hwQual
std::string monitorDir
MonitorElement * muColl2hwEtaAtVtx
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * muColl1hwIso
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
std::string muonColl2Title
MonitorElement * muColl2EtaPhimap
MonitorElement * summary
MonitorElement * muColl2hwPhiAtVtx
MonitorElement * muColl1EtaPhimap
MonitorElement * muColl2BxRange
MonitorElement * muColl2nMu
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * muColl2hwEta
MonitorElement * muColl1hwQual
MonitorElement * muColl2hwChargeValid
MonitorElement * muColl1hwPhi
MonitorElement * muColl1hwChargeValid
MonitorElement * muColl1nMu
std::string summaryTitle
std::string muonColl1Title
MonitorElement * muColl1hwPhiAtVtx
MonitorElement * muColl2hwCharge
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * muColl1BxRange
MonitorElement * muColl1Index
void L1TStage2MuonComp::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

Definition at line 43 of file L1TStage2MuonComp.cc.

43 {}
void L1TStage2MuonComp::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 29 of file L1TStage2MuonComp.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), edm::ParameterDescriptionNode::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

29  {
31  desc.add<edm::InputTag>("muonCollection1")->setComment("L1T Muon collection 1");
32  desc.add<edm::InputTag>("muonCollection2")->setComment("L1T Muon collection 2");
33  desc.addUntracked<std::string>("monitorDir", "")->setComment("Target directory in the DQM file. Will be created if not existing.");
34  desc.addUntracked<std::string>("muonCollection1Title", "Muon collection 1")->setComment("Histogram title for first collection.");
35  desc.addUntracked<std::string>("muonCollection2Title", "Muon collection 2")->setComment("Histogram title for second collection.");
36  desc.addUntracked<std::string>("summaryTitle", "Summary")->setComment("Title of summary histogram.");
37  desc.addUntracked<std::vector<int>>("ignoreBin", std::vector<int>())->setComment("List of bins to ignore");
38  desc.addUntracked<bool>("verbose", false);
39  desc.addUntracked<bool>("enable2DComp", false);
40  descriptions.add("l1tStage2MuonComp", desc);
41 }
void setComment(std::string const &value)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

bool L1TStage2MuonComp::enable2DComp
private

Definition at line 45 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::errorSummaryDen
private

Definition at line 49 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::errorSummaryNum
private

Definition at line 48 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

std::vector<int> L1TStage2MuonComp::ignoreBin
private

Definition at line 43 of file L1TStage2MuonComp.h.

Referenced by L1TStage2MuonComp().

bool L1TStage2MuonComp::incBin[RIDX+1]
private

Definition at line 35 of file L1TStage2MuonComp.h.

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

std::string L1TStage2MuonComp::monitorDir
private

Definition at line 39 of file L1TStage2MuonComp.h.

Referenced by bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1BxRange
private

Definition at line 51 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1EtaPhimap
private

Definition at line 63 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwCharge
private

Definition at line 58 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwChargeValid
private

Definition at line 59 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwEta
private

Definition at line 54 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwEtaAtVtx
private

Definition at line 56 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwIso
private

Definition at line 61 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwPhi
private

Definition at line 55 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwPhiAtVtx
private

Definition at line 57 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwPt
private

Definition at line 53 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1hwQual
private

Definition at line 60 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1Index
private

Definition at line 62 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl1nMu
private

Definition at line 52 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2BxRange
private

Definition at line 65 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2EtaPhimap
private

Definition at line 77 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwCharge
private

Definition at line 72 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwChargeValid
private

Definition at line 73 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwEta
private

Definition at line 68 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwEtaAtVtx
private

Definition at line 70 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwIso
private

Definition at line 75 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwPhi
private

Definition at line 69 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwPhiAtVtx
private

Definition at line 71 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwPt
private

Definition at line 67 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2hwQual
private

Definition at line 74 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2Index
private

Definition at line 76 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TStage2MuonComp::muColl2nMu
private

Definition at line 66 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

std::string L1TStage2MuonComp::muonColl1Title
private

Definition at line 40 of file L1TStage2MuonComp.h.

Referenced by bookHistograms().

std::string L1TStage2MuonComp::muonColl2Title
private

Definition at line 41 of file L1TStage2MuonComp.h.

Referenced by bookHistograms().

edm::EDGetTokenT<l1t::MuonBxCollection> L1TStage2MuonComp::muonToken1
private

Definition at line 37 of file L1TStage2MuonComp.h.

Referenced by analyze().

edm::EDGetTokenT<l1t::MuonBxCollection> L1TStage2MuonComp::muonToken2
private

Definition at line 38 of file L1TStage2MuonComp.h.

Referenced by analyze().

MonitorElement* L1TStage2MuonComp::summary
private

Definition at line 47 of file L1TStage2MuonComp.h.

Referenced by analyze(), and bookHistograms().

std::string L1TStage2MuonComp::summaryTitle
private

Definition at line 42 of file L1TStage2MuonComp.h.

Referenced by bookHistograms().

bool L1TStage2MuonComp::verbose
private