CMS 3D CMS Logo

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

#include <HcalDetDiagTimingMonitor.h>

Inheritance diagram for HcalDetDiagTimingMonitor:
HcalBaseDQMonitor edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void cleanup ()
 
void done ()
 
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)
 
 HcalDetDiagTimingMonitor (const edm::ParameterSet &ps)
 
bool isSignal (double *data, int n)
 
void reset ()
 
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)
 
void setup ()
 
 ~HcalDetDiagTimingMonitor ()
 
- Public Member Functions inherited from HcalBaseDQMonitor
 HcalBaseDQMonitor (const edm::ParameterSet &ps)
 
 HcalBaseDQMonitor ()
 
 ~HcalBaseDQMonitor ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Public Attributes

double HBHE [100][73][5][4]
 
double HF [100][73][5][4]
 
double HO [100][73][5][4]
 
double nHBHE [100][73][5][4]
 
double nHF [100][73][5][4]
 
double nHO [100][73][5][4]
 
double occHBHE [100][73][5]
 
double occHF [100][73][5]
 
double occHO [100][73][5]
 
double occSum
 

Private Member Functions

void CheckTiming ()
 

Private Attributes

bool CosmicsCorr_
 
edm::InputTag FEDRawDataCollection_
 
int GCTTriggerBit1_
 
int GCTTriggerBit2_
 
int GCTTriggerBit3_
 
int GCTTriggerBit4_
 
int GCTTriggerBit5_
 
MonitorElementHBTimeDT
 
MonitorElementHBTimeGCT
 
MonitorElementHBTimeHO
 
MonitorElementHBTimeRPC
 
MonitorElementHETimeCSCm
 
MonitorElementHETimeCSCp
 
MonitorElementHETimeRPCm
 
MonitorElementHETimeRPCp
 
MonitorElementHFTimeCSCm
 
MonitorElementHFTimeCSCp
 
MonitorElementHOTimeDT
 
MonitorElementHOTimeGCT
 
MonitorElementHOTimeHO
 
MonitorElementHOTimeRPC
 
edm::InputTag inputLabelDigi_
 
edm::InputTag L1ADataLabel_
 
MonitorElementSummary
 

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 HcalBaseDQMonitor
virtual void beginJob ()
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
virtual void endJob (void)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
virtual void endRun (const edm::Run &run, const edm::EventSetup &c)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
void SetupEtaPhiHists (EtaPhiHists &hh, std::string Name, std::string Units)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 
- Protected Attributes inherited from HcalBaseDQMonitor
std::vector< int > AllowedCalibTypes_
 
int badChannelStatusMask_
 
int currentLS
 
int currenttype_
 
DQMStoredbe_
 
int debug_
 
bool enableCleanup_
 
bool eventAllowed_
 
bool HBpresent_
 
bool HEpresent_
 
bool HFpresent_
 
bool HOpresent_
 
int ievt_
 
std::map< unsigned int, int > KnownBadCells_
 
int levt_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemsCurrentLB
 
MonitorElementProblemsVsLB
 
MonitorElementProblemsVsLB_HB
 
MonitorElementProblemsVsLB_HBHEHF
 
MonitorElementProblemsVsLB_HE
 
MonitorElementProblemsVsLB_HF
 
MonitorElementProblemsVsLB_HO
 
bool skipOutOfOrderLS_
 
std::string subdir_
 
int tevt_
 

Detailed Description

Date:
2010/03/25 11:00:57
Revision:
1.2
Author
D. Vishnevskiy

Definition at line 25 of file HcalDetDiagTimingMonitor.h.

Constructor & Destructor Documentation

HcalDetDiagTimingMonitor::HcalDetDiagTimingMonitor ( const edm::ParameterSet ps)

Definition at line 45 of file HcalDetDiagTimingMonitor.cc.

References HcalBaseDQMonitor::AllowedCalibTypes_, CosmicsCorr_, HcalBaseDQMonitor::debug_, HcalBaseDQMonitor::enableCleanup_, FEDRawDataCollection_, GCTTriggerBit1_, GCTTriggerBit2_, GCTTriggerBit3_, GCTTriggerBit4_, GCTTriggerBit5_, edm::ParameterSet::getUntrackedParameter(), inputLabelDigi_, L1ADataLabel_, HcalBaseDQMonitor::makeDiagnostics_, HcalBaseDQMonitor::mergeRuns_, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::Online_, HcalBaseDQMonitor::prefixME_, HcalBaseDQMonitor::skipOutOfOrderLS_, and HcalBaseDQMonitor::subdir_.

46 {
47  Online_ = ps.getUntrackedParameter<bool>("online",false);
48  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
49  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
50  debug_ = ps.getUntrackedParameter<int>("debug",0);
51  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
52  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
53  prefixME_.append("/");
54  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder","DetDiagTimingMonitor_Hcal");
55  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
56  subdir_.append("/");
57  subdir_=prefixME_+subdir_;
58  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
59  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",false);
60  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
61  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
62 
63  GCTTriggerBit1_= ps.getUntrackedParameter<int>("GCTTriggerBit1", 15);
64  GCTTriggerBit2_= ps.getUntrackedParameter<int>("GCTTriggerBit2", 16);
65  GCTTriggerBit3_= ps.getUntrackedParameter<int>("GCTTriggerBit3", 17);
66  GCTTriggerBit4_= ps.getUntrackedParameter<int>("GCTTriggerBit4", 18);
67  GCTTriggerBit5_= ps.getUntrackedParameter<int>("GCTTriggerBit5", 16);
68  CosmicsCorr_ = ps.getUntrackedParameter<bool>("CosmicsCorr", true);
69 
72  FEDRawDataCollection_ = ps.getUntrackedParameter<edm::InputTag>("FEDRawDataCollection",edm::InputTag("source",""));
73 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > AllowedCalibTypes_
HcalDetDiagTimingMonitor::~HcalDetDiagTimingMonitor ( )

Definition at line 75 of file HcalDetDiagTimingMonitor.cc.

75 {}

Member Function Documentation

void HcalDetDiagTimingMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 144 of file HcalDetDiagTimingMonitor.cc.

References adc2fC, HcalBaseDQMonitor::analyze(), CheckTiming(), CosmicsCorr_, FEDRawData::data(), data, HcalBaseDQMonitor::dbe_, relval_parameters_module::energy, eta(), FEDRawDataCollection_, MonitorElement::Fill(), GCTTriggerBit1_, GCTTriggerBit2_, GCTTriggerBit3_, GCTTriggerBit4_, GCTTriggerBit5_, get_ped_hbhe(), get_ped_hf(), get_ped_ho(), edm::Event::getByLabel(), L1MuGMTReadoutCollection::getRecords(), GetTime(), HBTimeDT, HBTimeGCT, HBTimeHO, HBTimeRPC, hc_Null, HcalBarrel, HcalEndcap, HETimeCSCm, HETimeCSCp, HETimeRPCm, HETimeRPCp, HFTimeCSCm, HFTimeCSCp, HOTimeDT, HOTimeGCT, HOTimeHO, HOTimeRPC, i, HcalBaseDQMonitor::ievt_, inputLabelDigi_, HcalBaseDQMonitor::IsAllowedCalibType(), isSignal(), edm::HandleBase::isValid(), L1ADataLabel_, HcalBaseDQMonitor::LumiInOrder(), edm::EventBase::luminosityBlock(), MAXCSC, MAXDTBX, FEDNumbering::MAXHCALFEDID, MAXRPC, FEDNumbering::MINHCALFEDID, N, occHBHE, occHF, occHO, occSum, phi, edm::Handle< T >::product(), lumiPlot::rawdata, set_hbhe(), set_hf(), set_ho(), funct::sin(), FEDRawData::size(), TRIG_CSC, TRIG_DT, TRIG_GCT, TRIG_RPC, and TRIG_RPCF.

145 {
146  if (!IsAllowedCalibType()) return;
147  if (LumiInOrder(iEvent.luminosityBlock())==false) return;
148  HcalBaseDQMonitor::analyze(iEvent, iSetup);
149 
150  int eta,phi,depth,nTS,BXinEVENT=1,TRIGGER=0;
151 
152  if(!dbe_) return;
153  // We do not want to look at Abort Gap events
155  iEvent.getByLabel(FEDRawDataCollection_,rawdata);
156  //checking FEDs for calibration information
157  if(!rawdata.isValid()) return;
159  const FEDRawData& fedData = rawdata->FEDData(i) ;
160  if ( fedData.size() < 24 ) continue ;
161  if(((const HcalDCCHeader*)(fedData.data()))->getCalibType()!=hc_Null) return;
162  }
165  bool GCTTrigger1=false,GCTTrigger2=false,GCTTrigger3=false,GCTTrigger4=false,GCTTrigger5=false,HOselfTrigger=false;
166  // Check GCT trigger bits
168  iEvent.getByLabel(L1ADataLabel_, gtRecord);
169  if(gtRecord.isValid()){
170 
171  const TechnicalTriggerWord tWord = gtRecord->technicalTriggerWord();
172  const DecisionWord dWord = gtRecord->decisionWord();
173  //bool HFselfTrigger = tWord.at(9);
174  if (!tWord.empty()) HOselfTrigger = tWord.at(11);
175 
176  if (!dWord.empty())
177  {
178  GCTTrigger1 = dWord.at(GCTTriggerBit1_);
179  GCTTrigger2 = dWord.at(GCTTriggerBit2_);
180  GCTTrigger3 = dWord.at(GCTTriggerBit3_);
181  GCTTrigger4 = dWord.at(GCTTriggerBit4_);
182  GCTTrigger5 = dWord.at(GCTTriggerBit5_);
183  }
184 
185  // define trigger trigger source (example from GMT group)
187  iEvent.getByLabel(L1ADataLabel_,gmtrc_handle);
188  if(!gmtrc_handle.isValid()) return;
189  L1MuGMTReadoutCollection const* gmtrc = gmtrc_handle.product();
190 
191  int idt =0;
192  int icsc =0;
193  int irpcb =0;
194  int irpcf =0;
195  int ndt[5] = {0,0,0,0,0};
196  int ncsc[5] = {0,0,0,0,0};
197  int nrpcb[5] = {0,0,0,0,0};
198  int nrpcf[5] = {0,0,0,0,0};
199  int N;
200  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
201  std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
202  N=0;
203  int NN=0;
204  for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
205  if(igmtrr->getBxInEvent()==0) BXinEVENT=NN;
206  NN++;
207  std::vector<L1MuRegionalCand>::const_iterator iter1;
208  std::vector<L1MuRegionalCand> rmc;
209  // DTBX Trigger
210  rmc = igmtrr->getDTBXCands();
211  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
212  if ( idt < MAXDTBX && !(*iter1).empty() ) {
213  idt++;
214  if(N<5) ndt[N]++;
215 
216  }
217  }
218  // CSC Trigger
219  rmc = igmtrr->getCSCCands();
220  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
221  if ( icsc < MAXCSC && !(*iter1).empty() ) {
222  icsc++;
223  if(N<5) ncsc[N]++;
224  }
225  }
226  // RPCb Trigger
227  rmc = igmtrr->getBrlRPCCands();
228  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
229  if ( irpcb < MAXRPC && !(*iter1).empty() ) {
230  irpcb++;
231  if(N<5) nrpcb[N]++;
232 
233  }
234  }
235  // RPCfwd Trigger
236  rmc = igmtrr->getFwdRPCCands();
237  for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
238  if ( irpcf < MAXRPC && !(*iter1).empty() ) {
239  irpcf++;
240  if(N<5) nrpcf[N]++;
241 
242  }
243  }
244 
245  N++;
246  }
247  if(ncsc[BXinEVENT]>0 ) { TRIGGER=+TRIG_CSC; }
248  if(ndt[BXinEVENT]>0 ) { TRIGGER=+TRIG_DT; }
249  if(nrpcb[BXinEVENT]>0) { TRIGGER=+TRIG_RPC; }
250  if(nrpcf[BXinEVENT]>0) { TRIGGER=+TRIG_RPCF; }
251  if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5) { TRIGGER=+TRIG_GCT; }
252  }
255  if(ievt_<100){
257  iEvent.getByLabel(inputLabelDigi_,hbhe);
258  if(hbhe.isValid()){
259  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
260  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
261  for(int i=0;i<nTS;i++) if(digi->sample(i).adc()<20) set_hbhe(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
262  }
263  }
265  iEvent.getByLabel(inputLabelDigi_,ho);
266  if(ho.isValid()){
267  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
268  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
269  for(int i=0;i<nTS;i++) if(digi->sample(i).adc()<20) set_ho(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
270  }
271  }
273  iEvent.getByLabel(inputLabelDigi_,hf);
274  if(hf.isValid()){
275  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
276  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
277  for(int i=0;i<nTS;i++) if(digi->sample(i).adc()<20) set_hf(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
278  }
279  }
280  return;
281  }
284  double data[20];
286  iEvent.getByLabel(inputLabelDigi_,hbhe);
287  if(hbhe.isValid()){
288  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
289  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
290  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()]-get_ped_hbhe(eta,phi,depth,digi->sample(i).capid());
291  if(!isSignal(data,nTS)) continue;
292 
293  occHBHE[eta+50][phi][depth]+=1.0; occSum+=1.0;
294  if((occHBHE[eta+50][phi][depth]/(double)(ievt_))>0.001) continue;
295 
296  double Time=GetTime(data,nTS);
297  if(digi->id().subdet()==HcalBarrel){
298  if(TRIGGER==TRIG_GCT) HBTimeGCT->Fill(Time);
299  if(CosmicsCorr_) Time+=(7.5*sin((phi*5.0)/180.0*3.14159))/25.0;
300  if(TRIGGER==TRIG_DT) HBTimeDT->Fill(Time);
301  if(HOselfTrigger) HBTimeHO->Fill(Time);
302  if(TRIGGER==TRIG_RPC) HBTimeRPC->Fill(Time);
303  }
304  if(digi->id().subdet()==HcalEndcap){
305  if(CosmicsCorr_) Time+=(3.5*sin((phi*5.0)/180.0*3.14159))/25.0;
306  if(TRIGGER==TRIG_CSC && eta>0) HETimeCSCp->Fill(Time);
307  if(TRIGGER==TRIG_CSC && eta<0) HETimeCSCm->Fill(Time);
308  if(TRIGGER==TRIG_RPCF && eta>0) HETimeRPCp->Fill(Time);
309  if(TRIGGER==TRIG_RPCF && eta<0) HETimeRPCm->Fill(Time);
310  }
311 
312  }
313  }
315  iEvent.getByLabel(inputLabelDigi_,ho);
316  if(ho.isValid()){
317  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
318  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
319  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()]-get_ped_ho(eta,phi,depth,digi->sample(i).capid());
320  if(!isSignal(data,nTS)) continue;
321  occHO[eta+50][phi][depth]+=1.0;
322  occSum+=1.0;
323  if((occHO[eta+50][phi][depth]/(double)(ievt_))>0.001) continue;
324 
325  double Time=GetTime(data,nTS);
326  if(CosmicsCorr_) Time+=(12.0*sin((phi*5.0)/180.0*3.14159))/25.0;
327  if(TRIGGER==TRIG_DT) HOTimeDT ->Fill(Time);
328  if(HOselfTrigger) HOTimeHO ->Fill(Time);
329  if(TRIGGER==TRIG_RPC) HOTimeRPC->Fill(Time);
330  if(TRIGGER==TRIG_GCT) HOTimeGCT->Fill(Time);
331  }
332  }
334  iEvent.getByLabel(inputLabelDigi_,hf);
335  if(hf.isValid()){
336  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
337  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
338  double energy=0;
339  for(int i=0;i<nTS;i++){
340  data[i]=adc2fC[digi->sample(i).adc()]-get_ped_hf(eta,phi,depth,digi->sample(i).capid());
341  energy+=data[i];
342  }
343 
344  if(energy<25.0) continue;
345  occHF[eta+50][phi][depth]+=1.0;
346  occSum+=1.0;
347 
348  double Time=GetTime(data,nTS);
349  if((occHF[eta+50][phi][depth]/(double)(ievt_))>0.01) continue;
350 
351  if(TRIGGER==TRIG_CSC && eta>0) HFTimeCSCp->Fill(Time);
352  if(TRIGGER==TRIG_CSC && eta<0) HFTimeCSCm->Fill(Time);
353  }
354  }
355  if((ievt_%500)==0){
356  CheckTiming();
357  //printf("Run: %i, Evants processed: %i\n",iEvent.run(),ievt_);
358  }
359 }
int i
Definition: DBlmapReader.cc:9
bool LumiInOrder(int lumisec)
static const int MAXCSC
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
void set_hf(int eta, int phi, int depth, int cap, float val)
static const int TRIG_CSC
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< T >::const_iterator const_iterator
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
static const int MAXRPC
T eta() const
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
void Fill(long long x)
static const int TRIG_RPC
static const int MAXDTBX
bool isSignal(double *data, int n)
double get_ped_ho(int eta, int phi, int depth, int cup)
std::vector< bool > DecisionWord
typedefs
static const int TRIG_GCT
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
void set_ho(int eta, int phi, int depth, int cap, float val)
#define N
Definition: blowfish.cc:9
static const int TRIG_RPCF
static const float adc2fC[128]
double get_ped_hbhe(int eta, int phi, int depth, int cup)
double get_ped_hf(int eta, int phi, int depth, int cup)
T const * product() const
Definition: Handle.h:74
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void set_hbhe(int eta, int phi, int depth, int cap, float val)
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
dictionary rawdata
Definition: lumiPlot.py:393
double GetTime(double *data, int n)
static const int TRIG_DT
Definition: DDAxes.h:10
void HcalDetDiagTimingMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 86 of file HcalDetDiagTimingMonitor.cc.

References HcalBaseDQMonitor::beginRun(), gather_cfg::cout, HcalBaseDQMonitor::debug_, HcalBaseDQMonitor::mergeRuns_, reset(), setup(), and HcalBaseDQMonitor::tevt_.

87 {
88  if (debug_>1) std::cout <<"HcalDetDiagTimingMonitor::beginRun"<<std::endl;
90 
91  if (tevt_==0) this->setup(); // set up histograms if they have not been created before
92  if (mergeRuns_==false)
93  this->reset();
94 
95  return;
96 
97 } // void HcalNDetDiagTimingMonitor::beginRun(...)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
tuple cout
Definition: gather_cfg.py:121
void HcalDetDiagTimingMonitor::CheckTiming ( )
private

Definition at line 361 of file HcalDetDiagTimingMonitor.cc.

References MonitorElement::getEntries(), HBTimeDT, HBTimeGCT, HBTimeHO, HBTimeRPC, HETimeCSCm, HETimeCSCp, HETimeRPCm, HETimeRPCp, HFTimeCSCm, HFTimeCSCp, HOTimeDT, HOTimeGCT, HOTimeHO, HOTimeRPC, MonitorElement::setBinContent(), and Summary.

Referenced by analyze().

361  {
362  if(HBTimeDT->getEntries()>10){
363  Summary->setBinContent(1,1,1);
364  }
365  if(HBTimeRPC->getEntries()>10){
366  Summary->setBinContent(2,1,1);
367  }
368  if(HBTimeGCT->getEntries()>10){
369  Summary->setBinContent(3,1,1);
370  }
371  if(HBTimeHO->getEntries()>10){
372  Summary->setBinContent(6,1,1);
373  }
374  if(HOTimeDT->getEntries()>10){
375  Summary->setBinContent(1,2,1);
376  }
377  if(HOTimeRPC->getEntries()>10){
378  Summary->setBinContent(2,2,1);
379  }
380  if(HOTimeGCT->getEntries()>10){
381  Summary->setBinContent(3,2,1);
382  }
383  if(HOTimeHO->getEntries()>10){
384  Summary->setBinContent(6,2,1);
385  }
386  if(HETimeCSCp->getEntries()>10){
387  Summary->setBinContent(4,4,1);
388  }
389  if(HETimeCSCm->getEntries()>10){
390  Summary->setBinContent(4,3,1);
391  }
392  if(HETimeRPCp->getEntries()>10){
393  Summary->setBinContent(5,4,1);
394  }
395  if(HETimeRPCm->getEntries()>10){
396  Summary->setBinContent(5,3,1);
397  }
398  if(HFTimeCSCp->getEntries()>10){
399  Summary->setBinContent(4,6,1);
400  }
401  if(HFTimeCSCm->getEntries()>10){
402  Summary->setBinContent(4,4,1);
403  }
404 }
void setBinContent(int binx, double content)
set content of bin (1-D)
double getEntries(void) const
get # of entries
void HcalDetDiagTimingMonitor::cleanup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 77 of file HcalDetDiagTimingMonitor.cc.

References HcalBaseDQMonitor::dbe_, DQMStore::removeContents(), DQMStore::setCurrentFolder(), and HcalBaseDQMonitor::subdir_.

77  {
78  if(dbe_){
81  dbe_ = 0;
82  }
83 }
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2564
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void HcalDetDiagTimingMonitor::done ( )

Definition at line 406 of file HcalDetDiagTimingMonitor.cc.

406 { }
double HcalDetDiagTimingMonitor::get_ped_hbhe ( int  eta,
int  phi,
int  depth,
int  cup 
)
inline

Definition at line 64 of file HcalDetDiagTimingMonitor.h.

References HBHE, nHBHE, and phi.

Referenced by analyze().

64  {
65  if(nHBHE[eta+50][phi][depth][cup]<10) return 2.5;
66  if(nHBHE[eta+50][phi][depth][cup]!=0){
67  double ped=HBHE[eta+50][phi][depth][cup]/nHBHE[eta+50][phi][depth][cup];
68  if(ped>1.5 && ped<4.5) return ped;
69  }
70  return 9999;
71  }
T eta() const
Definition: DDAxes.h:10
double HcalDetDiagTimingMonitor::get_ped_hf ( int  eta,
int  phi,
int  depth,
int  cup 
)
inline

Definition at line 80 of file HcalDetDiagTimingMonitor.h.

References HF, nHF, and phi.

Referenced by analyze().

80  {
81  if(nHF[eta+50][phi][depth][cup]<10) return 2.5;
82  if(nHF[eta+50][phi][depth][cup]!=0){
83  double ped=HF[eta+50][phi][depth][cup]/nHF[eta+50][phi][depth][cup];
84  if(ped>1.5 && ped<4.5) return ped;
85  }
86  return 9999;
87  }
T eta() const
Definition: DDAxes.h:10
double HcalDetDiagTimingMonitor::get_ped_ho ( int  eta,
int  phi,
int  depth,
int  cup 
)
inline

Definition at line 72 of file HcalDetDiagTimingMonitor.h.

References HO, nHO, and phi.

Referenced by analyze().

72  {
73  if(nHO[eta+50][phi][depth][cup]<10) return 2.5;
74  if(nHO[eta+50][phi][depth][cup]!=0){
75  double ped=HO[eta+50][phi][depth][cup]/nHO[eta+50][phi][depth][cup];
76  if(ped>1.5 && ped<4.5) return ped;
77  }
78  return 9999;
79  }
T eta() const
Definition: DDAxes.h:10
double HcalDetDiagTimingMonitor::GetTime ( double *  data,
int  n 
)
inline

Definition at line 30 of file HcalDetDiagTimingMonitor.h.

References j, and n.

Referenced by analyze().

30  {
31  int MaxI=-100; double Time=0,SumT=0,MaxT=-10;
32  for(int j=0;j<n;++j) if(MaxT<data[j]){ MaxT=data[j]; MaxI=j; }
33  if(MaxI>=0){
34  Time=MaxI*data[MaxI];
35  SumT=data[MaxI];
36  if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
37  if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
38  Time=Time/SumT;
39  }
40  return Time;
41  }
int j
Definition: DBlmapReader.cc:9
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
bool HcalDetDiagTimingMonitor::isSignal ( double *  data,
int  n 
)
inline

Definition at line 42 of file HcalDetDiagTimingMonitor.h.

References i, and max().

Referenced by analyze().

42  {
43  int Imax=-1; double max=-100;
44  for(int i=0;i<n;i++) if(data[i]>max){max=data[i]; Imax=i;}
45  if(Imax==0 && Imax==(n-1)) return false;
46  float sum=data[Imax-1]+data[Imax+1];
47  if(data[Imax]>5.5 && sum>(data[Imax]*0.25)) return true;
48  return false;
49  }
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 HcalDetDiagTimingMonitor::reset ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 84 of file HcalDetDiagTimingMonitor.cc.

Referenced by beginRun().

84 {}
void HcalDetDiagTimingMonitor::set_hbhe ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
)
inline

Definition at line 52 of file HcalDetDiagTimingMonitor.h.

References HBHE, nHBHE, and phi.

Referenced by analyze().

52  {
53  HBHE[eta+50][phi][depth][cap]+=val;
54  nHBHE[eta+50][phi][depth][cap]+=1.0;
55  }
T eta() const
Definition: DDAxes.h:10
void HcalDetDiagTimingMonitor::set_hf ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
)
inline

Definition at line 60 of file HcalDetDiagTimingMonitor.h.

References HF, nHF, and phi.

Referenced by analyze().

60  {
61  HF[eta+50][phi][depth][cap]+=val;
62  nHF[eta+50][phi][depth][cap]+=1.0;
63  }
T eta() const
Definition: DDAxes.h:10
void HcalDetDiagTimingMonitor::set_ho ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
)
inline

Definition at line 56 of file HcalDetDiagTimingMonitor.h.

References HO, nHO, and phi.

Referenced by analyze().

56  {
57  HO[eta+50][phi][depth][cap]+=val;
58  nHO[eta+50][phi][depth][cap]+=1.0;
59  }
T eta() const
Definition: DDAxes.h:10
void HcalDetDiagTimingMonitor::setup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 101 of file HcalDetDiagTimingMonitor.cc.

References DQMStore::book1D(), DQMStore::book2D(), HcalBaseDQMonitor::dbe_, HBTimeDT, HBTimeGCT, HBTimeHO, HBTimeRPC, HETimeCSCm, HETimeCSCp, HETimeRPCm, HETimeRPCp, HFTimeCSCm, HFTimeCSCp, HOTimeDT, HOTimeGCT, HOTimeHO, HOTimeRPC, i, j, NULL, MonitorElement::setBinContent(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), HcalBaseDQMonitor::setup(), HcalBaseDQMonitor::subdir_, and Summary.

Referenced by beginRun().

102 {
103 
105 
106  std::string str;
107  if(dbe_!=NULL){
109  str="Hcal Timing summary"; Summary = dbe_->book2D(str,str,6,0,6,6,0,6);
110  Summary->setBinLabel(1,"DT",1);
111  Summary->setBinLabel(2,"RPC",1);
112  Summary->setBinLabel(3,"GCT",1);
113  Summary->setBinLabel(4,"CSC",1);
114  Summary->setBinLabel(5,"RPCf",1);
115  Summary->setBinLabel(6,"bit11",1);
116  Summary->setBinLabel(1,"HB",2);
117  Summary->setBinLabel(2,"HO",2);
118  Summary->setBinLabel(3,"HEM",2);
119  Summary->setBinLabel(4,"HEP",2);
120  Summary->setBinLabel(5,"HFM",2);
121  Summary->setBinLabel(6,"HFP",2);
122  for(int i=1;i<=6;i++) for(int j=1;j<=6;j++) Summary->setBinContent(i,j,-1);
123 
124  dbe_->setCurrentFolder(subdir_+"Timing Plots");
125  str="HB Timing (DT Trigger)"; HBTimeDT = dbe_->book1D(str,str,100,0,10);
126  str="HO Timing (DT Trigger)"; HOTimeDT = dbe_->book1D(str,str,100,0,10);
127  str="HB Timing (RPC Trigger)"; HBTimeRPC = dbe_->book1D(str,str,100,0,10);
128  str="HO Timing (RPC Trigger)"; HOTimeRPC = dbe_->book1D(str,str,100,0,10);
129  str="HB Timing (HO SelfTrigger tech bit 11)"; HBTimeHO = dbe_->book1D(str,str,100,0,10);
130  str="HO Timing (HO SelfTrigger tech bit 11)"; HOTimeHO = dbe_->book1D(str,str,100,0,10);
131 
132  str="HB Timing (GCT Trigger alg bit 15 16 17 18)"; HBTimeGCT =dbe_->book1D(str,str,100,0,10);
133  str="HO Timing (GCT Trigger alg bit 15 16 17 18)"; HOTimeGCT =dbe_->book1D(str,str,100,0,10);
134 
135  str="HEP Timing (CSC Trigger)"; HETimeCSCp =dbe_->book1D(str,str,100,0,10);
136  str="HEM Timing (CSC Trigger)"; HETimeCSCm =dbe_->book1D(str,str,100,0,10);
137  str="HEP Timing (RPCf Trigger)"; HETimeRPCp =dbe_->book1D(str,str,100,0,10);
138  str="HEM Timing (RPCf Trigger)"; HETimeRPCm =dbe_->book1D(str,str,100,0,10);
139  str="HFP Timing (CSC Trigger)"; HFTimeCSCp =dbe_->book1D(str,str,100,0,10);
140  str="HFM Timing (CSC Trigger)"; HFTimeCSCm =dbe_->book1D(str,str,100,0,10);
141  }
142 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
#define NULL
Definition: scimark2.h:8
int j
Definition: DBlmapReader.cc:9
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
virtual void setup(void)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429

Member Data Documentation

bool HcalDetDiagTimingMonitor::CosmicsCorr_
private

Definition at line 120 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

edm::InputTag HcalDetDiagTimingMonitor::FEDRawDataCollection_
private

Definition at line 113 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

int HcalDetDiagTimingMonitor::GCTTriggerBit1_
private

Definition at line 115 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

int HcalDetDiagTimingMonitor::GCTTriggerBit2_
private

Definition at line 116 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

int HcalDetDiagTimingMonitor::GCTTriggerBit3_
private

Definition at line 117 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

int HcalDetDiagTimingMonitor::GCTTriggerBit4_
private

Definition at line 118 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

int HcalDetDiagTimingMonitor::GCTTriggerBit5_
private

Definition at line 119 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

double HcalDetDiagTimingMonitor::HBHE[100][73][5][4]

Definition at line 88 of file HcalDetDiagTimingMonitor.h.

Referenced by get_ped_hbhe(), and set_hbhe().

MonitorElement* HcalDetDiagTimingMonitor::HBTimeDT
private

Definition at line 122 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HBTimeGCT
private

Definition at line 124 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HBTimeHO
private

Definition at line 125 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HBTimeRPC
private

Definition at line 123 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HETimeCSCm
private

Definition at line 131 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HETimeCSCp
private

Definition at line 130 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HETimeRPCm
private

Definition at line 133 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HETimeRPCp
private

Definition at line 132 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

double HcalDetDiagTimingMonitor::HF[100][73][5][4]

Definition at line 92 of file HcalDetDiagTimingMonitor.h.

Referenced by get_ped_hf(), and set_hf().

MonitorElement* HcalDetDiagTimingMonitor::HFTimeCSCm
private

Definition at line 135 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HFTimeCSCp
private

Definition at line 134 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

double HcalDetDiagTimingMonitor::HO[100][73][5][4]

Definition at line 90 of file HcalDetDiagTimingMonitor.h.

Referenced by get_ped_ho(), and set_ho().

MonitorElement* HcalDetDiagTimingMonitor::HOTimeDT
private

Definition at line 126 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HOTimeGCT
private

Definition at line 128 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HOTimeHO
private

Definition at line 129 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

MonitorElement* HcalDetDiagTimingMonitor::HOTimeRPC
private

Definition at line 127 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), CheckTiming(), and setup().

edm::InputTag HcalDetDiagTimingMonitor::inputLabelDigi_
private

Definition at line 111 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

edm::InputTag HcalDetDiagTimingMonitor::L1ADataLabel_
private

Definition at line 112 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze(), and HcalDetDiagTimingMonitor().

double HcalDetDiagTimingMonitor::nHBHE[100][73][5][4]

Definition at line 89 of file HcalDetDiagTimingMonitor.h.

Referenced by get_ped_hbhe(), and set_hbhe().

double HcalDetDiagTimingMonitor::nHF[100][73][5][4]

Definition at line 93 of file HcalDetDiagTimingMonitor.h.

Referenced by get_ped_hf(), and set_hf().

double HcalDetDiagTimingMonitor::nHO[100][73][5][4]

Definition at line 91 of file HcalDetDiagTimingMonitor.h.

Referenced by get_ped_ho(), and set_ho().

double HcalDetDiagTimingMonitor::occHBHE[100][73][5]

Definition at line 97 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze().

double HcalDetDiagTimingMonitor::occHF[100][73][5]

Definition at line 99 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze().

double HcalDetDiagTimingMonitor::occHO[100][73][5]

Definition at line 98 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze().

double HcalDetDiagTimingMonitor::occSum

Definition at line 100 of file HcalDetDiagTimingMonitor.h.

Referenced by analyze().

MonitorElement* HcalDetDiagTimingMonitor::Summary
private

Definition at line 136 of file HcalDetDiagTimingMonitor.h.

Referenced by CheckTiming(), and setup().