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