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

Additional Inherited Members

- Public Types inherited from edm::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 251 of file HcalDetDiagLaserMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 381 of file HcalDetDiagLaserMonitor.cc.

References createHTMLonly, dataset_seq_number, DatasetName, HcalBaseDQMonitor::debug_, emap, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), htmlOutputPath, ievt_, inputLabelDigi_, HLT_25ns14e33_v1_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.

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

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

580  {
581  if(createHTMLonly) return;
582  HcalBaseDQMonitor::analyze(iEvent,iSetup); // base class increments ievt_, etc. counters
583 
584 int eta,phi,depth,nTS;
585 static bool HBHEseq,HOseq,HFseq;
586 static int lastHBHEorbit,lastHOorbit,lastHForbit,nChecksHBHE,nChecksHO,nChecksHF,ievt_hbhe,ievt_ho,ievt_hf;
587  if(ievt_==-1){
588  ievt_=0;HBHEseq=HOseq=HFseq=false; lastHBHEorbit=lastHOorbit=lastHForbit=-1;nChecksHBHE=nChecksHO=nChecksHF=0;
589  ievt_hbhe=0,ievt_ho=0,ievt_hf=0;
590  }
591 
592  bool LaserEvent=false;
593  bool LaserRaddam=false;
594  int orbit=iEvent.orbitNumber();
595  meRUN_->Fill(iEvent.id().run());
596  // for local runs
597  edm::Handle<HcalTBTriggerData> trigger_data;
598  iEvent.getByToken(tok_tb_, trigger_data);
599  if(trigger_data.isValid()){
600  if(trigger_data->wasLaserTrigger()) LaserEvent=true;
601  LocalRun=true;
602  }
603  if(!LocalRun && Online_){
604  if(HBHEseq && (orbit-lastHBHEorbit)>(11223*10) && ievt_hbhe>40){
605  HBHEseq=false;
609  nChecksHBHE++;
610  ievt_hbhe=0;
611  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();
612  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();
613  }
614  if(HOseq && (orbit-lastHOorbit)>(11223*10) && ievt_ho>40){
615  HOseq=false;
618  nChecksHO++;
619  ievt_ho=0;
620  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();
621  }
622  if(HFseq && (orbit-lastHForbit)>(11223*10) && ievt_hf>40){
623  HFseq=false;
626  nChecksHF++;
627  ievt_hf=0;
628  if(nChecksHF==1 || (nChecksHF>1 && ((nChecksHF-1)%12)==0)){
629  SaveReference();
630  }
631  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();
632  }
633  }
634 
635  // Abort Gap laser
636  if(LocalRun==false || LaserEvent==false){
638  iEvent.getByToken(tok_raw_ ,rawdata);
639  // edm::Handle<FEDRawDataCollection> rawdata;
640  // iEvent.getByType(rawdata);
641  //checking FEDs for calibration information
643  const FEDRawData& fedData = rawdata->FEDData(i) ;
644  if ( fedData.size() < 24 ) continue ;
645  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
646  if(value==hc_HBHEHPD){ HBHEseq=true; HOseq=HFseq=false; lastHBHEorbit=orbit; ievt_hbhe++; }
647  if(value==hc_HOHPD){ HOseq=true; HBHEseq=HFseq=false; lastHOorbit=orbit; ievt_ho++; }
648  if(value==hc_HFPMT){ HFseq=true; HBHEseq=HOseq=false; lastHForbit=orbit; ievt_hf++; }
649 
650  if(value==hc_HBHEHPD || value==hc_HOHPD || value==hc_HFPMT){ LaserEvent=true; break;}
651  if(value==hc_RADDAM){ LaserEvent=true; LaserRaddam=true; break;}
652  }
653  }
654  if(!LaserEvent) return;
656  iEvent.getByToken(tok_hbhe_,hbhe);
658  iEvent.getByToken(tok_ho_,ho);
660  iEvent.getByToken(tok_hf_,hf);
662  iEvent.getByToken(tok_calib_, calib);
663 
664  if(LocalRun && LaserEvent){
665  int N=0;
666  if(hf.isValid()){
667  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
668  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth();
669  float e=0;
670  for(int i=0;i<digi->size();i++) e+=adc2fC[digi->sample(i).adc()&0xff]-2.5;
671  if(e>40){ N++;}
672  }
673  }
674  if(N>50 && N<57){ RaddamRun=true; /*LaserRaddam=true;*/}
675  }
676  if(RaddamRun){
677  if(hf.isValid()){
678  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
679  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
680  int N;
681  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
682  if(N==56) continue;
683  float max1=0,max2=0;
684  int nmax1=0,nmax2=0;
685  for(int i=0;i<nTS;i++){
686  if(max1<adc2fC[digi->sample(i).adc()&0xff]){ nmax1=i; max1=adc2fC[digi->sample(i).adc()&0xff]; }
687  }
688  Raddam_data[N].TOTEVNT++;
689  for(int i=0;i<nTS;i++){
690  if(i==nmax1) continue;
691  if(max2<adc2fC[digi->sample(i).adc()&0xff]){ nmax2=i; max2=adc2fC[digi->sample(i).adc()&0xff]; }
692  }
693  if(nmax1>nmax2){
694  int tmp1=nmax2;
695  nmax2=nmax1;nmax1=tmp1;
696  }
697  if(nmax1==0 || nmax2==(nTS-1)) continue;
698  if(nmax2!=(nmax1+1)) continue;
699 
700  if(max1<RaddamThreshold1 || max2<RaddamThreshold1) continue;
702  max1-=2.5; max2-=2.5;
703  float S2=max1+max2;
704  float S4=S2+adc2fC[digi->sample(nmax1-1).adc()&0xff]+adc2fC[digi->sample(nmax2+1).adc()&0xff]-5.0;
705  if((S2/S4)<RaddamThreshold2) continue;
707  Raddam_data[N].s1_adc[digi->sample(nmax1).adc()&0xff]++;
708  Raddam_data[N].s2_adc[digi->sample(nmax2).adc()&0xff]++;
709  }
710  }
711  }
712 
713  meEVT_->Fill(++ievt_);
714  run_number=iEvent.id().run();
715  double data[20];
716  if(!LaserRaddam){
717  if(hbhe.isValid()){
718  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
719  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
720  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
721  if(digi->id().subdet()==HcalBarrel){
722  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
723  hb_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
724  }
725  if(digi->id().subdet()==HcalEndcap){
726  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
727  he_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
728  }
729  }
730  }
731  if(ho.isValid()){
732  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
733  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
734  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
735  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
736  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
737  }else{
738  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
739  }
740  ho_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
741  }
742  }
743  if(hf.isValid()){
744  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
745  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
746  double ped=adc2fC[digi->sample(0).adc()&0xff];
747  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
748  hf_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
749  }
750  }
751  if(calib.isValid())for(HcalCalibDigiCollection::const_iterator digi=calib->begin();digi!=calib->end();digi++){
752  if(digi->id().cboxChannel()!=0 || digi->id().hcalSubdet()==0) continue;
753  nTS=digi->size();
754  float e=0;
755  for(int i=0;i<nTS;i++){ data[i]=adc2fC[digi->sample(i).adc()&0xff]; e+=data[i];}
756  if(e<15000) calib_data[digi->id().hcalSubdet()][digi->id().ieta()+2][digi->id().iphi()-1].add_statistics(data,nTS);
757  }
758  }else{ //Raddam
759  if(hf.isValid()){
760  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
761  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
762  int N;
763  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
764  if(N==56) continue;
765  for(int i=0;i<nTS;i++) Raddam[N]->Fill(i,adc2fC[digi->sample(i).adc()&0xff]-2.5);
766 
767  }
768  }
769  }
770 }
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:457
std::vector< HFDataFrame >::const_iterator const_iterator
edm::EDGetTokenT< HFDigiCollection > tok_hf_
HcalRaddamData Raddam_data[56]
static const Raddam_ch RADDAM_CH[56]
static const float adc2fC[128]
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(long long x)
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:67
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< HODigiCollection > tok_ho_
HcalDetDiagLaserData hb_data[85][72][4]
#define N
Definition: blowfish.cc:9
virtual void reset(void)
edm::EventID id() const
Definition: EventBase.h:60
HcalDetDiagLaserData hf_data[85][72][4]
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 2058 of file HcalDetDiagLaserMonitor.cc.

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 436 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(), 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(), ntuplemaker::status, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, Time2Dhbhehf, and Time2Dho.

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 2059 of file HcalDetDiagLaserMonitor.cc.

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

Reimplemented from HcalBaseDQMonitor.

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

References funct::abs(), HLT_25ns14e33_v1_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(), cond::rpcobgas::time, Time2Dhbhehf, and Time2Dho.

Referenced by analyze(), and endRun().

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

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

Referenced by analyze(), and endRun().

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

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

Referenced by fillHistos().

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

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

Referenced by fillProblems().

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

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

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

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

Referenced by bookHistograms().

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

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

Referenced by bookHistograms().

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

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

Referenced by endRun().

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

Definition at line 1445 of file HcalDetDiagLaserMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), calib_data, dataset_seq_number, HcalDetId::depth(), HLT_25ns14e33_v1_cff::depth, DetId::det(), cond::rpcobgas::detid, 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_steps::k, HcalElectronicsMap::lookup(), OutputFilePath, Overwrite, phi, colinearityKinematic::Phi, plotscripts::rms(), DTTTrigCorrFirst::run, run_number, sd, step1_ZMM_7Tev::Status, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), tree::t, interactiveExample::theFile, cond::rpcobgas::time, MainPageGenerator::tree, xmlFile(), and XmlFilePath.

Referenced by analyze(), and endRun().

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

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

Definition at line 350 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Energy2Dho
private

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

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergy
private

Definition at line 335 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergyRMS
private

Definition at line 337 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTime
private

Definition at line 336 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTimeRMS
private

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

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergy
private

Definition at line 343 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergyRMS
private

Definition at line 345 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTime
private

Definition at line 344 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTimeRMS
private

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

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergy
private

Definition at line 339 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergyRMS
private

Definition at line 341 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTime
private

Definition at line 340 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTimeRMS
private

Definition at line 342 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement * HcalDetDiagLaserMonitor::htmlFolder
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms().

std::string HcalDetDiagLaserMonitor::htmlOutputPath
private

Definition at line 330 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and HcalDetDiagLaserMonitor().

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

Definition at line 292 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::IsReference
private

Definition at line 316 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

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

Definition at line 378 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillProblems().

double HcalDetDiagLaserMonitor::LaserEnergyThreshold
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::LaserTimingThreshold
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::LocalRun
private

Definition at line 317 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement* HcalDetDiagLaserMonitor::meEVT_
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement * HcalDetDiagLaserMonitor::meRUN_
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

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

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

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

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

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

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

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::Online_
private

Definition at line 325 of file HcalDetDiagLaserMonitor.cc.

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

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

Definition at line 324 of file HcalDetDiagLaserMonitor.cc.

Referenced by 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 367 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms().

MonitorElement* HcalDetDiagLaserMonitor::Raddam[56]
private

Definition at line 362 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and bookHistograms().

bool HcalDetDiagLaserMonitor::RaddamRun
private

Definition at line 317 of file HcalDetDiagLaserMonitor.cc.

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

double HcalDetDiagLaserMonitor::RaddamThreshold1
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::RaddamThreshold2
private

Definition at line 311 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dhbhehf
private

Definition at line 354 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dho
private

Definition at line 355 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

std::string HcalDetDiagLaserMonitor::ReferenceData
private

Definition at line 319 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::string HcalDetDiagLaserMonitor::ReferenceRun
private

Definition at line 320 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and LoadReference().

MonitorElement* HcalDetDiagLaserMonitor::RefRun_
private

Definition at line 334 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dhbhehf
private

Definition at line 352 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dho
private

Definition at line 353 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 363 of file HcalDetDiagLaserMonitor.cc.

Referenced by SaveRaddamData().

TH1F * HcalDetDiagLaserMonitor::S2[56]
private

Definition at line 363 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and SaveRaddamData().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dhbhehf
private

Definition at line 348 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dho
private

Definition at line 349 of file HcalDetDiagLaserMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

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

Definition at line 295 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 297 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 299 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 298 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 294 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

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

Definition at line 296 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

std::string HcalDetDiagLaserMonitor::XmlFilePath
private