test
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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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 251 of file HcalDetDiagLaserMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 381 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.

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

561  {
562 
563 }

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 566 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.

566  {
567  if(createHTMLonly) return;
568  HcalBaseDQMonitor::analyze(iEvent,iSetup); // base class increments ievt_, etc. counters
569 
570 int eta,phi,depth,nTS;
571 static bool HBHEseq,HOseq,HFseq;
572 static int lastHBHEorbit,lastHOorbit,lastHForbit,nChecksHBHE,nChecksHO,nChecksHF,ievt_hbhe,ievt_ho,ievt_hf;
573  if(ievt_==-1){
574  ievt_=0;HBHEseq=HOseq=HFseq=false; lastHBHEorbit=lastHOorbit=lastHForbit=-1;nChecksHBHE=nChecksHO=nChecksHF=0;
575  ievt_hbhe=0,ievt_ho=0,ievt_hf=0;
576  }
577 
578  if(!dbe_) return;
579  bool LaserEvent=false;
580  bool LaserRaddam=false;
581  int orbit=iEvent.orbitNumber();
582  meRUN_->Fill(iEvent.id().run());
583  // for local runs
584  edm::Handle<HcalTBTriggerData> trigger_data;
585  iEvent.getByToken(tok_tb_, trigger_data);
586  if(trigger_data.isValid()){
587  if(trigger_data->wasLaserTrigger()) LaserEvent=true;
588  LocalRun=true;
589  }
590  if(!LocalRun && Online_){
591  if(HBHEseq && (orbit-lastHBHEorbit)>(11223*10) && ievt_hbhe>40){
592  HBHEseq=false;
596  nChecksHBHE++;
597  ievt_hbhe=0;
598  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();
599  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();
600  }
601  if(HOseq && (orbit-lastHOorbit)>(11223*10) && ievt_ho>40){
602  HOseq=false;
605  nChecksHO++;
606  ievt_ho=0;
607  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();
608  }
609  if(HFseq && (orbit-lastHForbit)>(11223*10) && ievt_hf>40){
610  HFseq=false;
613  nChecksHF++;
614  ievt_hf=0;
615  if(nChecksHF==1 || (nChecksHF>1 && ((nChecksHF-1)%12)==0)){
616  SaveReference();
617  }
618  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();
619  }
620  }
621 
622  // Abort Gap laser
623  if(LocalRun==false || LaserEvent==false){
625  iEvent.getByToken(tok_raw_ ,rawdata);
626  // edm::Handle<FEDRawDataCollection> rawdata;
627  // iEvent.getByType(rawdata);
628  //checking FEDs for calibration information
630  const FEDRawData& fedData = rawdata->FEDData(i) ;
631  if ( fedData.size() < 24 ) continue ;
632  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
633  if(value==hc_HBHEHPD){ HBHEseq=true; HOseq=HFseq=false; lastHBHEorbit=orbit; ievt_hbhe++; }
634  if(value==hc_HOHPD){ HOseq=true; HBHEseq=HFseq=false; lastHOorbit=orbit; ievt_ho++; }
635  if(value==hc_HFPMT){ HFseq=true; HBHEseq=HOseq=false; lastHForbit=orbit; ievt_hf++; }
636 
637  if(value==hc_HBHEHPD || value==hc_HOHPD || value==hc_HFPMT){ LaserEvent=true; break;}
638  if(value==hc_RADDAM){ LaserEvent=true; LaserRaddam=true; break;}
639  }
640  }
641  if(!LaserEvent) return;
643  iEvent.getByToken(tok_hbhe_,hbhe);
645  iEvent.getByToken(tok_ho_,ho);
647  iEvent.getByToken(tok_hf_,hf);
649  iEvent.getByToken(tok_calib_, calib);
650 
651  if(LocalRun && LaserEvent){
652  int N=0;
653  if(hf.isValid()){
654  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
655  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth();
656  float e=0;
657  for(int i=0;i<digi->size();i++) e+=adc2fC[digi->sample(i).adc()&0xff]-2.5;
658  if(e>40){ N++;}
659  }
660  }
661  if(N>50 && N<57){ RaddamRun=true; /*LaserRaddam=true;*/}
662  }
663  if(RaddamRun){
664  if(hf.isValid()){
665  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
666  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
667  int N;
668  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
669  if(N==56) continue;
670  float max1=0,max2=0;
671  int nmax1=0,nmax2=0;
672  for(int i=0;i<nTS;i++){
673  if(max1<adc2fC[digi->sample(i).adc()&0xff]){ nmax1=i; max1=adc2fC[digi->sample(i).adc()&0xff]; }
674  }
675  Raddam_data[N].TOTEVNT++;
676  for(int i=0;i<nTS;i++){
677  if(i==nmax1) continue;
678  if(max2<adc2fC[digi->sample(i).adc()&0xff]){ nmax2=i; max2=adc2fC[digi->sample(i).adc()&0xff]; }
679  }
680  if(nmax1>nmax2){
681  int tmp1=nmax2;
682  nmax2=nmax1;nmax1=tmp1;
683  }
684  if(nmax1==0 || nmax2==(nTS-1)) continue;
685  if(nmax2!=(nmax1+1)) continue;
686 
687  if(max1<RaddamThreshold1 || max2<RaddamThreshold1) continue;
689  max1-=2.5; max2-=2.5;
690  float S2=max1+max2;
691  float S4=S2+adc2fC[digi->sample(nmax1-1).adc()&0xff]+adc2fC[digi->sample(nmax2+1).adc()&0xff]-5.0;
692  if((S2/S4)<RaddamThreshold2) continue;
694  Raddam_data[N].s1_adc[digi->sample(nmax1).adc()&0xff]++;
695  Raddam_data[N].s2_adc[digi->sample(nmax2).adc()&0xff]++;
696  }
697  }
698  }
699 
700  meEVT_->Fill(++ievt_);
701  run_number=iEvent.id().run();
702  double data[20];
703  if(!LaserRaddam){
704  if(hbhe.isValid()){
705  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
706  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
707  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
708  if(digi->id().subdet()==HcalBarrel){
709  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
710  hb_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
711  }
712  if(digi->id().subdet()==HcalEndcap){
713  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
714  he_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
715  }
716  }
717  }
718  if(ho.isValid()){
719  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
720  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
721  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
722  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
723  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
724  }else{
725  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
726  }
727  ho_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
728  }
729  }
730  if(hf.isValid()){
731  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
732  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
733  double ped=adc2fC[digi->sample(0).adc()&0xff];
734  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
735  hf_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
736  }
737  }
738  if(calib.isValid())for(HcalCalibDigiCollection::const_iterator digi=calib->begin();digi!=calib->end();digi++){
739  if(digi->id().cboxChannel()!=0 || digi->id().hcalSubdet()==0) continue;
740  nTS=digi->size();
741  float e=0;
742  for(int i=0;i<nTS;i++){ data[i]=adc2fC[digi->sample(i).adc()&0xff]; e+=data[i];}
743  if(e<15000) calib_data[digi->id().hcalSubdet()][digi->id().ieta()+2][digi->id().iphi()-1].add_statistics(data,nTS);
744  }
745  }else{ //Raddam
746  if(hf.isValid()){
747  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
748  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
749  int N;
750  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
751  if(N==56) continue;
752  for(int i=0;i<nTS;i++) Raddam[N]->Fill(i,adc2fC[digi->sample(i).adc()&0xff]-2.5);
753 
754  }
755  }
756  }
757 }
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 2041 of file HcalDetDiagLaserMonitor.cc.

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 426 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.

426  {
428  c.get<HcalChannelQualityRcd>().get(p);
429  HcalChannelQuality* chanquality= new HcalChannelQuality(*p.product());
430  std::vector<DetId> mydetids = chanquality->getAllChannels();
431  KnownBadCells_.clear();
432 
433  for (std::vector<DetId>::const_iterator i = mydetids.begin();i!=mydetids.end();++i){
434  if (i->det()!=DetId::Hcal) continue; // not an hcal cell
435  HcalDetId id=HcalDetId(*i);
436  int status=(chanquality->getValues(id))->getValue();
438  KnownBadCells_[id.rawId()]=status;
439  }
440  }
441 
442  edm::ESHandle<HcalDbService> conditions_;
443  c.get<HcalDbRecord>().get(conditions_);
444  emap=conditions_->getHcalMapping();
445 
447  if (!dbe_) return;
449 
451  meEVT_ = dbe_->bookInt("HcalDetDiagLaserMonitor Event Number");
452  meRUN_ = dbe_->bookInt("HcalDetDiagLaserMonitor Run Number");
453 
454  ReferenceRun="UNKNOWN";
455  LoadReference();
456  LoadDataset();
457  if(DatasetName.size()>0 && createHTMLonly){
458  char str[200]; sprintf(str,"%sHcalDetDiagLaserData_run%i_%i/",htmlOutputPath.c_str(),run_number,dataset_seq_number);
459  htmlFolder=dbe_->bookString("HcalDetDiagLaserMonitor HTML folder",str);
460  MonitorElement *me;
461  dbe_->setCurrentFolder(prefixME_+"HcalInfo");
462  me=dbe_->bookInt("HBpresent");
463  if(nHB>0) me->Fill(1);
464  me=dbe_->bookInt("HEpresent");
465  if(nHE>0) me->Fill(1);
466  me=dbe_->bookInt("HOpresent");
467  if(nHO>0) me->Fill(1);
468  me=dbe_->bookInt("HFpresent");
469  if(nHF>0) me->Fill(1);
470  }
472  ProblemCellsByDepth_timing->setup(dbe_," Problem Bad Laser Timing");
473  for(unsigned int i=0;i<ProblemCellsByDepth_timing->depth.size();i++)
474  problemnames_.push_back(ProblemCellsByDepth_timing->depth[i]->getName());
476  ProblemCellsByDepth_energy->setup(dbe_," Problem Bad Laser Energy");
477  for(unsigned int i=0;i<ProblemCellsByDepth_energy->depth.size();i++)
478  problemnames_.push_back(ProblemCellsByDepth_energy->depth[i]->getName());
479 
480  dbe_->setCurrentFolder(subdir_+"Summary Plots");
481 
482  name="HBHE Laser Energy Distribution"; hbheEnergy = dbe_->book1D(name,name,200,0,3000);
483  name="HBHE Laser Timing Distribution"; hbheTime = dbe_->book1D(name,name,200,0,10);
484  name="HBHE Laser Energy RMS_div_Energy Distribution"; hbheEnergyRMS = dbe_->book1D(name,name,200,0,0.5);
485  name="HBHE Laser Timing RMS Distribution"; hbheTimeRMS = dbe_->book1D(name,name,200,0,1);
486  name="HO Laser Energy Distribution"; hoEnergy = dbe_->book1D(name,name,200,0,3000);
487  name="HO Laser Timing Distribution"; hoTime = dbe_->book1D(name,name,200,0,10);
488  name="HO Laser Energy RMS_div_Energy Distribution"; hoEnergyRMS = dbe_->book1D(name,name,200,0,0.5);
489  name="HO Laser Timing RMS Distribution"; hoTimeRMS = dbe_->book1D(name,name,200,0,1);
490  name="HF Laser Energy Distribution"; hfEnergy = dbe_->book1D(name,name,200,0,3000);
491  name="HF Laser Timing Distribution"; hfTime = dbe_->book1D(name,name,200,0,10);
492  name="HF Laser Energy RMS_div_Energy Distribution"; hfEnergyRMS = dbe_->book1D(name,name,200,0,0.7);
493  name="HF Laser Timing RMS Distribution"; hfTimeRMS = dbe_->book1D(name,name,200,0,1);
494 
495  name="Laser Timing HBHEHF"; Time2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
496  name="Laser Timing HO"; Time2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
497  name="Laser Energy HBHEHF"; Energy2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
498  name="Laser Energy HO"; Energy2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
499  name="HBHEHF Laser (Timing-Ref)+1"; refTime2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
500  name="HO Laser (Timing-Ref)+1"; refTime2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
501  name="HBHEHF Laser Energy_div_Ref"; refEnergy2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
502  name="HO Laser Energy_div_Ref"; refEnergy2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
503 
504  name="HB RBX average Time-Ref"; hb_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
505  name="HE RBX average Time-Ref"; he_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
506  name="HO RBX average Time-Ref"; ho_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
507  name="HF RoBox average Time-Ref"; hf_time_rbx = dbe_->book1D(name,name,24,0.5,24.5);
508 
509  char str[200];
510  for(int i=1;i<=18;i++){ sprintf(str,"HBM%02i",i); hb_time_rbx->setBinLabel(i,str); }
511  for(int i=1;i<=18;i++){ sprintf(str,"HBP%02i",i); hb_time_rbx->setBinLabel(i+18,str); }
512  for(int i=1;i<=18;i++){ sprintf(str,"HEM%02i",i); he_time_rbx->setBinLabel(i,str); }
513  for(int i=1;i<=18;i++){ sprintf(str,"HEP%02i",i); he_time_rbx->setBinLabel(i+18,str); }
514  for(int i=1;i<=12;i++){ sprintf(str,"HFM%02i",i); hf_time_rbx->setBinLabel(i,str); }
515  for(int i=1;i<=12;i++){ sprintf(str,"HFP%02i",i); hf_time_rbx->setBinLabel(i+12,str); }
516  for(int i=1;i<=6;i++){ sprintf(str,"HO2M%02i",i*2); ho_time_rbx->setBinLabel(i,str); }
517  for(int i=1;i<=6;i++){ sprintf(str,"HO1M%02i",i*2); ho_time_rbx->setBinLabel(i+6,str); }
518  for(int i=1;i<=12;i++){ sprintf(str,"HO0%02i",i); ho_time_rbx->setBinLabel(i+12,str); }
519  for(int i=1;i<=6;i++){ sprintf(str,"HO1P%02i",i*2); ho_time_rbx->setBinLabel(i+24,str); }
520  for(int i=1;i<=6;i++){ sprintf(str,"HO2P%02i",i*2); ho_time_rbx->setBinLabel(i+30,str); }
521 
522  Time2Dhbhehf->setAxisTitle("i#eta",1);
523  Time2Dhbhehf->setAxisTitle("i#phi",2);
524  Time2Dho->setAxisTitle("i#eta",1);
525  Time2Dho->setAxisTitle("i#phi",2);
526  Energy2Dhbhehf->setAxisTitle("i#eta",1);
527  Energy2Dhbhehf->setAxisTitle("i#phi",2);
528  Energy2Dho->setAxisTitle("i#eta",1);
529  Energy2Dho->setAxisTitle("i#phi",2);
530  refTime2Dhbhehf->setAxisTitle("i#eta",1);
531  refTime2Dhbhehf->setAxisTitle("i#phi",2);
532  refTime2Dho->setAxisTitle("i#eta",1);
533  refTime2Dho->setAxisTitle("i#phi",2);
534  refEnergy2Dhbhehf->setAxisTitle("i#eta",1);
535  refEnergy2Dhbhehf->setAxisTitle("i#phi",2);
536  refEnergy2Dho->setAxisTitle("i#eta",1);
537  refEnergy2Dho->setAxisTitle("i#phi",2);
538 
540  refTime2Dho->setAxisRange(0,2,3);
541  refEnergy2Dhbhehf->setAxisRange(0.5,1.5,3);
542  refEnergy2Dho->setAxisRange(0.5,1.5,3);
543 
545  RefRun_= dbe_->bookString("HcalDetDiagLaserMonitor Reference Run",ReferenceRun);
546 
547  dbe_->setCurrentFolder(subdir_+"Raddam Plots");
548  for(int i=0;i<56;i++){
549  sprintf(str,"RADDAM (%i %i)",RADDAM_CH[i].eta,RADDAM_CH[i].phi);
550  Raddam[i] = dbe_->book1D(str,str,10,-0.5,9.5);
551  }
552 
553  dbe_->setCurrentFolder(subdir_+"Plots for client");
555  ProblemCellsByDepth_timing_val->setup(dbe_," Laser Timing difference");
557  ProblemCellsByDepth_energy_val->setup(dbe_," Laser Energy difference");
558 }
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:954
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:920
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:861
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:1082
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:667
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2042 of file HcalDetDiagLaserMonitor.cc.

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 2025 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 1129 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(), bookConverter::max, min(), phi, refEnergy2Dhbhehf, refEnergy2Dho, refTime2Dhbhehf, refTime2Dho, MonitorElement::Reset(), RMS, plotscripts::rms(), MonitorElement::setAxisRange(), MonitorElement::setBinContent(), MonitorElement::setBinError(), cond::rpcobgas::time, Time2Dhbhehf, and Time2Dho.

Referenced by analyze(), and endRun().

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

Referenced by analyze(), and endRun().

819  {
820 float ave_t,ave_e,ave_t_r,ave_e_r;
821  if(!get_ave_subdet(sd,&ave_t,&ave_e,&ave_t_r,&ave_e_r)) return;
822 
823  for(int i=0;i<4;i++){
826  }
827 
828  std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
829  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
830  DetId detid=emap->lookup(*eid);
831  if (detid.det()!=DetId::Hcal) continue;
832  HcalGenericDetId gid(emap->lookup(*eid));
833  if(!(!(gid.null()) &&
834  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
835  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
836  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
837  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
838  int eta=0,phi=0,depth=0;
839  HcalDetId hid(detid);
840  if(KnownBadCells_.find(hid.rawId())==KnownBadCells_.end()) continue;
841  eta=hid.ieta();
842  phi=hid.iphi();
843  depth=hid.depth();
844 
845  int e=CalcEtaBin(sd,eta,depth)+1;
846  if(detid.subdetId()==HcalBarrel && sd==HcalBarrel){
847  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
848  if(!hb_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
849  if(!hb_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
850  if(!hb_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
851  hb_data[eta+42][phi-1][depth-1].nChecks++;
852  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
853  if(diff_t>LaserTimingThreshold){
854  hb_data[eta+42][phi-1][depth-1].nBadTime++;
855  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
856  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
857  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
858  float diff_e=((VAL/ave_e))/(val/ave_e_r);
859  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
860  hb_data[eta+42][phi-1][depth-1].nBadEnergy++;
861  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
862  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
863  }
864  }
865  if(detid.subdetId()==HcalEndcap && sd==HcalEndcap){
866  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
867  if(!he_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
868  if(!he_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
869  if(!he_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
870  he_data[eta+42][phi-1][depth-1].nChecks++;
871  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
872  if(diff_t>LaserTimingThreshold){
873  he_data[eta+42][phi-1][depth-1].nBadTime++;
874  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
875  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
876  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
877  float diff_e=((VAL/ave_e))/(val/ave_e_r);
878  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
879  he_data[eta+42][phi-1][depth-1].nBadEnergy++;
880  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
881  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
882  }
883  }
884  if(detid.subdetId()==HcalOuter && sd==HcalOuter){
885  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
886  if(!ho_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
887  if(!ho_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
888  if(!ho_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
889  ho_data[eta+42][phi-1][depth-1].nChecks++;
890  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
891  if(diff_t>LaserTimingThreshold){
892  ho_data[eta+42][phi-1][depth-1].nBadTime++;
893  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
894  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
895  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
896  float diff_e=((VAL/ave_e))/(val/ave_e_r);
897  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
898  ho_data[eta+42][phi-1][depth-1].nBadEnergy++;
899  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
900  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
901  }
902  }
903  if(detid.subdetId()==HcalForward && sd==HcalForward){
904  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
905  if(!hf_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
906  if(!hf_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
907  if(!hf_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
908  hf_data[eta+42][phi-1][depth-1].nChecks++;
909  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
910  if(diff_t>LaserTimingThreshold){
911  hf_data[eta+42][phi-1][depth-1].nBadTime++;
912  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
913  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
914  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
915  float diff_e=((VAL/ave_e))/(val/ave_e_r);
916  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
917  hf_data[eta+42][phi-1][depth-1].nBadEnergy++;
918  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
919  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
920  }
921  }
922  }
923  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
924  DetId detid=emap->lookup(*eid);
925  if (detid.det()!=DetId::Hcal) continue;
926  HcalGenericDetId gid(emap->lookup(*eid));
927  if(!(!(gid.null()) &&
928  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
929  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
930  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
931  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
932  int eta=0,phi=0,depth=0;
933  HcalDetId hid(detid);
934  eta=hid.ieta();
935  phi=hid.iphi();
936  depth=hid.depth();
937 
938  if(detid.subdetId()==HcalBarrel){
939  if(hb_data[eta+42][phi-1][depth-1].nBadTime>0){
940  int e=CalcEtaBin(HcalBarrel,eta,depth)+1;
941  double val=hb_data[eta+42][phi-1][depth-1].nBadTime/hb_data[eta+42][phi-1][depth-1].nChecks;
942  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
943  }
944  if(hb_data[eta+42][phi-1][depth-1].nBadEnergy>0){
945  int e=CalcEtaBin(HcalBarrel,eta,depth)+1;
946  double val=hb_data[eta+42][phi-1][depth-1].nBadEnergy/hb_data[eta+42][phi-1][depth-1].nChecks;
947  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
948  }
949  }
950  if(detid.subdetId()==HcalEndcap){
951  if(he_data[eta+42][phi-1][depth-1].nBadTime>0){
952  int e=CalcEtaBin(HcalEndcap,eta,depth)+1;
953  double val=he_data[eta+42][phi-1][depth-1].nBadTime/he_data[eta+42][phi-1][depth-1].nChecks;
954  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
955  }
956  if(he_data[eta+42][phi-1][depth-1].nBadEnergy>0){
957  int e=CalcEtaBin(HcalEndcap,eta,depth)+1;
958  double val=he_data[eta+42][phi-1][depth-1].nBadEnergy/he_data[eta+42][phi-1][depth-1].nChecks;
959  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
960  }
961  }
962  if(detid.subdetId()==HcalOuter){
963  if(ho_data[eta+42][phi-1][depth-1].nBadTime>0){
964  int e=CalcEtaBin(HcalOuter,eta,depth)+1;
965  double val=ho_data[eta+42][phi-1][depth-1].nBadTime/ho_data[eta+42][phi-1][depth-1].nChecks;
966  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
967  }
968  if(ho_data[eta+42][phi-1][depth-1].nBadEnergy>0){
969  int e=CalcEtaBin(HcalOuter,eta,depth)+1;
970  double val=ho_data[eta+42][phi-1][depth-1].nBadEnergy/ho_data[eta+42][phi-1][depth-1].nChecks;
971  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
972  }
973  }
974  if(detid.subdetId()==HcalForward){
975  if(hf_data[eta+42][phi-1][depth-1].nBadTime>0){
976  int e=CalcEtaBin(HcalForward,eta,depth)+1;
977  double val=hf_data[eta+42][phi-1][depth-1].nBadTime/hf_data[eta+42][phi-1][depth-1].nChecks;
978  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
979  }
980  if(hf_data[eta+42][phi-1][depth-1].nBadEnergy>0){
981  int e=CalcEtaBin(HcalForward,eta,depth)+1;
982  double val=hf_data[eta+42][phi-1][depth-1].nBadEnergy/hf_data[eta+42][phi-1][depth-1].nChecks;
983  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
984  }
985  }
986  }
987 }
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 989 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().

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

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

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

257  {
258  int SD=0,ETA=0,PHI=0;
259  if(sd.compare("HB")==0) SD=1;
260  if(sd.compare("HE")==0) SD=2;
261  if(sd.compare("HO")==0) SD=3;
262  if(sd.compare("HF")==0) SD=4;
263  if(SD==1 || SD==2){
264  if(eta>0) ETA=1; else ETA=-1;
265  if(phi==71 ||phi==72 || phi==1 || phi==2) PHI=71; else PHI=((phi-3)/4)*4+3;
266  }else if(SD==3){
267  if(abs(eta)<=4){
268  ETA=0;
269  if(phi==71 ||phi==72 || phi==1 || phi==2 || phi==3 || phi==4) PHI=71; else PHI=((phi-5)/6)*6+5;
270  }else{
271  if(abs(eta)>4 && abs(eta)<=10) ETA=1;
272  if(abs(eta)>10 && abs(eta)<=15) ETA=2;
273  if(eta<0) ETA=-ETA;
274  if(phi==71 ||phi==72 || (phi>=1 && phi<=10)) PHI=71; else PHI=((phi-11)/12)*12+11;
275  }
276  }else if(SD==4){
277  if(eta>0) ETA=1; else ETA=-1;
278  if(phi>=1 && phi<=18) PHI=1;
279  if(phi>=19 && phi<=36) PHI=19;
280  if(phi>=37 && phi<=54) PHI=37;
281  if(phi>=55 && phi<=72) PHI=55;
282  }
283  return &calib_data[SD][ETA+2][PHI-1];
284  };
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 1800 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(), edmStreamStallGrapher::t, and cond::rpcobgas::time.

Referenced by beginRun().

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

Referenced by beginRun().

1763  {
1764 double amp,rms,time,time_rms;
1765 int Eta,Phi,Depth;
1766 char subdet[10];
1767 TFile *f;
1768  if(gSystem->AccessPathName(ReferenceData.c_str())) return;
1769  f = new TFile(ReferenceData.c_str(),"READ");
1770 
1771  if(!f->IsOpen()) return ;
1772  TObjString *STR=(TObjString *)f->Get("run number");
1773 
1774  if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
1775 
1776  TTree* t=(TTree*)f->Get("HCAL Laser data");
1777  if(!t) return;
1778  t->SetBranchAddress("Subdet", subdet);
1779  t->SetBranchAddress("eta", &Eta);
1780  t->SetBranchAddress("phi", &Phi);
1781  t->SetBranchAddress("depth", &Depth);
1782  t->SetBranchAddress("amp", &amp);
1783  t->SetBranchAddress("rms", &rms);
1784  t->SetBranchAddress("time", &time);
1785  t->SetBranchAddress("time_rms", &time_rms);
1786  for(int ievt=0;ievt<t->GetEntries();ievt++){
1787  t->GetEntry(ievt);
1788  if(strcmp(subdet,"HB")==0) hb_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1789  if(strcmp(subdet,"HE")==0) he_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1790  if(strcmp(subdet,"HO")==0) ho_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1791  if(strcmp(subdet,"HF")==0) hf_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1792  if(strcmp(subdet,"CALIB_HB")==0) calib_data[1][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1793  if(strcmp(subdet,"CALIB_HE")==0) calib_data[2][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1794  if(strcmp(subdet,"CALIB_HO")==0) calib_data[3][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1795  if(strcmp(subdet,"CALIB_HF")==0) calib_data[4][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1796  }
1797  f->Close();
1798  IsReference=true;
1799 }
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 1878 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, edmStreamStallGrapher::t, interactiveExample::theFile, cond::rpcobgas::time, HcalRaddamData::TOTEVNT, xmlFile(), and XmlFilePath.

Referenced by endRun().

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

Referenced by analyze(), and endRun().

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

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

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

Definition at line 350 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Energy2Dho
private

Definition at line 351 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 357 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergy
private

Definition at line 335 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergyRMS
private

Definition at line 337 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTime
private

Definition at line 336 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTimeRMS
private

Definition at line 338 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 358 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 360 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergy
private

Definition at line 343 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergyRMS
private

Definition at line 345 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTime
private

Definition at line 344 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTimeRMS
private

Definition at line 346 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 359 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergy
private

Definition at line 339 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergyRMS
private

Definition at line 341 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTime
private

Definition at line 340 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTimeRMS
private

Definition at line 342 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement * HcalDetDiagLaserMonitor::htmlFolder
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

std::string HcalDetDiagLaserMonitor::htmlOutputPath
private

Definition at line 330 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

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

Definition at line 292 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::IsReference
private

Definition at line 316 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

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

Definition at line 378 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

double HcalDetDiagLaserMonitor::LaserEnergyThreshold
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::LaserTimingThreshold
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::LocalRun
private

Definition at line 317 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement* HcalDetDiagLaserMonitor::meEVT_
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement * HcalDetDiagLaserMonitor::meRUN_
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHB
private

Definition at line 318 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHBHEchecks
private

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHE
private

Definition at line 318 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHF
private

Definition at line 318 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHFchecks
private

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHO
private

Definition at line 318 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHOchecks
private

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::Online_
private

Definition at line 325 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 324 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy
private

Definition at line 366 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy_val
private

Definition at line 370 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing
private

Definition at line 365 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing_val
private

Definition at line 369 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

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

Definition at line 367 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

MonitorElement* HcalDetDiagLaserMonitor::Raddam[56]
private

Definition at line 362 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and beginRun().

bool HcalDetDiagLaserMonitor::RaddamRun
private

Definition at line 317 of file HcalDetDiagLaserMonitor.cc.

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

double HcalDetDiagLaserMonitor::RaddamThreshold1
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::RaddamThreshold2
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dhbhehf
private

Definition at line 354 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dho
private

Definition at line 355 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagLaserMonitor::ReferenceData
private

Definition at line 319 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::string HcalDetDiagLaserMonitor::ReferenceRun
private

Definition at line 320 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and LoadReference().

MonitorElement* HcalDetDiagLaserMonitor::RefRun_
private

Definition at line 334 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dhbhehf
private

Definition at line 352 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dho
private

Definition at line 353 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

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

Definition at line 363 of file HcalDetDiagLaserMonitor.cc.

Referenced by SaveRaddamData().

TH1F * HcalDetDiagLaserMonitor::S2[56]
private

Definition at line 363 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and SaveRaddamData().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dhbhehf
private

Definition at line 348 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dho
private

Definition at line 349 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

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

Definition at line 295 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 297 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 299 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 298 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 294 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 296 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

std::string HcalDetDiagLaserMonitor::XmlFilePath
private