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

Definition at line 359 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().

359  {
360  if(HBTimeDT->getEntries()>10){
361  Summary->setBinContent(1,1,1);
362  }
363  if(HBTimeRPC->getEntries()>10){
364  Summary->setBinContent(2,1,1);
365  }
366  if(HBTimeGCT->getEntries()>10){
367  Summary->setBinContent(3,1,1);
368  }
369  if(HBTimeHO->getEntries()>10){
370  Summary->setBinContent(6,1,1);
371  }
372  if(HOTimeDT->getEntries()>10){
373  Summary->setBinContent(1,2,1);
374  }
375  if(HOTimeRPC->getEntries()>10){
376  Summary->setBinContent(2,2,1);
377  }
378  if(HOTimeGCT->getEntries()>10){
379  Summary->setBinContent(3,2,1);
380  }
381  if(HOTimeHO->getEntries()>10){
382  Summary->setBinContent(6,2,1);
383  }
384  if(HETimeCSCp->getEntries()>10){
385  Summary->setBinContent(4,4,1);
386  }
387  if(HETimeCSCm->getEntries()>10){
388  Summary->setBinContent(4,3,1);
389  }
390  if(HETimeRPCp->getEntries()>10){
391  Summary->setBinContent(5,4,1);
392  }
393  if(HETimeRPCm->getEntries()>10){
394  Summary->setBinContent(5,3,1);
395  }
396  if(HFTimeCSCp->getEntries()>10){
397  Summary->setBinContent(4,6,1);
398  }
399  if(HFTimeCSCm->getEntries()>10){
400  Summary->setBinContent(4,4,1);
401  }
402 }
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:2330
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void HcalDetDiagTimingMonitor::done ( )

Definition at line 404 of file HcalDetDiagTimingMonitor.cc.

404 { }
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
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)
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="HB 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:519
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:647
virtual void setup(void)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237

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().