CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
L1TGMT Class Reference

#include <L1TGMT.h>

Inheritance diagram for L1TGMT:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 L1TGMT (const edm::ParameterSet &ps)
 
 ~L1TGMT () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 

Private Types

enum  ensubs {
  DTTF =0, RPCb, CSCTF, RPCf,
  GMT
}
 

Private Member Functions

void book_ (const edm::EventSetup &c)
 
double phiconv_ (float phi)
 

Private Attributes

MonitorElementbx_csc_rpc
 
MonitorElementbx_dt_csc
 
MonitorElementbx_dt_rpc
 
MonitorElementbx_number
 
int bxnum_old_
 
MonitorElementdbx_chip
 
MonitorElementdist_eta_csc_rpc
 
MonitorElementdist_eta_dt_csc
 
MonitorElementdist_eta_dt_rpc
 
MonitorElementdist_phi_csc_rpc
 
MonitorElementdist_phi_dt_csc
 
MonitorElementdist_phi_dt_rpc
 
MonitorElementeta_dtcsc_and_rpc
 
MonitorElementeta_dtcsc_only
 
MonitorElementeta_rpc_only
 
MonitorElementetaphi_dtcsc_and_rpc
 
MonitorElementetaphi_dtcsc_only
 
MonitorElementetaphi_rpc_only
 
const edm::EDGetTokenT< L1MuGMTReadoutCollectiongmtSource_
 
std::ofstream logFile_
 
MonitorElementn_csctf_vs_dttf
 
MonitorElementn_rpcb_vs_dttf
 
MonitorElementn_rpcf_vs_csctf
 
int obnum_old_
 
MonitorElementphi_dtcsc_and_rpc
 
MonitorElementphi_dtcsc_only
 
MonitorElementphi_rpc_only
 
MonitorElementregional_triggers
 
MonitorElementsubs_bits [5]
 
MonitorElementsubs_dbx [4]
 
MonitorElementsubs_eta [5]
 
MonitorElementsubs_etaphi [5]
 
MonitorElementsubs_etaqty [5]
 
MonitorElementsubs_nbx [5]
 
MonitorElementsubs_phi [5]
 
MonitorElementsubs_pt [5]
 
MonitorElementsubs_qty [5]
 
int trsrc_old_
 
const bool verbose_
 

Static Private Attributes

static const double piconv_ = 180. / acos(-1.)
 

Detailed Description

Definition at line 43 of file L1TGMT.h.

Member Enumeration Documentation

enum L1TGMT::ensubs
private
Enumerator
DTTF 
RPCb 
CSCTF 
RPCf 
GMT 

Definition at line 65 of file L1TGMT.h.

Constructor & Destructor Documentation

L1TGMT::L1TGMT ( const edm::ParameterSet ps)

Definition at line 23 of file L1TGMT.cc.

References gather_cfg::cout, and verbose_.

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 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const bool verbose_
Definition: L1TGMT.h:105
int obnum_old_
Definition: L1TGMT.h:110
int bxnum_old_
Definition: L1TGMT.h:109
int trsrc_old_
Definition: L1TGMT.h:111
const edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtSource_
Definition: L1TGMT.h:107
L1TGMT::~L1TGMT ( )
override

Definition at line 33 of file L1TGMT.cc.

34 {
35 }

Member Function Documentation

void L1TGMT::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 44 of file L1TGMT.cc.

References begin, bx_csc_rpc, bx_dt_csc, bx_dt_rpc, bx_number, bxnum_old_, gather_cfg::cout, CSCTF, dist_eta_csc_rpc, dist_eta_dt_csc, dist_eta_dt_rpc, dist_phi_csc_rpc, dist_phi_dt_csc, dist_phi_dt_rpc, DTTF, eta_dtcsc_and_rpc, eta_dtcsc_only, eta_rpc_only, etaphi_dtcsc_and_rpc, etaphi_dtcsc_only, etaphi_rpc_only, MonitorElement::Fill(), edm::Event::getByToken(), L1MuGMTReadoutCollection::getRecords(), GMT, gmtSource_, mps_fire::i, edm::HandleBase::isValid(), n_csctf_vs_dttf, n_rpcb_vs_dttf, n_rpcf_vs_csctf, obnum_old_, edm::EventBase::orbitNumber(), phi_dtcsc_and_rpc, phi_dtcsc_only, phi_rpc_only, phiconv_(), edm::Handle< T >::product(), regional_triggers, RPCb, RPCf, subs_bits, subs_dbx, subs_eta, subs_etaphi, subs_etaqty, subs_nbx, subs_phi, subs_pt, subs_qty, trsrc_old_, and verbose_.

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 }
MonitorElement * bx_number
Definition: L1TGMT.h:78
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * phi_rpc_only
Definition: L1TGMT.h:85
const bool verbose_
Definition: L1TGMT.h:105
MonitorElement * subs_eta[5]
Definition: L1TGMT.h:68
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
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
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
MonitorElement * bx_dt_csc
Definition: L1TGMT.h:97
int orbitNumber() const
Definition: EventBase.h:65
MonitorElement * subs_phi[5]
Definition: L1TGMT.h:69
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * dist_phi_dt_rpc
Definition: L1TGMT.h:89
MonitorElement * dist_phi_dt_csc
Definition: L1TGMT.h:91
T const * product() const
Definition: Handle.h:74
MonitorElement * phi_dtcsc_and_rpc
Definition: L1TGMT.h:83
MonitorElement * subs_pt[5]
Definition: L1TGMT.h:70
MonitorElement * subs_qty[5]
Definition: L1TGMT.h:71
#define begin
Definition: vmac.h:32
MonitorElement * bx_csc_rpc
Definition: L1TGMT.h:96
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
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
MonitorElement * subs_etaqty[5]
Definition: L1TGMT.h:73
MonitorElement * dist_eta_dt_csc
Definition: L1TGMT.h:94
MonitorElement * n_rpcf_vs_csctf
Definition: L1TGMT.h:100
void L1TGMT::book_ ( const edm::EventSetup c)
private
void L1TGMT::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &  c 
)
overrideprotected

Definition at line 239 of file L1TGMT.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), bx_csc_rpc, bx_dt_csc, bx_dt_rpc, bx_number, CSCTF, dbx_chip, dist_eta_csc_rpc, dist_eta_dt_csc, dist_eta_dt_rpc, dist_phi_csc_rpc, dist_phi_dt_csc, dist_phi_dt_rpc, DTTF, eta_dtcsc_and_rpc, eta_dtcsc_only, eta_rpc_only, etaphi_dtcsc_and_rpc, etaphi_dtcsc_only, etaphi_rpc_only, edm::EventSetup::get(), L1MuTriggerScales::getGMTEtaScale(), L1MuScale::getNBins(), L1MuTriggerScales::getPhiScale(), L1MuTriggerPtScale::getPtScale(), L1MuTriggerScales::getRegionalEtaScale(), L1MuScale::getValue(), GMT, mps_fire::i, cuy::ib, n_csctf_vs_dttf, n_rpcb_vs_dttf, n_rpcf_vs_csctf, pileupCalc::nbins, phi_dtcsc_and_rpc, phi_dtcsc_only, phi_rpc_only, piconv_, edm::ESHandle< T >::product(), emtf::ptscale, regional_triggers, RPCb, RPCf, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, subs_bits, subs_dbx, subs_eta, subs_etaphi, subs_etaqty, subs_nbx, subs_phi, subs_pt, and subs_qty.

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 }
MonitorElement * bx_number
Definition: L1TGMT.h:78
const L1MuScale * getPtScale() const
get the Pt scale
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
MonitorElement * phi_rpc_only
Definition: L1TGMT.h:85
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)
MonitorElement * subs_nbx[5]
Definition: L1TGMT.h:67
MonitorElement * dist_eta_dt_rpc
Definition: L1TGMT.h:92
MonitorElement * subs_bits[5]
Definition: L1TGMT.h:74
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
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
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:106
MonitorElement * bx_dt_csc
Definition: L1TGMT.h:97
MonitorElement * subs_phi[5]
Definition: L1TGMT.h:69
virtual unsigned getNBins() const =0
get number of bins
MonitorElement * dbx_chip
Definition: L1TGMT.h:79
MonitorElement * dist_phi_dt_rpc
Definition: L1TGMT.h:89
MonitorElement * dist_phi_dt_csc
Definition: L1TGMT.h:91
MonitorElement * phi_dtcsc_and_rpc
Definition: L1TGMT.h:83
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
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) ...
MonitorElement * bx_csc_rpc
Definition: L1TGMT.h:96
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
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:662
void L1TGMT::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

Definition at line 38 of file L1TGMT.cc.

39 {
40 }
double L1TGMT::phiconv_ ( float  phi)
private

Definition at line 232 of file L1TGMT.cc.

References piconv_.

Referenced by analyze().

232  {
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 }
static const double piconv_
Definition: L1TGMT.h:113

Member Data Documentation

MonitorElement* L1TGMT::bx_csc_rpc
private

Definition at line 96 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::bx_dt_csc
private

Definition at line 97 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::bx_dt_rpc
private

Definition at line 95 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::bx_number
private

Definition at line 78 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

int L1TGMT::bxnum_old_
private

Definition at line 109 of file L1TGMT.h.

Referenced by analyze().

MonitorElement* L1TGMT::dbx_chip
private

Definition at line 79 of file L1TGMT.h.

Referenced by bookHistograms().

MonitorElement* L1TGMT::dist_eta_csc_rpc
private

Definition at line 93 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::dist_eta_dt_csc
private

Definition at line 94 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::dist_eta_dt_rpc
private

Definition at line 92 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::dist_phi_csc_rpc
private

Definition at line 90 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::dist_phi_dt_csc
private

Definition at line 91 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::dist_phi_dt_rpc
private

Definition at line 89 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::eta_dtcsc_and_rpc
private

Definition at line 80 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::eta_dtcsc_only
private

Definition at line 81 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::eta_rpc_only
private

Definition at line 82 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::etaphi_dtcsc_and_rpc
private

Definition at line 86 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::etaphi_dtcsc_only
private

Definition at line 87 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::etaphi_rpc_only
private

Definition at line 88 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

const edm::EDGetTokenT<L1MuGMTReadoutCollection> L1TGMT::gmtSource_
private

Definition at line 107 of file L1TGMT.h.

Referenced by analyze().

std::ofstream L1TGMT::logFile_
private

Definition at line 106 of file L1TGMT.h.

MonitorElement* L1TGMT::n_csctf_vs_dttf
private

Definition at line 101 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::n_rpcb_vs_dttf
private

Definition at line 99 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::n_rpcf_vs_csctf
private

Definition at line 100 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

int L1TGMT::obnum_old_
private

Definition at line 110 of file L1TGMT.h.

Referenced by analyze().

MonitorElement* L1TGMT::phi_dtcsc_and_rpc
private

Definition at line 83 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::phi_dtcsc_only
private

Definition at line 84 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::phi_rpc_only
private

Definition at line 85 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

const double L1TGMT::piconv_ = 180. / acos(-1.)
staticprivate

Definition at line 113 of file L1TGMT.h.

Referenced by bookHistograms(), and phiconv_().

MonitorElement* L1TGMT::regional_triggers
private

Definition at line 76 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_bits[5]
private

Definition at line 74 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_dbx[4]
private

Definition at line 103 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_eta[5]
private

Definition at line 68 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_etaphi[5]
private

Definition at line 72 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_etaqty[5]
private

Definition at line 73 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_nbx[5]
private

Definition at line 67 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_phi[5]
private

Definition at line 69 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_pt[5]
private

Definition at line 70 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TGMT::subs_qty[5]
private

Definition at line 71 of file L1TGMT.h.

Referenced by analyze(), and bookHistograms().

int L1TGMT::trsrc_old_
private

Definition at line 111 of file L1TGMT.h.

Referenced by analyze().

const bool L1TGMT::verbose_
private

Definition at line 105 of file L1TGMT.h.

Referenced by analyze(), and L1TGMT().