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 DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase 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 DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

std::string baseFolder_
 
HcalDetDiagLaserData calib_data [5][5][72]
 
bool createHTMLonly
 
int dataset_seq_number
 
std::string DatasetName
 
const HcalElectronicsMapemap
 
MonitorElementEnergy2Dhbhehf
 
MonitorElementEnergy2Dho
 
HcalDetDiagLaserData hb_data [85][72][4]
 
MonitorElementhb_time_rbx
 
MonitorElementhbheEnergy
 
MonitorElementhbheEnergyRMS
 
bool HBHEseq_
 
MonitorElementhbheTime
 
MonitorElementhbheTimeRMS
 
HcalDetDiagLaserData he_data [85][72][4]
 
MonitorElementhe_time_rbx
 
HcalDetDiagLaserData hf_data [85][72][4]
 
MonitorElementhf_time_rbx
 
MonitorElementhfEnergy
 
MonitorElementhfEnergyRMS
 
bool HFseq_
 
MonitorElementhfTime
 
MonitorElementhfTimeRMS
 
HcalDetDiagLaserData ho_data [85][72][4]
 
MonitorElementho_time_rbx
 
MonitorElementhoEnergy
 
MonitorElementhoEnergyRMS
 
bool HOseq_
 
MonitorElementhoTime
 
MonitorElementhoTimeRMS
 
MonitorElementhtmlFolder
 
std::string htmlOutputPath
 
int ievt_
 
int ievt_hbhe_
 
int ievt_hf_
 
int ievt_ho_
 
edm::InputTag inputLabelDigi_
 
bool IsReference
 
std::map< unsigned int, int > KnownBadCells_
 
double LaserEnergyThreshold
 
double LaserTimingThreshold
 
int lastHBHEorbit_
 
int lastHForbit_
 
int lastHOorbit_
 
bool LocalRun
 
MonitorElementmeEVT_
 
MonitorElementmeRUN_
 
int nChecksHBHE_
 
int nChecksHF_
 
int nChecksHO_
 
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]
 
HcalRaddamData Raddam_data [56]
 
bool RaddamRun
 
double RaddamThreshold1
 
double RaddamThreshold2
 
MonitorElementrefEnergy2Dhbhehf
 
MonitorElementrefEnergy2Dho
 
std::string ReferenceData
 
std::string ReferenceRun
 
MonitorElementRefRun_
 
MonitorElementrefTime2Dhbhehf
 
MonitorElementrefTime2Dho
 
int run_number
 
TH1F * S1 [56]
 
TH1F * S2 [56]
 
MonitorElementTime2Dhbhehf
 
MonitorElementTime2Dho
 
edm::EDGetTokenT
< HcalCalibDigiCollection
tok_calib_
 
edm::EDGetTokenT
< HBHEDigiCollection
tok_hbhe_
 
edm::EDGetTokenT
< HFDigiCollection
tok_hf_
 
edm::EDGetTokenT
< HODigiCollection
tok_ho_
 
edm::EDGetTokenT
< FEDRawDataCollection
tok_raw_
 
edm::EDGetTokenT
< HcalTBTriggerData
tok_tb_
 
std::string XmlFilePath
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void cleanup (void)
 
virtual void dqmBeginRun (const edm::Run &run, const edm::EventSetup &c)
 
void getLogicalMap (const edm::EventSetup &c)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
virtual void reset (void)
 
virtual void setup (DQMStore::IBooker &)
 
void SetupEtaPhiHists (DQMStore::IBooker &ib, EtaPhiHists &hh, std::string Name, std::string Units)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from HcalBaseDQMonitor
std::vector< int > AllowedCalibTypes_
 
int badChannelStatusMask_
 
int currentLS
 
int currenttype_
 
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 249 of file HcalDetDiagLaserMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 386 of file HcalDetDiagLaserMonitor.cc.

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

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

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 585 of file HcalDetDiagLaserMonitor.cc.

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

585  {
586  if(createHTMLonly) return;
587  HcalBaseDQMonitor::analyze(iEvent,iSetup); // base class increments ievt_, etc. counters
588 
589 int eta,phi,depth,nTS;
590  if(ievt_==-1){
593  }
594 
595  bool LaserEvent=false;
596  bool LaserRaddam=false;
597  int orbit=iEvent.orbitNumber();
598  meRUN_->Fill(iEvent.id().run());
599  // for local runs
600  edm::Handle<HcalTBTriggerData> trigger_data;
601  iEvent.getByToken(tok_tb_, trigger_data);
602  if(trigger_data.isValid()){
603  if(trigger_data->wasLaserTrigger()) LaserEvent=true;
604  LocalRun=true;
605  }
606  if(!LocalRun && Online_){
607  if(HBHEseq_ && (orbit-lastHBHEorbit_)>(11223*10) && ievt_hbhe_>40){
608  HBHEseq_=false;
612  nChecksHBHE_++;
613  ievt_hbhe_=0;
614  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();
615  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();
616  }
617  if(HOseq_ && (orbit-lastHOorbit_)>(11223*10) && ievt_ho_>40){
618  HOseq_=false;
621  nChecksHO_++;
622  ievt_ho_=0;
623  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();
624  }
625  if(HFseq_ && (orbit-lastHForbit_)>(11223*10) && ievt_hf_>40){
626  HFseq_=false;
629  nChecksHF_++;
630  ievt_hf_=0;
631  if(nChecksHF_==1 || (nChecksHF_>1 && ((nChecksHF_-1)%12)==0)){
632  SaveReference();
633  }
634  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();
635  }
636  }
637 
638  // Abort Gap laser
639  if(LocalRun==false || LaserEvent==false){
641  iEvent.getByToken(tok_raw_ ,rawdata);
642  // edm::Handle<FEDRawDataCollection> rawdata;
643  // iEvent.getByType(rawdata);
644  //checking FEDs for calibration information
646  const FEDRawData& fedData = rawdata->FEDData(i) ;
647  if ( fedData.size() < 24 ) continue ;
648  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
649  if(value==hc_HBHEHPD){ HBHEseq_=true; HOseq_=HFseq_=false; lastHBHEorbit_=orbit; ievt_hbhe_++; }
650  if(value==hc_HOHPD){ HOseq_=true; HBHEseq_=HFseq_=false; lastHOorbit_=orbit; ievt_ho_++; }
651  if(value==hc_HFPMT){ HFseq_=true; HBHEseq_=HOseq_=false; lastHForbit_=orbit; ievt_hf_++; }
652 
653  if(value==hc_HBHEHPD || value==hc_HOHPD || value==hc_HFPMT){ LaserEvent=true; break;}
654  if(value==hc_RADDAM){ LaserEvent=true; LaserRaddam=true; break;}
655  }
656  }
657  if(!LaserEvent) return;
659  iEvent.getByToken(tok_hbhe_,hbhe);
661  iEvent.getByToken(tok_ho_,ho);
663  iEvent.getByToken(tok_hf_,hf);
665  iEvent.getByToken(tok_calib_, calib);
666 
667  if(LocalRun && LaserEvent){
668  int N=0;
669  if(hf.isValid()){
670  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
671  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth();
672  float e=0;
673  for(int i=0;i<digi->size();i++) e+=adc2fC[digi->sample(i).adc()&0xff]-2.5;
674  if(e>40){ N++;}
675  }
676  }
677  if(N>50 && N<57){ RaddamRun=true; /*LaserRaddam=true;*/}
678  }
679  if(RaddamRun){
680  if(hf.isValid()){
681  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
682  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
683  int N;
684  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
685  if(N==56) continue;
686  float max1=0,max2=0;
687  int nmax1=0,nmax2=0;
688  for(int i=0;i<nTS;i++){
689  if(max1<adc2fC[digi->sample(i).adc()&0xff]){ nmax1=i; max1=adc2fC[digi->sample(i).adc()&0xff]; }
690  }
691  Raddam_data[N].TOTEVNT++;
692  for(int i=0;i<nTS;i++){
693  if(i==nmax1) continue;
694  if(max2<adc2fC[digi->sample(i).adc()&0xff]){ nmax2=i; max2=adc2fC[digi->sample(i).adc()&0xff]; }
695  }
696  if(nmax1>nmax2){
697  int tmp1=nmax2;
698  nmax2=nmax1;nmax1=tmp1;
699  }
700  if(nmax1==0 || nmax2==(nTS-1)) continue;
701  if(nmax2!=(nmax1+1)) continue;
702 
703  if(max1<RaddamThreshold1 || max2<RaddamThreshold1) continue;
705  max1-=2.5; max2-=2.5;
706  float S2=max1+max2;
707  float S4=S2+adc2fC[digi->sample(nmax1-1).adc()&0xff]+adc2fC[digi->sample(nmax2+1).adc()&0xff]-5.0;
708  if((S2/S4)<RaddamThreshold2) continue;
710  Raddam_data[N].s1_adc[digi->sample(nmax1).adc()&0xff]++;
711  Raddam_data[N].s2_adc[digi->sample(nmax2).adc()&0xff]++;
712  }
713  }
714  }
715 
716  meEVT_->Fill(++ievt_);
717  run_number=iEvent.id().run();
718  double data[20];
719  if(!LaserRaddam){
720  if(hbhe.isValid()){
721  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
722  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
723  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
724  if(digi->id().subdet()==HcalBarrel){
725  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
726  hb_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
727  }
728  if(digi->id().subdet()==HcalEndcap){
729  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
730  he_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
731  }
732  }
733  }
734  if(ho.isValid()){
735  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
736  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
737  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
738  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
739  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
740  }else{
741  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
742  }
743  ho_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
744  }
745  }
746  if(hf.isValid()){
747  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
748  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
749  double ped=adc2fC[digi->sample(0).adc()&0xff];
750  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
751  hf_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
752  }
753  }
754  if(calib.isValid())for(HcalCalibDigiCollection::const_iterator digi=calib->begin();digi!=calib->end();digi++){
755  if(digi->id().cboxChannel()!=0 || digi->id().hcalSubdet()==0) continue;
756  nTS=digi->size();
757  float e=0;
758  for(int i=0;i<nTS;i++){ data[i]=adc2fC[digi->sample(i).adc()&0xff]; e+=data[i];}
759  if(e<15000) calib_data[digi->id().hcalSubdet()][digi->id().ieta()+2][digi->id().iphi()-1].add_statistics(data,nTS);
760  }
761  }else{ //Raddam
762  if(hf.isValid()){
763  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
764  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
765  int N;
766  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
767  if(N==56) continue;
768  for(int i=0;i<nTS;i++) Raddam[N]->Fill(i,adc2fC[digi->sample(i).adc()&0xff]-2.5);
769 
770  }
771  }
772  }
773 }
RunNumber_t run() const
Definition: EventID.h:39
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
void add_statistics(double *data, int nTS)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::vector< HFDataFrame >::const_iterator const_iterator
edm::EDGetTokenT< HFDigiCollection > tok_hf_
static const Raddam_ch RADDAM_CH[56]
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(long long x)
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:66
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< HODigiCollection > tok_ho_
double const adc2fC[256]
Definition: Constants.h:221
HcalDetDiagLaserData hb_data[85][72][4]
#define N
Definition: blowfish.cc:9
virtual void reset(void)
edm::EventID id() const
Definition: EventBase.h:59
HcalDetDiagLaserData hf_data[85][72][4]
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
dictionary rawdata
Definition: lumiPlot.py:393
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
HcalDetDiagLaserData calib_data[5][5][72]
void HcalDetDiagLaserMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2061 of file HcalDetDiagLaserMonitor.cc.

2061 {}
void HcalDetDiagLaserMonitor::bookHistograms ( DQMStore::IBooker ib,
const edm::Run run,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 441 of file HcalDetDiagLaserMonitor.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookInt(), DQMStore::IBooker::bookString(), createHTMLonly, dataset_seq_number, DatasetName, 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(), hlt_dqm_clientPB-live_cfg::me, 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::IBooker::setCurrentFolder(), EtaPhiHists::setup(), HcalBaseDQMonitor::setup(), mps_update::status, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, Time2Dhbhehf, and Time2Dho.

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 2062 of file HcalDetDiagLaserMonitor.cc.

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

Reimplemented from HcalBaseDQMonitor.

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

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

Referenced by analyze(), and endRun().

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

Definition at line 835 of file HcalDetDiagLaserMonitor.cc.

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

Referenced by analyze(), and endRun().

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

Definition at line 1005 of file HcalDetDiagLaserMonitor.cc.

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

Referenced by fillHistos().

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

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

Referenced by fillProblems().

774  {
775 double T=0,nT=0,E=0,nE=0,Tr=0,nTr=0,Er=0,nEr=0;
776  if(sd==HcalBarrel) for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){
777  for(int depth=1;depth<=2;depth++){
778  if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
779  double ave=0,rms=0,time=0,time_rms=0;
780  hb_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
781  hb_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
782  T+=time; nT++; E+=ave; nE++;
783  if(hb_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
784  Tr+=time; nTr++; Er+=ave; nEr++;}
785  }
786  }
787  }
788  // HE histograms
789  if(sd==HcalEndcap) for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
790  for(int depth=1;depth<=3;depth++){
791  if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
792  double ave=0; double rms=0; double time=0; double time_rms=0;
793  he_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
794  he_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
795  T+=time; nT++; E+=ave; nE++;
796  if(he_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
797  Tr+=time; nTr++; Er+=ave; nEr++;}
798  }
799  }
800  }
801  // HF histograms
802  if(sd==HcalForward) for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
803  for(int depth=1;depth<=2;depth++){
804  if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
805  double ave=0; double rms=0; double time=0; double time_rms=0;
806  hf_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
807  hf_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
808  T+=time; nT++; E+=ave; nE++;
809  if(hf_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
810  Tr+=time; nTr++; Er+=ave; nEr++;}
811  }
812  }
813  }
814  // HO histograms
815  if(sd==HcalOuter) for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
816  for(int depth=4;depth<=4;depth++){
817  if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
818  double ave=0; double rms=0; double time=0; double time_rms=0;
819  ho_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
820  ho_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
821  T+=time; nT++; E+=ave; nE++;
822  if(ho_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
823  Tr+=time; nTr++; Er+=ave; nEr++;}
824  }
825  }
826  }
827  if(nT<200 || nE<200 || nTr<200 || nEr<200) return false;
828  *ave_t=T/nT;
829  *ave_e=E/nE;
830  *ave_t_r=Tr/nTr;
831  *ave_e_r=Er/nEr;
832  return true;
833 }
bool get_average_amp(double *ave, double *rms)
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]
HcalDetDiagLaserData* HcalDetDiagLaserMonitor::GetCalib ( std::string  sd,
int  eta,
int  phi 
)
inlineprivate

Definition at line 255 of file HcalDetDiagLaserMonitor.cc.

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

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

Definition at line 1818 of file HcalDetDiagLaserMonitor.cc.

References calib_data, createHTMLonly, dataset_seq_number, DatasetName, g4TestOverlap_cfg::Depth, 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(), and lumiQTWidget::t.

Referenced by bookHistograms().

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

Definition at line 1780 of file HcalDetDiagLaserMonitor.cc.

References calib_data, g4TestOverlap_cfg::Depth, 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, and lumiQTWidget::t.

Referenced by bookHistograms().

1780  {
1781 double amp,rms,time,time_rms;
1782 int Eta,Phi,Depth;
1783 char subdet[10];
1784 TFile *f;
1785  if(gSystem->AccessPathName(ReferenceData.c_str())) return;
1786  f = new TFile(ReferenceData.c_str(),"READ");
1787 
1788  if(!f->IsOpen()) return ;
1789  TObjString *STR=(TObjString *)f->Get("run number");
1790 
1791  if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
1792 
1793  TTree* t=(TTree*)f->Get("HCAL Laser data");
1794  if(!t) return;
1795  t->SetBranchAddress("Subdet", subdet);
1796  t->SetBranchAddress("eta", &Eta);
1797  t->SetBranchAddress("phi", &Phi);
1798  t->SetBranchAddress("depth", &Depth);
1799  t->SetBranchAddress("amp", &amp);
1800  t->SetBranchAddress("rms", &rms);
1801  t->SetBranchAddress("time", &time);
1802  t->SetBranchAddress("time_rms", &time_rms);
1803  for(int ievt=0;ievt<t->GetEntries();ievt++){
1804  t->GetEntry(ievt);
1805  if(strcmp(subdet,"HB")==0) hb_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1806  if(strcmp(subdet,"HE")==0) he_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1807  if(strcmp(subdet,"HO")==0) ho_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1808  if(strcmp(subdet,"HF")==0) hf_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1809  if(strcmp(subdet,"CALIB_HB")==0) calib_data[1][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1810  if(strcmp(subdet,"CALIB_HE")==0) calib_data[2][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1811  if(strcmp(subdet,"CALIB_HO")==0) calib_data[3][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1812  if(strcmp(subdet,"CALIB_HF")==0) calib_data[4][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1813  }
1814  f->Close();
1815  f->Delete();
1816  IsReference=true;
1817 }
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 1897 of file HcalDetDiagLaserMonitor.cc.

References hcaldqm::constants::adc2fC, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, dataset_seq_number, Raddam_ch::depth, HLT_25ns10e33_v2_cff::depth, Raddam_ch::eta, eta, i, j, N, gen::n, OutputFilePath, Overwrite, phi, Raddam_ch::phi, Raddam_data, 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, combinedConstraintHelpers::sum2(), lumiQTWidget::t, interactiveExample::theFile, HcalRaddamData::TOTEVNT, xmlFile(), and XmlFilePath.

Referenced by endRun().

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

Definition at line 1448 of file HcalDetDiagLaserMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), calib_data, dataset_seq_number, g4TestOverlap_cfg::Depth, HcalDetId::depth(), HLT_25ns10e33_v2_cff::depth, DetId::det(), alignCSCRings::e, emap, eta, reco::tau::disc::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, relval_2017::k, HcalElectronicsMap::lookup(), OutputFilePath, Overwrite, phi, colinearityKinematic::Phi, plotscripts::rms(), DTTTrigCorrFirst::run, run_number, sd, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), lumiQTWidget::t, interactiveExample::theFile, MainPageGenerator::tree, xmlFile(), and XmlFilePath.

Referenced by analyze(), and endRun().

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

Member Data Documentation

std::string HcalDetDiagLaserMonitor::baseFolder_
private

Definition at line 321 of file HcalDetDiagLaserMonitor.cc.

HcalDetDiagLaserData HcalDetDiagLaserMonitor::calib_data[5][5][72]
private
bool HcalDetDiagLaserMonitor::createHTMLonly
private
int HcalDetDiagLaserMonitor::dataset_seq_number
private
std::string HcalDetDiagLaserMonitor::DatasetName
private
const HcalElectronicsMap* HcalDetDiagLaserMonitor::emap
private
MonitorElement* HcalDetDiagLaserMonitor::Energy2Dhbhehf
private

Definition at line 348 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Energy2Dho
private

Definition at line 349 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 355 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergy
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergyRMS
private

Definition at line 335 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

bool HcalDetDiagLaserMonitor::HBHEseq_
private

Definition at line 381 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

MonitorElement* HcalDetDiagLaserMonitor::hbheTime
private

Definition at line 334 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTimeRMS
private

Definition at line 336 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 356 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 358 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergy
private

Definition at line 341 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergyRMS
private

Definition at line 343 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

bool HcalDetDiagLaserMonitor::HFseq_
private

Definition at line 381 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

MonitorElement* HcalDetDiagLaserMonitor::hfTime
private

Definition at line 342 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTimeRMS
private

Definition at line 344 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 357 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergy
private
MonitorElement* HcalDetDiagLaserMonitor::hoEnergyRMS
private

Definition at line 339 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

bool HcalDetDiagLaserMonitor::HOseq_
private

Definition at line 381 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

MonitorElement* HcalDetDiagLaserMonitor::hoTime
private

Definition at line 338 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTimeRMS
private

Definition at line 340 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement * HcalDetDiagLaserMonitor::htmlFolder
private

Definition at line 331 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms().

std::string HcalDetDiagLaserMonitor::htmlOutputPath
private

Definition at line 328 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::ievt_
private
int HcalDetDiagLaserMonitor::ievt_hbhe_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

int HcalDetDiagLaserMonitor::ievt_hf_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

int HcalDetDiagLaserMonitor::ievt_ho_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

edm::InputTag HcalDetDiagLaserMonitor::inputLabelDigi_
private

Definition at line 290 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::IsReference
private

Definition at line 314 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

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

Definition at line 376 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillProblems().

double HcalDetDiagLaserMonitor::LaserEnergyThreshold
private

Definition at line 309 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::LaserTimingThreshold
private

Definition at line 309 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::lastHBHEorbit_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

int HcalDetDiagLaserMonitor::lastHForbit_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

int HcalDetDiagLaserMonitor::lastHOorbit_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

bool HcalDetDiagLaserMonitor::LocalRun
private

Definition at line 315 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement* HcalDetDiagLaserMonitor::meEVT_
private

Definition at line 331 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement * HcalDetDiagLaserMonitor::meRUN_
private

Definition at line 331 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nChecksHBHE_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

int HcalDetDiagLaserMonitor::nChecksHF_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

int HcalDetDiagLaserMonitor::nChecksHO_
private

Definition at line 382 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze().

int HcalDetDiagLaserMonitor::nHB
private
int HcalDetDiagLaserMonitor::nHBHEchecks
private

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHE
private
int HcalDetDiagLaserMonitor::nHF
private
int HcalDetDiagLaserMonitor::nHFchecks
private

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHO
private
int HcalDetDiagLaserMonitor::nHOchecks
private

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::Online_
private

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

Referenced by bookHistograms(), and HcalDetDiagLaserMonitor().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy
private
EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy_val
private
EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing
private
EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing_val
private
std::vector<std::string> HcalDetDiagLaserMonitor::problemnames_
private

Definition at line 365 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms().

MonitorElement* HcalDetDiagLaserMonitor::Raddam[56]
private

Definition at line 360 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and bookHistograms().

HcalRaddamData HcalDetDiagLaserMonitor::Raddam_data[56]
private

Definition at line 378 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and SaveRaddamData().

bool HcalDetDiagLaserMonitor::RaddamRun
private

Definition at line 315 of file HcalDetDiagLaserMonitor.cc.

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

double HcalDetDiagLaserMonitor::RaddamThreshold1
private

Definition at line 309 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::RaddamThreshold2
private

Definition at line 309 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dhbhehf
private

Definition at line 352 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dho
private

Definition at line 353 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

std::string HcalDetDiagLaserMonitor::ReferenceData
private

Definition at line 317 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::string HcalDetDiagLaserMonitor::ReferenceRun
private

Definition at line 318 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and LoadReference().

MonitorElement* HcalDetDiagLaserMonitor::RefRun_
private

Definition at line 332 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dhbhehf
private

Definition at line 350 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dho
private

Definition at line 351 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 361 of file HcalDetDiagLaserMonitor.cc.

Referenced by SaveRaddamData().

TH1F * HcalDetDiagLaserMonitor::S2[56]
private

Definition at line 361 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and SaveRaddamData().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dhbhehf
private

Definition at line 346 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dho
private

Definition at line 347 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 293 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 295 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 297 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 296 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 292 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 294 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

std::string HcalDetDiagLaserMonitor::XmlFilePath
private