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
HcalDetDiagLaserMonitor Class Reference

#include <DQM/HcalDetDiagLaserMonitor/src/HcalDetDiagLaserMonitor.cc>

Inheritance diagram for HcalDetDiagLaserMonitor:
HcalBaseDQMonitor edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 HcalDetDiagLaserMonitor (const edm::ParameterSet &)
 
 ~HcalDetDiagLaserMonitor ()
 
- Public Member Functions inherited from HcalBaseDQMonitor
 HcalBaseDQMonitor (const edm::ParameterSet &ps)
 
 HcalBaseDQMonitor ()
 
virtual ~HcalBaseDQMonitor ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void beginRun (const edm::Run &run, const edm::EventSetup &c) override
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void endRun (const edm::Run &run, const edm::EventSetup &c) override
 
void fillHistos (int sd)
 
void fillProblems (int sd)
 
bool get_ave_rbx (int sd, int side, int rbx, float *ave, float *rms)
 
bool get_ave_subdet (int sd, float *ave_t, float *ave_e, float *ave_t_r, float *ave_e_r)
 
HcalDetDiagLaserDataGetCalib (std::string sd, int eta, int phi)
 
void LoadDataset ()
 
void LoadReference ()
 
void SaveRaddamData ()
 
void SaveReference ()
 

Private Attributes

std::string baseFolder_
 
HcalDetDiagLaserData calib_data [5][5][72]
 
bool createHTMLonly
 
int dataset_seq_number
 
std::string DatasetName
 
const HcalElectronicsMapemap
 
MonitorElementEnergy2Dhbhehf
 
MonitorElementEnergy2Dho
 
HcalDetDiagLaserData hb_data [85][72][4]
 
MonitorElementhb_time_rbx
 
MonitorElementhbheEnergy
 
MonitorElementhbheEnergyRMS
 
MonitorElementhbheTime
 
MonitorElementhbheTimeRMS
 
HcalDetDiagLaserData he_data [85][72][4]
 
MonitorElementhe_time_rbx
 
HcalDetDiagLaserData hf_data [85][72][4]
 
MonitorElementhf_time_rbx
 
MonitorElementhfEnergy
 
MonitorElementhfEnergyRMS
 
MonitorElementhfTime
 
MonitorElementhfTimeRMS
 
HcalDetDiagLaserData ho_data [85][72][4]
 
MonitorElementho_time_rbx
 
MonitorElementhoEnergy
 
MonitorElementhoEnergyRMS
 
MonitorElementhoTime
 
MonitorElementhoTimeRMS
 
MonitorElementhtmlFolder
 
std::string htmlOutputPath
 
int ievt_
 
edm::InputTag inputLabelDigi_
 
bool IsReference
 
std::map< unsigned int, int > KnownBadCells_
 
double LaserEnergyThreshold
 
double LaserTimingThreshold
 
bool LocalRun
 
MonitorElementmeEVT_
 
MonitorElementmeRUN_
 
int nHB
 
int nHBHEchecks
 
int nHE
 
int nHF
 
int nHFchecks
 
int nHO
 
int nHOchecks
 
bool Online_
 
std::string OutputFilePath
 
bool Overwrite
 
std::string prefixME_
 
EtaPhiHistsProblemCellsByDepth_energy
 
EtaPhiHistsProblemCellsByDepth_energy_val
 
EtaPhiHistsProblemCellsByDepth_timing
 
EtaPhiHistsProblemCellsByDepth_timing_val
 
std::vector< std::string > problemnames_
 
MonitorElementRaddam [56]
 
bool RaddamRun
 
double RaddamThreshold1
 
double RaddamThreshold2
 
MonitorElementrefEnergy2Dhbhehf
 
MonitorElementrefEnergy2Dho
 
std::string ReferenceData
 
std::string ReferenceRun
 
MonitorElementRefRun_
 
MonitorElementrefTime2Dhbhehf
 
MonitorElementrefTime2Dho
 
int run_number
 
TH1F * S1 [56]
 
TH1F * S2 [56]
 
MonitorElementTime2Dhbhehf
 
MonitorElementTime2Dho
 
edm::EDGetTokenT
< HcalCalibDigiCollection
tok_calib_
 
edm::EDGetTokenT
< HBHEDigiCollection
tok_hbhe_
 
edm::EDGetTokenT
< HFDigiCollection
tok_hf_
 
edm::EDGetTokenT
< HODigiCollection
tok_ho_
 
edm::EDGetTokenT
< FEDRawDataCollection
tok_raw_
 
edm::EDGetTokenT
< HcalTBTriggerData
tok_tb_
 
std::string XmlFilePath
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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 cleanup (void)
 
virtual void endJob (void)
 
void getLogicalMap (const edm::EventSetup &c)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
virtual void reset (void)
 
virtual void setup (void)
 
void SetupEtaPhiHists (EtaPhiHists &hh, std::string Name, std::string Units)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- 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_
 
HcalLogicalMaplogicalMap_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
bool needLogicalMap_
 
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

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 247 of file HcalDetDiagLaserMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 377 of file HcalDetDiagLaserMonitor.cc.

References createHTMLonly, dataset_seq_number, DatasetName, HcalBaseDQMonitor::debug_, emap, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), htmlOutputPath, ievt_, inputLabelDigi_, IsReference, LaserEnergyThreshold, LaserTimingThreshold, LocalRun, nHB, nHBHEchecks, nHE, nHF, nHFchecks, nHO, nHOchecks, Online_, OutputFilePath, Overwrite, prefixME_, RaddamRun, RaddamThreshold1, RaddamThreshold2, ReferenceData, run_number, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, tok_calib_, tok_hbhe_, tok_hf_, tok_ho_, tok_raw_, tok_tb_, and XmlFilePath.

377  {
378 
379 
380  ievt_=-1;
381  emap=0;
383  run_number=-1;
384  IsReference=false;
385  LocalRun=RaddamRun=false;
386  createHTMLonly=false;
387  nHB=nHE=nHO=nHF=0;
389 
390  inputLabelDigi_ = iConfig.getUntrackedParameter<edm::InputTag>("digiLabel",edm::InputTag("hcalDigis"));
391 
392  ReferenceData = iConfig.getUntrackedParameter<std::string>("LaserReferenceData" ,"");
393  OutputFilePath = iConfig.getUntrackedParameter<std::string>("OutputFilePath", "");
394  DatasetName = iConfig.getUntrackedParameter<std::string>("LaserDatasetName", "");
395  htmlOutputPath = iConfig.getUntrackedParameter<std::string>("htmlOutputPath", "");
396  XmlFilePath = iConfig.getUntrackedParameter<std::string>("XmlFilePath", "");
397  Online_ = iConfig.getUntrackedParameter<bool> ("online",false);
398  Overwrite = iConfig.getUntrackedParameter<bool> ("Overwrite",true);
399  prefixME_ = iConfig.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
400  if (prefixME_.size()>0 && prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
401  prefixME_.append("/");
402  subdir_ = iConfig.getUntrackedParameter<std::string>("TaskFolder","DetDiagPedestalMonitor_Hcal/");
403  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
404  subdir_.append("/");
405  subdir_=prefixME_+subdir_;
406  debug_ = iConfig.getUntrackedParameter<int>("debug",0);
407 
408  LaserTimingThreshold = iConfig.getUntrackedParameter<double>("LaserTimingThreshold",0.2);
409  LaserEnergyThreshold = iConfig.getUntrackedParameter<double>("LaserEnergyThreshold",0.1);
410  RaddamThreshold1 = iConfig.getUntrackedParameter<double>("RaddamThreshold1",10.0);
411  RaddamThreshold2 = iConfig.getUntrackedParameter<double>("RaddamThreshold2",0.95);
412 
413  // register for data access
414  tok_tb_ = consumes<HcalTBTriggerData>(iConfig.getParameter<edm::InputTag>("hcalTBTriggerDataTag"));
415  tok_raw_ = consumes<FEDRawDataCollection>(iConfig.getUntrackedParameter<edm::InputTag>("RawDataLabel",edm::InputTag("source")));
416  tok_calib_ = consumes<HcalCalibDigiCollection>(iConfig.getUntrackedParameter<edm::InputTag>("calibDigiLabel",edm::InputTag("hcalDigis")));
417  tok_hbhe_ = consumes<HBHEDigiCollection>(inputLabelDigi_);
418  tok_ho_ = consumes<HODigiCollection>(inputLabelDigi_);
419  tok_hf_ = consumes<HFDigiCollection>(inputLabelDigi_);
420 
421 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
const HcalElectronicsMap * emap
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
HcalDetDiagLaserMonitor::~HcalDetDiagLaserMonitor ( )

Definition at line 557 of file HcalDetDiagLaserMonitor.cc.

557  {
558 
559 }

Member Function Documentation

void HcalDetDiagLaserMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 562 of file HcalDetDiagLaserMonitor.cc.

References adc2fC, HcalDetDiagLaserData::add_statistics(), HcalBaseDQMonitor::analyze(), calib, calib_data, createHTMLonly, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, FEDRawData::data(), data, HcalBaseDQMonitor::dbe_, alignCSCRings::e, eta(), MonitorElement::Fill(), HcalObjRepresent::Fill(), fillHistos(), fillProblems(), edm::Event::getByToken(), hb_data, hc_HBHEHPD, hc_HFPMT, hc_HOHPD, hc_RADDAM, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, hf_data, ho_data, i, edm::EventBase::id(), ievt_, edm::HandleBase::isValid(), j, gen::k, LocalRun, FEDNumbering::MAXHCALFEDID, meEVT_, meRUN_, FEDNumbering::MINHCALFEDID, N, Online_, edm::EventBase::orbitNumber(), phi, Raddam, RaddamRun, RaddamThreshold1, RaddamThreshold2, lumiPlot::rawdata, HcalBaseDQMonitor::reset(), edm::EventID::run(), run_number, HcalRaddamData::s1_adc, S2, HcalRaddamData::s2_adc, SaveReference(), FEDRawData::size(), tok_calib_, tok_hbhe_, tok_hf_, tok_ho_, tok_raw_, tok_tb_, HcalRaddamData::TOTEVNT, and relativeConstraints::value.

562  {
563  if(createHTMLonly) return;
564  HcalBaseDQMonitor::analyze(iEvent,iSetup); // base class increments ievt_, etc. counters
565 
566 int eta,phi,depth,nTS;
567 static bool HBHEseq,HOseq,HFseq;
568 static int lastHBHEorbit,lastHOorbit,lastHForbit,nChecksHBHE,nChecksHO,nChecksHF,ievt_hbhe,ievt_ho,ievt_hf;
569  if(ievt_==-1){
570  ievt_=0;HBHEseq=HOseq=HFseq=false; lastHBHEorbit=lastHOorbit=lastHForbit=-1;nChecksHBHE=nChecksHO=nChecksHF=0;
571  ievt_hbhe=0,ievt_ho=0,ievt_hf=0;
572  }
573 
574  if(!dbe_) return;
575  bool LaserEvent=false;
576  bool LaserRaddam=false;
577  int orbit=iEvent.orbitNumber();
578  meRUN_->Fill(iEvent.id().run());
579  // for local runs
580  edm::Handle<HcalTBTriggerData> trigger_data;
581  iEvent.getByToken(tok_tb_, trigger_data);
582  if(trigger_data.isValid()){
583  if(trigger_data->wasLaserTrigger()) LaserEvent=true;
584  LocalRun=true;
585  }
586  if(!LocalRun && Online_){
587  if(HBHEseq && (orbit-lastHBHEorbit)>(11223*10) && ievt_hbhe>40){
588  HBHEseq=false;
592  nChecksHBHE++;
593  ievt_hbhe=0;
594  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) hb_data[i][j][k].reset();
595  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) he_data[i][j][k].reset();
596  }
597  if(HOseq && (orbit-lastHOorbit)>(11223*10) && ievt_ho>40){
598  HOseq=false;
601  nChecksHO++;
602  ievt_ho=0;
603  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) ho_data[i][j][k].reset();
604  }
605  if(HFseq && (orbit-lastHForbit)>(11223*10) && ievt_hf>40){
606  HFseq=false;
609  nChecksHF++;
610  ievt_hf=0;
611  if(nChecksHF==1 || (nChecksHF>1 && ((nChecksHF-1)%12)==0)){
612  SaveReference();
613  }
614  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) hf_data[i][j][k].reset();
615  }
616  }
617 
618  // Abort Gap laser
619  if(LocalRun==false || LaserEvent==false){
621  iEvent.getByToken(tok_raw_ ,rawdata);
622  // edm::Handle<FEDRawDataCollection> rawdata;
623  // iEvent.getByType(rawdata);
624  //checking FEDs for calibration information
626  const FEDRawData& fedData = rawdata->FEDData(i) ;
627  if ( fedData.size() < 24 ) continue ;
628  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
629  if(value==hc_HBHEHPD){ HBHEseq=true; HOseq=HFseq=false; lastHBHEorbit=orbit; ievt_hbhe++; }
630  if(value==hc_HOHPD){ HOseq=true; HBHEseq=HFseq=false; lastHOorbit=orbit; ievt_ho++; }
631  if(value==hc_HFPMT){ HFseq=true; HBHEseq=HOseq=false; lastHForbit=orbit; ievt_hf++; }
632 
633  if(value==hc_HBHEHPD || value==hc_HOHPD || value==hc_HFPMT){ LaserEvent=true; break;}
634  if(value==hc_RADDAM){ LaserEvent=true; LaserRaddam=true; break;}
635  }
636  }
637  if(!LaserEvent) return;
639  iEvent.getByToken(tok_hbhe_,hbhe);
641  iEvent.getByToken(tok_ho_,ho);
643  iEvent.getByToken(tok_hf_,hf);
645  iEvent.getByToken(tok_calib_, calib);
646 
647  if(LocalRun && LaserEvent){
648  int N=0;
649  if(hf.isValid()){
650  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
651  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth();
652  float e=0;
653  for(int i=0;i<digi->size();i++) e+=adc2fC[digi->sample(i).adc()&0xff]-2.5;
654  if(e>40){ N++;}
655  }
656  }
657  if(N>50 && N<57){ RaddamRun=true; /*LaserRaddam=true;*/}
658  }
659  if(RaddamRun){
660  if(hf.isValid()){
661  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
662  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
663  int N;
664  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
665  if(N==56) continue;
666  float max1=0,max2=0;
667  int nmax1=0,nmax2=0;
668  for(int i=0;i<nTS;i++){
669  if(max1<adc2fC[digi->sample(i).adc()&0xff]){ nmax1=i; max1=adc2fC[digi->sample(i).adc()&0xff]; }
670  }
671  Raddam_data[N].TOTEVNT++;
672  for(int i=0;i<nTS;i++){
673  if(i==nmax1) continue;
674  if(max2<adc2fC[digi->sample(i).adc()&0xff]){ nmax2=i; max2=adc2fC[digi->sample(i).adc()&0xff]; }
675  }
676  if(nmax1>nmax2){
677  int tmp1=nmax2;
678  nmax2=nmax1;nmax1=tmp1;
679  }
680  if(nmax1==0 || nmax2==(nTS-1)) continue;
681  if(nmax2!=(nmax1+1)) continue;
682 
683  if(max1<RaddamThreshold1 || max2<RaddamThreshold1) continue;
685  max1-=2.5; max2-=2.5;
686  float S2=max1+max2;
687  float S4=S2+adc2fC[digi->sample(nmax1-1).adc()&0xff]+adc2fC[digi->sample(nmax2+1).adc()&0xff]-5.0;
688  if((S2/S4)<RaddamThreshold2) continue;
690  Raddam_data[N].s1_adc[digi->sample(nmax1).adc()&0xff]++;
691  Raddam_data[N].s2_adc[digi->sample(nmax2).adc()&0xff]++;
692  }
693  }
694  }
695 
696  meEVT_->Fill(++ievt_);
697  run_number=iEvent.id().run();
698  double data[20];
699  if(!LaserRaddam){
700  if(hbhe.isValid()){
701  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
702  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
703  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
704  if(digi->id().subdet()==HcalBarrel){
705  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
706  hb_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
707  }
708  if(digi->id().subdet()==HcalEndcap){
709  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
710  he_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
711  }
712  }
713  }
714  if(ho.isValid()){
715  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
716  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
717  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
718  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
719  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
720  }else{
721  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
722  }
723  ho_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
724  }
725  }
726  if(hf.isValid()){
727  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
728  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
729  double ped=adc2fC[digi->sample(0).adc()&0xff];
730  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
731  hf_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
732  }
733  }
734  if(calib.isValid())for(HcalCalibDigiCollection::const_iterator digi=calib->begin();digi!=calib->end();digi++){
735  if(digi->id().cboxChannel()!=0 || digi->id().hcalSubdet()==0) continue;
736  nTS=digi->size();
737  float e=0;
738  for(int i=0;i<nTS;i++){ data[i]=adc2fC[digi->sample(i).adc()&0xff]; e+=data[i];}
739  if(e<15000) calib_data[digi->id().hcalSubdet()][digi->id().ieta()+2][digi->id().iphi()-1].add_statistics(data,nTS);
740  }
741  }else{ //Raddam
742  if(hf.isValid()){
743  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
744  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
745  int N;
746  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
747  if(N==56) continue;
748  for(int i=0;i<nTS;i++) Raddam[N]->Fill(i,adc2fC[digi->sample(i).adc()&0xff]-2.5);
749 
750  }
751  }
752  }
753 }
RunNumber_t run() const
Definition: EventID.h:42
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
void add_statistics(double *data, int nTS)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< HFDataFrame >::const_iterator const_iterator
edm::EDGetTokenT< HFDigiCollection > tok_hf_
HcalRaddamData Raddam_data[56]
T eta() const
static const float adc2fC[128]
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(long long x)
Raddam_ch RADDAM_CH[56]
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int j
Definition: DBlmapReader.cc:9
int orbitNumber() const
Definition: EventBase.h:63
bool isValid() const
Definition: HandleBase.h:76
edm::EDGetTokenT< HODigiCollection > tok_ho_
int k[5][pyjets_maxn]
HcalDetDiagLaserData hb_data[85][72][4]
#define N
Definition: blowfish.cc:9
virtual void reset(void)
edm::EventID id() const
Definition: EventBase.h:56
HcalDetDiagLaserData hf_data[85][72][4]
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
dictionary rawdata
Definition: lumiPlot.py:393
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
HcalDetDiagLaserData calib_data[5][5][72]
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2037 of file HcalDetDiagLaserMonitor.cc.

2037 {}
void HcalDetDiagLaserMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 422 of file HcalDetDiagLaserMonitor.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), DQMStore::bookString(), createHTMLonly, dataset_seq_number, DatasetName, HcalBaseDQMonitor::dbe_, EtaPhiHists::depth, emap, Energy2Dhbhehf, Energy2Dho, eta(), MonitorElement::Fill(), edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), hb_time_rbx, hbheEnergy, hbheEnergyRMS, hbheTime, hbheTimeRMS, DetId::Hcal, HcalChannelStatus::HcalCellMask, HcalChannelStatus::HcalCellOff, he_time_rbx, hf_time_rbx, hfEnergy, hfEnergyRMS, hfTime, hfTimeRMS, ho_time_rbx, hoEnergy, hoEnergyRMS, hoTime, hoTimeRMS, htmlFolder, htmlOutputPath, i, KnownBadCells_, LoadDataset(), LoadReference(), meEVT_, meRUN_, mergeVDriftHistosByStation::name, nHB, nHE, nHF, nHO, AlCaHLTBitMon_ParallelJobs::p, phi, prefixME_, ProblemCellsByDepth_energy, ProblemCellsByDepth_energy_val, ProblemCellsByDepth_timing, ProblemCellsByDepth_timing_val, problemnames_, edm::ESHandle< class >::product(), Raddam, refEnergy2Dhbhehf, refEnergy2Dho, ReferenceRun, RefRun_, refTime2Dhbhehf, refTime2Dho, run_number, MonitorElement::setAxisRange(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), EtaPhiHists::setup(), HcalBaseDQMonitor::setup(), ntuplemaker::status, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, Time2Dhbhehf, and Time2Dho.

422  {
424  c.get<HcalChannelQualityRcd>().get(p);
425  HcalChannelQuality* chanquality= new HcalChannelQuality(*p.product());
426  std::vector<DetId> mydetids = chanquality->getAllChannels();
427  KnownBadCells_.clear();
428 
429  for (std::vector<DetId>::const_iterator i = mydetids.begin();i!=mydetids.end();++i){
430  if (i->det()!=DetId::Hcal) continue; // not an hcal cell
431  HcalDetId id=HcalDetId(*i);
432  int status=(chanquality->getValues(id))->getValue();
434  KnownBadCells_[id.rawId()]=status;
435  }
436  }
437 
438  edm::ESHandle<HcalDbService> conditions_;
439  c.get<HcalDbRecord>().get(conditions_);
440  emap=conditions_->getHcalMapping();
441 
443  if (!dbe_) return;
445 
447  meEVT_ = dbe_->bookInt("HcalDetDiagLaserMonitor Event Number");
448  meRUN_ = dbe_->bookInt("HcalDetDiagLaserMonitor Run Number");
449 
450  ReferenceRun="UNKNOWN";
451  LoadReference();
452  LoadDataset();
453  if(DatasetName.size()>0 && createHTMLonly){
454  char str[200]; sprintf(str,"%sHcalDetDiagLaserData_run%i_%i/",htmlOutputPath.c_str(),run_number,dataset_seq_number);
455  htmlFolder=dbe_->bookString("HcalDetDiagLaserMonitor HTML folder",str);
456  MonitorElement *me;
457  dbe_->setCurrentFolder(prefixME_+"HcalInfo");
458  me=dbe_->bookInt("HBpresent");
459  if(nHB>0) me->Fill(1);
460  me=dbe_->bookInt("HEpresent");
461  if(nHE>0) me->Fill(1);
462  me=dbe_->bookInt("HOpresent");
463  if(nHO>0) me->Fill(1);
464  me=dbe_->bookInt("HFpresent");
465  if(nHF>0) me->Fill(1);
466  }
468  ProblemCellsByDepth_timing->setup(dbe_," Problem Bad Laser Timing");
469  for(unsigned int i=0;i<ProblemCellsByDepth_timing->depth.size();i++)
470  problemnames_.push_back(ProblemCellsByDepth_timing->depth[i]->getName());
472  ProblemCellsByDepth_energy->setup(dbe_," Problem Bad Laser Energy");
473  for(unsigned int i=0;i<ProblemCellsByDepth_energy->depth.size();i++)
474  problemnames_.push_back(ProblemCellsByDepth_energy->depth[i]->getName());
475 
476  dbe_->setCurrentFolder(subdir_+"Summary Plots");
477 
478  name="HBHE Laser Energy Distribution"; hbheEnergy = dbe_->book1D(name,name,200,0,3000);
479  name="HBHE Laser Timing Distribution"; hbheTime = dbe_->book1D(name,name,200,0,10);
480  name="HBHE Laser Energy RMS_div_Energy Distribution"; hbheEnergyRMS = dbe_->book1D(name,name,200,0,0.5);
481  name="HBHE Laser Timing RMS Distribution"; hbheTimeRMS = dbe_->book1D(name,name,200,0,1);
482  name="HO Laser Energy Distribution"; hoEnergy = dbe_->book1D(name,name,200,0,3000);
483  name="HO Laser Timing Distribution"; hoTime = dbe_->book1D(name,name,200,0,10);
484  name="HO Laser Energy RMS_div_Energy Distribution"; hoEnergyRMS = dbe_->book1D(name,name,200,0,0.5);
485  name="HO Laser Timing RMS Distribution"; hoTimeRMS = dbe_->book1D(name,name,200,0,1);
486  name="HF Laser Energy Distribution"; hfEnergy = dbe_->book1D(name,name,200,0,3000);
487  name="HF Laser Timing Distribution"; hfTime = dbe_->book1D(name,name,200,0,10);
488  name="HF Laser Energy RMS_div_Energy Distribution"; hfEnergyRMS = dbe_->book1D(name,name,200,0,0.7);
489  name="HF Laser Timing RMS Distribution"; hfTimeRMS = dbe_->book1D(name,name,200,0,1);
490 
491  name="Laser Timing HBHEHF"; Time2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
492  name="Laser Timing HO"; Time2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
493  name="Laser Energy HBHEHF"; Energy2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
494  name="Laser Energy HO"; Energy2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
495  name="HBHEHF Laser (Timing-Ref)+1"; refTime2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
496  name="HO Laser (Timing-Ref)+1"; refTime2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
497  name="HBHEHF Laser Energy_div_Ref"; refEnergy2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
498  name="HO Laser Energy_div_Ref"; refEnergy2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
499 
500  name="HB RBX average Time-Ref"; hb_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
501  name="HE RBX average Time-Ref"; he_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
502  name="HO RBX average Time-Ref"; ho_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
503  name="HF RoBox average Time-Ref"; hf_time_rbx = dbe_->book1D(name,name,24,0.5,24.5);
504 
505  char str[200];
506  for(int i=1;i<=18;i++){ sprintf(str,"HBM%02i",i); hb_time_rbx->setBinLabel(i,str); }
507  for(int i=1;i<=18;i++){ sprintf(str,"HBP%02i",i); hb_time_rbx->setBinLabel(i+18,str); }
508  for(int i=1;i<=18;i++){ sprintf(str,"HEM%02i",i); he_time_rbx->setBinLabel(i,str); }
509  for(int i=1;i<=18;i++){ sprintf(str,"HEP%02i",i); he_time_rbx->setBinLabel(i+18,str); }
510  for(int i=1;i<=12;i++){ sprintf(str,"HFM%02i",i); hf_time_rbx->setBinLabel(i,str); }
511  for(int i=1;i<=12;i++){ sprintf(str,"HFP%02i",i); hf_time_rbx->setBinLabel(i+12,str); }
512  for(int i=1;i<=6;i++){ sprintf(str,"HO2M%02i",i*2); ho_time_rbx->setBinLabel(i,str); }
513  for(int i=1;i<=6;i++){ sprintf(str,"HO1M%02i",i*2); ho_time_rbx->setBinLabel(i+6,str); }
514  for(int i=1;i<=12;i++){ sprintf(str,"HO0%02i",i); ho_time_rbx->setBinLabel(i+12,str); }
515  for(int i=1;i<=6;i++){ sprintf(str,"HO1P%02i",i*2); ho_time_rbx->setBinLabel(i+24,str); }
516  for(int i=1;i<=6;i++){ sprintf(str,"HO2P%02i",i*2); ho_time_rbx->setBinLabel(i+30,str); }
517 
518  Time2Dhbhehf->setAxisTitle("i#eta",1);
519  Time2Dhbhehf->setAxisTitle("i#phi",2);
520  Time2Dho->setAxisTitle("i#eta",1);
521  Time2Dho->setAxisTitle("i#phi",2);
522  Energy2Dhbhehf->setAxisTitle("i#eta",1);
523  Energy2Dhbhehf->setAxisTitle("i#phi",2);
524  Energy2Dho->setAxisTitle("i#eta",1);
525  Energy2Dho->setAxisTitle("i#phi",2);
526  refTime2Dhbhehf->setAxisTitle("i#eta",1);
527  refTime2Dhbhehf->setAxisTitle("i#phi",2);
528  refTime2Dho->setAxisTitle("i#eta",1);
529  refTime2Dho->setAxisTitle("i#phi",2);
530  refEnergy2Dhbhehf->setAxisTitle("i#eta",1);
531  refEnergy2Dhbhehf->setAxisTitle("i#phi",2);
532  refEnergy2Dho->setAxisTitle("i#eta",1);
533  refEnergy2Dho->setAxisTitle("i#phi",2);
534 
536  refTime2Dho->setAxisRange(0,2,3);
537  refEnergy2Dhbhehf->setAxisRange(0.5,1.5,3);
538  refEnergy2Dho->setAxisRange(0.5,1.5,3);
539 
541  RefRun_= dbe_->bookString("HcalDetDiagLaserMonitor Reference Run",ReferenceRun);
542 
543  dbe_->setCurrentFolder(subdir_+"Raddam Plots");
544  for(int i=0;i<56;i++){
545  sprintf(str,"RADDAM (%i %i)",RADDAM_CH[i].eta,RADDAM_CH[i].phi);
546  Raddam[i] = dbe_->book1D(str,str,10,-0.5,9.5);
547  }
548 
549  dbe_->setCurrentFolder(subdir_+"Plots for client");
551  ProblemCellsByDepth_timing_val->setup(dbe_," Laser Timing difference");
553  ProblemCellsByDepth_energy_val->setup(dbe_," Laser Energy difference");
554 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
const HcalElectronicsMap * emap
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
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)
const Item * getValues(DetId fId, bool throwOnFail=true) const
T eta() const
std::map< unsigned int, int > KnownBadCells_
void Fill(long long x)
Raddam_ch RADDAM_CH[56]
std::vector< MonitorElement * > depth
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:838
std::vector< DetId > getAllChannels() const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
tuple status
Definition: ntuplemaker.py:245
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:779
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:1000
virtual void setup(void)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::vector< std::string > problemnames_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2038 of file HcalDetDiagLaserMonitor.cc.

2038 {}
void HcalDetDiagLaserMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2021 of file HcalDetDiagLaserMonitor.cc.

References createHTMLonly, fillHistos(), fillProblems(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, ievt_, LocalRun, Online_, RaddamRun, SaveRaddamData(), and SaveReference().

void HcalDetDiagLaserMonitor::fillHistos ( int  sd)
private

Definition at line 1125 of file HcalDetDiagLaserMonitor.cc.

References funct::abs(), Energy2Dhbhehf, Energy2Dho, eta(), MonitorElement::Fill(), get_ave_rbx(), HcalDetDiagLaserData::get_average_amp(), HcalDetDiagLaserData::get_average_time(), hb_data, hb_time_rbx, hbheEnergy, hbheEnergyRMS, hbheTime, hbheTimeRMS, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, he_time_rbx, hf_data, hf_time_rbx, hfEnergy, hfEnergyRMS, hfTime, hfTimeRMS, ho_data, ho_time_rbx, hoEnergy, hoEnergyRMS, hoTime, hoTimeRMS, i, isSiPM(), max(), bookConverter::min, phi, refEnergy2Dhbhehf, refEnergy2Dho, refTime2Dhbhehf, refTime2Dho, MonitorElement::Reset(), plotscripts::rms(), MonitorElement::setAxisRange(), MonitorElement::setBinContent(), MonitorElement::setBinError(), cond::rpcobgas::time, Time2Dhbhehf, and Time2Dho.

Referenced by analyze(), and endRun().

1125  {
1126  if(sd==HcalBarrel || sd==HcalEndcap){
1127  hbheEnergy->Reset();
1128  hbheTime->Reset();
1129  hbheEnergyRMS->Reset();
1130  hbheTimeRMS->Reset();
1131  hb_time_rbx->Reset();
1132  he_time_rbx->Reset();
1133  }
1134  if(sd==HcalOuter){
1135  hoEnergy->Reset();
1136  hoTime->Reset();
1137  hoEnergyRMS->Reset();
1138  hoTimeRMS->Reset();
1139  Time2Dho->Reset();
1140  Energy2Dho->Reset();
1141  refTime2Dho->Reset();
1142  refEnergy2Dho->Reset();
1143  ho_time_rbx->Reset();
1144  }
1145  if(sd==HcalForward){
1146  hfEnergy->Reset();
1147  hfTime->Reset();
1148  hfEnergyRMS->Reset();
1149  hfTimeRMS->Reset();
1150  hf_time_rbx->Reset();
1151  }
1152  if(sd==HcalBarrel || sd==HcalEndcap){
1153  // HB histograms
1154  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){
1155  double T=0,nT=0,E=0,nE=0;
1156  for(int depth=1;depth<=2;depth++){
1157  if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
1158  double ave=0;
1159  double rms=0;
1160  double time=0;
1161  double time_rms=0;
1162  hb_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1163  hb_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1164  hbheEnergy->Fill(ave);
1165  if(ave>0)hbheEnergyRMS->Fill(rms/ave);
1166  hbheTime->Fill(time);
1167  hbheTimeRMS->Fill(time_rms);
1168  T+=time; nT++; E+=ave; nE++;
1169  }
1170  }
1171  if(nT>0){Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT);Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); }
1172  }
1173  // HE histograms
1174  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
1175  double T=0,nT=0,E=0,nE=0;
1176  for(int depth=1;depth<=3;depth++){
1177  if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
1178  double ave=0; double rms=0; double time=0; double time_rms=0;
1179  he_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1180  he_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1181  hbheEnergy->Fill(ave);
1182  if(ave>0)hbheEnergyRMS->Fill(rms/ave);
1183  hbheTime->Fill(time);
1184  hbheTimeRMS->Fill(time_rms);
1185  T+=time; nT++; E+=ave; nE++;
1186  }
1187  }
1188  if(nT>0 && abs(eta)>16 ){Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT); Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); }
1189  if(nT>0 && abs(eta)>20 ){Time2Dhbhehf->setBinContent(eta+44,phi+2,T/nT); Energy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);}
1190  }
1191  }
1192  if(sd==HcalForward){
1193  // HF histograms
1194  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
1195  double T=0,nT=0,E=0,nE=0;
1196  for(int depth=1;depth<=2;depth++){
1197  if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
1198  double ave=0; double rms=0; double time=0; double time_rms=0;
1199  hf_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1200  hf_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1201  hfEnergy->Fill(ave);
1202  if(ave>0)hfEnergyRMS->Fill(rms/ave);
1203  hfTime->Fill(time);
1204  T+=time; nT++; E+=ave; nE++;
1205  hfTimeRMS->Fill(time_rms);
1206  }
1207  }
1208  if(nT>0 && abs(eta)>29 ){ Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT); Time2Dhbhehf->setBinContent(eta+44,phi+2,T/nT);}
1209  if(nT>0 && abs(eta)>29 ){ Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); Energy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);}
1210  }
1211  }
1212  if(sd==HcalOuter){
1213  // HO histograms
1214  for(int eta=-10;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
1215  if(eta>10 && !isSiPM(eta,phi,4)) continue;
1216  double T=0,nT=0,E=0,nE=0;
1217  for(int depth=4;depth<=4;depth++){
1218  if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
1219  double ave=0; double rms=0; double time=0; double time_rms=0;
1220  ho_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1221  ho_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1222  hoEnergy->Fill(ave);
1223  if(ave>0)hoEnergyRMS->Fill(rms/ave);
1224  hoTime->Fill(time);
1225  T+=time; nT++; E+=ave; nE++;
1226  hoTimeRMS->Fill(time_rms);
1227  }
1228  }
1229  if(nT>0){ Time2Dho->Fill(eta,phi,T/nT); Energy2Dho->Fill(eta,phi+1,E/nE) ;}
1230  }
1231  }
1232 
1233  // compare with reference...
1234  if(sd==HcalBarrel || sd==HcalEndcap){
1235  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){
1236  double T=0,nT=0,E=0,nE=0;
1237  for(int depth=1;depth<=2;depth++){
1238  if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
1239  double val=0,rms=0,time=0,time_rms=0;
1240  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1241  if(!hb_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1242  if(!hb_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1243  if(!hb_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1244  E+=VAL/val; nE++;
1245  T+=TIME-time; nT++;
1246  }
1247  }
1248  if(nE>0) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);
1249  if(nT>0){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+1,TTT); }
1250  }
1251  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
1252  double T=0,nT=0,E=0,nE=0;
1253  for(int depth=1;depth<=3;depth++){
1254  if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
1255  double val=0,rms=0,time=0,time_rms=0;
1256  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1257  if(!he_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1258  if(!he_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1259  if(!he_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1260  E+=VAL/val; nE++;
1261  T+=TIME-time; nT++;
1262  }
1263  }
1264  if(nE>0 && abs(eta)>16) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);
1265  if(nT>0 && abs(eta)>16){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+1,TTT); }
1266  if(nE>0 && abs(eta)>20) refEnergy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);
1267  if(nT>0 && abs(eta)>20){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+2,TTT); }
1268  }
1269  }
1270  if(sd==HcalForward){
1271  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
1272  double T=0,nT=0,E=0,nE=0;
1273  for(int depth=1;depth<=2;depth++){
1274  if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
1275  double val=0,rms=0,time=0,time_rms=0;
1276  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1277  if(!hf_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1278  if(!hf_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1279  if(!hf_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1280  E+=VAL/val; nE++;
1281  T+=TIME-time; nT++;
1282  }
1283  }
1284  if(nE>0 && abs(eta)>29) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);
1285  if(nT>0 && abs(eta)>29){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+1,TTT); }
1286  if(nE>0 && abs(eta)>29) refEnergy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);
1287  if(nT>0 && abs(eta)>29){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+2,TTT); }
1288  }
1289  }
1290  if(sd==HcalOuter){
1291  for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
1292  if(eta>10 && !isSiPM(eta,phi,4)) continue;
1293  double T=0,nT=0,E=0,nE=0;
1294  for(int depth=4;depth<=4;depth++){
1295  if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
1296  double val=0,rms=0,time=0,time_rms=0;
1297  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1298  if(!ho_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1299  if(!ho_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1300  if(!ho_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1301  E+=VAL/val; nE++;
1302  T+=TIME-time; nT++;
1303  }
1304  }
1305  if(nE>0) refEnergy2Dho->Fill(eta,phi,E/nE);
1306  if(nT>0){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dho->Fill(eta,phi,TTT);}
1307  }
1308  }
1310  float min,max;
1311  if(sd==HcalBarrel || sd==HcalEndcap){
1312  min=100;max=-100;
1313  for(int i=1;i<=18;i++){
1314  float ave=-10,rms=-10;
1315  if(get_ave_rbx(HcalBarrel,-1,i,&ave,&rms)){
1316  hb_time_rbx->setBinContent(i,ave);
1317  hb_time_rbx->setBinError(i,rms);
1318  if(ave<min) min=ave;
1319  if(ave>max) max=ave;
1320  }
1321  }
1322  for(int i=1;i<=18;i++){
1323  float ave=-10,rms=-10;
1324  if(get_ave_rbx(HcalBarrel,1,i,&ave,&rms)){
1325  hb_time_rbx->setBinContent(i+18,ave);
1326  hb_time_rbx->setBinError(i+18,rms);
1327  if(ave<min) min=ave;
1328  if(ave>max) max=ave;
1329  }
1330  }
1331  if(max>-100)hb_time_rbx->setAxisRange(min-1,max+1,2);
1332  min=100;max=-100;
1333  for(int i=1;i<=18;i++){
1334  float ave=-10,rms=-10;
1335  if(get_ave_rbx(HcalEndcap,-1,i,&ave,&rms)){
1336  he_time_rbx->setBinContent(i,ave);
1337  he_time_rbx->setBinError(i,rms);
1338  if(ave<min) min=ave;
1339  if(ave>max) max=ave;
1340  }
1341  }
1342  for(int i=1;i<=18;i++){
1343  float ave=-10,rms=-10;
1344  if(get_ave_rbx(HcalEndcap,1,i,&ave,&rms)){
1345  he_time_rbx->setBinContent(i+18,ave);
1346  he_time_rbx->setBinError(i+18,rms);
1347  if(ave<min) min=ave;
1348  if(ave>max) max=ave;
1349  }
1350  }
1351  if(max>-100)he_time_rbx->setAxisRange(min-1,max+1,2);
1352  }
1354  if(sd==HcalOuter){
1355  min=100;max=-100;
1356  for(int i=1;i<=6;i++){
1357  float ave=-10,rms=-10;
1358  if(get_ave_rbx(HcalOuter,-2,i,&ave,&rms)){
1359  ho_time_rbx->setBinContent(i,ave);
1360  ho_time_rbx->setBinError(i,rms);
1361  if(ave<min) min=ave;
1362  if(ave>max) max=ave;
1363  }
1364  }
1365  for(int i=1;i<=6;i++){
1366  float ave=-10,rms=-10;
1367  if(get_ave_rbx(HcalOuter,-1,i,&ave,&rms)){
1368  ho_time_rbx->setBinContent(i+6,ave);
1369  ho_time_rbx->setBinError(i+6,rms);
1370  if(ave<min) min=ave;
1371  if(ave>max) max=ave;
1372  }
1373  }
1374  for(int i=1;i<=12;i++){
1375  float ave=-10,rms=-10;
1376  if(get_ave_rbx(HcalOuter,0,i,&ave,&rms)){
1377  ho_time_rbx->setBinContent(i+12,ave);
1378  ho_time_rbx->setBinError(i+12,rms);
1379  if(ave<min) min=ave;
1380  if(ave>max) max=ave;
1381  }
1382  }
1383  for(int i=1;i<=6;i++){
1384  float ave=-10,rms=-10;
1385  if(get_ave_rbx(HcalOuter,1,i,&ave,&rms)){
1386  ho_time_rbx->setBinContent(i+24,ave);
1387  ho_time_rbx->setBinError(i+24,rms);
1388  if(ave<min) min=ave;
1389  if(ave>max) max=ave;
1390  }
1391  }
1392  for(int i=1;i<=6;i++){
1393  float ave=-10,rms=-10;
1394  if(get_ave_rbx(HcalOuter,2,i,&ave,&rms)){
1395  ho_time_rbx->setBinContent(i+30,ave);
1396  ho_time_rbx->setBinError(i+30,rms);
1397  if(ave<min) min=ave;
1398  if(ave>max) max=ave;
1399  }
1400  }
1401  if(max>-100)ho_time_rbx->setAxisRange(min-1,max+1,2);
1402  }
1404  if(sd==HcalForward){
1405  min=100;max=-100;
1406  for(int i=1;i<=12;i++){
1407  float ave=-10,rms=-10;
1408  if(get_ave_rbx(HcalForward,-1,i,&ave,&rms)){
1409  hf_time_rbx->setBinContent(i,ave);
1410  hf_time_rbx->setBinError(i,rms);
1411  if(ave<min) min=ave;
1412  if(ave>max) max=ave;
1413  }
1414  }
1415  for(int i=1;i<=12;i++){
1416  float ave=-10,rms=-10;
1417  if(get_ave_rbx(HcalForward,1,i,&ave,&rms)){
1418  hf_time_rbx->setBinContent(i+12,ave);
1419  hf_time_rbx->setBinError(i+12,rms);
1420  if(ave<min) min=ave;
1421  if(ave>max) max=ave;
1422  }
1423  }
1424  if(max>-100)hf_time_rbx->setAxisRange(min-1,max+1,2);
1425  }
1426 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
bool get_average_amp(double *ave, double *rms)
T eta() const
bool get_ave_rbx(int sd, int side, int rbx, float *ave, float *rms)
bool get_average_time(double *ave, double *rms)
void Fill(long long x)
bool isSiPM(int ieta, int iphi, int depth)
const T & max(const T &a, const T &b)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
HcalDetDiagLaserData hb_data[85][72][4]
double sd
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
long double T
HcalDetDiagLaserData ho_data[85][72][4]
void Reset(void)
reset ME (ie. contents, errors, etc)
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::fillProblems ( int  sd)
private

Definition at line 815 of file HcalDetDiagLaserMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), CalcEtaBin(), HcalDetId::depth(), EtaPhiHists::depth, DetId::det(), cond::rpcobgas::detid, alignCSCRings::e, emap, eta(), get_ave_subdet(), hb_data, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalOuter, he_data, hf_data, ho_data, i, HcalDetId::ieta(), HcalDetId::iphi(), KnownBadCells_, LaserEnergyThreshold, LaserTimingThreshold, HcalElectronicsMap::lookup(), HcalDetDiagLaserData::nBadEnergy, HcalDetDiagLaserData::nBadTime, HcalDetDiagLaserData::nChecks, phi, ProblemCellsByDepth_energy, ProblemCellsByDepth_energy_val, ProblemCellsByDepth_timing, ProblemCellsByDepth_timing_val, DetId::rawId(), plotscripts::rms(), DetId::subdetId(), and cond::rpcobgas::time.

Referenced by analyze(), and endRun().

815  {
816 float ave_t,ave_e,ave_t_r,ave_e_r;
817  if(!get_ave_subdet(sd,&ave_t,&ave_e,&ave_t_r,&ave_e_r)) return;
818 
819  for(int i=0;i<4;i++){
822  }
823 
824  std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
825  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
826  DetId detid=emap->lookup(*eid);
827  if (detid.det()!=DetId::Hcal) continue;
828  HcalGenericDetId gid(emap->lookup(*eid));
829  if(!(!(gid.null()) &&
830  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
831  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
832  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
833  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
834  int eta=0,phi=0,depth=0;
835  HcalDetId hid(detid);
836  if(KnownBadCells_.find(hid.rawId())==KnownBadCells_.end()) continue;
837  eta=hid.ieta();
838  phi=hid.iphi();
839  depth=hid.depth();
840 
841  int e=CalcEtaBin(sd,eta,depth)+1;
842  if(detid.subdetId()==HcalBarrel && sd==HcalBarrel){
843  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
844  if(!hb_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
845  if(!hb_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
846  if(!hb_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
847  hb_data[eta+42][phi-1][depth-1].nChecks++;
848  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
849  if(diff_t>LaserTimingThreshold){
850  hb_data[eta+42][phi-1][depth-1].nBadTime++;
851  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
852  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
853  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
854  float diff_e=((VAL/ave_e))/(val/ave_e_r);
855  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
856  hb_data[eta+42][phi-1][depth-1].nBadEnergy++;
857  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
858  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
859  }
860  }
861  if(detid.subdetId()==HcalEndcap && sd==HcalEndcap){
862  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
863  if(!he_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
864  if(!he_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
865  if(!he_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
866  he_data[eta+42][phi-1][depth-1].nChecks++;
867  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
868  if(diff_t>LaserTimingThreshold){
869  he_data[eta+42][phi-1][depth-1].nBadTime++;
870  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
871  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
872  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
873  float diff_e=((VAL/ave_e))/(val/ave_e_r);
874  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
875  he_data[eta+42][phi-1][depth-1].nBadEnergy++;
876  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
877  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
878  }
879  }
880  if(detid.subdetId()==HcalOuter && sd==HcalOuter){
881  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
882  if(!ho_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
883  if(!ho_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
884  if(!ho_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
885  ho_data[eta+42][phi-1][depth-1].nChecks++;
886  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
887  if(diff_t>LaserTimingThreshold){
888  ho_data[eta+42][phi-1][depth-1].nBadTime++;
889  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
890  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
891  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
892  float diff_e=((VAL/ave_e))/(val/ave_e_r);
893  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
894  ho_data[eta+42][phi-1][depth-1].nBadEnergy++;
895  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
896  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
897  }
898  }
899  if(detid.subdetId()==HcalForward && sd==HcalForward){
900  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
901  if(!hf_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
902  if(!hf_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
903  if(!hf_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
904  hf_data[eta+42][phi-1][depth-1].nChecks++;
905  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
906  if(diff_t>LaserTimingThreshold){
907  hf_data[eta+42][phi-1][depth-1].nBadTime++;
908  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
909  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
910  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
911  float diff_e=((VAL/ave_e))/(val/ave_e_r);
912  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
913  hf_data[eta+42][phi-1][depth-1].nBadEnergy++;
914  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
915  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
916  }
917  }
918  }
919  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
920  DetId detid=emap->lookup(*eid);
921  if (detid.det()!=DetId::Hcal) continue;
922  HcalGenericDetId gid(emap->lookup(*eid));
923  if(!(!(gid.null()) &&
924  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
925  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
926  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
927  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
928  int eta=0,phi=0,depth=0;
929  HcalDetId hid(detid);
930  eta=hid.ieta();
931  phi=hid.iphi();
932  depth=hid.depth();
933 
934  if(detid.subdetId()==HcalBarrel){
935  if(hb_data[eta+42][phi-1][depth-1].nBadTime>0){
936  int e=CalcEtaBin(HcalBarrel,eta,depth)+1;
937  double val=hb_data[eta+42][phi-1][depth-1].nBadTime/hb_data[eta+42][phi-1][depth-1].nChecks;
938  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
939  }
940  if(hb_data[eta+42][phi-1][depth-1].nBadEnergy>0){
941  int e=CalcEtaBin(HcalBarrel,eta,depth)+1;
942  double val=hb_data[eta+42][phi-1][depth-1].nBadEnergy/hb_data[eta+42][phi-1][depth-1].nChecks;
943  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
944  }
945  }
946  if(detid.subdetId()==HcalEndcap){
947  if(he_data[eta+42][phi-1][depth-1].nBadTime>0){
948  int e=CalcEtaBin(HcalEndcap,eta,depth)+1;
949  double val=he_data[eta+42][phi-1][depth-1].nBadTime/he_data[eta+42][phi-1][depth-1].nChecks;
950  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
951  }
952  if(he_data[eta+42][phi-1][depth-1].nBadEnergy>0){
953  int e=CalcEtaBin(HcalEndcap,eta,depth)+1;
954  double val=he_data[eta+42][phi-1][depth-1].nBadEnergy/he_data[eta+42][phi-1][depth-1].nChecks;
955  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
956  }
957  }
958  if(detid.subdetId()==HcalOuter){
959  if(ho_data[eta+42][phi-1][depth-1].nBadTime>0){
960  int e=CalcEtaBin(HcalOuter,eta,depth)+1;
961  double val=ho_data[eta+42][phi-1][depth-1].nBadTime/ho_data[eta+42][phi-1][depth-1].nChecks;
962  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
963  }
964  if(ho_data[eta+42][phi-1][depth-1].nBadEnergy>0){
965  int e=CalcEtaBin(HcalOuter,eta,depth)+1;
966  double val=ho_data[eta+42][phi-1][depth-1].nBadEnergy/ho_data[eta+42][phi-1][depth-1].nChecks;
967  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
968  }
969  }
970  if(detid.subdetId()==HcalForward){
971  if(hf_data[eta+42][phi-1][depth-1].nBadTime>0){
972  int e=CalcEtaBin(HcalForward,eta,depth)+1;
973  double val=hf_data[eta+42][phi-1][depth-1].nBadTime/hf_data[eta+42][phi-1][depth-1].nChecks;
974  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
975  }
976  if(hf_data[eta+42][phi-1][depth-1].nBadEnergy>0){
977  int e=CalcEtaBin(HcalForward,eta,depth)+1;
978  double val=hf_data[eta+42][phi-1][depth-1].nBadEnergy/hf_data[eta+42][phi-1][depth-1].nChecks;
979  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
980  }
981  }
982  }
983 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
const HcalElectronicsMap * emap
bool get_ave_subdet(int sd, float *ave_t, float *ave_e, float *ave_t_r, float *ave_e_r)
T eta() const
std::map< unsigned int, int > KnownBadCells_
std::vector< MonitorElement * > depth
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
HcalDetDiagLaserData hb_data[85][72][4]
double sd
int CalcEtaBin(int subdet, int ieta, int depth)
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
HcalDetDiagLaserData ho_data[85][72][4]
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
Definition: DDAxes.h:10
bool HcalDetDiagLaserMonitor::get_ave_rbx ( int  sd,
int  side,
int  rbx,
float *  ave,
float *  rms 
)
private

Definition at line 985 of file HcalDetDiagLaserMonitor.cc.

References hb_data, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, hf_data, ho_data, i, j, gen::k, n, plotscripts::rms(), mathSSE::sqrt(), and cond::rpcobgas::time.

Referenced by fillHistos().

985  {
986  double xt=0,xxt=0;
987  int eta_min=0,eta_max=0,n=0;
988  if(sd==HcalBarrel){
989  if(side>0){eta_min=1; eta_max=29;}
990  if(side<0){eta_min=-29; eta_max=-1;}
991  if(rbx==1){
992  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++)for(int k=1;k<=3;k++){
993  double val,rms,time,time_rms;
994  double TIME,TIME_RMS;
995  if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
996  if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
997  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
998  }
999  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=2;j++)for(int k=1;k<=3;k++){
1000  double val,rms,time,time_rms;
1001  double TIME,TIME_RMS;
1002  if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1003  if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1004  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1005  }
1006 
1007  }else{
1008  for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*4-1);j<=((rbx-1)*4+2);j++)for(int k=1;k<=3;k++){
1009  double val,rms,time,time_rms;
1010  double TIME,TIME_RMS;
1011  if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1012  if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1013  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1014  }
1015  }
1016  }
1017  if(sd==HcalEndcap){
1018  if(side>0){eta_min=1; eta_max=29;}
1019  if(side<0){eta_min=-29; eta_max=-1;}
1020  if(rbx==1){
1021  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++)for(int k=1;k<=3;k++){
1022  double val,rms,time,time_rms;
1023  double TIME,TIME_RMS;
1024  if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1025  if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1026  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1027  }
1028  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=2;j++)for(int k=1;k<=3;k++){
1029  double val,rms,time,time_rms;
1030  double TIME,TIME_RMS;
1031  if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1032  if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1033  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1034  }
1035 
1036  }else{
1037  for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*4-1);j<=((rbx-1)*4+2);j++)for(int k=1;k<=3;k++){
1038  double val,rms,time,time_rms;
1039  double TIME,TIME_RMS;
1040  if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1041  if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1042  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1043  }
1044  }
1045  }
1046  if(sd==HcalForward){
1047  if(side>0){eta_min=29; eta_max=40;}
1048  if(side<0){eta_min=-40; eta_max=-29;}
1049  for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*6+1);j<=((rbx-1)*6+6);j++)for(int k=1;k<=2;k++){
1050  double val,rms,time,time_rms;
1051  double TIME,TIME_RMS;
1052  if(!hf_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1053  if(!hf_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1054  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1055  }
1056  }
1057  if(sd==HcalOuter){
1058  if(side==0){
1059  eta_min=-4,eta_max=4;
1060  if(rbx==1){
1061  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++){
1062  double val,rms,time,time_rms;
1063  double TIME,TIME_RMS;
1064  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1065  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1066  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1067  }
1068  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=4;j++){
1069  double val,rms,time,time_rms;
1070  double TIME,TIME_RMS;
1071  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1072  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1073  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1074  }
1075 
1076  }else{
1077  for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*6-1);j<=((rbx-1)*6+4);j++){
1078  double val,rms,time,time_rms;
1079  double TIME,TIME_RMS;
1080  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1081  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1082  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1083  }
1084  }
1085  }
1086  if(side==-1){ eta_min=-10,eta_max=-5;}
1087  if(side==-2){ eta_min=-15,eta_max=-11;}
1088  if(side==1) { eta_min=5, eta_max=10;}
1089  if(side==2) { eta_min=11, eta_max=15;}
1090  if(side!=0){
1091  if(rbx==1){
1092  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++){
1093  double val,rms,time,time_rms;
1094  double TIME,TIME_RMS;
1095  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1096  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1097  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1098  }
1099  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=10;j++){
1100  double val,rms,time,time_rms;
1101  double TIME,TIME_RMS;
1102  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1103  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1104  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1105  }
1106 
1107  }else{
1108  for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*12-1);j<=((rbx-1)*12+10);j++){
1109  double val,rms,time,time_rms;
1110  double TIME,TIME_RMS;
1111  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1112  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1113  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1114  }
1115  }
1116  }
1117  }
1118  if(n<10) return false;
1119  *ave=xt/n;
1120  *rms=sqrt(xxt/n-(xt*xt)/(n*n));
1121  return true;
1122 }
int i
Definition: DBlmapReader.cc:9
T sqrt(T t)
Definition: SSEVec.h:48
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
HcalDetDiagLaserData hb_data[85][72][4]
double sd
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
bool HcalDetDiagLaserMonitor::get_ave_subdet ( int  sd,
float *  ave_t,
float *  ave_e,
float *  ave_t_r,
float *  ave_e_r 
)
private

Definition at line 754 of file HcalDetDiagLaserMonitor.cc.

References eta(), HcalDetDiagLaserData::get_average_amp(), HcalDetDiagLaserData::get_average_time(), hb_data, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, hf_data, ho_data, phi, plotscripts::rms(), and cond::rpcobgas::time.

Referenced by fillProblems().

754  {
755 double T=0,nT=0,E=0,nE=0,Tr=0,nTr=0,Er=0,nEr=0;
756  if(sd==HcalBarrel) for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){
757  for(int depth=1;depth<=2;depth++){
758  if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
759  double ave=0,rms=0,time=0,time_rms=0;
760  hb_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
761  hb_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
762  T+=time; nT++; E+=ave; nE++;
763  if(hb_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
764  Tr+=time; nTr++; Er+=ave; nEr++;}
765  }
766  }
767  }
768  // HE histograms
769  if(sd==HcalEndcap) for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
770  for(int depth=1;depth<=3;depth++){
771  if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
772  double ave=0; double rms=0; double time=0; double time_rms=0;
773  he_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
774  he_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
775  T+=time; nT++; E+=ave; nE++;
776  if(he_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
777  Tr+=time; nTr++; Er+=ave; nEr++;}
778  }
779  }
780  }
781  // HF histograms
782  if(sd==HcalForward) for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
783  for(int depth=1;depth<=2;depth++){
784  if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
785  double ave=0; double rms=0; double time=0; double time_rms=0;
786  hf_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
787  hf_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
788  T+=time; nT++; E+=ave; nE++;
789  if(hf_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
790  Tr+=time; nTr++; Er+=ave; nEr++;}
791  }
792  }
793  }
794  // HO histograms
795  if(sd==HcalOuter) for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
796  for(int depth=4;depth<=4;depth++){
797  if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
798  double ave=0; double rms=0; double time=0; double time_rms=0;
799  ho_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
800  ho_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
801  T+=time; nT++; E+=ave; nE++;
802  if(ho_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
803  Tr+=time; nTr++; Er+=ave; nEr++;}
804  }
805  }
806  }
807  if(nT<200 || nE<200 || nTr<200 || nEr<200) return false;
808  *ave_t=T/nT;
809  *ave_e=E/nE;
810  *ave_t_r=Tr/nTr;
811  *ave_e_r=Er/nEr;
812  return true;
813 }
bool get_average_amp(double *ave, double *rms)
T eta() const
bool get_average_time(double *ave, double *rms)
HcalDetDiagLaserData hb_data[85][72][4]
double sd
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
long double T
HcalDetDiagLaserData ho_data[85][72][4]
Definition: DDAxes.h:10
HcalDetDiagLaserData* HcalDetDiagLaserMonitor::GetCalib ( std::string  sd,
int  eta,
int  phi 
)
inlineprivate

Definition at line 253 of file HcalDetDiagLaserMonitor.cc.

References funct::abs(), calib_data, ETA, PHI, and SD.

253  {
254  int SD=0,ETA=0,PHI=0;
255  if(sd.compare("HB")==0) SD=1;
256  if(sd.compare("HE")==0) SD=2;
257  if(sd.compare("HO")==0) SD=3;
258  if(sd.compare("HF")==0) SD=4;
259  if(SD==1 || SD==2){
260  if(eta>0) ETA=1; else ETA=-1;
261  if(phi==71 ||phi==72 || phi==1 || phi==2) PHI=71; else PHI=((phi-3)/4)*4+3;
262  }else if(SD==3){
263  if(abs(eta)<=4){
264  ETA=0;
265  if(phi==71 ||phi==72 || phi==1 || phi==2 || phi==3 || phi==4) PHI=71; else PHI=((phi-5)/6)*6+5;
266  }else{
267  if(abs(eta)>4 && abs(eta)<=10) ETA=1;
268  if(abs(eta)>10 && abs(eta)<=15) ETA=2;
269  if(eta<0) ETA=-ETA;
270  if(phi==71 ||phi==72 || (phi>=1 && phi<=10)) PHI=71; else PHI=((phi-11)/12)*12+11;
271  }
272  }else if(SD==4){
273  if(eta>0) ETA=1; else ETA=-1;
274  if(phi>=1 && phi<=18) PHI=1;
275  if(phi>=19 && phi<=36) PHI=19;
276  if(phi>=37 && phi<=54) PHI=37;
277  if(phi>=55 && phi<=72) PHI=55;
278  }
279  return &calib_data[SD][ETA+2][PHI-1];
280  };
T eta() const
static const float SD[]
Definition: sicif.h:67
#define ETA
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double sd
#define PHI
HcalDetDiagLaserData calib_data[5][5][72]
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::LoadDataset ( )
private

Definition at line 1796 of file HcalDetDiagLaserMonitor.cc.

References calib_data, createHTMLonly, dataset_seq_number, DatasetName, reco::tau::disc::Eta(), patZpeak::events, f, MonitorElement::Fill(), hb_data, he_data, hf_data, ho_data, ievt_, meEVT_, meRUN_, nHB, nHE, nHF, nHO, colinearityKinematic::Phi, plotscripts::rms(), DTTTrigCorrFirst::run, run_number, HcalDetDiagLaserData::set_data(), HcalDetDiagLaserData::set_statistics(), HcalDetDiagLaserData::set_statistics1(), lumiQTWidget::t, and cond::rpcobgas::time.

Referenced by beginRun().

1796  {
1797 double amp,rms,time,time_rms;
1798 int Eta,Phi,Depth,Statistic;
1799 char subdet[10];
1800 TFile *f;
1801  if(DatasetName.size()==0) return;
1802  createHTMLonly=true;
1803  if(gSystem->AccessPathName(DatasetName.c_str())) return;
1804  f = new TFile(DatasetName.c_str(),"READ");
1805 
1806  if(!f->IsOpen()) return ;
1807 
1808  TTree* t=0;
1809  t=(TTree*)f->Get("HCAL Laser data");
1810  if(!t) return;
1811  t->SetBranchAddress("Subdet", subdet);
1812  t->SetBranchAddress("eta", &Eta);
1813  t->SetBranchAddress("phi", &Phi);
1814  t->SetBranchAddress("depth", &Depth);
1815  t->SetBranchAddress("amp", &amp);
1816  t->SetBranchAddress("rms", &rms);
1817  t->SetBranchAddress("time", &time);
1818  t->SetBranchAddress("time_rms", &time_rms);
1819  t->SetBranchAddress("statistic",&Statistic);
1820  for(int ievt=0;ievt<t->GetEntries();ievt++){
1821  t->GetEntry(ievt);
1822  if(strcmp(subdet,"HB")==0){ nHB++;
1823  hb_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1824  hb_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1825  hb_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1826  }
1827  if(strcmp(subdet,"HE")==0){ nHE++;
1828  he_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1829  he_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1830  he_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1831  }
1832  if(strcmp(subdet,"HO")==0){ nHO++;
1833  ho_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1834  ho_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1835  ho_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1836  }
1837  if(strcmp(subdet,"HF")==0){ nHF++;
1838  hf_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1839  hf_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1840  hf_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1841  }
1842  if(strcmp(subdet,"CALIB_HB")==0){
1843  calib_data[1][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1844  calib_data[1][Eta+2][Phi-1].set_statistics(Statistic);
1845  calib_data[1][Eta+2][Phi-1].set_statistics1(Statistic);
1846  }
1847  if(strcmp(subdet,"CALIB_HE")==0){
1848  calib_data[2][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1849  calib_data[2][Eta+2][Phi-1].set_statistics(Statistic);
1850  calib_data[2][Eta+2][Phi-1].set_statistics1(Statistic);
1851  }
1852  if(strcmp(subdet,"CALIB_HO")==0){
1853  calib_data[3][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1854  calib_data[3][Eta+2][Phi-1].set_statistics(Statistic);
1855  calib_data[3][Eta+2][Phi-1].set_statistics1(Statistic);
1856  }
1857  if(strcmp(subdet,"CALIB_HF")==0){
1858  calib_data[4][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1859  calib_data[4][Eta+2][Phi-1].set_statistics(Statistic);
1860  calib_data[4][Eta+2][Phi-1].set_statistics1(Statistic);
1861  }
1862  }
1863  TObjString *STR1=(TObjString *)f->Get("run number");
1864  if(STR1){ int run; sscanf(STR1->String(),"%i",&run); meRUN_->Fill(run); run_number=run;}
1865 
1866  TObjString *STR2=(TObjString *)f->Get("Total events processed");
1867  if(STR2){ int events; sscanf(STR2->String(),"%i",&events); meEVT_->Fill(events); ievt_=events;}
1868 
1869  TObjString *STR3=(TObjString *)f->Get("Dataset number");
1870  if(STR3){ int ds; sscanf(STR3->String(),"%i",&ds); dataset_seq_number=ds;}
1871  f->Close();
1872 }
void Fill(long long x)
double f[11][100]
HcalDetDiagLaserData hb_data[85][72][4]
HcalDetDiagLaserData hf_data[85][72][4]
tuple events
Definition: patZpeak.py:19
void set_data(float val, float rms, float time, float time_rms)
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
void HcalDetDiagLaserMonitor::LoadReference ( )
private

Definition at line 1759 of file HcalDetDiagLaserMonitor.cc.

References calib_data, reco::tau::disc::Eta(), f, hb_data, he_data, hf_data, ho_data, IsReference, colinearityKinematic::Phi, ReferenceData, ReferenceRun, plotscripts::rms(), HcalDetDiagLaserData::set_reference(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, and cond::rpcobgas::time.

Referenced by beginRun().

1759  {
1760 double amp,rms,time,time_rms;
1761 int Eta,Phi,Depth;
1762 char subdet[10];
1763 TFile *f;
1764  if(gSystem->AccessPathName(ReferenceData.c_str())) return;
1765  f = new TFile(ReferenceData.c_str(),"READ");
1766 
1767  if(!f->IsOpen()) return ;
1768  TObjString *STR=(TObjString *)f->Get("run number");
1769 
1770  if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
1771 
1772  TTree* t=(TTree*)f->Get("HCAL Laser data");
1773  if(!t) return;
1774  t->SetBranchAddress("Subdet", subdet);
1775  t->SetBranchAddress("eta", &Eta);
1776  t->SetBranchAddress("phi", &Phi);
1777  t->SetBranchAddress("depth", &Depth);
1778  t->SetBranchAddress("amp", &amp);
1779  t->SetBranchAddress("rms", &rms);
1780  t->SetBranchAddress("time", &time);
1781  t->SetBranchAddress("time_rms", &time_rms);
1782  for(int ievt=0;ievt<t->GetEntries();ievt++){
1783  t->GetEntry(ievt);
1784  if(strcmp(subdet,"HB")==0) hb_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1785  if(strcmp(subdet,"HE")==0) he_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1786  if(strcmp(subdet,"HO")==0) ho_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1787  if(strcmp(subdet,"HF")==0) hf_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1788  if(strcmp(subdet,"CALIB_HB")==0) calib_data[1][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1789  if(strcmp(subdet,"CALIB_HE")==0) calib_data[2][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1790  if(strcmp(subdet,"CALIB_HO")==0) calib_data[3][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1791  if(strcmp(subdet,"CALIB_HF")==0) calib_data[4][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1792  }
1793  f->Close();
1794  IsReference=true;
1795 }
void set_reference(float val, float rms, float time, float time_rms)
double f[11][100]
HcalDetDiagLaserData hb_data[85][72][4]
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
void HcalDetDiagLaserMonitor::SaveRaddamData ( )
private

Definition at line 1874 of file HcalDetDiagLaserMonitor.cc.

References adc2fC, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, dataset_seq_number, Raddam_ch::depth, Raddam_ch::eta, eta(), i, j, N, n, OutputFilePath, Overwrite, phi, Raddam_ch::phi, run_number, S1, HcalRaddamData::s1_adc, HcalRaddamData::S1BINWIDTH, HcalRaddamData::S1CHI2, HcalRaddamData::S1FITMEAN, HcalRaddamData::S1FITMEANER, HcalRaddamData::S1FITSIGMA, HcalRaddamData::S1MEAN, HcalRaddamData::S1NDF, HcalRaddamData::S1RMS, S2, HcalRaddamData::s2_adc, HcalRaddamData::S2BINWIDTH, HcalRaddamData::S2CHI2, HcalRaddamData::S2FITMEAN, HcalRaddamData::S2FITMEANER, HcalRaddamData::S2FITSIGMA, HcalRaddamData::S2MEAN, HcalRaddamData::S2NDF, HcalRaddamData::S2RMS, AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, interactiveExample::theFile, cond::rpcobgas::time, HcalRaddamData::TOTEVNT, xmlFile(), and XmlFilePath.

Referenced by endRun().

1874  {
1875 float adc_range[20]={14,28,40,52,67,132,202,262,322,397,722,1072,1372,1672,2047,3672,5422,6922,8422,10297};
1876 int adc_bins[20]={1,2,3,4,5,5,10,15,20,25,25,50,75,100,125,125,250,375,500,625};
1877 char str[100];
1878  TF1 *fitFunc = new TF1("fitFunc","gaus");
1879  if(fitFunc==0) return;
1880  for(int i=0;i<56;i++){
1881  float sum1=0,sum2=0,n=0;
1882  S1[i]=S2[i]=0;
1883  for(int j=0;j<128;j++){
1884  sum1+=(adc2fC[j]-2.5)*Raddam_data[i].s1_adc[j];
1885  sum2+=(adc2fC[j]-2.5)*Raddam_data[i].s2_adc[j];
1886  n+=Raddam_data[i].s1_adc[j];
1887  }
1888  if(n<100) continue;
1889  sum1=sum1/n;
1890  sum2=sum2/n;
1891  int N=0;
1892  int Ws1=1,Ws2=1;
1893  for(N=1;N<19;N++) if(sum1>adc_range[N-1] && sum1<adc_range[N]) break;
1894  Ws1=adc_bins[N+1];
1895  for(N=1;N<19;N++) if(sum2>adc_range[N-1] && sum2<adc_range[N]) break;
1896  Ws2=adc_bins[N+1];
1897  sprintf(str,"Raddam(%i,%i,%i) S1",RADDAM_CH[i].eta,RADDAM_CH[i].phi,RADDAM_CH[i].depth);
1898  S1[i]=new TH1F(str,str,10000/Ws1,0,10000);
1899  sprintf(str,"Raddam(%i,%i,%i) S2",RADDAM_CH[i].eta,RADDAM_CH[i].phi,RADDAM_CH[i].depth);
1900  S2[i]=new TH1F(str,str,10000/Ws1,0,10000);
1901  for(int j=0;j<128;j++){
1902  S1[i]->Fill(adc2fC[j]-2.5,Raddam_data[i].s1_adc[j]);
1903  S2[i]->Fill(adc2fC[j]-2.5,Raddam_data[i].s2_adc[j]);
1904  }
1905  double parm[3];
1906  S1[i]->Fit("fitFunc");
1907  S1[i]->GetFunction("fitFunc")->GetParameters(parm);
1908  Raddam_data[i].S1MEAN=S1[i]->GetMean();
1909  Raddam_data[i].S1RMS=S1[i]->GetRMS();
1910  Raddam_data[i].S1FITMEAN=parm[1];
1911  Raddam_data[i].S1FITMEANER=S1[i]->GetFunction("fitFunc")->GetParError(1);
1912  Raddam_data[i].S1FITSIGMA=parm[2];
1913  Raddam_data[i].S1CHI2=S1[i]->GetFunction("fitFunc")->GetChisquare();
1914  Raddam_data[i].S1NDF=S1[i]->GetFunction("fitFunc")->GetNDF();
1915  Raddam_data[i].S1BINWIDTH=Ws1;
1916  S2[i]->Fit("fitFunc");
1917  S2[i]->GetFunction("fitFunc")->GetParameters(parm);
1918  Raddam_data[i].S2MEAN=S2[i]->GetMean();
1919  Raddam_data[i].S2RMS=S2[i]->GetRMS();
1920  Raddam_data[i].S2FITMEAN=parm[1];
1921  Raddam_data[i].S2FITMEANER=S2[i]->GetFunction("fitFunc")->GetParError(1);
1922  Raddam_data[i].S2FITSIGMA=parm[2];
1923  Raddam_data[i].S2CHI2=S2[i]->GetFunction("fitFunc")->GetChisquare();
1924  Raddam_data[i].S2NDF=S2[i]->GetFunction("fitFunc")->GetNDF();
1925  Raddam_data[i].S2BINWIDTH=Ws2;
1926  }
1927  if(XmlFilePath.size()>0){
1928  char TIME[40];
1929  Long_t t; t=time(0); strftime(TIME,30,"%F %T",localtime(&t));
1930  //create XML file
1931  if(!Overwrite){
1932  sprintf(str,"HcalDetDiagRaddam_%i_%i.xml",run_number,dataset_seq_number);
1933  }else{
1934  sprintf(str,"HcalDetDiagRaddam.xml");
1935  }
1936  std::string xmlName=str;
1937  std::ofstream xmlFile;
1938  xmlFile.open(xmlName.c_str());
1939  xmlFile<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n";
1940  xmlFile<<"<ROOT>\n";
1941  xmlFile<<" <HEADER>\n";
1942  xmlFile<<" <TYPE>\n";
1943  xmlFile<<" <EXTENSION_TABLE_NAME>HCAL_RADDAM</EXTENSION_TABLE_NAME>\n";
1944  xmlFile<<" <NAME>HCAL Raddam</NAME>\n";
1945  xmlFile<<" </TYPE>\n";
1946  xmlFile<<" <!-- run details -->\n";
1947  xmlFile<<" <RUN>\n";
1948  xmlFile<<" <RUN_TYPE>TEST LOCAL-RUN</RUN_TYPE>\n";
1949  xmlFile<<" <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
1950  xmlFile<<" <RUN_BEGIN_TIMESTAMP>"<<TIME<<"</RUN_BEGIN_TIMESTAMP>\n";
1951  xmlFile<<" <COMMENT_DESCRIPTION>hcal raddam data</COMMENT_DESCRIPTION>\n";
1952  xmlFile<<" <LOCATION>P5</LOCATION>\n";
1953  xmlFile<<" <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
1954  xmlFile<<" </RUN>\n";
1955  xmlFile<<" </HEADER>\n";
1956  xmlFile<<" <DATA_SET>\n";
1957  xmlFile<<" <COMMENT_DESCRIPTION>Test Raddam data</COMMENT_DESCRIPTION>\n";
1958  xmlFile<<" <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
1959  xmlFile<<" <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
1960  xmlFile<<" <VERSION>Test_Version_1</VERSION>\n";
1961 
1962  for(int i=0;i<56;i++){
1963  xmlFile<<" <DATA>\n";
1964  xmlFile<<" <SUBDET>HF</SUBDET>\n";
1965  xmlFile<<" <IETA>"<<RADDAM_CH[i].eta<<"</IETA>\n";
1966  xmlFile<<" <IPHI>"<<RADDAM_CH[i].phi<<"</IPHI>\n";
1967  xmlFile<<" <DEPTH>"<<RADDAM_CH[i].depth<<"</DEPTH>\n";
1968 
1969  xmlFile<<" <TOTEVNT>"<<Raddam_data[i].TOTEVNT<<"</TOTEVNT>\n";
1970  xmlFile<<" <CUT1EVNT>"<<Raddam_data[i].CUT1EVNT<<"</CUT1EVNT>\n";
1971  xmlFile<<" <CUT2EVNT>"<<Raddam_data[i].CUT2EVNT<<"</CUT2EVNT>\n";
1972 
1973  xmlFile<<" <S1MEAN>"<<Raddam_data[i].S1MEAN <<"</S1MEAN>\n";
1974  xmlFile<<" <S1RMS>"<<Raddam_data[i].S1RMS <<"</S1RMS>\n";
1975  xmlFile<<" <S1FITMEAN>"<<Raddam_data[i].S1FITMEAN <<"</S1FITMEAN>\n";
1976  xmlFile<<" <S1FITMEANER>"<<Raddam_data[i].S1FITMEANER <<"</S1FITMEANER>\n";
1977  xmlFile<<" <S1FITSIGMA>"<<Raddam_data[i].S1FITSIGMA <<"</S1FITSIGMA>\n";
1978  xmlFile<<" <S1CHI2>"<<Raddam_data[i].S1CHI2 <<"</S1CHI2>\n";
1979  xmlFile<<" <S1NDF>"<<Raddam_data[i].S1NDF <<"</S1NDF>\n";
1980  xmlFile<<" <S1BINWIDTH>"<<Raddam_data[i].S1BINWIDTH <<"</S1BINWIDTH>\n";
1981 
1982  xmlFile<<" <S2MEAN>"<<Raddam_data[i].S2MEAN <<"</S2MEAN>\n";
1983  xmlFile<<" <S2RMS>"<<Raddam_data[i].S2RMS <<"</S2RMS>\n";
1984  xmlFile<<" <S2FITMEAN>"<<Raddam_data[i].S2FITMEAN <<"</S2FITMEAN>\n";
1985  xmlFile<<" <S2FITMEANER>"<<Raddam_data[i].S2FITMEANER <<"</S2FITMEANER>\n";
1986  xmlFile<<" <S2FITSIGMA>"<<Raddam_data[i].S2FITSIGMA <<"</S2FITSIGMA>\n";
1987  xmlFile<<" <S2CHI2>"<<Raddam_data[i].S2CHI2 <<"</S2CHI2>\n";
1988  xmlFile<<" <S2NDF>"<<Raddam_data[i].S2NDF <<"</S2NDF>\n";
1989  xmlFile<<" <S2BINWIDTH>"<<Raddam_data[i].S2BINWIDTH <<"</S2BINWIDTH>\n";
1990  xmlFile<<" </DATA>\n";
1991  }
1992  xmlFile<<" </DATA_SET>\n";
1993  xmlFile<<"</ROOT>\n";
1994 
1995  xmlFile.close();
1996  sprintf(str,"zip %s.zip %s",xmlName.c_str(),xmlName.c_str());
1997  system(str);
1998  sprintf(str,"rm -f %s",xmlName.c_str());
1999  system(str);
2000  sprintf(str,"mv -f %s.zip %s",xmlName.c_str(),XmlFilePath.c_str());
2001  system(str);
2002  }
2003  if(OutputFilePath.size()>0){
2004  if(!Overwrite){
2005  sprintf(str,"%sHcalDetDiagRaddamData_run%06i_%i.root",OutputFilePath.c_str(),run_number,dataset_seq_number);
2006  }else{
2007  sprintf(str,"%sHcalDetDiagRaddamData.root",OutputFilePath.c_str());
2008  }
2009  TFile *theFile = new TFile(str, "RECREATE");
2010  if(!theFile->IsOpen()) return;
2011  theFile->cd();
2012  for(int i=0;i<56;i++){
2013  if(S1[i]!=0)S1[i]->Write();
2014  if(S2[i]!=0)S2[i]->Write();
2015  }
2016  theFile->Write();
2017  theFile->Close();
2018  }
2019 }
int i
Definition: DBlmapReader.cc:9
HcalRaddamData Raddam_data[56]
T eta() const
static const float adc2fC[128]
Raddam_ch RADDAM_CH[56]
int j
Definition: DBlmapReader.cc:9
#define N
Definition: blowfish.cc:9
bool xmlFile(const std::string fParam)
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::SaveReference ( )
private

Definition at line 1428 of file HcalDetDiagLaserMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), calib_data, dataset_seq_number, HcalDetId::depth(), DetId::det(), cond::rpcobgas::detid, alignCSCRings::e, emap, reco::tau::disc::Eta(), eta(), patZpeak::events, HcalDetDiagLaserData::get_average_amp1(), HcalDetDiagLaserData::get_average_time1(), HcalDetDiagLaserData::get_statistics1(), HcalDetDiagLaserData::get_status(), hb_data, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalOuter, he_data, hf_data, ho_data, i, HcalDetId::ieta(), ievt_, HcalDetId::iphi(), j, gen::k, HcalElectronicsMap::lookup(), OutputFilePath, Overwrite, phi, colinearityKinematic::Phi, plotscripts::rms(), DTTTrigCorrFirst::run, run_number, sd, step1_ZMM_7Tev::Status, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), lumiQTWidget::t, interactiveExample::theFile, cond::rpcobgas::time, diffTreeTool::tree, xmlFile(), and XmlFilePath.

Referenced by analyze(), and endRun().

1428  {
1429 double amp,rms,Time,time_rms;
1430 int Eta,Phi,Depth,Statistic,Status=0;
1431 char Subdet[10],str[500];
1432  if(OutputFilePath.size()>0){
1433  if(!Overwrite){
1434  sprintf(str,"%sHcalDetDiagLaserData_run%06i_%i.root",OutputFilePath.c_str(),run_number,dataset_seq_number);
1435  }else{
1436  sprintf(str,"%sHcalDetDiagLaserData.root",OutputFilePath.c_str());
1437  }
1438  TFile *theFile = new TFile(str, "RECREATE");
1439  if(!theFile->IsOpen()) return;
1440  theFile->cd();
1441  sprintf(str,"%d",run_number); TObjString run(str); run.Write("run number");
1442  sprintf(str,"%d",ievt_); TObjString events(str); events.Write("Total events processed");
1443  sprintf(str,"%d",dataset_seq_number); TObjString dsnum(str); dsnum.Write("Dataset number");
1444  Long_t t; t=time(0); strftime(str,30,"%F %T",localtime(&t)); TObjString tm(str); tm.Write("Dataset creation time");
1445 
1446  TTree *tree =new TTree("HCAL Laser data","HCAL Laser data");
1447  if(tree==0) return;
1448  tree->Branch("Subdet", &Subdet, "Subdet/C");
1449  tree->Branch("eta", &Eta, "Eta/I");
1450  tree->Branch("phi", &Phi, "Phi/I");
1451  tree->Branch("depth", &Depth, "Depth/I");
1452  tree->Branch("statistic",&Statistic, "Statistic/I");
1453  tree->Branch("status", &Status, "Status/I");
1454  tree->Branch("amp", &amp, "amp/D");
1455  tree->Branch("rms", &rms, "rms/D");
1456  tree->Branch("time", &Time, "time/D");
1457  tree->Branch("time_rms", &time_rms, "time_rms/D");
1458  sprintf(Subdet,"HB");
1459  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
1460  if((Statistic=hb_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1461  Eta=eta; Phi=phi; Depth=depth;
1462  Status=hb_data[eta+42][phi-1][depth-1].get_status();
1463  hb_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1464  hb_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1465  tree->Fill();
1466  }
1467  }
1468  sprintf(Subdet,"HE");
1469  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=3;depth++){
1470  if((Statistic=he_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1471  Eta=eta; Phi=phi; Depth=depth;
1472  Status=he_data[eta+42][phi-1][depth-1].get_status();
1473  he_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1474  he_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1475  tree->Fill();
1476  }
1477  }
1478  sprintf(Subdet,"HO");
1479  for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++) for(int depth=4;depth<=4;depth++){
1480  if((Statistic=ho_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1481  Eta=eta; Phi=phi; Depth=depth;
1482  Status=ho_data[eta+42][phi-1][depth-1].get_status();
1483  ho_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1484  ho_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1485  tree->Fill();
1486  }
1487  }
1488  sprintf(Subdet,"HF");
1489  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
1490  if((Statistic=hf_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1491  Eta=eta; Phi=phi; Depth=depth;
1492  Status=hf_data[eta+42][phi-1][depth-1].get_status();
1493  hf_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1494  hf_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1495  tree->Fill();
1496  }
1497  }
1498  sprintf(Subdet,"CALIB_HB");
1499  for(int eta=-1;eta<=1;eta++) for(int phi=1;phi<=72;phi++){
1500  if((Statistic=calib_data[1][eta+2][phi-1].get_statistics1())>10){
1501  Eta=eta; Phi=phi; Depth=0;
1502  Status=calib_data[1][eta+2][phi-1].get_status();
1503  calib_data[1][eta+2][phi-1].get_average_amp1(&amp,&rms);
1504  calib_data[1][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1505  tree->Fill();
1506  }
1507  }
1508  sprintf(Subdet,"CALIB_HE");
1509  for(int eta=-1;eta<=1;eta++) for(int phi=1;phi<=72;phi++){
1510  if((Statistic=calib_data[2][eta+2][phi-1].get_statistics1())>10){
1511  Eta=eta; Phi=phi; Depth=0;
1512  Status=calib_data[2][eta+2][phi-1].get_status();
1513  calib_data[2][eta+2][phi-1].get_average_amp1(&amp,&rms);
1514  calib_data[2][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1515  tree->Fill();
1516  }
1517  }
1518  sprintf(Subdet,"CALIB_HO");
1519  for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
1520  if((Statistic=calib_data[3][eta+2][phi-1].get_statistics1())>10){
1521  Eta=eta; Phi=phi; Depth=0;
1522  Status=calib_data[3][eta+2][phi-1].get_status();
1523  calib_data[3][eta+2][phi-1].get_average_amp1(&amp,&rms);
1524  calib_data[3][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1525  tree->Fill();
1526  }
1527  }
1528  sprintf(Subdet,"CALIB_HF");
1529  for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
1530  if((Statistic=calib_data[4][eta+2][phi-1].get_statistics1())>10){
1531  Eta=eta; Phi=phi; Depth=0;
1532  Status=calib_data[4][eta+2][phi-1].get_status();
1533  calib_data[4][eta+2][phi-1].get_average_amp1(&amp,&rms);
1534  calib_data[4][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1535  tree->Fill();
1536  }
1537  }
1538  theFile->Write();
1539  theFile->Close();
1540  }
1541  if(XmlFilePath.size()>0){
1542  char TIME[40];
1543  Long_t t; t=time(0); strftime(TIME,30,"%F %T",localtime(&t));
1544  //create XML file
1545  if(!Overwrite){
1546  sprintf(str,"HcalDetDiagLaser_%i_%i.xml",run_number,dataset_seq_number);
1547  }else{
1548  sprintf(str,"HcalDetDiagLaser.xml");
1549  }
1550  std::string xmlName=str;
1551  std::ofstream xmlFile;
1552  xmlFile.open(xmlName.c_str());
1553 
1554  xmlFile<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
1555  xmlFile<<"<ROOT>\n";
1556  xmlFile<<" <HEADER>\n";
1557  xmlFile<<" <HINTS mode='only-det-root'/>\n";
1558  xmlFile<<" <TYPE>\n";
1559  xmlFile<<" <EXTENSION_TABLE_NAME>HCAL_DETMON_LED_LASER_V1</EXTENSION_TABLE_NAME>\n";
1560  xmlFile<<" <NAME>HCAL Laser HBHE HPD [abort gap global]</NAME>\n";
1561  xmlFile<<" </TYPE>\n";
1562  xmlFile<<" <!-- run details -->\n";
1563  xmlFile<<" <RUN>\n";
1564  xmlFile<<" <RUN_TYPE>GLOBAL-RUN</RUN_TYPE>\n";
1565  xmlFile<<" <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
1566  xmlFile<<" <RUN_BEGIN_TIMESTAMP>2009-01-01 00:00:00</RUN_BEGIN_TIMESTAMP>\n";
1567  xmlFile<<" <COMMENT_DESCRIPTION>hcal laser data</COMMENT_DESCRIPTION>\n";
1568  xmlFile<<" <LOCATION>P5</LOCATION>\n";
1569  xmlFile<<" <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
1570  xmlFile<<" </RUN>\n";
1571  xmlFile<<" </HEADER>\n";
1572  xmlFile<<" <DATA_SET>\n";
1573  xmlFile<<" <!-- optional dataset metadata -->\n\n";
1574  xmlFile<<" <SET_NUMBER>"<<dataset_seq_number<<"</SET_NUMBER>\n";
1575  xmlFile<<" <SET_BEGIN_TIMESTAMP>2009-01-01 00:00:00</SET_BEGIN_TIMESTAMP>\n";
1576  xmlFile<<" <SET_END_TIMESTAMP>2009-01-01 00:00:00</SET_END_TIMESTAMP>\n";
1577  xmlFile<<" <NUMBER_OF_EVENTS_IN_SET>"<<ievt_<<"</NUMBER_OF_EVENTS_IN_SET>\n";
1578  xmlFile<<" <COMMENT_DESCRIPTION>Automatic DQM output</COMMENT_DESCRIPTION>\n";
1579  xmlFile<<" <DATA_FILE_NAME>"<< xmlName <<"</DATA_FILE_NAME>\n";
1580  xmlFile<<" <IMAGE_FILE_NAME>data plot url or file path</IMAGE_FILE_NAME>\n";
1581  xmlFile<<" <!-- who and when created this dataset-->\n\n";
1582  xmlFile<<" <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
1583  xmlFile<<" <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
1584  xmlFile<<" <!-- version (string) and subversion (number) -->\n";
1585  xmlFile<<" <!-- fields are used to read data back from the database -->\n\n";
1586  xmlFile<<" <VERSION>"<<run_number<<dataset_seq_number<<"</VERSION>\n";
1587  xmlFile<<" <SUBVERSION>1</SUBVERSION>\n";
1588  xmlFile<<" <!-- Assign predefined dataset attributes -->\n\n";
1589  xmlFile<<" <PREDEFINED_ATTRIBUTES>\n";
1590  xmlFile<<" <ATTRIBUTE>\n";
1591  xmlFile<<" <NAME>HCAL Dataset Status</NAME>\n";
1592  xmlFile<<" <VALUE>VALID</VALUE>\n";
1593  xmlFile<<" </ATTRIBUTE>\n";
1594  xmlFile<<" </PREDEFINED_ATTRIBUTES>\n";
1595  xmlFile<<" <!-- multiple data block records -->\n\n";
1596 
1597  std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
1598  for(std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
1599  DetId detid=emap->lookup(*eid);
1600  if (detid.det()!=DetId::Hcal) continue;
1601  HcalGenericDetId gid(emap->lookup(*eid));
1602  if(!(!(gid.null()) &&
1603  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
1604  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
1605  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
1606  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
1607  int eta,phi,depth;
1608  std::string subdet="";
1609  HcalDetId hid(detid);
1610  eta=hid.ieta();
1611  phi=hid.iphi();
1612  depth=hid.depth();
1613 
1614  double e=0,e_rms=0,t=0,t_rms=0;
1615  if(detid.subdetId()==HcalBarrel){
1616  subdet="HB";
1617  Statistic=hb_data[eta+42][phi-1][depth-1].get_statistics1();
1618  Status =hb_data[eta+42][phi-1][depth-1].get_status();
1619  hb_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1620  hb_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1621  }else if(detid.subdetId()==HcalEndcap){
1622  subdet="HE";
1623  Statistic=he_data[eta+42][phi-1][depth-1].get_statistics1();
1624  Status =he_data[eta+42][phi-1][depth-1].get_status();
1625  he_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1626  he_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1627  }else if(detid.subdetId()==HcalForward){
1628  subdet="HF";
1629  Statistic=hf_data[eta+42][phi-1][depth-1].get_statistics1();
1630  Status =hf_data[eta+42][phi-1][depth-1].get_status();
1631  hf_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1632  hf_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1633  }else if(detid.subdetId()==HcalOuter){
1634  subdet="HO";
1635  Statistic=ho_data[eta+42][phi-1][depth-1].get_statistics1();
1636  Status =ho_data[eta+42][phi-1][depth-1].get_status();
1637  ho_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1638  ho_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1639  }else continue;
1640  xmlFile<<" <DATA>\n";
1641  xmlFile<<" <NUMBER_OF_EVENTS_USED>"<<Statistic<<"</NUMBER_OF_EVENTS_USED>\n";
1642  xmlFile<<" <SIGNAL_MEAN>"<<e<<"</SIGNAL_MEAN>\n";
1643  xmlFile<<" <SIGNAL_RMS>"<<e_rms<<"</SIGNAL_RMS>\n";
1644  xmlFile<<" <TIME_MEAN>"<<t<<"</TIME_MEAN>\n";
1645  xmlFile<<" <TIME_RMS>"<<t_rms<<"</TIME_RMS>\n";
1646  xmlFile<<" <CHANNEL_STATUS_WORD>"<<Status<<"</CHANNEL_STATUS_WORD>\n";
1647  xmlFile<<" <CHANNEL_OBJECTNAME>HcalDetId</CHANNEL_OBJECTNAME>\n";
1648  xmlFile<<" <SUBDET>"<<subdet<<"</SUBDET>\n";
1649  xmlFile<<" <IETA>"<<eta<<"</IETA>\n";
1650  xmlFile<<" <IPHI>"<<phi<<"</IPHI>\n";
1651  xmlFile<<" <DEPTH>"<<depth<<"</DEPTH>\n";
1652  xmlFile<<" <TYPE>0</TYPE>\n";
1653  xmlFile<<" </DATA>\n";
1654  }
1656  xmlFile<<" </DATA_SET>\n";
1657  xmlFile<<"</ROOT>\n";
1658  xmlFile.close();
1659 
1660 
1661  //create CALIB XML file
1662  sprintf(str,"HcalDetDiagLaserCalib_%i_%i.xml",run_number,dataset_seq_number);
1663  std::string xmlNameCalib=str;
1664  std::ofstream xmlFileCalib;
1665  xmlFileCalib.open(xmlNameCalib.c_str());
1666 
1667  xmlFileCalib<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
1668  xmlFileCalib<<"<ROOT>\n";
1669  xmlFileCalib<<" <HEADER>\n";
1670  xmlFileCalib<<" <HINTS mode='only-det-root'/>\n";
1671  xmlFileCalib<<" <TYPE>\n";
1672  xmlFileCalib<<" <EXTENSION_TABLE_NAME>HCAL_DETMON_LED_LASER_V1</EXTENSION_TABLE_NAME>\n";
1673  xmlFileCalib<<" <NAME>HCAL Laser CALIB [abort gap global]</NAME>\n";
1674  xmlFileCalib<<" </TYPE>\n";
1675  xmlFileCalib<<" <!-- run details -->\n";
1676  xmlFileCalib<<" <RUN>\n";
1677  xmlFileCalib<<" <RUN_TYPE>Global-RUN</RUN_TYPE>\n";
1678  xmlFileCalib<<" <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
1679  xmlFileCalib<<" <RUN_BEGIN_TIMESTAMP>2009-01-01 00:00:00</RUN_BEGIN_TIMESTAMP>\n";
1680  xmlFileCalib<<" <COMMENT_DESCRIPTION>hcal Laser CALIB data</COMMENT_DESCRIPTION>\n";
1681  xmlFileCalib<<" <LOCATION>P5</LOCATION>\n";
1682  xmlFileCalib<<" <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
1683  xmlFileCalib<<" </RUN>\n";
1684  xmlFileCalib<<" </HEADER>\n";
1685  xmlFileCalib<<" <DATA_SET>\n";
1686  xmlFileCalib<<" <!-- optional dataset metadata -->\n\n";
1687  xmlFileCalib<<" <SET_NUMBER>"<<dataset_seq_number<<"</SET_NUMBER>\n";
1688  xmlFileCalib<<" <SET_BEGIN_TIMESTAMP>2009-01-01 00:00:00</SET_BEGIN_TIMESTAMP>\n";
1689  xmlFileCalib<<" <SET_END_TIMESTAMP>2009-01-01 00:00:00</SET_END_TIMESTAMP>\n";
1690  xmlFileCalib<<" <NUMBER_OF_EVENTS_IN_SET>"<<ievt_<<"</NUMBER_OF_EVENTS_IN_SET>\n";
1691  xmlFileCalib<<" <COMMENT_DESCRIPTION>Automatic DQM output</COMMENT_DESCRIPTION>\n";
1692  xmlFileCalib<<" <DATA_FILE_NAME>"<< xmlNameCalib <<"</DATA_FILE_NAME>\n";
1693  xmlFileCalib<<" <IMAGE_FILE_NAME>data plot url or file path</IMAGE_FILE_NAME>\n";
1694  xmlFileCalib<<" <!-- who and when created this dataset-->\n\n";
1695  xmlFileCalib<<" <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
1696  xmlFileCalib<<" <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
1697  xmlFileCalib<<" <!-- version (string) and subversion (number) -->\n";
1698  xmlFileCalib<<" <!-- fields are used to read data back from the database -->\n\n";
1699  xmlFileCalib<<" <VERSION>"<<run_number<<dataset_seq_number<<"</VERSION>\n";
1700  xmlFileCalib<<" <SUBVERSION>1</SUBVERSION>\n";
1701  xmlFileCalib<<" <!-- Assign predefined dataset attributes -->\n\n";
1702  xmlFileCalib<<" <PREDEFINED_ATTRIBUTES>\n";
1703  xmlFileCalib<<" <ATTRIBUTE>\n";
1704  xmlFileCalib<<" <NAME>HCAL Dataset Status</NAME>\n";
1705  xmlFileCalib<<" <VALUE>VALID</VALUE>\n";
1706  xmlFileCalib<<" </ATTRIBUTE>\n";
1707  xmlFileCalib<<" </PREDEFINED_ATTRIBUTES>\n";
1708  xmlFileCalib<<" <!-- multiple data block records -->\n\n";
1709 
1710  for(int sd=1;sd<=4;sd++) for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
1711  std::string subdet="";
1712  if(sd==1) subdet="HB";
1713  if(sd==2) subdet="HE";
1714  if(sd==3) subdet="HO";
1715  if(sd==4) subdet="HF";
1716  if((calib_data[sd][eta+2][phi-1].get_statistics())>100){
1717  double e=0,e_rms=0,t=0,t_rms=0;
1718  Status=calib_data[sd][eta+2][phi-1].get_status();
1719  Statistic=calib_data[sd][eta+2][phi-1].get_statistics1();
1720  calib_data[sd][eta+2][phi-1].get_average_amp1(&e,&e_rms);
1721  calib_data[sd][eta+2][phi-1].get_average_time1(&t,&t_rms);
1722  xmlFileCalib<<" <DATA>\n";
1723  xmlFileCalib<<" <NUMBER_OF_EVENTS_USED>"<<Statistic<<"</NUMBER_OF_EVENTS_USED>\n";
1724  xmlFileCalib<<" <SIGNAL_MEAN>"<<e<<"</SIGNAL_MEAN>\n";
1725  xmlFileCalib<<" <SIGNAL_RMS>"<<e_rms<<"</SIGNAL_RMS>\n";
1726  xmlFileCalib<<" <TIME_MEAN>"<<t<<"</TIME_MEAN>\n";
1727  xmlFileCalib<<" <TIME_RMS>"<<t_rms<<"</TIME_RMS>\n";
1728  xmlFileCalib<<" <CHANNEL_STATUS_WORD>"<<Status<<"</CHANNEL_STATUS_WORD>\n";
1729  xmlFileCalib<<" <CHANNEL_OBJECTNAME>HcalDetId</CHANNEL_OBJECTNAME>\n";
1730  xmlFileCalib<<" <SUBDET>"<<subdet<<"</SUBDET>\n";
1731  xmlFileCalib<<" <IETA>"<<eta<<"</IETA>\n";
1732  xmlFileCalib<<" <IPHI>"<<phi<<"</IPHI>\n";
1733  xmlFileCalib<<" <DEPTH>"<<0<<"</DEPTH>\n";
1734  xmlFileCalib<<" <TYPE>0</TYPE>\n";
1735  xmlFileCalib<<" </DATA>\n";
1736  }
1737  }
1739  xmlFileCalib<<" </DATA_SET>\n";
1740  xmlFileCalib<<"</ROOT>\n";
1741  xmlFileCalib.close();
1742 
1743  sprintf(str,"zip %s.zip %s %s",xmlName.c_str(),xmlName.c_str(),xmlNameCalib.c_str());
1744  system(str);
1745  sprintf(str,"rm -f %s %s",xmlName.c_str(),xmlNameCalib.c_str());
1746  system(str);
1747  sprintf(str,"mv -f %s.zip %s",xmlName.c_str(),XmlFilePath.c_str());
1748  system(str);
1749 
1750  }
1751  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) hb_data[i][j][k].reset1();
1752  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) he_data[i][j][k].reset1();
1753  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) ho_data[i][j][k].reset1();
1754  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) hf_data[i][j][k].reset1();
1755  for(int i=1;i<=4;i++)for(int j=-2;j<=2;j++)for(int k=1;k<=72;k++)calib_data[i][j][k].reset1();
1756  ievt_=0;
1757  dataset_seq_number++;
1758 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
bool get_average_amp1(double *ave, double *rms)
const HcalElectronicsMap * emap
T eta() const
int j
Definition: DBlmapReader.cc:9
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int k[5][pyjets_maxn]
Definition: DetId.h:18
HcalDetDiagLaserData hb_data[85][72][4]
bool get_average_time1(double *ave, double *rms)
double sd
bool xmlFile(const std::string fParam)
HcalDetDiagLaserData hf_data[85][72][4]
tuple events
Definition: patZpeak.py:19
HcalDetDiagLaserData he_data[85][72][4]
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
Definition: DDAxes.h:10

Member Data Documentation

std::string HcalDetDiagLaserMonitor::baseFolder_
private

Definition at line 319 of file HcalDetDiagLaserMonitor.cc.

HcalDetDiagLaserData HcalDetDiagLaserMonitor::calib_data[5][5][72]
private
bool HcalDetDiagLaserMonitor::createHTMLonly
private
int HcalDetDiagLaserMonitor::dataset_seq_number
private
std::string HcalDetDiagLaserMonitor::DatasetName
private

Definition at line 325 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

const HcalElectronicsMap* HcalDetDiagLaserMonitor::emap
private
MonitorElement* HcalDetDiagLaserMonitor::Energy2Dhbhehf
private

Definition at line 346 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Energy2Dho
private

Definition at line 347 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::hb_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::hb_time_rbx
private

Definition at line 353 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergy
private

Definition at line 331 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergyRMS
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTime
private

Definition at line 332 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTimeRMS
private

Definition at line 334 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::he_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::he_time_rbx
private

Definition at line 354 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::hf_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::hf_time_rbx
private

Definition at line 356 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergy
private

Definition at line 339 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergyRMS
private

Definition at line 341 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTime
private

Definition at line 340 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTimeRMS
private

Definition at line 342 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::ho_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::ho_time_rbx
private

Definition at line 355 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergy
private

Definition at line 335 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergyRMS
private

Definition at line 337 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTime
private

Definition at line 336 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTimeRMS
private

Definition at line 338 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement * HcalDetDiagLaserMonitor::htmlFolder
private

Definition at line 329 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

std::string HcalDetDiagLaserMonitor::htmlOutputPath
private

Definition at line 326 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::ievt_
private
edm::InputTag HcalDetDiagLaserMonitor::inputLabelDigi_
private

Definition at line 288 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::IsReference
private

Definition at line 312 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::map<unsigned int, int> HcalDetDiagLaserMonitor::KnownBadCells_
private

Definition at line 374 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

double HcalDetDiagLaserMonitor::LaserEnergyThreshold
private

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::LaserTimingThreshold
private

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::LocalRun
private

Definition at line 313 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), endRun(), and HcalDetDiagLaserMonitor().

MonitorElement* HcalDetDiagLaserMonitor::meEVT_
private

Definition at line 329 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), beginRun(), and LoadDataset().

MonitorElement * HcalDetDiagLaserMonitor::meRUN_
private

Definition at line 329 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), beginRun(), and LoadDataset().

int HcalDetDiagLaserMonitor::nHB
private

Definition at line 314 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

int HcalDetDiagLaserMonitor::nHBHEchecks
private

Definition at line 306 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHE
private

Definition at line 314 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

int HcalDetDiagLaserMonitor::nHF
private

Definition at line 314 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

int HcalDetDiagLaserMonitor::nHFchecks
private

Definition at line 306 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHO
private

Definition at line 314 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

int HcalDetDiagLaserMonitor::nHOchecks
private

Definition at line 306 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::Online_
private

Definition at line 321 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), endRun(), and HcalDetDiagLaserMonitor().

std::string HcalDetDiagLaserMonitor::OutputFilePath
private
bool HcalDetDiagLaserMonitor::Overwrite
private
std::string HcalDetDiagLaserMonitor::prefixME_
private

Definition at line 320 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy
private

Definition at line 362 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy_val
private

Definition at line 366 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing
private

Definition at line 361 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing_val
private

Definition at line 365 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

std::vector<std::string> HcalDetDiagLaserMonitor::problemnames_
private

Definition at line 363 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

MonitorElement* HcalDetDiagLaserMonitor::Raddam[56]
private

Definition at line 358 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and beginRun().

bool HcalDetDiagLaserMonitor::RaddamRun
private

Definition at line 313 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), endRun(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::RaddamThreshold1
private

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::RaddamThreshold2
private

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dhbhehf
private

Definition at line 350 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dho
private

Definition at line 351 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagLaserMonitor::ReferenceData
private

Definition at line 315 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::string HcalDetDiagLaserMonitor::ReferenceRun
private

Definition at line 316 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and LoadReference().

MonitorElement* HcalDetDiagLaserMonitor::RefRun_
private

Definition at line 330 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dhbhehf
private

Definition at line 348 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dho
private

Definition at line 349 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

int HcalDetDiagLaserMonitor::run_number
private
TH1F* HcalDetDiagLaserMonitor::S1[56]
private

Definition at line 359 of file HcalDetDiagLaserMonitor.cc.

Referenced by SaveRaddamData().

TH1F * HcalDetDiagLaserMonitor::S2[56]
private

Definition at line 359 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and SaveRaddamData().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dhbhehf
private

Definition at line 344 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dho
private

Definition at line 345 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

edm::EDGetTokenT<HcalCalibDigiCollection> HcalDetDiagLaserMonitor::tok_calib_
private

Definition at line 291 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

edm::EDGetTokenT<HBHEDigiCollection> HcalDetDiagLaserMonitor::tok_hbhe_
private

Definition at line 293 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

edm::EDGetTokenT<HFDigiCollection> HcalDetDiagLaserMonitor::tok_hf_
private

Definition at line 295 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

edm::EDGetTokenT<HODigiCollection> HcalDetDiagLaserMonitor::tok_ho_
private

Definition at line 294 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

edm::EDGetTokenT<FEDRawDataCollection> HcalDetDiagLaserMonitor::tok_raw_
private

Definition at line 290 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

edm::EDGetTokenT<HcalTBTriggerData> HcalDetDiagLaserMonitor::tok_tb_
private

Definition at line 292 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

std::string HcalDetDiagLaserMonitor::XmlFilePath
private