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