CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalTimingMonitorModule Class Reference

#include <DQM/HcalMonitorModule/src/HcalTimingMonitorModule.cc>

Inheritance diagram for HcalTimingMonitorModule:
edm::EDAnalyzer

Public Member Functions

 HcalTimingMonitorModule (const edm::ParameterSet &)
 
void initialize ()
 
 ~HcalTimingMonitorModule ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 
double get_ped_hbhe (int eta, int phi, int depth, int cup)
 
double get_ped_hf (int eta, int phi, int depth, int cup)
 
double get_ped_ho (int eta, int phi, int depth, int cup)
 
double GetTime (double *data, int n)
 
bool isSignal (double *data, int n)
 
void set_hbhe (int eta, int phi, int depth, int cap, float val)
 
void set_hf (int eta, int phi, int depth, int cap, float val)
 
void set_ho (int eta, int phi, int depth, int cap, float val)
 

Private Attributes

bool CosmicsCorr_
 
int counterEvt_
 
MonitorElementCSCcand
 
DQMStoredbe_
 
bool Debug_
 
MonitorElementDTcand
 
int GCTTriggerBit1_
 
int GCTTriggerBit2_
 
int GCTTriggerBit3_
 
int GCTTriggerBit4_
 
int GCTTriggerBit5_
 
MonitorElementHBEnergy
 
double HBHE [100][73][5][4]
 
MonitorElementHBShapeDT
 
MonitorElementHBShapeGCT
 
MonitorElementHBShapeRPC
 
MonitorElementHBTimeDT
 
MonitorElementHBTimeGCT
 
MonitorElementHBTimeRPC
 
MonitorElementHEEnergy
 
MonitorElementHEShapeCSCm
 
MonitorElementHEShapeCSCp
 
MonitorElementHETimeCSCm
 
MonitorElementHETimeCSCp
 
double HF [100][73][5][4]
 
MonitorElementHFEnergy
 
MonitorElementHFShapeCSCm
 
MonitorElementHFShapeCSCp
 
MonitorElementHFTimeCSCm
 
MonitorElementHFTimeCSCp
 
double HO [100][73][5][4]
 
MonitorElementHOEnergy
 
MonitorElementHOShapeDT
 
MonitorElementHOShapeGCT
 
MonitorElementHOShapeRPC
 
MonitorElementHOTimeDT
 
MonitorElementHOTimeGCT
 
MonitorElementHOTimeRPC
 
std::string L1ADataLabel
 
std::string monitorName_
 
double nHBHE [100][73][5][4]
 
double nHF [100][73][5][4]
 
double nHO [100][73][5][4]
 
MonitorElementOR
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 
int prescaleLS_
 
MonitorElementRPCbcand
 
MonitorElementRPCfcand
 
int run_number
 
int TrigCSC
 
int TrigDT
 
int TrigGCT
 
int TrigRPC
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 77 of file HcalTimingMonitorModule.cc.

Constructor & Destructor Documentation

HcalTimingMonitorModule::HcalTimingMonitorModule ( const edm::ParameterSet iConfig)
explicit

Definition at line 201 of file HcalTimingMonitorModule.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), CosmicsCorr_, counterEvt_, dbe_, Debug_, MonitorElement::Fill(), GCTTriggerBit1_, GCTTriggerBit2_, GCTTriggerBit3_, GCTTriggerBit4_, GCTTriggerBit5_, MonitorElement::getTH2F(), edm::ParameterSet::getUntrackedParameter(), initialize(), L1ADataLabel, monitorName_, cppFunctionSkipper::operator, parameters_, prescaleEvt_, prescaleLS_, run_number, DQMStore::setCurrentFolder(), TrigCSC, TrigDT, TrigGCT, and TrigRPC.

201  {
202  std::string str;
203  parameters_ = iConfig;
205  // Base folder for the contents of this job
206  std::string subsystemname = parameters_.getUntrackedParameter<std::string>("subSystemFolder", "HcalTiming") ;
207 
208  monitorName_ = parameters_.getUntrackedParameter<std::string>("monitorName","HcalTiming");
209  if (monitorName_ != "" ) monitorName_ =subsystemname+"/"+monitorName_+"/" ;
210  counterEvt_=0;
211 
212  // some currently dummy things for compartability with GUI
213  dbe_->setCurrentFolder(subsystemname+"/EventInfo/");
214  str="reportSummary";
215  dbe_->bookFloat(str)->Fill(1); // Unknown status by default
216  str="reportSummaryMap";
217  MonitorElement* me=dbe_->book2D(str,str,5,0,5,1,0,1); // Unknown status by default
218  TH2F* myhist=me->getTH2F();
219  myhist->GetXaxis()->SetBinLabel(1,"HB");
220  myhist->GetXaxis()->SetBinLabel(2,"HE");
221  myhist->GetXaxis()->SetBinLabel(3,"HO");
222  myhist->GetXaxis()->SetBinLabel(4,"HF");
223  myhist->GetYaxis()->SetBinLabel(1,"Status");
224  // Unknown status by default
225  myhist->SetBinContent(1,1,-1);
226  myhist->SetBinContent(2,1,-1);
227  myhist->SetBinContent(3,1,-1);
228  myhist->SetBinContent(4,1,-1);
229  // Add ZDC at some point
230  myhist->GetXaxis()->SetBinLabel(5,"ZDC");
231  myhist->SetBinContent(5,1,-1); // no ZDC info known
232  myhist->SetOption("textcolz");
233 
234  run_number=0;
236  L1ADataLabel = iConfig.getUntrackedParameter<std::string>("L1ADataLabel" , "l1GtUnpack");
237  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", 1);
238  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", 1);
239  GCTTriggerBit1_= parameters_.getUntrackedParameter<int>("GCTTriggerBit1", -1);
240  GCTTriggerBit2_= parameters_.getUntrackedParameter<int>("GCTTriggerBit2", -1);
241  GCTTriggerBit3_= parameters_.getUntrackedParameter<int>("GCTTriggerBit3", -1);
242  GCTTriggerBit4_= parameters_.getUntrackedParameter<int>("GCTTriggerBit4", -1);
243  GCTTriggerBit5_= parameters_.getUntrackedParameter<int>("GCTTriggerBit5", -1);
244  CosmicsCorr_ = parameters_.getUntrackedParameter<bool>("CosmicsCorr", true);
245  Debug_ = parameters_.getUntrackedParameter<bool>("Debug", true);
246  initialize();
247 }
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:654
void Fill(long long x)
TH2F * getTH2F(void) const
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:845
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
HcalTimingMonitorModule::~HcalTimingMonitorModule ( )

Definition at line 249 of file HcalTimingMonitorModule.cc.

249 {}

Member Function Documentation

void HcalTimingMonitorModule::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 295 of file HcalTimingMonitorModule.cc.

References adc2fC, CosmicsCorr_, counterEvt_, CSCcand, data, Debug_, DTcand, relval_parameters_module::energy, eta(), MonitorElement::Fill(), HcalObjRepresent::Fill(), GCTTriggerBit1_, GCTTriggerBit2_, GCTTriggerBit3_, GCTTriggerBit4_, GCTTriggerBit5_, get_ped_hbhe(), get_ped_hf(), get_ped_ho(), edm::Event::getByLabel(), edm::Event::getByType(), L1MuGMTReadoutCollection::getRecords(), GetTime(), HBEnergy, HBShapeDT, HBShapeGCT, HBShapeRPC, HBTimeDT, HBTimeGCT, HBTimeRPC, HcalBarrel, HcalEndcap, HEEnergy, HEShapeCSCm, HEShapeCSCp, HETimeCSCm, HETimeCSCp, HFEnergy, HFShapeCSCm, HFShapeCSCp, HFTimeCSCm, HFTimeCSCp, HOEnergy, HOShapeDT, HOShapeGCT, HOShapeRPC, HOTimeDT, HOTimeGCT, HOTimeRPC, i, edm::EventBase::id(), isSignal(), edm::HandleBase::isValid(), L1ADataLabel, MAXCSC, MAXDTBX, MAXRPC, N, OR, phi, prescaleEvt_, edm::Handle< T >::product(), RPCbcand, RPCfcand, edm::EventID::run(), run_number, set_hbhe(), set_hf(), set_ho(), funct::sin(), TRIG_CSC, TRIG_DT, TRIG_GCT, TRIG_RPC, TrigCSC, TrigDT, TrigGCT, and TrigRPC.

295  {
296 int HBcnt=0,HEcnt=0,HOcnt=0,HFcnt=0,eta,phi,depth,nTS;
297 int TRIGGER=0;
298  counterEvt_++;
299  if (prescaleEvt_<1) return;
300  if (counterEvt_%prescaleEvt_!=0) return;
301 
302  run_number=iEvent.id().run();
303  // Check GCT trigger bits
305 
306  if (!iEvent.getByLabel( L1ADataLabel, gtRecord))
307  return;
308  const TechnicalTriggerWord tWord = gtRecord->technicalTriggerWord();
309  const DecisionWord dWord = gtRecord->decisionWord();
310  //bool HFselfTrigger = tWord.at(9);
311  //bool HOselfTrigger = tWord.at(11);
312  bool GCTTrigger1 = dWord.at(GCTTriggerBit1_);
313  bool GCTTrigger2 = dWord.at(GCTTriggerBit2_);
314  bool GCTTrigger3 = dWord.at(GCTTriggerBit3_);
315  bool GCTTrigger4 = dWord.at(GCTTriggerBit4_);
316  bool GCTTrigger5 = dWord.at(GCTTriggerBit5_);
317  if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5){ TrigGCT++; TRIGGER=+TRIG_GCT; }
318 
321  // define trigger trigger source (example from GMT group)
323  if (!iEvent.getByLabel(L1ADataLabel,gmtrc_handle)) return;
324  L1MuGMTReadoutCollection const* gmtrc = gmtrc_handle.product();
325 
326  int idt =0;
327  int icsc =0;
328  int irpcb =0;
329  int irpcf =0;
330  int ndt[5] = {0,0,0,0,0};
331  int ncsc[5] = {0,0,0,0,0};
332  int nrpcb[5] = {0,0,0,0,0};
333  int nrpcf[5] = {0,0,0,0,0};
334  int N;
335 
336  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
337  std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
338  N=0;
339  for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
340  std::vector<L1MuRegionalCand>::const_iterator iter1;
341  std::vector<L1MuRegionalCand> rmc;
342  // DTBX Trigger
343  rmc = igmtrr->getDTBXCands();
344  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
345  if ( idt < MAXDTBX && !(*iter1).empty() ) {
346  idt++;
347  if(N<5) ndt[N]++;
348 
349  }
350  }
351  // CSC Trigger
352  rmc = igmtrr->getCSCCands();
353  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
354  if ( icsc < MAXCSC && !(*iter1).empty() ) {
355  icsc++;
356  if(N<5) ncsc[N]++;
357  }
358  }
359  // RPCb Trigger
360  rmc = igmtrr->getBrlRPCCands();
361  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
362  if ( irpcb < MAXRPC && !(*iter1).empty() ) {
363  irpcb++;
364  if(N<5) nrpcb[N]++;
365 
366  }
367  }
368  // RPCfwd Trigger
369  rmc = igmtrr->getFwdRPCCands();
370  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
371  if ( irpcf < MAXRPC && !(*iter1).empty() ) {
372  irpcf++;
373  if(N<5) nrpcf[N]++;
374 
375  }
376  }
377 
378  N++;
379  }
380  if(ndt[0]) DTcand->Fill(0);
381  if(ndt[1]) DTcand->Fill(1);
382  if(ndt[2]) DTcand->Fill(2);
383  if(ndt[3]) DTcand->Fill(3);
384  if(ndt[4]) DTcand->Fill(4);
385  if(ncsc[0]) CSCcand->Fill(0);
386  if(ncsc[1]) CSCcand->Fill(1);
387  if(ncsc[2]) CSCcand->Fill(2);
388  if(ncsc[3]) CSCcand->Fill(3);
389  if(ncsc[4]) CSCcand->Fill(4);
390  if(nrpcb[0]) RPCbcand->Fill(0);
391  if(nrpcb[1]) RPCbcand->Fill(1);
392  if(nrpcb[2]) RPCbcand->Fill(2);
393  if(nrpcb[3]) RPCbcand->Fill(3);
394  if(nrpcb[4]) RPCbcand->Fill(4);
395  if(nrpcf[0]) RPCfcand->Fill(0);
396  if(nrpcf[1]) RPCfcand->Fill(1);
397  if(nrpcf[2]) RPCfcand->Fill(2);
398  if(nrpcf[3]) RPCfcand->Fill(3);
399  if(nrpcf[4]) RPCfcand->Fill(4);
400  if(ndt[0]||nrpcb[0]||nrpcf[0]||ncsc[0]) OR->Fill(0);
401  if(ndt[1]||nrpcb[1]||nrpcf[1]||ncsc[1]) OR->Fill(1);
402  if(ndt[2]||nrpcb[2]||nrpcf[2]||ncsc[2]) OR->Fill(2);
403  if(ndt[3]||nrpcb[3]||nrpcf[3]||ncsc[3]) OR->Fill(3);
404  if(ndt[4]||nrpcb[4]||nrpcf[4]||ncsc[4]) OR->Fill(4);
405 
406  if(ncsc[1]>0 ) { TrigCSC++; TRIGGER=+TRIG_CSC; }
407  if(ndt[1]>0 ) { TrigDT++; TRIGGER=+TRIG_DT; }
408  if(nrpcb[1]>0) { TrigRPC++; TRIGGER=+TRIG_RPC; }
409 
412  if(counterEvt_<100){
414  iEvent.getByType(hbhe);
415  if (hbhe.isValid())
416  {
417  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
418  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
419  if(digi->id().subdet()==HcalBarrel) HBcnt++;
420  if(digi->id().subdet()==HcalEndcap) HEcnt++;
421  for(int i=0;i<nTS;i++)
422  if(digi->sample(i).adc()<20) set_hbhe(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
423  }
424  }
426  iEvent.getByType(ho);
427  if (ho.isValid())
428  {
429  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
430  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
431  HOcnt++;
432  for(int i=0;i<nTS;i++)
433  if(digi->sample(i).adc()<20) set_ho(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
434  }
435  } // if
436 
438  iEvent.getByType(hf);
439  if (hf.isValid())
440  {
441  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
442  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
443  HFcnt++;
444  for(int i=0;i<nTS;i++)
445  if(digi->sample(i).adc()<20) set_hf(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
446  }
447  }
448  } // if (counterEvt<100)
449  else{
451  double data[10];
452 
454  iEvent.getByType(hbhe);
455  if (hbhe.isValid())
456  {
457  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
458  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
459  if(nTS>10) nTS=10;
460  if(digi->id().subdet()==HcalBarrel) HBcnt++;
461  if(digi->id().subdet()==HcalEndcap) HEcnt++;
462  double energy=0;
463  for(int i=0;i<nTS;i++){
464  data[i]=adc2fC[digi->sample(i).adc()]-get_ped_hbhe(eta,phi,depth,digi->sample(i).capid());
465  energy+=data[i];
466  }
467  if(digi->id().subdet()==HcalBarrel) HBEnergy->Fill(energy);
468  if(digi->id().subdet()==HcalEndcap) HEEnergy->Fill(energy);
469  if(!isSignal(data,nTS)) continue;
470  for(int i=0;i<nTS;i++){
471  if(data[i]>-1.0){
472  if(digi->id().subdet()==HcalBarrel && (TRIGGER|TRIG_DT)==TRIG_DT) HBShapeDT->Fill(i,data[i]);
473  if(digi->id().subdet()==HcalBarrel && (TRIGGER|TRIG_RPC)==TRIG_RPC) HBShapeRPC->Fill(i,data[i]);
474  if(digi->id().subdet()==HcalBarrel && (TRIGGER|TRIG_GCT)==TRIG_GCT) HBShapeGCT->Fill(i,data[i]);
475  if(digi->id().subdet()==HcalEndcap && (TRIGGER|TRIG_CSC)==TRIG_CSC && eta>0) HEShapeCSCp->Fill(i,data[i]);
476  if(digi->id().subdet()==HcalEndcap && (TRIGGER|TRIG_CSC)==TRIG_CSC && eta<0) HEShapeCSCm->Fill(i,data[i]);
477  }
478  }
479  double Time=GetTime(data,nTS);
480  if(digi->id().subdet()==HcalBarrel){
481  if(CosmicsCorr_) Time+=(7.5*sin((phi*5.0)/180.0*3.14159))/25.0;
482  if((TRIGGER&TRIG_DT)==TRIG_DT) HBTimeDT ->Fill(GetTime(data,nTS));
483  if((TRIGGER&TRIG_RPC)==TRIG_RPC) HBTimeRPC->Fill(GetTime(data,nTS));
484  if((TRIGGER&TRIG_GCT)==TRIG_GCT) HBTimeGCT->Fill(GetTime(data,nTS));
485  }else{
486  if(CosmicsCorr_) Time+=(3.5*sin((phi*5.0)/180.0*3.14159))/25.0;
487  if(digi->id().subdet()==HcalEndcap && (TRIGGER&TRIG_CSC)==TRIG_CSC && eta>0) HETimeCSCp->Fill(Time);
488  if(digi->id().subdet()==HcalEndcap && (TRIGGER&TRIG_CSC)==TRIG_CSC && eta<0) HETimeCSCm->Fill(Time);
489  }
490  }
491  } // if (...)
492 
494  iEvent.getByType(ho);
495  if (ho.isValid())
496  {
497  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
498  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
499  if(nTS>10) nTS=10;
500  HOcnt++;
501  double energy=0;
502  for(int i=0;i<nTS;i++){
503  data[i]=adc2fC[digi->sample(i).adc()]-get_ped_ho(eta,phi,depth,digi->sample(i).capid());
504  energy+=data[i];
505  }
506  HOEnergy->Fill(energy);
507  if(!isSignal(data,nTS)) continue;
508  for(int i=0;i<nTS;i++){
509  if(data[i]>-1.0){
510  if((TRIGGER&TRIG_DT)==TRIG_DT) HOShapeDT->Fill(i,data[i]);
511  if((TRIGGER&TRIG_RPC)==TRIG_RPC) HOShapeRPC->Fill(i,data[i]);
512  if((TRIGGER&TRIG_GCT)==TRIG_GCT) HOShapeGCT->Fill(i,data[i]);
513  }
514  }
515  double Time=GetTime(data,nTS);
516  if(CosmicsCorr_) Time+=(12.0*sin((phi*5.0)/180.0*3.14159))/25.0;
517  if((TRIGGER&TRIG_DT)==TRIG_DT) HOTimeDT->Fill(Time);
518  if((TRIGGER&TRIG_RPC)==TRIG_RPC) HOTimeRPC->Fill(Time);
519  if((TRIGGER&TRIG_GCT)==TRIG_GCT) HOTimeGCT->Fill(Time);
520  }
521  }// if (ho)
522 
524  iEvent.getByType(hf);
525  if (hf.isValid())
526  {
527  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
528  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
529  if(nTS>10) nTS=10;
530  HFcnt++;
531  double energy=0;
532  for(int i=0;i<nTS;i++){
533  data[i]=adc2fC[digi->sample(i).adc()]-get_ped_hf(eta,phi,depth,digi->sample(i).capid());
534  energy+=data[i];
535  }
536  HFEnergy->Fill(energy);
537  if(energy<15.0) continue;
538  for(int i=0;i<nTS;i++){
539  if(data[i]>-1.0){
540  if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta>0) HFShapeCSCp->Fill(i,data[i]);
541  if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta<0) HFShapeCSCm->Fill(i,data[i]);
542  }
543  }
544  if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta>0) HFTimeCSCp->Fill(GetTime(data,nTS));
545  if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta<0) HFTimeCSCm->Fill(GetTime(data,nTS));
546  }
547  } // if (hf)
550  }
551  if(Debug_) if((counterEvt_%100)==0) printf("Run: %i,Events processed: %i (HB: %i towers,HE: %i towers,HO: %i towers,HF: %i towers)"
552  " CSC: %i DT: %i RPC: %i GCT: %i\n",
553  run_number,counterEvt_,HBcnt,HEcnt,HOcnt,HFcnt,TrigCSC,TrigDT,TrigRPC,TrigGCT);
556 }
RunNumber_t run() const
Definition: EventID.h:42
int i
Definition: DBlmapReader.cc:9
static const int MAXCSC
static const int TRIG_RPC
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double GetTime(double *data, int n)
double get_ped_ho(int eta, int phi, int depth, int cup)
std::vector< T >::const_iterator const_iterator
static const int TRIG_GCT
static const int MAXRPC
bool getByType(Handle< PROD > &result) const
Definition: Event.h:398
void set_hf(int eta, int phi, int depth, int cap, float val)
T eta() const
static const float adc2fC[128]
bool isSignal(double *data, int n)
void Fill(long long x)
static const int TRIG_CSC
static const int MAXDTBX
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< bool > DecisionWord
typedefs
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
double get_ped_hbhe(int eta, int phi, int depth, int cup)
void set_hbhe(int eta, int phi, int depth, int cap, float val)
#define N
Definition: blowfish.cc:9
void set_ho(int eta, int phi, int depth, int cap, float val)
T const * product() const
Definition: Handle.h:74
edm::EventID id() const
Definition: EventBase.h:56
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
static const int TRIG_DT
double get_ped_hf(int eta, int phi, int depth, int cup)
Definition: DDAxes.h:10
void HcalTimingMonitorModule::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 252 of file HcalTimingMonitorModule.cc.

252 {}
void HcalTimingMonitorModule::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 254 of file HcalTimingMonitorModule.cc.

254 {}
double HcalTimingMonitorModule::get_ped_hbhe ( int  eta,
int  phi,
int  depth,
int  cup 
)
inlineprivate

Definition at line 124 of file HcalTimingMonitorModule.cc.

References HBHE, nHBHE, and phi.

Referenced by analyze().

124  {
125  if(nHBHE[eta+50][phi][depth][cup]<10) return 2.5;
126  if(nHBHE[eta+50][phi][depth][cup]!=0){
127  double ped=HBHE[eta+50][phi][depth][cup]/nHBHE[eta+50][phi][depth][cup];
128  if(ped>1.5 && ped<4.5) return ped;
129  }
130  return 99999;
131  }
T eta() const
Definition: DDAxes.h:10
double HcalTimingMonitorModule::get_ped_hf ( int  eta,
int  phi,
int  depth,
int  cup 
)
inlineprivate

Definition at line 140 of file HcalTimingMonitorModule.cc.

References HF, nHF, and phi.

Referenced by analyze().

140  {
141  if(nHF[eta+50][phi][depth][cup]<10) return 2.5;
142  if(nHF[eta+50][phi][depth][cup]!=0){
143  double ped=HF[eta+50][phi][depth][cup]/nHF[eta+50][phi][depth][cup];
144  if(ped>1.5 && ped<4.5) return ped;
145  }
146  return 99999;
147  }
T eta() const
Definition: DDAxes.h:10
double HcalTimingMonitorModule::get_ped_ho ( int  eta,
int  phi,
int  depth,
int  cup 
)
inlineprivate

Definition at line 132 of file HcalTimingMonitorModule.cc.

References HO, nHO, and phi.

Referenced by analyze().

132  {
133  if(nHO[eta+50][phi][depth][cup]<10) return 2.5;
134  if(nHO[eta+50][phi][depth][cup]!=0){
135  double ped=HO[eta+50][phi][depth][cup]/nHO[eta+50][phi][depth][cup];
136  if(ped>1.5 && ped<4.5) return ped;
137  }
138  return 99999;
139  }
T eta() const
Definition: DDAxes.h:10
double HcalTimingMonitorModule::GetTime ( double *  data,
int  n 
)
inlineprivate

Definition at line 88 of file HcalTimingMonitorModule.cc.

References j, and n.

Referenced by analyze().

88  {
89  int MaxI=-100; double Time=0,SumT=0,MaxT=-10;
90  for(int j=0;j<n;++j) if(MaxT<data[j]){ MaxT=data[j]; MaxI=j; }
91  if (MaxI>=0)
92  {
93  Time=MaxI*data[MaxI];
94  SumT=data[MaxI];
95  if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
96  if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
97  Time=Time/SumT;
98  }
99  return Time;
100  }
int j
Definition: DBlmapReader.cc:9
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void HcalTimingMonitorModule::initialize ( )

Definition at line 256 of file HcalTimingMonitorModule.cc.

References DQMStore::book1D(), CSCcand, dbe_, DTcand, HBEnergy, HBShapeDT, HBShapeGCT, HBShapeRPC, HBTimeDT, HBTimeGCT, HBTimeRPC, HEEnergy, HEShapeCSCm, HEShapeCSCp, HETimeCSCm, HETimeCSCp, HFEnergy, HFShapeCSCm, HFShapeCSCp, HFTimeCSCm, HFTimeCSCp, HOEnergy, HOShapeDT, HOShapeGCT, HOShapeRPC, HOTimeDT, HOTimeGCT, HOTimeRPC, monitorName_, OR, RPCbcand, RPCfcand, and DQMStore::setCurrentFolder().

Referenced by HcalTimingMonitorModule().

256  {
257  std::string str;
258  dbe_->setCurrentFolder(monitorName_+"DebugPlots");
259  str="L1MuGMTReadoutRecord_getDTBXCands"; DTcand =dbe_->book1D(str,str,5,-0.5,4.5);
260  str="L1MuGMTReadoutRecord_getBrlRPCCands"; RPCbcand=dbe_->book1D(str,str,5,-0.5,4.5);
261  str="L1MuGMTReadoutRecord_getFwdRPCCands"; RPCfcand=dbe_->book1D(str,str,5,-0.5,4.5);
262  str="L1MuGMTReadoutRecord_getCSCCands"; CSCcand =dbe_->book1D(str,str,5,-0.5,4.5);
263  str="DT_OR_RPCb_OR_RPCf_OR_CSC"; OR =dbe_->book1D(str,str,5,-0.5,4.5);
264 
265  str="HB Tower Energy (LinADC-PED)"; HBEnergy=dbe_->book1D(str,str,1000,-10,90);
266  str="HE Tower Energy (LinADC-PED)"; HEEnergy=dbe_->book1D(str,str,1000,-10,90);
267  str="HO Tower Energy (LinADC-PED)"; HOEnergy=dbe_->book1D(str,str,1000,-10,90);
268  str="HF Tower Energy (LinADC-PED)"; HFEnergy=dbe_->book1D(str,str,1000,-10,90);
269 
270  dbe_->setCurrentFolder(monitorName_+"ShapePlots");
271  str="HB Shape (DT Trigger)"; HBShapeDT =dbe_->book1D(str,str,10,-0.5,9.5);
272  str="HB Shape (RPC Trigger)"; HBShapeRPC =dbe_->book1D(str,str,10,-0.5,9.5);
273  str="HB Shape (GCT Trigger)"; HBShapeGCT =dbe_->book1D(str,str,10,-0.5,9.5);
274  str="HO Shape (DT Trigger)"; HOShapeDT =dbe_->book1D(str,str,10,-0.5,9.5);
275  str="HO Shape (RPC Trigger)"; HOShapeRPC =dbe_->book1D(str,str,10,-0.5,9.5);
276  str="HO Shape (GCT Trigger)"; HOShapeGCT =dbe_->book1D(str,str,10,-0.5,9.5);
277  str="HE+ Shape (CSC Trigger)"; HEShapeCSCp=dbe_->book1D(str,str,10,-0.5,9.5);
278  str="HE- Shape (CSC Trigger)"; HEShapeCSCm=dbe_->book1D(str,str,10,-0.5,9.5);
279  str="HF+ Shape (CSC Trigger)"; HFShapeCSCp=dbe_->book1D(str,str,10,-0.5,9.5);
280  str="HF- Shape (CSC Trigger)"; HFShapeCSCm=dbe_->book1D(str,str,10,-0.5,9.5);
281 
282  dbe_->setCurrentFolder(monitorName_+"TimingPlots");
283  str="HB Timing (DT Trigger)"; HBTimeDT =dbe_->book1D(str,str,100,0,10);
284  str="HB Timing (RPC Trigger)"; HBTimeRPC =dbe_->book1D(str,str,100,0,10);
285  str="HB Timing (GCT Trigger)"; HBTimeGCT =dbe_->book1D(str,str,100,0,10);
286  str="HO Timing (DT Trigger)"; HOTimeDT =dbe_->book1D(str,str,100,0,10);
287  str="HO Timing (RPC Trigger)"; HOTimeRPC =dbe_->book1D(str,str,100,0,10);
288  str="HO Timing (GCT Trigger)"; HOTimeGCT =dbe_->book1D(str,str,100,0,10);
289  str="HE+ Timing (CSC Trigger)"; HETimeCSCp =dbe_->book1D(str,str,100,0,10);
290  str="HE- Timing (CSC Trigger)"; HETimeCSCm =dbe_->book1D(str,str,100,0,10);
291  str="HF+ Timing (CSC Trigger)"; HFTimeCSCp =dbe_->book1D(str,str,100,0,10);
292  str="HF- Timing (CSC Trigger)"; HFTimeCSCm =dbe_->book1D(str,str,100,0,10);
293 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
bool HcalTimingMonitorModule::isSignal ( double *  data,
int  n 
)
inlineprivate

Definition at line 101 of file HcalTimingMonitorModule.cc.

References i, and max().

Referenced by analyze().

101  {
102  int Imax=-1; double max=-100;
103  for(int i=0;i<n;i++) if(data[i]>max){max=data[i]; Imax=i;}
104  if(Imax==0 && Imax==(n-1)) return false;
105  float sum=data[Imax-1]+data[Imax+1];
106  if(data[Imax]>5.5 && sum>(data[Imax]*0.20)) return true;
107  return false;
108  }
int i
Definition: DBlmapReader.cc:9
const T & max(const T &a, const T &b)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void HcalTimingMonitorModule::set_hbhe ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
)
inlineprivate

Definition at line 112 of file HcalTimingMonitorModule.cc.

References HBHE, nHBHE, and phi.

Referenced by analyze().

112  {
113  HBHE[eta+50][phi][depth][cap]+=val;
114  nHBHE[eta+50][phi][depth][cap]+=1.0;
115  }
T eta() const
Definition: DDAxes.h:10
void HcalTimingMonitorModule::set_hf ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
)
inlineprivate

Definition at line 120 of file HcalTimingMonitorModule.cc.

References HF, nHF, and phi.

Referenced by analyze().

120  {
121  HF[eta+50][phi][depth][cap]+=val;
122  nHF[eta+50][phi][depth][cap]+=1.0;
123  }
T eta() const
Definition: DDAxes.h:10
void HcalTimingMonitorModule::set_ho ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
)
inlineprivate

Definition at line 116 of file HcalTimingMonitorModule.cc.

References HO, nHO, and phi.

Referenced by analyze().

116  {
117  HO[eta+50][phi][depth][cap]+=val;
118  nHO[eta+50][phi][depth][cap]+=1.0;
119  }
T eta() const
Definition: DDAxes.h:10

Member Data Documentation

bool HcalTimingMonitorModule::CosmicsCorr_
private

Definition at line 170 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::counterEvt_
private

Definition at line 156 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

MonitorElement * HcalTimingMonitorModule::CSCcand
private

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

DQMStore* HcalTimingMonitorModule::dbe_
private

Definition at line 162 of file HcalTimingMonitorModule.cc.

Referenced by HcalTimingMonitorModule(), and initialize().

bool HcalTimingMonitorModule::Debug_
private

Definition at line 171 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

MonitorElement* HcalTimingMonitorModule::DTcand
private

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

int HcalTimingMonitorModule::GCTTriggerBit1_
private

Definition at line 165 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::GCTTriggerBit2_
private

Definition at line 166 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::GCTTriggerBit3_
private

Definition at line 167 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::GCTTriggerBit4_
private

Definition at line 168 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::GCTTriggerBit5_
private

Definition at line 169 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

MonitorElement* HcalTimingMonitorModule::HBEnergy
private

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

double HcalTimingMonitorModule::HBHE[100][73][5][4]
private

Definition at line 148 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hbhe(), and set_hbhe().

MonitorElement* HcalTimingMonitorModule::HBShapeDT
private

Definition at line 176 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HBShapeGCT
private

Definition at line 178 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HBShapeRPC
private

Definition at line 177 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HBTimeDT
private

Definition at line 187 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HBTimeGCT
private

Definition at line 189 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HBTimeRPC
private

Definition at line 188 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement * HcalTimingMonitorModule::HEEnergy
private

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HEShapeCSCm
private

Definition at line 183 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HEShapeCSCp
private

Definition at line 182 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HETimeCSCm
private

Definition at line 194 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HETimeCSCp
private

Definition at line 193 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

double HcalTimingMonitorModule::HF[100][73][5][4]
private

Definition at line 152 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hf(), and set_hf().

MonitorElement * HcalTimingMonitorModule::HFEnergy
private

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HFShapeCSCm
private

Definition at line 185 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HFShapeCSCp
private

Definition at line 184 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HFTimeCSCm
private

Definition at line 196 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HFTimeCSCp
private

Definition at line 195 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

double HcalTimingMonitorModule::HO[100][73][5][4]
private

Definition at line 150 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_ho(), and set_ho().

MonitorElement * HcalTimingMonitorModule::HOEnergy
private

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HOShapeDT
private

Definition at line 179 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HOShapeGCT
private

Definition at line 181 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HOShapeRPC
private

Definition at line 180 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HOTimeDT
private

Definition at line 190 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HOTimeGCT
private

Definition at line 192 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement* HcalTimingMonitorModule::HOTimeRPC
private

Definition at line 191 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

std::string HcalTimingMonitorModule::L1ADataLabel
private

Definition at line 198 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

std::string HcalTimingMonitorModule::monitorName_
private

Definition at line 163 of file HcalTimingMonitorModule.cc.

Referenced by HcalTimingMonitorModule(), and initialize().

double HcalTimingMonitorModule::nHBHE[100][73][5][4]
private

Definition at line 149 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hbhe(), and set_hbhe().

double HcalTimingMonitorModule::nHF[100][73][5][4]
private

Definition at line 153 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hf(), and set_hf().

double HcalTimingMonitorModule::nHO[100][73][5][4]
private

Definition at line 151 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_ho(), and set_ho().

MonitorElement * HcalTimingMonitorModule::OR
private

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

edm::ParameterSet HcalTimingMonitorModule::parameters_
private
int HcalTimingMonitorModule::prescaleEvt_
private

Definition at line 164 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::prescaleLS_
private

Definition at line 164 of file HcalTimingMonitorModule.cc.

Referenced by HcalTimingMonitorModule().

MonitorElement * HcalTimingMonitorModule::RPCbcand
private

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

MonitorElement * HcalTimingMonitorModule::RPCfcand
private

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

int HcalTimingMonitorModule::run_number
private

Definition at line 157 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::TrigCSC
private

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::TrigDT
private

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::TrigGCT
private

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

int HcalTimingMonitorModule::TrigRPC
private

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().