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