CMS 3D CMS Logo

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