CMS 3D CMS Logo

L1TGMT.cc
Go to the documentation of this file.
1 /*
2  * \file L1TGMT.cc
3  *
4  * \author J. Berryhill, I. Mikulec
5  *
6  */
7 
10 
17 
18 using namespace std;
19 using namespace edm;
20 
21 const double L1TGMT::piconv_ = 180. / acos(-1.);
22 
24  : verbose_(ps.getUntrackedParameter<bool>("verbose", false)) // verbosity switch
25  ,
26  gmtSource_(consumes<L1MuGMTReadoutCollection>(ps.getParameter<InputTag>("gmtSource"))),
27  bxnum_old_(0),
28  obnum_old_(0),
29  trsrc_old_(0) {
30  if (verbose_)
31  cout << "L1TGMT: constructor...." << endl;
32  l1muTrigscaleToken_ = esConsumes<edm::Transition::BeginRun>();
33  l1TrigptscaleToken_ = esConsumes<edm::Transition::BeginRun>();
34 }
35 
37 
38 void L1TGMT::analyze(const Event& e, const EventSetup& c) {
39  if (verbose_)
40  cout << "L1TGMT: analyze...." << endl;
41 
43  e.getByToken(gmtSource_, pCollection);
44 
45  if (!pCollection.isValid()) {
46  edm::LogInfo("DataNotFound") << "can't find L1MuGMTReadoutCollection";
47  return;
48  }
49 
50  // remember the bx of 1st candidate of each system (9=none)
51  int bx1st[4] = {9, 9, 9, 9};
52 
53  // get GMT readout collection
54  L1MuGMTReadoutCollection const* gmtrc = pCollection.product();
55  // get record vector
56  vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
57  // loop over records of individual bx's
58  vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
59 
60  for (RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++) {
61  vector<L1MuRegionalCand> INPCands[4] = {
62  RRItr->getDTBXCands(), RRItr->getBrlRPCCands(), RRItr->getCSCCands(), RRItr->getFwdRPCCands()};
63  vector<L1MuGMTExtendedCand> GMTCands = RRItr->getGMTCands();
64 
65  vector<L1MuRegionalCand>::const_iterator INPItr;
66  vector<L1MuGMTExtendedCand>::const_iterator GMTItr;
67  vector<L1MuGMTExtendedCand>::const_iterator GMTItr2;
68 
69  int BxInEvent = RRItr->getBxInEvent();
70 
71  // count non-empty candidates in this bx
72  int nSUBS[5] = {0, 0, 0, 0, 0};
73  for (int i = 0; i < 4; i++) {
74  for (INPItr = INPCands[i].begin(); INPItr != INPCands[i].end(); ++INPItr) {
75  if (!INPItr->empty()) {
76  nSUBS[i]++;
77  if (bx1st[i] == 9)
78  bx1st[i] = BxInEvent;
79  }
80  }
81  subs_nbx[i]->Fill(float(nSUBS[i]), float(BxInEvent));
82  }
83 
84  for (GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr) {
85  if (!GMTItr->empty())
86  nSUBS[GMT]++;
87  }
88  subs_nbx[GMT]->Fill(float(nSUBS[GMT]), float(BxInEvent));
89 
91  // from here care only about the L1A bunch crossing
92  if (BxInEvent != 0)
93  continue;
94 
95  // get the absolute bx number of the L1A
96  int Bx = RRItr->getBxNr();
97 
98  bx_number->Fill(double(Bx));
99 
100  for (int i = 0; i < 4; i++) {
101  for (INPItr = INPCands[i].begin(); INPItr != INPCands[i].end(); ++INPItr) {
102  if (INPItr->empty())
103  continue;
104  subs_eta[i]->Fill(INPItr->etaValue());
105  subs_phi[i]->Fill(phiconv_(INPItr->phiValue()));
106  subs_pt[i]->Fill(INPItr->ptValue());
107  subs_qty[i]->Fill(INPItr->quality());
108  subs_etaphi[i]->Fill(INPItr->etaValue(), phiconv_(INPItr->phiValue()));
109  subs_etaqty[i]->Fill(INPItr->etaValue(), INPItr->quality());
110  int word = INPItr->getDataWord();
111  for (int j = 0; j < 32; j++) {
112  if (word & (1 << j))
113  subs_bits[i]->Fill(float(j));
114  }
115  }
116  }
117 
118  for (GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr) {
119  if (GMTItr->empty())
120  continue;
121  subs_eta[GMT]->Fill(GMTItr->etaValue());
122  subs_phi[GMT]->Fill(phiconv_(GMTItr->phiValue()));
123  subs_pt[GMT]->Fill(GMTItr->ptValue());
124  subs_qty[GMT]->Fill(GMTItr->quality());
125  subs_etaphi[GMT]->Fill(GMTItr->etaValue(), phiconv_(GMTItr->phiValue()));
126  subs_etaqty[GMT]->Fill(GMTItr->etaValue(), GMTItr->quality());
127  int word = GMTItr->getDataWord();
128  for (int j = 0; j < 32; j++) {
129  if (word & (1 << j))
130  subs_bits[GMT]->Fill(float(j));
131  }
132 
133  if (GMTItr->isMatchedCand()) {
134  if (GMTItr->quality() > 3) {
135  eta_dtcsc_and_rpc->Fill(GMTItr->etaValue());
136  phi_dtcsc_and_rpc->Fill(phiconv_(GMTItr->phiValue()));
137  etaphi_dtcsc_and_rpc->Fill(GMTItr->etaValue(), phiconv_(GMTItr->phiValue()));
138  }
139  } else if (GMTItr->isRPC()) {
140  if (GMTItr->quality() > 3) {
141  eta_rpc_only->Fill(GMTItr->etaValue());
142  phi_rpc_only->Fill(phiconv_(GMTItr->phiValue()));
143  etaphi_rpc_only->Fill(GMTItr->etaValue(), phiconv_(GMTItr->phiValue()));
144  }
145  } else {
146  if (GMTItr->quality() > 3) {
147  eta_dtcsc_only->Fill(GMTItr->etaValue());
148  phi_dtcsc_only->Fill(phiconv_(GMTItr->phiValue()));
149  etaphi_dtcsc_only->Fill(GMTItr->etaValue(), phiconv_(GMTItr->phiValue()));
150  }
151 
152  if (GMTItr != GMTCands.end()) {
153  for (GMTItr2 = GMTCands.begin(); GMTItr2 != GMTCands.end(); ++GMTItr2) {
154  if (GMTItr2 == GMTItr)
155  continue;
156  if (GMTItr2->empty())
157  continue;
158  if (GMTItr2->isRPC()) {
159  if (GMTItr->isFwd()) {
160  dist_eta_csc_rpc->Fill(GMTItr->etaValue() - GMTItr2->etaValue());
161  dist_phi_csc_rpc->Fill(phiconv_(GMTItr->phiValue()) - phiconv_(GMTItr2->phiValue()));
162  } else {
163  dist_eta_dt_rpc->Fill(GMTItr->etaValue() - GMTItr2->etaValue());
164  dist_phi_dt_rpc->Fill(phiconv_(GMTItr->phiValue()) - phiconv_(GMTItr2->phiValue()));
165  }
166  } else {
167  if (!(GMTItr->isFwd()) && GMTItr2->isFwd()) {
168  dist_eta_dt_csc->Fill(GMTItr->etaValue() - GMTItr2->etaValue());
169  dist_phi_dt_csc->Fill(phiconv_(GMTItr->phiValue()) - phiconv_(GMTItr2->phiValue()));
170  } else if (GMTItr->isFwd() && !(GMTItr2->isFwd())) {
171  dist_eta_dt_csc->Fill(GMTItr2->etaValue() - GMTItr->etaValue());
172  dist_phi_dt_csc->Fill(phiconv_(GMTItr->phiValue()) - phiconv_(GMTItr2->phiValue()));
173  }
174  }
175  }
176  }
177  }
178  }
179 
180  n_rpcb_vs_dttf->Fill(float(nSUBS[DTTF]), float(nSUBS[RPCb]));
181  n_rpcf_vs_csctf->Fill(float(nSUBS[CSCTF]), float(nSUBS[RPCf]));
182  n_csctf_vs_dttf->Fill(float(nSUBS[DTTF]), float(nSUBS[CSCTF]));
183 
184  regional_triggers->Fill(-1.); // fill underflow for normalization
185  if (nSUBS[GMT])
186  regional_triggers->Fill(0.); // fill all muon bin
187  int ioff = 1;
188  for (int i = 0; i < 4; i++) {
189  if (nSUBS[i])
190  regional_triggers->Fill(float(5 * i + nSUBS[i] + ioff));
191  }
192  if (nSUBS[DTTF] && (nSUBS[RPCb] || nSUBS[RPCf]))
193  regional_triggers->Fill(22.);
194  if (nSUBS[DTTF] && nSUBS[CSCTF])
195  regional_triggers->Fill(23.);
196  if (nSUBS[CSCTF] && (nSUBS[RPCb] || nSUBS[RPCf]))
197  regional_triggers->Fill(24.);
198  if (nSUBS[DTTF] && nSUBS[CSCTF] && (nSUBS[RPCb] || nSUBS[RPCf]))
199  regional_triggers->Fill(25.);
200 
201  // fill only if previous event corresponds to previous trigger
202  // if( (Ev - evnum_old_) == 1 && bxnum_old_ > -1 ) {
203  // assume getting all events in a sequence (usefull only from reco data)
204  if (bxnum_old_ > -1) {
205  float dBx = Bx - bxnum_old_ + 3564.0 * (e.orbitNumber() - obnum_old_);
206  for (int id = 0; id < 4; id++) {
207  if (trsrc_old_ & (1 << id)) {
208  for (int i = 0; i < 4; i++) {
209  if (nSUBS[i])
210  subs_dbx[i]->Fill(dBx, float(id));
211  }
212  }
213  }
214  }
215 
216  // save quantities for the next event
217  bxnum_old_ = Bx;
218  obnum_old_ = e.orbitNumber();
219  trsrc_old_ = 0;
220  for (int i = 0; i < 4; i++) {
221  if (nSUBS[i])
222  trsrc_old_ |= (1 << i);
223  }
224  }
225 
226  if (bx1st[DTTF] < 9 && bx1st[RPCb] < 9)
227  bx_dt_rpc->Fill(bx1st[DTTF], bx1st[RPCb]);
228  if (bx1st[CSCTF] < 9 && bx1st[RPCf] < 9)
229  bx_csc_rpc->Fill(bx1st[CSCTF], bx1st[RPCf]);
230  if (bx1st[DTTF] < 9 && bx1st[CSCTF] < 9)
231  bx_dt_csc->Fill(bx1st[DTTF], bx1st[CSCTF]);
232 }
233 
234 double L1TGMT::phiconv_(float phi) {
235  double phiout = double(phi);
236  phiout *= piconv_;
237  phiout += 0.001; // add a small value to get off the bin edge
238  return phiout;
239 }
240 
242  std::string subs[5] = {"DTTF", "RPCb", "CSCTF", "RPCf", "GMT"};
243 
244  const L1MuTriggerScales* scales = &c.getData(l1muTrigscaleToken_);
245  const L1MuTriggerPtScale* scalept = &c.getData(l1TrigptscaleToken_);
246 
247  ibooker.setCurrentFolder("L1T/L1TGMT");
248 
249  int nqty = 8;
250  double qtymin = -0.5;
251  double qtymax = 7.5;
252 
253  float phiscale[145];
254  int nphiscale;
255  {
256  int nbins = scales->getPhiScale()->getNBins();
257  if (nbins > 144)
258  nbins = 144;
259  for (int j = 0; j <= nbins; j++) {
260  phiscale[j] = piconv_ * scales->getPhiScale()->getValue(j);
261  }
262  nphiscale = nbins;
263  }
264 
265  float qscale[9];
266  {
267  for (int j = 0; j < 9; j++) {
268  qscale[j] = -0.5 + j;
269  }
270  }
271 
272  // pt scale first bin reserved for empty muon
273  float ptscale[32];
274  int nptscale;
275  {
276  int nbins = scalept->getPtScale()->getNBins() - 1;
277  if (nbins > 31)
278  nbins = 31;
279  for (int j = 1; j <= nbins; j++) {
280  ptscale[j - 1] = scalept->getPtScale()->getValue(j);
281  }
282  ptscale[nbins] = ptscale[nbins - 1] + 10.; // make reasonable size last bin
283  nptscale = nbins;
284  }
285 
286  float etascale[5][66];
287  int netascale[5];
288  // DTTF eta scale
289  {
290  int nbins = scales->getRegionalEtaScale(DTTF)->getNBins();
291  if (nbins > 65)
292  nbins = 65;
293  for (int j = 0; j <= nbins; j++) {
294  etascale[DTTF][j] = scales->getRegionalEtaScale(DTTF)->getValue(j);
295  }
296  netascale[DTTF] = nbins;
297  }
298  // RPCb etascale
299  {
300  int nbins = scales->getRegionalEtaScale(RPCb)->getNBins();
301  if (nbins > 65)
302  nbins = 65;
303  for (int j = 0; j <= nbins; j++) {
304  etascale[RPCb][j] = scales->getRegionalEtaScale(RPCb)->getValue(j);
305  }
306  netascale[RPCb] = nbins;
307  }
308  // CSCTF etascale
309  // special case - need to mirror 2*32 bins
310  {
311  int nbins = scales->getRegionalEtaScale(CSCTF)->getNBins();
312  if (nbins > 32)
313  nbins = 32;
314 
315  int i = 0;
316  for (int j = nbins; j >= 0; j--, i++) {
317  etascale[CSCTF][i] = (-1) * scales->getRegionalEtaScale(CSCTF)->getValue(j);
318  }
319  for (int j = 0; j <= nbins; j++, i++) {
320  etascale[CSCTF][i] = scales->getRegionalEtaScale(CSCTF)->getValue(j);
321  }
322  netascale[CSCTF] = i - 1;
323  }
324  // RPCf etascale
325  {
326  int nbins = scales->getRegionalEtaScale(RPCf)->getNBins();
327  if (nbins > 65)
328  nbins = 65;
329  for (int j = 0; j <= nbins; j++) {
330  etascale[RPCf][j] = scales->getRegionalEtaScale(RPCf)->getValue(j);
331  }
332  netascale[RPCf] = nbins;
333  }
334  // GMT etascale
335  {
336  int nbins = scales->getGMTEtaScale()->getNBins();
337  if (nbins > 32)
338  nbins = 32;
339 
340  int i = 0;
341  for (int j = nbins; j > 0; j--, i++) {
342  etascale[GMT][i] = (-1) * scales->getGMTEtaScale()->getValue(j);
343  }
344  for (int j = 0; j <= nbins; j++, i++) {
345  etascale[GMT][i] = scales->getGMTEtaScale()->getValue(j);
346  }
347  netascale[GMT] = i - 1;
348  }
349 
350  std::string hname("");
351  std::string htitle("");
352 
353  for (int i = 0; i < 5; i++) {
354  hname = subs[i] + "_nbx";
355  htitle = subs[i] + " multiplicity in bx";
356  subs_nbx[i] = ibooker.book2D(hname.data(), htitle.data(), 4, 1., 5., 5, -2.5, 2.5);
357  subs_nbx[i]->setAxisTitle(subs[i] + " candidates", 1);
358  subs_nbx[i]->setAxisTitle("bx wrt L1A", 2);
359 
360  hname = subs[i] + "_eta";
361  htitle = subs[i] + " eta value";
362  subs_eta[i] = ibooker.book1D(hname.data(), htitle.data(), netascale[i], etascale[i]);
363  subs_eta[i]->setAxisTitle("eta", 1);
364 
365  hname = subs[i] + "_phi";
366  htitle = subs[i] + " phi value";
367  subs_phi[i] = ibooker.book1D(hname.data(), htitle.data(), nphiscale, phiscale);
368  subs_phi[i]->setAxisTitle("phi (deg)", 1);
369 
370  hname = subs[i] + "_pt";
371  htitle = subs[i] + " pt value";
372  subs_pt[i] = ibooker.book1D(hname.data(), htitle.data(), nptscale, ptscale);
373  subs_pt[i]->setAxisTitle("L1 pT (GeV)", 1);
374 
375  hname = subs[i] + "_qty";
376  htitle = subs[i] + " qty value";
377  subs_qty[i] = ibooker.book1D(hname.data(), htitle.data(), nqty, qtymin, qtymax);
378  subs_qty[i]->setAxisTitle(subs[i] + " quality", 1);
379 
380  hname = subs[i] + "_etaphi";
381  htitle = subs[i] + " phi vs eta";
382  subs_etaphi[i] = ibooker.book2D(hname.data(), htitle.data(), netascale[i], etascale[i], nphiscale, phiscale);
383  subs_etaphi[i]->setAxisTitle("eta", 1);
384  subs_etaphi[i]->setAxisTitle("phi (deg)", 2);
385 
386  hname = subs[i] + "_etaqty";
387  htitle = subs[i] + " qty vs eta";
388  subs_etaqty[i] = ibooker.book2D(hname.data(), htitle.data(), netascale[i], etascale[i], nqty, qscale);
389  subs_etaqty[i]->setAxisTitle("eta", 1);
390  subs_etaqty[i]->setAxisTitle(subs[i] + " quality", 2);
391 
392  hname = subs[i] + "_bits";
393  htitle = subs[i] + " bit population";
394  subs_bits[i] = ibooker.book1D(hname.data(), htitle.data(), 32, -0.5, 31.5);
395  subs_bits[i]->setAxisTitle("bit number", 1);
396  }
397 
398  regional_triggers = ibooker.book1D("Regional_trigger", "Muon trigger contribution", 27, 0., 27.);
399  regional_triggers->setAxisTitle("regional trigger", 1);
400  int ib = 1;
401  regional_triggers->setBinLabel(ib++, "All muons", 1);
402  ib++;
403  regional_triggers->setBinLabel(ib++, "DT 1mu", 1);
404  regional_triggers->setBinLabel(ib++, "DT 2mu", 1);
405  regional_triggers->setBinLabel(ib++, "DT 3mu", 1);
406  regional_triggers->setBinLabel(ib++, "DT 4mu", 1);
407  ib++;
408  regional_triggers->setBinLabel(ib++, "RPCb 1mu", 1);
409  regional_triggers->setBinLabel(ib++, "RPCb 2mu", 1);
410  regional_triggers->setBinLabel(ib++, "RPCb 3mu", 1);
411  regional_triggers->setBinLabel(ib++, "RPCb 4mu", 1);
412  ib++;
413  regional_triggers->setBinLabel(ib++, "CSC 1mu", 1);
414  regional_triggers->setBinLabel(ib++, "CSC 2mu", 1);
415  regional_triggers->setBinLabel(ib++, "CSC 3mu", 1);
416  regional_triggers->setBinLabel(ib++, "CSC 4mu", 1);
417  ib++;
418  regional_triggers->setBinLabel(ib++, "RPCf 1mu", 1);
419  regional_triggers->setBinLabel(ib++, "RPCf 2mu", 1);
420  regional_triggers->setBinLabel(ib++, "RPCf 3mu", 1);
421  regional_triggers->setBinLabel(ib++, "RPCf 4mu", 1);
422  ib++;
423  regional_triggers->setBinLabel(ib++, "DT & RPC", 1);
424  regional_triggers->setBinLabel(ib++, "DT & CSC", 1);
425  regional_triggers->setBinLabel(ib++, "CSC & RPC", 1);
426  regional_triggers->setBinLabel(ib++, "DT & CSC & RPC", 1);
427 
428  bx_number = ibooker.book1D("Bx_Number", "Bx number ROP chip", 3564, 0., 3564.);
429  bx_number->setAxisTitle("bx number", 1);
430 
431  dbx_chip = ibooker.bookProfile("dbx_Chip", "bx count difference wrt ROP chip", 5, 0., 5., 100, -4000., 4000., "i");
432  dbx_chip->setAxisTitle("chip name", 1);
433  dbx_chip->setAxisTitle("delta bx", 2);
434  dbx_chip->setBinLabel(1, "IND", 1);
435  dbx_chip->setBinLabel(2, "INB", 1);
436  dbx_chip->setBinLabel(3, "INC", 1);
437  dbx_chip->setBinLabel(4, "INF", 1);
438  dbx_chip->setBinLabel(5, "SRT", 1);
439 
441  ibooker.book1D("eta_DTCSC_and_RPC", "eta of confirmed GMT candidates", netascale[GMT], etascale[GMT]);
442  eta_dtcsc_and_rpc->setAxisTitle("eta", 1);
443 
445  ibooker.book1D("eta_DTCSC_only", "eta of unconfirmed DT/CSC candidates", netascale[GMT], etascale[GMT]);
446  eta_dtcsc_only->setAxisTitle("eta", 1);
447 
448  eta_rpc_only = ibooker.book1D("eta_RPC_only", "eta of unconfirmed RPC candidates", netascale[GMT], etascale[GMT]);
449  eta_rpc_only->setAxisTitle("eta", 1);
450 
451  phi_dtcsc_and_rpc = ibooker.book1D("phi_DTCSC_and_RPC", "phi of confirmed GMT candidates", nphiscale, phiscale);
452  phi_dtcsc_and_rpc->setAxisTitle("phi (deg)", 1);
453 
454  phi_dtcsc_only = ibooker.book1D("phi_DTCSC_only", "phi of unconfirmed DT/CSC candidates", nphiscale, phiscale);
455  phi_dtcsc_only->setAxisTitle("phi (deg)", 1);
456 
457  phi_rpc_only = ibooker.book1D("phi_RPC_only", "phi of unconfirmed RPC candidates", nphiscale, phiscale);
458  phi_rpc_only->setAxisTitle("phi (deg)", 1);
459 
460  etaphi_dtcsc_and_rpc = ibooker.book2D("etaphi_DTCSC_and_RPC",
461  "eta vs phi map of confirmed GMT candidates",
462  netascale[GMT],
463  etascale[GMT],
464  nphiscale,
465  phiscale);
467  etaphi_dtcsc_and_rpc->setAxisTitle("phi (deg)", 2);
468 
469  etaphi_dtcsc_only = ibooker.book2D("etaphi_DTCSC_only",
470  "eta vs phi map of unconfirmed DT/CSC candidates",
471  netascale[GMT],
472  etascale[GMT],
473  nphiscale,
474  phiscale);
475  etaphi_dtcsc_only->setAxisTitle("eta", 1);
476  etaphi_dtcsc_only->setAxisTitle("phi (deg)", 2);
477 
478  etaphi_rpc_only = ibooker.book2D("etaphi_RPC_only",
479  "eta vs phi map of unconfirmed RPC candidates",
480  netascale[GMT],
481  etascale[GMT],
482  nphiscale,
483  phiscale);
484  etaphi_rpc_only->setAxisTitle("eta", 1);
485  etaphi_rpc_only->setAxisTitle("phi (deg)", 2);
486 
487  dist_phi_dt_rpc = ibooker.book1D("dist_phi_DT_RPC", "Dphi between DT and RPC candidates", 100, -125., 125.);
488  dist_phi_dt_rpc->setAxisTitle("delta phi (deg)", 1);
489 
490  dist_phi_csc_rpc = ibooker.book1D("dist_phi_CSC_RPC", "Dphi between CSC and RPC candidates", 100, -125., 125.);
491  dist_phi_csc_rpc->setAxisTitle("delta phi (deg)", 1);
492 
493  dist_phi_dt_csc = ibooker.book1D("dist_phi_DT_CSC", "Dphi between DT and CSC candidates", 100, -125., 125.);
494  dist_phi_dt_csc->setAxisTitle("delta phi (deg)", 1);
495 
496  dist_eta_dt_rpc = ibooker.book1D("dist_eta_DT_RPC", "Deta between DT and RPC candidates", 40, -1., 1.);
497  dist_eta_dt_rpc->setAxisTitle("delta eta", 1);
498 
499  dist_eta_csc_rpc = ibooker.book1D("dist_eta_CSC_RPC", "Deta between CSC and RPC candidates", 40, -1., 1.);
500  dist_eta_csc_rpc->setAxisTitle("delta eta", 1);
501 
502  dist_eta_dt_csc = ibooker.book1D("dist_eta_DT_CSC", "Deta between DT and CSC candidates", 40, -1., 1.);
503  dist_eta_dt_csc->setAxisTitle("delta eta", 1);
504 
505  n_rpcb_vs_dttf = ibooker.book2D("n_RPCb_vs_DTTF", "n cands RPCb vs DTTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
506  n_rpcb_vs_dttf->setAxisTitle("DTTF candidates", 1);
507  n_rpcb_vs_dttf->setAxisTitle("barrel RPC candidates", 2);
508 
509  n_rpcf_vs_csctf = ibooker.book2D("n_RPCf_vs_CSCTF", "n cands RPCf vs CSCTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
510  n_rpcf_vs_csctf->setAxisTitle("CSCTF candidates", 1);
511  n_rpcf_vs_csctf->setAxisTitle("endcap RPC candidates", 2);
512 
513  n_csctf_vs_dttf = ibooker.book2D("n_CSCTF_vs_DTTF", "n cands CSCTF vs DTTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
514  n_csctf_vs_dttf->setAxisTitle("DTTF candidates", 1);
515  n_csctf_vs_dttf->setAxisTitle("CSCTF candidates", 2);
516 
517  bx_dt_rpc = ibooker.book2D("bx_DT_vs_RPC", "1st bx DT vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
518  bx_dt_rpc->setAxisTitle("bx of 1st DTTF candidate", 1);
519  bx_dt_rpc->setAxisTitle("bx of 1st RPCb candidate", 2);
520 
521  bx_csc_rpc = ibooker.book2D("bx_CSC_vs_RPC", "1st bx CSC vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
522  bx_csc_rpc->setAxisTitle("bx of 1st CSCTF candidate", 1);
523  bx_csc_rpc->setAxisTitle("bx of 1st RPCf candidate", 2);
524 
525  bx_dt_csc = ibooker.book2D("bx_DT_vs_CSC", "1st bx DT vs. CSC", 5, -2.5, 2.5, 5, -2.5, 2.5);
526  bx_dt_csc->setAxisTitle("bx of 1st DTTF candidate", 1);
527  bx_dt_csc->setAxisTitle("bx of 1st CSCTF candidate", 2);
528 
529  for (int i = 0; i < 4; i++) {
530  hname = subs[i] + "_dbx";
531  htitle = "dBx " + subs[i] + " to previous event";
532  subs_dbx[i] = ibooker.book2D(hname.data(), htitle.data(), 1000, 0., 1000., 4, 0., 4.);
533  for (int j = 0; j < 4; j++) {
534  subs_dbx[i]->setBinLabel((j + 1), subs[j], 2);
535  }
536  }
537 }
L1TGMT(const edm::ParameterSet &ps)
Definition: L1TGMT.cc:23
MonitorElement * bx_number
Definition: L1TGMT.h:75
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TGMT.cc:38
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcd > l1muTrigscaleToken_
Definition: L1TGMT.h:105
MonitorElement * phi_rpc_only
Definition: L1TGMT.h:82
const bool verbose_
Definition: L1TGMT.h:102
MonitorElement * subs_eta[5]
Definition: L1TGMT.h:65
T const * product() const
Definition: Handle.h:70
int obnum_old_
Definition: L1TGMT.h:109
MonitorElement * subs_nbx[5]
Definition: L1TGMT.h:64
double phiconv_(float phi)
Definition: L1TGMT.cc:234
int bxnum_old_
Definition: L1TGMT.h:108
~L1TGMT() override
Definition: L1TGMT.cc:36
const L1MuScale * getPtScale() const
get the Pt scale
MonitorElement * dist_eta_dt_rpc
Definition: L1TGMT.h:89
MonitorElement * subs_bits[5]
Definition: L1TGMT.h:71
MonitorElement * subs_dbx[4]
Definition: L1TGMT.h:100
MonitorElement * n_csctf_vs_dttf
Definition: L1TGMT.h:98
void Fill(long long x)
MonitorElement * eta_dtcsc_and_rpc
Definition: L1TGMT.h:77
uint64_t word
MonitorElement * dist_eta_csc_rpc
Definition: L1TGMT.h:90
MonitorElement * subs_etaphi[5]
Definition: L1TGMT.h:69
int trsrc_old_
Definition: L1TGMT.h:110
const edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtSource_
Definition: L1TGMT.h:104
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
MonitorElement * regional_triggers
Definition: L1TGMT.h:73
static const double piconv_
Definition: L1TGMT.h:112
MonitorElement * etaphi_dtcsc_and_rpc
Definition: L1TGMT.h:83
MonitorElement * etaphi_rpc_only
Definition: L1TGMT.h:85
MonitorElement * eta_dtcsc_only
Definition: L1TGMT.h:78
MonitorElement * eta_rpc_only
Definition: L1TGMT.h:79
MonitorElement * n_rpcb_vs_dttf
Definition: L1TGMT.h:96
MonitorElement * phi_dtcsc_only
Definition: L1TGMT.h:81
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
MonitorElement * bx_dt_csc
Definition: L1TGMT.h:94
MonitorElement * subs_phi[5]
Definition: L1TGMT.h:66
virtual 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)
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
Definition: L1TGMT.cc:241
MonitorElement * dbx_chip
Definition: L1TGMT.h:76
Log< level::Info, false > LogInfo
MonitorElement * dist_phi_dt_rpc
Definition: L1TGMT.h:86
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * dist_phi_dt_csc
Definition: L1TGMT.h:88
MonitorElement * phi_dtcsc_and_rpc
Definition: L1TGMT.h:80
MonitorElement * subs_pt[5]
Definition: L1TGMT.h:67
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
virtual unsigned getNBins() const =0
get number of bins
bool isValid() const
Definition: HandleBase.h:70
const double ptscale[31]
Definition: Utilities.cc:29
MonitorElement * subs_qty[5]
Definition: L1TGMT.h:68
HLT enums.
MonitorElement * bx_csc_rpc
Definition: L1TGMT.h:93
edm::ESGetToken< L1MuTriggerPtScale, L1MuTriggerPtScaleRcd > l1TrigptscaleToken_
Definition: L1TGMT.h:106
MonitorElement * bx_dt_rpc
Definition: L1TGMT.h:92
MonitorElement * dist_phi_csc_rpc
Definition: L1TGMT.h:87
MonitorElement * etaphi_dtcsc_only
Definition: L1TGMT.h:84
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * subs_etaqty[5]
Definition: L1TGMT.h:70
MonitorElement * dist_eta_dt_csc
Definition: L1TGMT.h:91
Definition: Run.h:45
MonitorElement * n_rpcf_vs_csctf
Definition: L1TGMT.h:97
ib
Definition: cuy.py:661
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)