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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 
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]
 
edm::InputTag calibDigiLabel_
 
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
 
edm::InputTag hcalTBTriggerDataTag_
 
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
 
edm::InputTag rawDataLabel_
 
MonitorElementrefEnergy2Dhbhehf
 
MonitorElementrefEnergy2Dho
 
std::string ReferenceData
 
std::string ReferenceRun
 
MonitorElementRefRun_
 
MonitorElementrefTime2Dhbhehf
 
MonitorElementrefTime2Dho
 
int run_number
 
TH1F * S1 [56]
 
TH1F * S2 [56]
 
MonitorElementTime2Dhbhehf
 
MonitorElementTime2Dho
 
std::string XmlFilePath
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void beginJob ()
 
virtual void 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 248 of file HcalDetDiagLaserMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 374 of file HcalDetDiagLaserMonitor.cc.

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

374  :
375  hcalTBTriggerDataTag_(iConfig.getParameter<edm::InputTag>("hcalTBTriggerDataTag"))
376 {
377  ievt_=-1;
378  emap=0;
380  run_number=-1;
381  IsReference=false;
382  LocalRun=RaddamRun=false;
383  createHTMLonly=false;
384  nHB=nHE=nHO=nHF=0;
386 
387  inputLabelDigi_ = iConfig.getUntrackedParameter<edm::InputTag>("digiLabel",edm::InputTag("hcalDigis"));
388  calibDigiLabel_ = iConfig.getUntrackedParameter<edm::InputTag>("calibDigiLabel",edm::InputTag("hcalDigis"));
389  rawDataLabel_ = iConfig.getUntrackedParameter<edm::InputTag>("RawDataLabel",edm::InputTag("source"));
390 
391  ReferenceData = iConfig.getUntrackedParameter<std::string>("LaserReferenceData" ,"");
392  OutputFilePath = iConfig.getUntrackedParameter<std::string>("OutputFilePath", "");
393  DatasetName = iConfig.getUntrackedParameter<std::string>("LaserDatasetName", "");
394  htmlOutputPath = iConfig.getUntrackedParameter<std::string>("htmlOutputPath", "");
395  XmlFilePath = iConfig.getUntrackedParameter<std::string>("XmlFilePath", "");
396  Online_ = iConfig.getUntrackedParameter<bool> ("online",false);
397  Overwrite = iConfig.getUntrackedParameter<bool> ("Overwrite",true);
398  prefixME_ = iConfig.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
399  if (prefixME_.size()>0 && prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
400  prefixME_.append("/");
401  subdir_ = iConfig.getUntrackedParameter<std::string>("TaskFolder","DetDiagPedestalMonitor_Hcal/");
402  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
403  subdir_.append("/");
404  subdir_=prefixME_+subdir_;
405  debug_ = iConfig.getUntrackedParameter<int>("debug",0);
406 
407  LaserTimingThreshold = iConfig.getUntrackedParameter<double>("LaserTimingThreshold",0.2);
408  LaserEnergyThreshold = iConfig.getUntrackedParameter<double>("LaserEnergyThreshold",0.1);
409  RaddamThreshold1 = iConfig.getUntrackedParameter<double>("RaddamThreshold1",10.0);
410  RaddamThreshold2 = iConfig.getUntrackedParameter<double>("RaddamThreshold2",0.95);
411 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const HcalElectronicsMap * emap
HcalDetDiagLaserMonitor::~HcalDetDiagLaserMonitor ( )

Definition at line 547 of file HcalDetDiagLaserMonitor.cc.

547  {
548 
549 }

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 552 of file HcalDetDiagLaserMonitor.cc.

References adc2fC, HcalDetDiagLaserData::add_statistics(), HcalBaseDQMonitor::analyze(), calib, calib_data, calibDigiLabel_, createHTMLonly, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, FEDRawData::data(), data, HcalBaseDQMonitor::dbe_, alignCSCRings::e, eta(), MonitorElement::Fill(), HcalObjRepresent::Fill(), fillHistos(), fillProblems(), edm::Event::getByLabel(), hb_data, hc_HBHEHPD, hc_HFPMT, hc_HOHPD, hc_RADDAM, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcalTBTriggerDataTag_, he_data, hf_data, ho_data, i, edm::EventBase::id(), ievt_, inputLabelDigi_, 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, rawDataLabel_, HcalBaseDQMonitor::reset(), edm::EventID::run(), run_number, HcalRaddamData::s1_adc, S2, HcalRaddamData::s2_adc, SaveReference(), FEDRawData::size(), HcalRaddamData::TOTEVNT, and relativeConstraints::value.

552  {
553  if(createHTMLonly) return;
554  HcalBaseDQMonitor::analyze(iEvent,iSetup); // base class increments ievt_, etc. counters
555 
556 int eta,phi,depth,nTS;
557 static bool HBHEseq,HOseq,HFseq;
558 static int lastHBHEorbit,lastHOorbit,lastHForbit,nChecksHBHE,nChecksHO,nChecksHF,ievt_hbhe,ievt_ho,ievt_hf;
559  if(ievt_==-1){
560  ievt_=0;HBHEseq=HOseq=HFseq=false; lastHBHEorbit=lastHOorbit=lastHForbit=-1;nChecksHBHE=nChecksHO=nChecksHF=0;
561  ievt_hbhe=0,ievt_ho=0,ievt_hf=0;
562  }
563 
564  if(!dbe_) return;
565  bool LaserEvent=false;
566  bool LaserRaddam=false;
567  int orbit=iEvent.orbitNumber();
568  meRUN_->Fill(iEvent.id().run());
569  // for local runs
570  edm::Handle<HcalTBTriggerData> trigger_data;
571  iEvent.getByLabel(hcalTBTriggerDataTag_, trigger_data);
572  if(trigger_data.isValid()){
573  if(trigger_data->wasLaserTrigger()) LaserEvent=true;
574  LocalRun=true;
575  }
576  if(!LocalRun && Online_){
577  if(HBHEseq && (orbit-lastHBHEorbit)>(11223*10) && ievt_hbhe>40){
578  HBHEseq=false;
582  nChecksHBHE++;
583  ievt_hbhe=0;
584  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();
585  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();
586  }
587  if(HOseq && (orbit-lastHOorbit)>(11223*10) && ievt_ho>40){
588  HOseq=false;
591  nChecksHO++;
592  ievt_ho=0;
593  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();
594  }
595  if(HFseq && (orbit-lastHForbit)>(11223*10) && ievt_hf>40){
596  HFseq=false;
599  nChecksHF++;
600  ievt_hf=0;
601  if(nChecksHF==1 || (nChecksHF>1 && ((nChecksHF-1)%12)==0)){
602  SaveReference();
603  }
604  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();
605  }
606  }
607 
608  // Abort Gap laser
609  if(LocalRun==false || LaserEvent==false){
611  iEvent.getByLabel(rawDataLabel_ ,rawdata);
612  // edm::Handle<FEDRawDataCollection> rawdata;
613  // iEvent.getByType(rawdata);
614  //checking FEDs for calibration information
616  const FEDRawData& fedData = rawdata->FEDData(i) ;
617  if ( fedData.size() < 24 ) continue ;
618  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
619  if(value==hc_HBHEHPD){ HBHEseq=true; HOseq=HFseq=false; lastHBHEorbit=orbit; ievt_hbhe++; }
620  if(value==hc_HOHPD){ HOseq=true; HBHEseq=HFseq=false; lastHOorbit=orbit; ievt_ho++; }
621  if(value==hc_HFPMT){ HFseq=true; HBHEseq=HOseq=false; lastHForbit=orbit; ievt_hf++; }
622 
623  if(value==hc_HBHEHPD || value==hc_HOHPD || value==hc_HFPMT){ LaserEvent=true; break;}
624  if(value==hc_RADDAM){ LaserEvent=true; LaserRaddam=true; break;}
625  }
626  }
627  if(!LaserEvent) return;
629  iEvent.getByLabel(inputLabelDigi_,hbhe);
631  iEvent.getByLabel(inputLabelDigi_,ho);
633  iEvent.getByLabel(inputLabelDigi_,hf);
635  iEvent.getByLabel(calibDigiLabel_, calib);
636 
637  if(LocalRun && LaserEvent){
638  int N=0;
639  if(hf.isValid()){
640  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
641  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth();
642  float e=0;
643  for(int i=0;i<digi->size();i++) e+=adc2fC[digi->sample(i).adc()&0xff]-2.5;
644  if(e>40){ N++;}
645  }
646  }
647  if(N>50 && N<57){ RaddamRun=true; /*LaserRaddam=true;*/}
648  }
649  if(RaddamRun){
650  if(hf.isValid()){
651  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
652  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
653  int N;
654  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
655  if(N==56) continue;
656  float max1=0,max2=0;
657  int nmax1=0,nmax2=0;
658  for(int i=0;i<nTS;i++){
659  if(max1<adc2fC[digi->sample(i).adc()&0xff]){ nmax1=i; max1=adc2fC[digi->sample(i).adc()&0xff]; }
660  }
661  Raddam_data[N].TOTEVNT++;
662  for(int i=0;i<nTS;i++){
663  if(i==nmax1) continue;
664  if(max2<adc2fC[digi->sample(i).adc()&0xff]){ nmax2=i; max2=adc2fC[digi->sample(i).adc()&0xff]; }
665  }
666  if(nmax1>nmax2){
667  int tmp1=nmax2;
668  nmax2=nmax1;nmax1=tmp1;
669  }
670  if(nmax1==0 || nmax2==(nTS-1)) continue;
671  if(nmax2!=(nmax1+1)) continue;
672 
673  if(max1<RaddamThreshold1 || max2<RaddamThreshold1) continue;
675  max1-=2.5; max2-=2.5;
676  float S2=max1+max2;
677  float S4=S2+adc2fC[digi->sample(nmax1-1).adc()&0xff]+adc2fC[digi->sample(nmax2+1).adc()&0xff]-5.0;
678  if((S2/S4)<RaddamThreshold2) continue;
680  Raddam_data[N].s1_adc[digi->sample(nmax1).adc()&0xff]++;
681  Raddam_data[N].s2_adc[digi->sample(nmax2).adc()&0xff]++;
682  }
683  }
684  }
685 
686  meEVT_->Fill(++ievt_);
687  run_number=iEvent.id().run();
688  double data[20];
689  if(!LaserRaddam){
690  if(hbhe.isValid()){
691  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
692  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
693  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
694  if(digi->id().subdet()==HcalBarrel){
695  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
696  hb_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
697  }
698  if(digi->id().subdet()==HcalEndcap){
699  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
700  he_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
701  }
702  }
703  }
704  if(ho.isValid()){
705  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->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((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
709  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
710  }else{
711  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
712  }
713  ho_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
714  }
715  }
716  if(hf.isValid()){
717  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
718  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
719  double ped=adc2fC[digi->sample(0).adc()&0xff];
720  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
721  hf_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
722  }
723  }
724  if(calib.isValid())for(HcalCalibDigiCollection::const_iterator digi=calib->begin();digi!=calib->end();digi++){
725  if(digi->id().cboxChannel()!=0 || digi->id().hcalSubdet()==0) continue;
726  nTS=digi->size();
727  float e=0;
728  for(int i=0;i<nTS;i++){ data[i]=adc2fC[digi->sample(i).adc()&0xff]; e+=data[i];}
729  if(e<15000) calib_data[digi->id().hcalSubdet()][digi->id().ieta()+2][digi->id().iphi()-1].add_statistics(data,nTS);
730  }
731  }else{ //Raddam
732  if(hf.isValid()){
733  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
734  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
735  int N;
736  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
737  if(N==56) continue;
738  for(int i=0;i<nTS;i++) Raddam[N]->Fill(i,adc2fC[digi->sample(i).adc()&0xff]-2.5);
739 
740  }
741  }
742  }
743 }
RunNumber_t run() const
Definition: EventID.h:42
int i
Definition: DBlmapReader.cc:9
void add_statistics(double *data, int nTS)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
std::vector< T >::const_iterator const_iterator
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:49
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
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:29
dictionary rawdata
Definition: lumiPlot.py:393
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2027 of file HcalDetDiagLaserMonitor.cc.

2027 {}
void HcalDetDiagLaserMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from HcalBaseDQMonitor.

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

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 2028 of file HcalDetDiagLaserMonitor.cc.

2028 {}
void HcalDetDiagLaserMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from HcalBaseDQMonitor.

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

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

Referenced by analyze(), and endRun().

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

Definition at line 805 of file HcalDetDiagLaserMonitor.cc.

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

Referenced by analyze(), and endRun().

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

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

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

References abs, calib_data, ETA, PHI, and SD.

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

Definition at line 1786 of file HcalDetDiagLaserMonitor.cc.

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

Referenced by beginRun().

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

Definition at line 1749 of file HcalDetDiagLaserMonitor.cc.

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

Referenced by beginRun().

1749  {
1750 double amp,rms,time,time_rms;
1751 int Eta,Phi,Depth;
1752 char subdet[10];
1753 TFile *f;
1754  if(gSystem->AccessPathName(ReferenceData.c_str())) return;
1755  f = new TFile(ReferenceData.c_str(),"READ");
1756 
1757  if(!f->IsOpen()) return ;
1758  TObjString *STR=(TObjString *)f->Get("run number");
1759 
1760  if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
1761 
1762  TTree* t=(TTree*)f->Get("HCAL Laser data");
1763  if(!t) return;
1764  t->SetBranchAddress("Subdet", subdet);
1765  t->SetBranchAddress("eta", &Eta);
1766  t->SetBranchAddress("phi", &Phi);
1767  t->SetBranchAddress("depth", &Depth);
1768  t->SetBranchAddress("amp", &amp);
1769  t->SetBranchAddress("rms", &rms);
1770  t->SetBranchAddress("time", &time);
1771  t->SetBranchAddress("time_rms", &time_rms);
1772  for(int ievt=0;ievt<t->GetEntries();ievt++){
1773  t->GetEntry(ievt);
1774  if(strcmp(subdet,"HB")==0) hb_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1775  if(strcmp(subdet,"HE")==0) he_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1776  if(strcmp(subdet,"HO")==0) ho_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1777  if(strcmp(subdet,"HF")==0) hf_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1778  if(strcmp(subdet,"CALIB_HB")==0) calib_data[1][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1779  if(strcmp(subdet,"CALIB_HE")==0) calib_data[2][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1780  if(strcmp(subdet,"CALIB_HO")==0) calib_data[3][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1781  if(strcmp(subdet,"CALIB_HF")==0) calib_data[4][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1782  }
1783  f->Close();
1784  IsReference=true;
1785 }
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 1864 of file HcalDetDiagLaserMonitor.cc.

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

Referenced by endRun().

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

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

Referenced by analyze(), and endRun().

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

HcalDetDiagLaserData HcalDetDiagLaserMonitor::calib_data[5][5][72]
private
edm::InputTag HcalDetDiagLaserMonitor::calibDigiLabel_
private

Definition at line 290 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::createHTMLonly
private
int HcalDetDiagLaserMonitor::dataset_seq_number
private
std::string HcalDetDiagLaserMonitor::DatasetName
private

Definition at line 322 of file HcalDetDiagLaserMonitor.cc.

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

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

Definition at line 343 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Energy2Dho
private

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

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergy
private

Definition at line 328 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergyRMS
private

Definition at line 330 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTime
private

Definition at line 329 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTimeRMS
private

Definition at line 331 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

edm::InputTag HcalDetDiagLaserMonitor::hcalTBTriggerDataTag_
private

Definition at line 292 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

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

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

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergy
private

Definition at line 336 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergyRMS
private

Definition at line 338 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTime
private

Definition at line 337 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTimeRMS
private

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

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergy
private

Definition at line 332 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergyRMS
private

Definition at line 334 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTime
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTimeRMS
private

Definition at line 335 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement * HcalDetDiagLaserMonitor::htmlFolder
private

Definition at line 326 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

std::string HcalDetDiagLaserMonitor::htmlOutputPath
private

Definition at line 323 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

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

Definition at line 289 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::IsReference
private

Definition at line 309 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

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

Definition at line 371 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

double HcalDetDiagLaserMonitor::LaserEnergyThreshold
private

Definition at line 304 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::LaserTimingThreshold
private

Definition at line 304 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::LocalRun
private

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement* HcalDetDiagLaserMonitor::meEVT_
private

Definition at line 326 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement * HcalDetDiagLaserMonitor::meRUN_
private

Definition at line 326 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHB
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHBHEchecks
private

Definition at line 303 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHE
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHF
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHFchecks
private

Definition at line 303 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHO
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHOchecks
private

Definition at line 303 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::Online_
private

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

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy
private

Definition at line 359 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy_val
private

Definition at line 363 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing
private

Definition at line 358 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing_val
private

Definition at line 362 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

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

Definition at line 360 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

MonitorElement* HcalDetDiagLaserMonitor::Raddam[56]
private

Definition at line 355 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and beginRun().

bool HcalDetDiagLaserMonitor::RaddamRun
private

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

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

double HcalDetDiagLaserMonitor::RaddamThreshold1
private

Definition at line 304 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::RaddamThreshold2
private

Definition at line 304 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

edm::InputTag HcalDetDiagLaserMonitor::rawDataLabel_
private

Definition at line 291 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dhbhehf
private

Definition at line 347 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dho
private

Definition at line 348 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagLaserMonitor::ReferenceData
private

Definition at line 312 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::string HcalDetDiagLaserMonitor::ReferenceRun
private

Definition at line 313 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and LoadReference().

MonitorElement* HcalDetDiagLaserMonitor::RefRun_
private

Definition at line 327 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dhbhehf
private

Definition at line 345 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dho
private

Definition at line 346 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

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

Definition at line 356 of file HcalDetDiagLaserMonitor.cc.

Referenced by SaveRaddamData().

TH1F * HcalDetDiagLaserMonitor::S2[56]
private

Definition at line 356 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and SaveRaddamData().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dhbhehf
private

Definition at line 341 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dho
private

Definition at line 342 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagLaserMonitor::XmlFilePath
private