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