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

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

Inheritance diagram for HcalDetDiagPedestalMonitor:
HcalBaseDQMonitor DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

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

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &ib, const edm::Run &run, const edm::EventSetup &c) override
 
void CheckStatus ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void endRun (const edm::Run &run, const edm::EventSetup &c) override
 
void fillHistos ()
 
void LoadDataset ()
 
void LoadReference ()
 
void SaveReference ()
 

Private Attributes

bool createHTMLonly
 
int dataset_seq_number
 
std::string DatasetName
 
const HcalElectronicsMapemap
 
HcalDetDiagPedestalData hb_data [85][72][4][4]
 
double HBMeanTreshold
 
double HBRmsTreshold
 
HcalDetDiagPedestalData he_data [85][72][4][4]
 
double HEMeanTreshold
 
double HERmsTreshold
 
HcalDetDiagPedestalData hf_data [85][72][4][4]
 
double HFMeanTreshold
 
double HFRmsTreshold
 
HcalDetDiagPedestalData ho_data [85][72][4][4]
 
double HOMeanTreshold
 
double HORmsTreshold
 
MonitorElementhtmlFolder
 
std::string htmlOutputPath
 
int ievt_
 
edm::InputTag inputLabelDigi_
 
bool IsReference
 
std::map< unsigned int, int > KnownBadCells_
 
int lastPEDorbit_
 
bool LocalRun
 
MonitorElementmeEVT_
 
MonitorElementmeRUN_
 
int nChecksPED_
 
int nHB
 
int nHE
 
int nHF
 
int nHO
 
int nTS_HBHE
 
int nTS_HF
 
int nTS_HO
 
bool Online_
 
std::string OutputFilePath
 
bool Overwrite
 
MonitorElementPedestals2DErrorHBHEHF
 
MonitorElementPedestals2DErrorHO
 
MonitorElementPedestals2DHBHEHF
 
MonitorElementPedestals2DHO
 
MonitorElementPedestals2DRmsHBHEHF
 
MonitorElementPedestals2DRmsHO
 
MonitorElementPedestalsAve4HB
 
MonitorElementPedestalsAve4HBref
 
MonitorElementPedestalsAve4HE
 
MonitorElementPedestalsAve4HEref
 
MonitorElementPedestalsAve4HF
 
MonitorElementPedestalsAve4HFref
 
MonitorElementPedestalsAve4HO
 
MonitorElementPedestalsAve4HOref
 
MonitorElementPedestalsAve4Simp
 
MonitorElementPedestalsRmsHB
 
MonitorElementPedestalsRmsHBref
 
MonitorElementPedestalsRmsHE
 
MonitorElementPedestalsRmsHEref
 
MonitorElementPedestalsRmsHF
 
MonitorElementPedestalsRmsHFref
 
MonitorElementPedestalsRmsHO
 
MonitorElementPedestalsRmsHOref
 
MonitorElementPedestalsRmsSimp
 
bool PEDseq_
 
std::string prefixME_
 
EtaPhiHistsProblemCellsByDepth_badped
 
EtaPhiHistsProblemCellsByDepth_badped_val
 
EtaPhiHistsProblemCellsByDepth_badrms
 
EtaPhiHistsProblemCellsByDepth_badrms_val
 
EtaPhiHistsProblemCellsByDepth_missing
 
EtaPhiHistsProblemCellsByDepth_missing_val
 
EtaPhiHistsProblemCellsByDepth_unstable
 
EtaPhiHistsProblemCellsByDepth_unstable_val
 
std::vector< std::string > problemnames_
 
std::string ReferenceData
 
std::string ReferenceRun
 
MonitorElementRefRun_
 
int run_number
 
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 135 of file HcalDetDiagPedestalMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 248 of file HcalDetDiagPedestalMonitor.cc.

References createHTMLonly, dataset_seq_number, DatasetName, emap, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HBMeanTreshold, HBRmsTreshold, HEMeanTreshold, HERmsTreshold, HFMeanTreshold, HFRmsTreshold, HOMeanTreshold, HORmsTreshold, htmlOutputPath, ievt_, inputLabelDigi_, IsReference, LocalRun, nHB, nHE, nHF, nHO, nTS_HBHE, nTS_HF, nTS_HO, Online_, OutputFilePath, Overwrite, prefixME_, ProblemCellsByDepth_badped, ProblemCellsByDepth_badped_val, ProblemCellsByDepth_badrms, ProblemCellsByDepth_badrms_val, ProblemCellsByDepth_missing, ProblemCellsByDepth_missing_val, ProblemCellsByDepth_unstable, ProblemCellsByDepth_unstable_val, ReferenceData, run_number, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, tok_hbhe_, tok_hf_, tok_ho_, tok_raw_, tok_tb_, and XmlFilePath.

248  : HcalBaseDQMonitor(iConfig) {
249 
250  ievt_=-1;
251  emap=0;
253  run_number=-1;
254  IsReference=false;
255  LocalRun=false;
256  nHB=nHE=nHO=nHF=0;
257  createHTMLonly=false;
259  inputLabelDigi_ = iConfig.getUntrackedParameter<edm::InputTag>("digiLabel");
260  ReferenceData = iConfig.getUntrackedParameter<std::string>("PedestalReferenceData" ,"");
261  OutputFilePath = iConfig.getUntrackedParameter<std::string>("OutputFilePath", "");
262  DatasetName = iConfig.getUntrackedParameter<std::string>("PedestalDatasetName", "");
263  htmlOutputPath = iConfig.getUntrackedParameter<std::string>("htmlOutputPath", "");
264  XmlFilePath = iConfig.getUntrackedParameter<std::string>("XmlFilePath", "");
265  Online_ = iConfig.getUntrackedParameter<bool> ("online",false);
266  Overwrite = iConfig.getUntrackedParameter<bool> ("Overwrite",true);
267 
268  prefixME_ = iConfig.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
269  if (prefixME_.size()>0 && prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
270  prefixME_.append("/");
271  subdir_ = iConfig.getUntrackedParameter<std::string>("TaskFolder","DetDiagPedestalMonitor_Hcal/");
272  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
273  subdir_.append("/");
274  subdir_=prefixME_+subdir_;
275 
276  HBMeanTreshold = iConfig.getUntrackedParameter<double>("HBMeanPedestalTreshold" , 0.2);
277  HBRmsTreshold = iConfig.getUntrackedParameter<double>("HBRmsPedestalTreshold" , 0.3);
278  HEMeanTreshold = iConfig.getUntrackedParameter<double>("HEMeanPedestalTreshold" , 0.2);
279  HERmsTreshold = iConfig.getUntrackedParameter<double>("HERmsPedestalTreshold" , 0.3);
280  HOMeanTreshold = iConfig.getUntrackedParameter<double>("HOMeanPedestalTreshold" , 0.2);
281  HORmsTreshold = iConfig.getUntrackedParameter<double>("HORmsPedestalTreshold" , 0.3);
282  HFMeanTreshold = iConfig.getUntrackedParameter<double>("HFMeanPedestalTreshold" , 0.2);
283  HFRmsTreshold = iConfig.getUntrackedParameter<double>("HFRmsPedestalTreshold" , 0.3);
284 
285  // register for data access
286  tok_hbhe_ = consumes<HBHEDigiCollection>(inputLabelDigi_);
287  tok_ho_ = consumes<HODigiCollection>(inputLabelDigi_);
288  tok_hf_ = consumes<HFDigiCollection>(inputLabelDigi_);
289  tok_raw_ = consumes<FEDRawDataCollection>(iConfig.getUntrackedParameter<edm::InputTag>("rawDataLabel"));
290  tok_tb_ = consumes<HcalTBTriggerData>(iConfig.getParameter<edm::InputTag>("hcalTBTriggerDataTag"));
291 
292 
297 
302 
303 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
edm::EDGetTokenT< HODigiCollection > tok_ho_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
HcalDetDiagPedestalMonitor::~HcalDetDiagPedestalMonitor ( )

Definition at line 305 of file HcalDetDiagPedestalMonitor.cc.

References ProblemCellsByDepth_badped, ProblemCellsByDepth_badped_val, ProblemCellsByDepth_badrms, ProblemCellsByDepth_badrms_val, ProblemCellsByDepth_missing, ProblemCellsByDepth_missing_val, ProblemCellsByDepth_unstable, and ProblemCellsByDepth_unstable_val.

306 {
307 
316 
317 }

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 463 of file HcalDetDiagPedestalMonitor.cc.

References HcalDetDiagPedestalData::add_statistics(), HcalBaseDQMonitor::analyze(), diJetCalib::calibType, CheckStatus(), createHTMLonly, FEDRawData::data(), HLT_25ns10e33_v2_cff::depth, eta, MonitorElement::Fill(), fillHistos(), edm::Event::getByToken(), hb_data, hc_Pedestal, HcalBarrel, HcalEndcap, he_data, hf_data, ho_data, i, edm::EventBase::id(), ievt_, edm::HandleBase::isValid(), j, relval_2017::k, cmsLHEtoEOSManager::l, lastPEDorbit_, LocalRun, FEDNumbering::MAXHCALFEDID, meEVT_, meRUN_, FEDNumbering::MINHCALFEDID, nChecksPED_, nTS_HBHE, nTS_HF, nTS_HO, Online_, edm::EventBase::orbitNumber(), PEDseq_, phi, lumiPlot::rawdata, HcalBaseDQMonitor::reset(), edm::EventID::run(), run_number, SaveReference(), FEDRawData::size(), tok_hbhe_, tok_hf_, tok_ho_, tok_raw_, tok_tb_, and relativeConstraints::value.

463  {
464  if(createHTMLonly) return;
465  HcalBaseDQMonitor::analyze(iEvent, iSetup); // increments counters
466 int eta,phi,depth,nTS;
467  if(ievt_==-1){ ievt_=0; PEDseq_=false; lastPEDorbit_=-1;nChecksPED_=0; }
468  int orbit=iEvent.orbitNumber();
469  meRUN_->Fill(iEvent.id().run());
470 
471  bool PedestalEvent=false;
472 
473  // for local runs
474  edm::Handle<HcalTBTriggerData> trigger_data;
475  iEvent.getByToken(tok_tb_, trigger_data);
476  if(trigger_data.isValid()){
477  if((trigger_data->triggerWord())==5) PedestalEvent=true;
478  LocalRun=true;
479  }
480 
481  if(LocalRun && !PedestalEvent) return;
482 
483  if(!LocalRun && Online_){
484  if(PEDseq_ && (orbit-lastPEDorbit_)>(11223*10) && ievt_>500){
485  PEDseq_=false;
486  fillHistos();
487  CheckStatus();
488  nChecksPED_++;
489  if(nChecksPED_==1 || (nChecksPED_>1 && ((nChecksPED_-1)%12)==0)){
490  SaveReference();
491  }
492  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)for(int l=0;l<4;l++) hb_data[i][j][k][l].reset();
493  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)for(int l=0;l<4;l++) he_data[i][j][k][l].reset();
494  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)for(int l=0;l<4;l++) ho_data[i][j][k][l].reset();
495  for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)for(int l=0;l<4;l++) hf_data[i][j][k][l].reset();
496  ievt_=0;
497  }
498  }
499 
500 
501  // Abort Gap pedestals
502  int calibType = -1 ;
503  if(LocalRun==false){
505  iEvent.getByToken(tok_raw_,rawdata);
506  //checking FEDs for calibration information
508  const FEDRawData& fedData = rawdata->FEDData(i) ;
509  if ( fedData.size() < 24 ) continue ;
510  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
511  if ( calibType < 0 ) calibType = value ;
512  if(value==hc_Pedestal){ PEDseq_=true; lastPEDorbit_=orbit; break;}
513  }
514  }
515  if(!LocalRun && calibType!=hc_Pedestal) return;
516 
517  ievt_++;
518  meEVT_->Fill(ievt_);
519  run_number=iEvent.id().run();
520 
522  iEvent.getByToken(tok_hbhe_,hbhe);
523  if(hbhe.isValid()){
524  if(hbhe->size()<30 && calibType==hc_Pedestal){
525  ievt_--;
526  meEVT_->Fill(ievt_);
527  return;
528  }
529  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
530  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
531  if(nTS>8) nTS=8;
532  if(nTS<8 && nTS>=4) nTS=4;
533  nTS_HBHE=nTS;
534  if(digi->id().subdet()==HcalBarrel){
535  for(int i=0;i<nTS;i++) hb_data[eta+42][phi-1][depth-1][digi->sample(i).capid()].add_statistics(digi->sample(i).adc());
536  }
537  if(digi->id().subdet()==HcalEndcap){
538  for(int i=0;i<nTS;i++) he_data[eta+42][phi-1][depth-1][digi->sample(i).capid()].add_statistics(digi->sample(i).adc());
539  }
540  }
541  }
543  iEvent.getByToken(tok_ho_,ho);
544  if(ho.isValid()){
545  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
546  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
547  if(nTS>8) nTS=8;
548  if(nTS<8 && nTS>=4) nTS=4;
549  nTS_HO=nTS;
550  for(int i=0;i<nTS;i++) ho_data[eta+42][phi-1][depth-1][digi->sample(i).capid()].add_statistics(digi->sample(i).adc());
551  }
552  }
554  iEvent.getByToken(tok_hf_,hf);
555  if(hf.isValid()){
556  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
557  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
558  if(nTS>8) nTS=8;
559  if(nTS<8 && nTS>=4) nTS=4;
560  nTS_HF=nTS;
561  for(int i=0;i<nTS;i++) hf_data[eta+42][phi-1][depth-1][digi->sample(i).capid()].add_statistics(digi->sample(i).adc());
562  }
563  }
564 }
RunNumber_t run() const
Definition: EventID.h:39
int i
Definition: DBlmapReader.cc:9
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
HcalDetDiagPedestalData ho_data[85][72][4][4]
tuple calibType
Definition: diJetCalib.py:20
std::vector< HBHEDataFrame >::const_iterator const_iterator
HcalDetDiagPedestalData he_data[85][72][4][4]
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(long long x)
HcalDetDiagPedestalData hb_data[85][72][4][4]
int j
Definition: DBlmapReader.cc:9
int orbitNumber() const
Definition: EventBase.h:66
void add_statistics(unsigned int val)
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< HODigiCollection > tok_ho_
virtual void reset(void)
edm::EventID id() const
Definition: EventBase.h:59
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
dictionary rawdata
Definition: lumiPlot.py:393
edm::EDGetTokenT< HFDigiCollection > tok_hf_
HcalDetDiagPedestalData hf_data[85][72][4][4]
void HcalDetDiagPedestalMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1336 of file HcalDetDiagPedestalMonitor.cc.

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 319 of file HcalDetDiagPedestalMonitor.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookInt(), DQMStore::IBooker::bookString(), createHTMLonly, dataset_seq_number, DatasetName, EtaPhiHists::depth, emap, MonitorElement::Fill(), edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, HcalChannelStatus::HcalCellMask, HcalChannelStatus::HcalCellOff, htmlFolder, htmlOutputPath, i, KnownBadCells_, LoadDataset(), LoadReference(), meEVT_, meRUN_, mergeVDriftHistosByStation::name, nHB, nHE, nHF, nHO, AlCaHLTBitMon_ParallelJobs::p, Pedestals2DErrorHBHEHF, Pedestals2DErrorHO, Pedestals2DHBHEHF, Pedestals2DHO, Pedestals2DRmsHBHEHF, Pedestals2DRmsHO, PedestalsAve4HB, PedestalsAve4HBref, PedestalsAve4HE, PedestalsAve4HEref, PedestalsAve4HF, PedestalsAve4HFref, PedestalsAve4HO, PedestalsAve4HOref, PedestalsAve4Simp, PedestalsRmsHB, PedestalsRmsHBref, PedestalsRmsHE, PedestalsRmsHEref, PedestalsRmsHF, PedestalsRmsHFref, PedestalsRmsHO, PedestalsRmsHOref, PedestalsRmsSimp, prefixME_, ProblemCellsByDepth_badped, ProblemCellsByDepth_badped_val, ProblemCellsByDepth_badrms, ProblemCellsByDepth_badrms_val, ProblemCellsByDepth_missing, ProblemCellsByDepth_missing_val, ProblemCellsByDepth_unstable, ProblemCellsByDepth_unstable_val, problemnames_, edm::ESHandle< class >::product(), ReferenceRun, RefRun_, run_number, MonitorElement::setAxisRange(), MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), EtaPhiHists::setup(), HcalBaseDQMonitor::setup(), mps_update::status, AlCaHLTBitMon_QueryRunRegistry::string, and HcalBaseDQMonitor::subdir_.

319  {
320  edm::ESHandle<HcalDbService> conditions_;
321  c.get<HcalDbRecord>().get(conditions_);
322  emap=conditions_->getHcalMapping();
323 
325  c.get<HcalChannelQualityRcd>().get("withTopo",p);
326  const HcalChannelQuality* chanquality= p.product();
327  std::vector<DetId> mydetids = chanquality->getAllChannels();
328  KnownBadCells_.clear();
329 
330  for (std::vector<DetId>::const_iterator i = mydetids.begin();i!=mydetids.end();++i){
331  if (i->det()!=DetId::Hcal) continue; // not an hcal cell
332  HcalDetId id=HcalDetId(*i);
333  int status=(chanquality->getValues(id))->getValue();
335  KnownBadCells_[id.rawId()]=status;
336  }
337  }
338 
339 
342 
344  meEVT_ = ib.bookInt("HcalDetDiagPedestalMonitor Event Number");
345  meRUN_ = ib.bookInt("HcalDetDiagPedestalMonitor Run Number");
346 
347  ReferenceRun="UNKNOWN";
348  LoadReference();
349  LoadDataset();
351  RefRun_= ib.bookString("HcalDetDiagPedestalMonitor Reference Run",ReferenceRun);
352  if(DatasetName.size()>0 && createHTMLonly){
353  char str[200]; sprintf(str,"%sHcalDetDiagPedestalData_run%i_%i/",htmlOutputPath.c_str(),run_number,dataset_seq_number);
354  htmlFolder=ib.bookString("HcalDetDiagPedestalMonitor HTML folder",str);
355  MonitorElement *me;
356  ib.setCurrentFolder(prefixME_+"HcalInfo");
357  me=ib.bookInt("HBpresent");
358  if(nHB>0) me->Fill(1);
359  me=ib.bookInt("HEpresent");
360  if(nHE>0) me->Fill(1);
361  me=ib.bookInt("HOpresent");
362  if(nHO>0) me->Fill(1);
363  me=ib.bookInt("HFpresent");
364  if(nHF>0) me->Fill(1);
365  }
366 
368  ProblemCellsByDepth_missing->setup(ib," Problem Missing Channels");
369  for(unsigned int i=0;i<ProblemCellsByDepth_missing->depth.size();i++)
370  problemnames_.push_back(ProblemCellsByDepth_missing->depth[i]->getName());
372  ProblemCellsByDepth_unstable->setup(ib," Problem Unstable Channels");
373  for(unsigned int i=0;i<ProblemCellsByDepth_unstable->depth.size();i++)
374  problemnames_.push_back(ProblemCellsByDepth_unstable->depth[i]->getName());
376  ProblemCellsByDepth_badped->setup(ib," Problem Bad Pedestal Value");
377  for(unsigned int i=0;i<ProblemCellsByDepth_badped->depth.size();i++)
378  problemnames_.push_back(ProblemCellsByDepth_badped->depth[i]->getName());
380  ProblemCellsByDepth_badrms->setup(ib," Problem Bad Rms Value");
381  for(unsigned int i=0;i<ProblemCellsByDepth_badrms->depth.size();i++)
382  problemnames_.push_back(ProblemCellsByDepth_badrms->depth[i]->getName());
383 
384  ib.setCurrentFolder(subdir_+"Summary Plots");
385  name="HB Pedestal Distribution (average over 4 caps)"; PedestalsAve4HB = ib.book1D(name,name,200,0,6);
386  name="HE Pedestal Distribution (average over 4 caps)"; PedestalsAve4HE = ib.book1D(name,name,200,0,6);
387  name="HO Pedestal Distribution (average over 4 caps)"; PedestalsAve4HO = ib.book1D(name,name,200,0,6);
388  name="HF Pedestal Distribution (average over 4 caps)"; PedestalsAve4HF = ib.book1D(name,name,200,0,6);
389  name="SIPM Pedestal Distribution (average over 4 caps)"; PedestalsAve4Simp = ib.book1D(name,name,200,5,15);
390 
391  name="HB Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HBref= ib.book1D(name,name,1500,-3,3);
392  name="HE Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HEref= ib.book1D(name,name,1500,-3,3);
393  name="HO Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HOref= ib.book1D(name,name,1500,-3,3);
394  name="HF Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HFref= ib.book1D(name,name,1500,-3,3);
395 
396  name="HB Pedestal RMS Distribution (individual cap)"; PedestalsRmsHB = ib.book1D(name,name,200,0,2);
397  name="HE Pedestal RMS Distribution (individual cap)"; PedestalsRmsHE = ib.book1D(name,name,200,0,2);
398  name="HO Pedestal RMS Distribution (individual cap)"; PedestalsRmsHO = ib.book1D(name,name,200,0,2);
399  name="HF Pedestal RMS Distribution (individual cap)"; PedestalsRmsHF = ib.book1D(name,name,200,0,2);
400  name="SIPM Pedestal RMS Distribution (individual cap)"; PedestalsRmsSimp = ib.book1D(name,name,200,0,4);
401 
402  name="HB Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHBref = ib.book1D(name,name,1500,-3,3);
403  name="HE Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHEref = ib.book1D(name,name,1500,-3,3);
404  name="HO Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHOref = ib.book1D(name,name,1500,-3,3);
405  name="HF Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHFref = ib.book1D(name,name,1500,-3,3);
406 
407  name="HBHEHF pedestal mean map"; Pedestals2DHBHEHF = ib.book2D(name,name,87,-43,43,74,0,73);
408  name="HO pedestal mean map"; Pedestals2DHO = ib.book2D(name,name,33,-16,16,74,0,73);
409  name="HBHEHF pedestal rms map"; Pedestals2DRmsHBHEHF = ib.book2D(name,name,87,-43,43,74,0,73);
410  name="HO pedestal rms map"; Pedestals2DRmsHO = ib.book2D(name,name,33,-16,16,74,0,73);
411  name="HBHEHF pedestal problems map"; Pedestals2DErrorHBHEHF = ib.book2D(name,name,87,-43,43,74,0,73);
412  name="HO pedestal problems map"; Pedestals2DErrorHO = ib.book2D(name,name,33,-16,16,74,0,73);
413 
415  Pedestals2DHO->setAxisRange(1,5,3);
418 
419  Pedestals2DHBHEHF->setAxisTitle("i#eta",1);
420  Pedestals2DHBHEHF->setAxisTitle("i#phi",2);
421  Pedestals2DHO->setAxisTitle("i#eta",1);
422  Pedestals2DHO->setAxisTitle("i#phi",2);
425  Pedestals2DRmsHO->setAxisTitle("i#eta",1);
426  Pedestals2DRmsHO->setAxisTitle("i#phi",2);
429  Pedestals2DErrorHO->setAxisTitle("i#eta",1);
430  Pedestals2DErrorHO->setAxisTitle("i#phi",2);
431  PedestalsAve4HB->setAxisTitle("ADC counts",1);
432  PedestalsAve4HE->setAxisTitle("ADC counts",1);
433  PedestalsAve4HO->setAxisTitle("ADC counts",1);
434  PedestalsAve4HF->setAxisTitle("ADC counts",1);
435  PedestalsAve4Simp->setAxisTitle("ADC counts",1);
436  PedestalsAve4HBref->setAxisTitle("ADC counts",1);
437  PedestalsAve4HEref->setAxisTitle("ADC counts",1);
438  PedestalsAve4HOref->setAxisTitle("ADC counts",1);
439  PedestalsAve4HFref->setAxisTitle("ADC counts",1);
440  PedestalsRmsHB->setAxisTitle("ADC counts",1);
441  PedestalsRmsHE->setAxisTitle("ADC counts",1);
442  PedestalsRmsHO->setAxisTitle("ADC counts",1);
443  PedestalsRmsHF->setAxisTitle("ADC counts",1);
444  PedestalsRmsSimp->setAxisTitle("ADC counts",1);
445  PedestalsRmsHBref->setAxisTitle("ADC counts",1);
446  PedestalsRmsHEref->setAxisTitle("ADC counts",1);
447  PedestalsRmsHOref->setAxisTitle("ADC counts",1);
448  PedestalsRmsHFref->setAxisTitle("ADC counts",1);
449 
450  ib.setCurrentFolder(subdir_+"Plots for client");
452  ProblemCellsByDepth_missing_val->setup(ib," Missing channels");
454  ProblemCellsByDepth_unstable_val->setup(ib," Channel instability value");
456  ProblemCellsByDepth_badped_val->setup(ib," Bad Pedestal-Ref Value");
458  ProblemCellsByDepth_badrms_val->setup(ib," Bad Rms-ref Value");
459 }
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)
std::vector< std::string > problemnames_
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:103
MonitorElement * bookString(Args &&...args)
Definition: DQMStore.h:97
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::map< unsigned int, int > KnownBadCells_
void Fill(long long x)
std::vector< MonitorElement * > depth
std::vector< DetId > getAllChannels() const
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual void setup(DQMStore::IBooker &)
tuple status
Definition: mps_update.py:57
void HcalDetDiagPedestalMonitor::CheckStatus ( )
private

Definition at line 676 of file HcalDetDiagPedestalMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), CalcEtaBin(), HcalDetDiagPedestalData::change_status(), HcalDetId::depth(), EtaPhiHists::depth, HLT_25ns10e33_v2_cff::depth, DetId::det(), alignCSCRings::e, emap, eta, MonitorElement::Fill(), HcalDetDiagPedestalData::get_average(), HcalDetDiagPedestalData::get_overflow(), HcalDetDiagPedestalData::get_reference(), HcalDetDiagPedestalData::get_statistics(), hb_data, HBMeanTreshold, HBRmsTreshold, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalOuter, he_data, HEMeanTreshold, HERmsTreshold, hf_data, HFMeanTreshold, HFRmsTreshold, ho_data, HOMeanTreshold, HORmsTreshold, i, HcalDetId::ieta(), ievt_, HcalDetId::iphi(), KnownBadCells_, HcalElectronicsMap::lookup(), HcalDetDiagPedestalData::nBadPed, HcalDetDiagPedestalData::nBadRms, HcalDetDiagPedestalData::nChecks, HcalDetDiagPedestalData::nMissing, nTS_HBHE, nTS_HF, nTS_HO, HcalDetDiagPedestalData::nUnstable, Pedestals2DErrorHBHEHF, Pedestals2DErrorHO, PedestalsAve4HBref, PedestalsAve4HEref, PedestalsAve4HFref, PedestalsAve4HOref, PedestalsRmsHBref, PedestalsRmsHEref, PedestalsRmsHFref, PedestalsRmsHOref, phi, ProblemCellsByDepth_badped, ProblemCellsByDepth_badped_val, ProblemCellsByDepth_badrms, ProblemCellsByDepth_badrms_val, ProblemCellsByDepth_missing, ProblemCellsByDepth_missing_val, ProblemCellsByDepth_unstable, ProblemCellsByDepth_unstable_val, DetId::rawId(), MonitorElement::Reset(), plotscripts::rms(), sd, mps_update::status, DetId::subdetId(), and tmp.

Referenced by analyze(), and endRun().

676  {
677  for(int i=0;i<4;i++){
682  }
691 
694 
695  if(emap==0) return;
696 
697  std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
698  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++) {
699  DetId detid=emap->lookup(*eid);
700  if (detid.det()!=DetId::Hcal) continue;
701  HcalGenericDetId gid(emap->lookup(*eid));
702  if(!(!(gid.null()) &&
703  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
704  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
705  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
706  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
707  int eta=0,phi=0,depth=0;
708 
709  HcalDetId hid(detid);
710  if(KnownBadCells_.find(hid.rawId())==KnownBadCells_.end()) continue;
711 
712  eta=hid.ieta();
713  phi=hid.iphi();
714  depth=hid.depth();
715  int sd=detid.subdetId();
716 
717  if(sd==HcalBarrel){
718  int ovf=hb_data[eta+42][phi-1][depth-1][0].get_overflow();
719  int stat=hb_data[eta+42][phi-1][depth-1][0].get_statistics()+ovf;
720  double status=0;
721  double ped[4],rms[4],ped_ref[4],rms_ref[4];
722  hb_data[eta+42][phi-1][depth-1][0].nChecks++;
723  if(stat==0){
724  status=1;
725  int e=CalcEtaBin(sd,eta,depth)+1;
726  hb_data[eta+42][phi-1][depth-1][0].nMissing++;
727  double val=hb_data[eta+42][phi-1][depth-1][0].nMissing/hb_data[eta+42][phi-1][depth-1][0].nChecks;
728  ProblemCellsByDepth_missing->depth[depth-1]->setBinContent(e,phi,val);
729  ProblemCellsByDepth_missing_val->depth[depth-1]->setBinContent(e,phi,1);
730  }
731  if(status) hb_data[eta+42][phi-1][depth-1][0].change_status(1);
732  if(stat>0 && stat!=(ievt_*2)){ if(nTS_HBHE==8) status=(double)stat/(double)(ievt_*2); else status=(double)stat/(double)(ievt_);
733  if(status<0.995){
734  int e=CalcEtaBin(sd,eta,depth)+1;
735  hb_data[eta+42][phi-1][depth-1][0].nUnstable++;
736  double val=hb_data[eta+42][phi-1][depth-1][0].nUnstable/hb_data[eta+42][phi-1][depth-1][0].nChecks;
737  ProblemCellsByDepth_unstable->depth[depth-1]->setBinContent(e,phi,val);
738  ProblemCellsByDepth_unstable_val->depth[depth-1]->setBinContent(e,phi,status);
739  hb_data[eta+42][phi-1][depth-1][0].change_status(2);
740  }
741  }
742  if(hb_data[eta+42][phi-1][depth-1][0].get_reference(&ped_ref[0],&rms_ref[0])
743  && hb_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0])){
744  hb_data[eta+42][phi-1][depth-1][1].get_reference(&ped_ref[1],&rms_ref[1]);
745  hb_data[eta+42][phi-1][depth-1][2].get_reference(&ped_ref[2],&rms_ref[2]);
746  hb_data[eta+42][phi-1][depth-1][3].get_reference(&ped_ref[3],&rms_ref[3]);
747  hb_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
748  hb_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
749  hb_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
750  double ave=(ped[0]+ped[1]+ped[2]+ped[3])/4.0;
751  double ave_ref=(ped_ref[0]+ped_ref[1]+ped_ref[2]+ped_ref[3])/4.0;
752  double deltaPed=ave-ave_ref; PedestalsAve4HBref->Fill(deltaPed); if(deltaPed<0) deltaPed=-deltaPed;
753  double deltaRms=rms[0]-rms_ref[0]; PedestalsRmsHBref->Fill(deltaRms); if(deltaRms<0) deltaRms=-deltaRms;
754  for(int i=1;i<4;i++){
755  double tmp=rms[i]-rms_ref[i]; PedestalsRmsHBref->Fill(tmp);
756  if(fabs(tmp)>fabs(deltaRms)) deltaRms=tmp;
757  }
758  if(deltaPed>HBMeanTreshold){
759  int e=CalcEtaBin(sd,eta,depth)+1;
760  hb_data[eta+42][phi-1][depth-1][0].nBadPed++;
761  double val=hb_data[eta+42][phi-1][depth-1][0].nBadPed/hb_data[eta+42][phi-1][depth-1][0].nChecks;
762  ProblemCellsByDepth_badped_val->depth[depth-1]->setBinContent(e,phi,ave-ave_ref);
763  ProblemCellsByDepth_badped->depth[depth-1]->setBinContent(e,phi,val);
765  }
766  if(deltaRms>HBRmsTreshold){
767  int e=CalcEtaBin(sd,eta,depth)+1;
768  hb_data[eta+42][phi-1][depth-1][0].nBadRms++;
769  double val=hb_data[eta+42][phi-1][depth-1][0].nBadRms/hb_data[eta+42][phi-1][depth-1][0].nChecks;
770  ProblemCellsByDepth_badrms->depth[depth-1]->setBinContent(e,phi,val);
771  ProblemCellsByDepth_badrms_val->depth[depth-1]->setBinContent(e,phi,deltaRms);
773  }
774  }
775  }
776  if(sd==HcalEndcap){
777  int ovf=he_data[eta+42][phi-1][depth-1][0].get_overflow();
778  int stat=he_data[eta+42][phi-1][depth-1][0].get_statistics()+ovf;
779  double status=0;
780  double ped[4],rms[4],ped_ref[4],rms_ref[4];
781  he_data[eta+42][phi-1][depth-1][0].nChecks++;
782  if(stat==0){
783  status=1;
784  int e=CalcEtaBin(sd,eta,depth)+1;
785  he_data[eta+42][phi-1][depth-1][0].nMissing++;
786  double val=he_data[eta+42][phi-1][depth-1][0].nMissing/he_data[eta+42][phi-1][depth-1][0].nChecks;
787  ProblemCellsByDepth_missing->depth[depth-1]->setBinContent(e,phi,val);
788  ProblemCellsByDepth_missing_val->depth[depth-1]->setBinContent(e,phi,1);
789  }
790  if(status) he_data[eta+42][phi-1][depth-1][0].change_status(1);
791  if(stat>0 && stat!=(ievt_*2)){ if(nTS_HBHE==8) status=(double)stat/(double)(ievt_*2); else status=(double)stat/(double)(ievt_);
792  if(status<0.995){
793  int e=CalcEtaBin(sd,eta,depth)+1;
794  he_data[eta+42][phi-1][depth-1][0].nUnstable++;
795  double val=he_data[eta+42][phi-1][depth-1][0].nUnstable/he_data[eta+42][phi-1][depth-1][0].nChecks;
796  ProblemCellsByDepth_unstable->depth[depth-1]->setBinContent(e,phi,val);
797  ProblemCellsByDepth_unstable_val->depth[depth-1]->setBinContent(e,phi,status);
798  he_data[eta+42][phi-1][depth-1][0].change_status(2);
799  }
800  }
801  if(he_data[eta+42][phi-1][depth-1][0].get_reference(&ped_ref[0],&rms_ref[0])
802  && he_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0])){
803  he_data[eta+42][phi-1][depth-1][1].get_reference(&ped_ref[1],&rms_ref[1]);
804  he_data[eta+42][phi-1][depth-1][2].get_reference(&ped_ref[2],&rms_ref[2]);
805  he_data[eta+42][phi-1][depth-1][3].get_reference(&ped_ref[3],&rms_ref[3]);
806  he_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
807  he_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
808  he_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
809  double ave=(ped[0]+ped[1]+ped[2]+ped[3])/4.0;
810  double ave_ref=(ped_ref[0]+ped_ref[1]+ped_ref[2]+ped_ref[3])/4.0;
811  double deltaPed=ave-ave_ref; PedestalsAve4HEref->Fill(deltaPed); if(deltaPed<0) deltaPed=-deltaPed;
812  double deltaRms=rms[0]-rms_ref[0]; PedestalsRmsHEref->Fill(deltaRms); if(deltaRms<0) deltaRms=-deltaRms;
813  for(int i=1;i<4;i++){
814  double tmp=rms[i]-rms_ref[i]; PedestalsRmsHEref->Fill(tmp);
815  if(fabs(tmp)>fabs(deltaRms)) deltaRms=tmp;
816  }
817  if(deltaPed>HEMeanTreshold){
818  int e=CalcEtaBin(sd,eta,depth)+1;
819  he_data[eta+42][phi-1][depth-1][0].nBadPed++;
820  double val=he_data[eta+42][phi-1][depth-1][0].nBadPed/he_data[eta+42][phi-1][depth-1][0].nChecks;
821  ProblemCellsByDepth_badped->depth[depth-1]->setBinContent(e,phi,val);
822  ProblemCellsByDepth_badped_val->depth[depth-1]->setBinContent(e,phi,ave-ave_ref);
824  }
825  if(deltaRms>HERmsTreshold){
826  int e=CalcEtaBin(sd,eta,depth)+1;
827  he_data[eta+42][phi-1][depth-1][0].nBadRms++;
828  double val=he_data[eta+42][phi-1][depth-1][0].nBadRms/he_data[eta+42][phi-1][depth-1][0].nChecks;
829  ProblemCellsByDepth_badrms->depth[depth-1]->setBinContent(e,phi,val);
830  ProblemCellsByDepth_badrms_val->depth[depth-1]->setBinContent(e,phi,deltaRms);
832  }
833  }
834  }
835  if(sd==HcalOuter){
836  int ovf=ho_data[eta+42][phi-1][depth-1][0].get_overflow();
837  int stat=ho_data[eta+42][phi-1][depth-1][0].get_statistics()+ovf;
838  double status=0;
839  double ped[4],rms[4],ped_ref[4],rms_ref[4];
840  ho_data[eta+42][phi-1][depth-1][0].nChecks++;
841  if(stat==0){
842  status=1;
843  int e=CalcEtaBin(sd,eta,depth)+1;
844  ho_data[eta+42][phi-1][depth-1][0].nMissing++;
845  double val=ho_data[eta+42][phi-1][depth-1][0].nMissing/ho_data[eta+42][phi-1][depth-1][0].nChecks;
846  ProblemCellsByDepth_missing->depth[depth-1]->setBinContent(e,phi,val);
847  ProblemCellsByDepth_missing_val->depth[depth-1]->setBinContent(e,phi,1);
848  }
849  if(status) ho_data[eta+42][phi-1][depth-1][0].change_status(1);
850  if(stat>0 && stat!=(ievt_*2)){ if(nTS_HO==8) status=(double)stat/(double)(ievt_*2); else status=(double)stat/(double)(ievt_);
851  if(status<0.995){
852  int e=CalcEtaBin(sd,eta,depth)+1;
853  ho_data[eta+42][phi-1][depth-1][0].nUnstable++;
854  double val=ho_data[eta+42][phi-1][depth-1][0].nUnstable/ho_data[eta+42][phi-1][depth-1][0].nChecks;
855  ProblemCellsByDepth_unstable->depth[depth-1]->setBinContent(e,phi,val);
856  ProblemCellsByDepth_unstable_val->depth[depth-1]->setBinContent(e,phi,status);
857  ho_data[eta+42][phi-1][depth-1][0].change_status(2);
858  }
859  }
860  if(ho_data[eta+42][phi-1][depth-1][0].get_reference(&ped_ref[0],&rms_ref[0])
861  && ho_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0])){
862  ho_data[eta+42][phi-1][depth-1][1].get_reference(&ped_ref[1],&rms_ref[1]);
863  ho_data[eta+42][phi-1][depth-1][2].get_reference(&ped_ref[2],&rms_ref[2]);
864  ho_data[eta+42][phi-1][depth-1][3].get_reference(&ped_ref[3],&rms_ref[3]);
865  ho_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
866  ho_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
867  ho_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
868 
869  double THRESTHOLD=HORmsTreshold;
870  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58))THRESTHOLD*=2;
871  double ave=(ped[0]+ped[1]+ped[2]+ped[3])/4.0;
872  double ave_ref=(ped_ref[0]+ped_ref[1]+ped_ref[2]+ped_ref[3])/4.0;
873  double deltaPed=ave-ave_ref; PedestalsAve4HOref->Fill(deltaPed);if(deltaPed<0) deltaPed=-deltaPed;
874  double deltaRms=rms[0]-rms_ref[0]; PedestalsRmsHOref->Fill(deltaRms); if(deltaRms<0) deltaRms=-deltaRms;
875  for(int i=1;i<4;i++){
876  double tmp=rms[i]-rms_ref[i]; PedestalsRmsHOref->Fill(tmp);
877  if(fabs(tmp)>fabs(deltaRms)) deltaRms=tmp;
878  }
879  if(deltaPed>HOMeanTreshold){
880  int e=CalcEtaBin(sd,eta,depth)+1;
881  ho_data[eta+42][phi-1][depth-1][0].nBadPed++;
882  double val=ho_data[eta+42][phi-1][depth-1][0].nBadPed/ho_data[eta+42][phi-1][depth-1][0].nChecks;
883  ProblemCellsByDepth_badped->depth[depth-1]->setBinContent(e,phi,val);
884  ProblemCellsByDepth_badped_val->depth[depth-1]->setBinContent(e,phi,ave-ave_ref);
885  Pedestals2DErrorHO->Fill(eta,phi,1);
886  }
887  if(deltaRms>THRESTHOLD){
888  int e=CalcEtaBin(sd,eta,depth)+1;
889  ho_data[eta+42][phi-1][depth-1][0].nBadRms++;
890  double val=ho_data[eta+42][phi-1][depth-1][0].nBadRms/ho_data[eta+42][phi-1][depth-1][0].nChecks;
891  ProblemCellsByDepth_badrms->depth[depth-1]->setBinContent(e,phi,val);
892  ProblemCellsByDepth_badrms_val->depth[depth-1]->setBinContent(e,phi,deltaRms);
893  Pedestals2DErrorHO->Fill(eta,phi,1);
894  }
895  }
896  }
897  if(sd==HcalForward){
898  int ovf=hf_data[eta+42][phi-1][depth-1][0].get_overflow();
899  int stat=hf_data[eta+42][phi-1][depth-1][0].get_statistics()+ovf;
900  double status=0;
901  double ped[4],rms[4],ped_ref[4],rms_ref[4];
902  hf_data[eta+42][phi-1][depth-1][0].nChecks++;
903  if(stat==0){
904  status=1;
905  int e=CalcEtaBin(sd,eta,depth)+1;
906  hf_data[eta+42][phi-1][depth-1][0].nMissing++;
907  double val=hf_data[eta+42][phi-1][depth-1][0].nMissing/hf_data[eta+42][phi-1][depth-1][0].nChecks;
908  ProblemCellsByDepth_missing->depth[depth-1]->setBinContent(e,phi,val);
909  ProblemCellsByDepth_missing_val->depth[depth-1]->setBinContent(e,phi,1);
910  }
911  if(status) hf_data[eta+42][phi-1][depth-1][0].change_status(1);
912  if(stat>0 && stat!=(ievt_*2)){ if(nTS_HF==8) status=(double)stat/(double)(ievt_*2); else status=(double)stat/(double)(ievt_);
913  if(status<0.995){
914  int e=CalcEtaBin(sd,eta,depth)+1;
915  hf_data[eta+42][phi-1][depth-1][0].nUnstable++;
916  double val=hf_data[eta+42][phi-1][depth-1][0].nUnstable/hf_data[eta+42][phi-1][depth-1][0].nChecks;
917  ProblemCellsByDepth_unstable->depth[depth-1]->setBinContent(e,phi,val);
918  ProblemCellsByDepth_unstable_val->depth[depth-1]->setBinContent(e,phi,status);
919  hf_data[eta+42][phi-1][depth-1][0].change_status(2);
920  }
921  }
922  if(hf_data[eta+42][phi-1][depth-1][0].get_reference(&ped_ref[0],&rms_ref[0])
923  && hf_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0])){
924  hf_data[eta+42][phi-1][depth-1][1].get_reference(&ped_ref[1],&rms_ref[1]);
925  hf_data[eta+42][phi-1][depth-1][2].get_reference(&ped_ref[2],&rms_ref[2]);
926  hf_data[eta+42][phi-1][depth-1][3].get_reference(&ped_ref[3],&rms_ref[3]);
927  hf_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
928  hf_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
929  hf_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
930  double ave=(ped[0]+ped[1]+ped[2]+ped[3])/4.0;
931  double ave_ref=(ped_ref[0]+ped_ref[1]+ped_ref[2]+ped_ref[3])/4.0;
932  double deltaPed=ave-ave_ref; PedestalsAve4HFref->Fill(deltaPed); if(deltaPed<0) deltaPed=-deltaPed;
933  double deltaRms=rms[0]-rms_ref[0]; PedestalsRmsHFref->Fill(deltaRms); if(deltaRms<0) deltaRms=-deltaRms;
934  for(int i=1;i<4;i++){
935  double tmp=rms[i]-rms_ref[i]; PedestalsRmsHFref->Fill(tmp);
936  if(fabs(tmp)>fabs(deltaRms)) deltaRms=tmp;
937  }
938  if(deltaPed>HFMeanTreshold){
939  int e=CalcEtaBin(sd,eta,depth)+1;
940  hf_data[eta+42][phi-1][depth-1][0].nBadPed++;
941  double val=hf_data[eta+42][phi-1][depth-1][0].nBadPed/hf_data[eta+42][phi-1][depth-1][0].nChecks;
942  ProblemCellsByDepth_badped->depth[depth-1]->setBinContent(e,phi,val);
943  ProblemCellsByDepth_badped_val->depth[depth-1]->setBinContent(e,phi,ave-ave_ref);
945  }
946  if(deltaRms>HFRmsTreshold){
947  int e=CalcEtaBin(sd,eta,depth)+1;
948  hf_data[eta+42][phi-1][depth-1][0].nBadRms++;
949  double val=hf_data[eta+42][phi-1][depth-1][0].nBadRms/hf_data[eta+42][phi-1][depth-1][0].nChecks;
950  ProblemCellsByDepth_badrms->depth[depth-1]->setBinContent(e,phi,val);
951  ProblemCellsByDepth_badrms_val->depth[depth-1]->setBinContent(e,phi,deltaRms);
953  }
954  }
955  }
956  }
957 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
HcalDetDiagPedestalData ho_data[85][72][4][4]
HcalDetDiagPedestalData he_data[85][72][4][4]
bool get_average(double *ave, double *rms)
std::map< unsigned int, int > KnownBadCells_
void Fill(long long x)
bool get_reference(double *val, double *rms)
std::vector< MonitorElement * > depth
HcalDetDiagPedestalData hb_data[85][72][4][4]
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
double sd
int CalcEtaBin(int subdet, int ieta, int depth)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
void Reset(void)
reset ME (ie. contents, errors, etc)
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
tuple status
Definition: mps_update.py:57
HcalDetDiagPedestalData hf_data[85][72][4][4]
void HcalDetDiagPedestalMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1337 of file HcalDetDiagPedestalMonitor.cc.

1337 {}
void HcalDetDiagPedestalMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
overrideprivatevirtual
void HcalDetDiagPedestalMonitor::fillHistos ( )
private

Definition at line 566 of file HcalDetDiagPedestalMonitor.cc.

References funct::abs(), HLT_25ns10e33_v2_cff::depth, eta, MonitorElement::Fill(), HcalDetDiagPedestalData::get_average(), hb_data, he_data, hf_data, ho_data, isSiPM(), Pedestals2DHBHEHF, Pedestals2DHO, Pedestals2DRmsHBHEHF, Pedestals2DRmsHO, PedestalsAve4HB, PedestalsAve4HE, PedestalsAve4HF, PedestalsAve4HO, PedestalsAve4Simp, PedestalsRmsHB, PedestalsRmsHE, PedestalsRmsHF, PedestalsRmsHO, PedestalsRmsSimp, phi, MonitorElement::Reset(), RMS, and plotscripts::rms().

Referenced by analyze(), and endRun().

566  {
580  Pedestals2DHO->Reset();
581  // HBHEHF summary map
582  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
583  double PED=0,RMS=0,nped=0,nrms=0,ave=0,rms=0;
584  for(int depth=1;depth<=3;depth++){
585  if(hb_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
586  hb_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
587  hb_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
588  hb_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
589  hb_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
590  }
591  if(he_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
592  he_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
593  he_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
594  he_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
595  he_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
596  }
597  if(hf_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
598  hf_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
599  hf_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
600  hf_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
601  hf_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
602  }
603  }
604  if(nped>0) Pedestals2DHBHEHF->Fill(eta,phi,PED/nped);
605  if(nrms>0) Pedestals2DRmsHBHEHF->Fill(eta,phi,RMS/nrms);
606  if(nped>0 && abs(eta)>20) Pedestals2DHBHEHF->Fill(eta,phi+1,PED/nped);
607  if(nrms>0 && abs(eta)>20) Pedestals2DRmsHBHEHF->Fill(eta,phi+1,RMS/nrms);
608  }
609  // HO summary map
610  for(int eta=-10;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
611  if(eta>10 && !isSiPM(eta,phi,4)) continue;
612  double PED=0,RMS=0,nped=0,nrms=0,ave=0,rms=0;
613  if(ho_data[eta+42][phi-1][4-1][0].get_statistics()>100){
614  ho_data[eta+42][phi-1][4-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
615  ho_data[eta+42][phi-1][4-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
616  ho_data[eta+42][phi-1][4-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
617  ho_data[eta+42][phi-1][4-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
618  }
619  if(nped>0) Pedestals2DHO->Fill(eta,phi,PED/nped);
620  if(nrms>0) Pedestals2DRmsHO->Fill(eta,phi,RMS/nrms);
621  }
622  // HB histograms
623  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
624  if(hb_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
625  double ave=0,rms=0,sum=0;
626  hb_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
627  hb_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
628  hb_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
629  hb_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
630  PedestalsAve4HB->Fill(sum/4.0);
631  }
632  }
633  // HE histograms
634  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=3;depth++){
635  if(he_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
636  double ave=0,rms=0,sum=0;
637  he_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
638  he_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
639  he_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
640  he_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
641  PedestalsAve4HE->Fill(sum/4.0);
642  }
643  }
644  // HO histograms
645  for(int eta=-10;eta<=15;eta++) for(int phi=1;phi<=72;phi++) for(int depth=4;depth<=4;depth++){
646  if(eta>10 && !isSiPM(eta,phi,4)) continue;
647  if(ho_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
648  double ave=0,rms=0,sum=0;
649  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
650  ho_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
651  ho_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
652  ho_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
653  ho_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
654  PedestalsAve4Simp->Fill(sum/4.0);
655  }else{
656  ho_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
657  ho_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
658  ho_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
659  ho_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
660  PedestalsAve4HO->Fill(sum/4.0);
661  }
662  }
663  }
664  // HF histograms
665  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
666  if(hf_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
667  double ave=0,rms=0,sum=0;
668  hf_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
669  hf_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
670  hf_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
671  hf_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
672  PedestalsAve4HF->Fill(sum/4.0);
673  }
674  }
675 }
HcalDetDiagPedestalData ho_data[85][72][4][4]
HcalDetDiagPedestalData he_data[85][72][4][4]
bool get_average(double *ave, double *rms)
void Fill(long long x)
bool isSiPM(int ieta, int iphi, int depth)
HcalDetDiagPedestalData hb_data[85][72][4][4]
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void Reset(void)
reset ME (ie. contents, errors, etc)
HcalDetDiagPedestalData hf_data[85][72][4][4]
void HcalDetDiagPedestalMonitor::LoadDataset ( )
private

Definition at line 1253 of file HcalDetDiagPedestalMonitor.cc.

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

Referenced by bookHistograms().

1253  {
1254  double ped[4],rms[4];
1255  int Eta,Phi,Depth,Statistic;
1256  char subdet[10];
1257  TFile *f;
1258  if(DatasetName.size()==0) return;
1259  createHTMLonly=true;
1260  if(gSystem->AccessPathName(DatasetName.c_str())) return;
1261  f = new TFile(DatasetName.c_str(),"READ");
1262  if(!f->IsOpen()) return ;
1263 
1264  TTree* t=0;
1265  t=(TTree*)f->Get("HCAL Pedestal data");
1266  if(!t) return;
1267  t->SetBranchAddress("Subdet", subdet);
1268  t->SetBranchAddress("eta", &Eta);
1269  t->SetBranchAddress("phi", &Phi);
1270  t->SetBranchAddress("depth", &Depth);
1271  t->SetBranchAddress("cap0_ped", &ped[0]);
1272  t->SetBranchAddress("cap0_rms", &rms[0]);
1273  t->SetBranchAddress("cap1_ped", &ped[1]);
1274  t->SetBranchAddress("cap1_rms", &rms[1]);
1275  t->SetBranchAddress("cap2_ped", &ped[2]);
1276  t->SetBranchAddress("cap2_rms", &rms[2]);
1277  t->SetBranchAddress("cap3_ped", &ped[3]);
1278  t->SetBranchAddress("cap3_rms", &rms[3]);
1279  t->SetBranchAddress("statistic",&Statistic);
1280 
1281  for(int ievt=0;ievt<t->GetEntries();ievt++){
1282  t->GetEntry(ievt);
1283  if(strcmp(subdet,"HB")==0){ nHB++;
1284  hb_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1285  hb_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1286  hb_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1287  hb_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1288  hb_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1289  hb_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1290  hb_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1291  hb_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1292  }
1293  if(strcmp(subdet,"HE")==0){ nHE++;
1294  he_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1295  he_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1296  he_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1297  he_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1298  he_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1299  he_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1300  he_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1301  he_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1302  }
1303  if(strcmp(subdet,"HO")==0){ nHO++;
1304  ho_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1305  ho_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1306  ho_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1307  ho_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1308  ho_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1309  ho_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1310  ho_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1311  ho_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1312  }
1313  if(strcmp(subdet,"HF")==0){ nHF++;
1314  hf_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1315  hf_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1316  hf_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1317  hf_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1318  hf_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1319  hf_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1320  hf_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1321  hf_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1322  }
1323  }
1324  TObjString *STR1=(TObjString *)f->Get("run number");
1325  if(STR1){ int run; sscanf(STR1->String(),"%i",&run); meRUN_->Fill(run); run_number=run;}
1326 
1327  TObjString *STR2=(TObjString *)f->Get("Total events processed");
1328  if(STR2){ int events; sscanf(STR2->String(),"%i",&events); meEVT_->Fill(events); ievt_=events;}
1329 
1330  TObjString *STR3=(TObjString *)f->Get("Dataset number");
1331  if(STR3){ int ds; sscanf(STR3->String(),"%i",&ds); dataset_seq_number=ds;}
1332 
1333  f->Close();
1334  f->Delete();
1335 }
HcalDetDiagPedestalData ho_data[85][72][4][4]
HcalDetDiagPedestalData he_data[85][72][4][4]
void Fill(long long x)
HcalDetDiagPedestalData hb_data[85][72][4][4]
double f[11][100]
Statistic
tuple events
Definition: patZpeak.py:19
void set_data(float val, float rms)
HcalDetDiagPedestalData hf_data[85][72][4][4]
void HcalDetDiagPedestalMonitor::LoadReference ( )
private

Definition at line 1195 of file HcalDetDiagPedestalMonitor.cc.

References g4TestOverlap_cfg::Depth, reco::tau::disc::Eta(), f, hb_data, he_data, hf_data, ho_data, IsReference, colinearityKinematic::Phi, ReferenceData, ReferenceRun, plotscripts::rms(), HcalDetDiagPedestalData::set_reference(), AlCaHLTBitMon_QueryRunRegistry::string, and lumiQTWidget::t.

Referenced by bookHistograms().

1195  {
1196  double ped[4],rms[4];
1197  int Eta,Phi,Depth;
1198  char subdet[10];
1199  TFile *f;
1200  if(gSystem->AccessPathName(ReferenceData.c_str())) return;
1201  f = new TFile(ReferenceData.c_str(),"READ");
1202  if(!f->IsOpen()) return ;
1203  TObjString *STR=(TObjString *)f->Get("run number");
1204 
1205  if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
1206 
1207  TTree* t=(TTree*)f->Get("HCAL Pedestal data");
1208  if(!t) return;
1209  t->SetBranchAddress("Subdet", subdet);
1210  t->SetBranchAddress("eta", &Eta);
1211  t->SetBranchAddress("phi", &Phi);
1212  t->SetBranchAddress("depth", &Depth);
1213  t->SetBranchAddress("cap0_ped", &ped[0]);
1214  t->SetBranchAddress("cap0_rms", &rms[0]);
1215  t->SetBranchAddress("cap1_ped", &ped[1]);
1216  t->SetBranchAddress("cap1_rms", &rms[1]);
1217  t->SetBranchAddress("cap2_ped", &ped[2]);
1218  t->SetBranchAddress("cap2_rms", &rms[2]);
1219  t->SetBranchAddress("cap3_ped", &ped[3]);
1220  t->SetBranchAddress("cap3_rms", &rms[3]);
1221  for(int ievt=0;ievt<t->GetEntries();ievt++){
1222  t->GetEntry(ievt);
1223  if(strcmp(subdet,"HB")==0){
1224  hb_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1225  hb_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1226  hb_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1227  hb_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1228  }
1229  if(strcmp(subdet,"HE")==0){
1230  he_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1231  he_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1232  he_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1233  he_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1234  }
1235  if(strcmp(subdet,"HO")==0){
1236  ho_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1237  ho_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1238  ho_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1239  ho_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1240  }
1241  if(strcmp(subdet,"HF")==0){
1242  hf_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1243  hf_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1244  hf_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1245  hf_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1246  }
1247  }
1248  f->Close();
1249  f->Delete();
1250  IsReference=true;
1251 }
HcalDetDiagPedestalData ho_data[85][72][4][4]
HcalDetDiagPedestalData he_data[85][72][4][4]
HcalDetDiagPedestalData hb_data[85][72][4][4]
double f[11][100]
void set_reference(float val, float rms)
HcalDetDiagPedestalData hf_data[85][72][4][4]
void HcalDetDiagPedestalMonitor::SaveReference ( )
private

Definition at line 968 of file HcalDetDiagPedestalMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), dataset_seq_number, g4TestOverlap_cfg::Depth, HcalDetId::depth(), HLT_25ns10e33_v2_cff::depth, DetId::det(), emap, eta, reco::tau::disc::Eta(), patZpeak::events, HcalDetDiagPedestalData::get_average(), HcalDetDiagPedestalData::get_statistics(), HcalDetDiagPedestalData::get_status(), hb_data, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalOuter, he_data, hf_data, ho_data, HcalDetId::ieta(), ievt_, HcalDetId::iphi(), HcalElectronicsMap::lookup(), OutputFilePath, Overwrite, phi, colinearityKinematic::Phi, plotscripts::rms(), DTTTrigCorrFirst::run, run_number, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), lumiQTWidget::t, interactiveExample::theFile, MainPageGenerator::tree, xmlFile(), and XmlFilePath.

Referenced by analyze(), and endRun().

968  {
969 double ped[4],rms[4];
970 int Eta,Phi,Depth,Statistic,Status=0;
971 char Subdet[10],str[500];
972  if(OutputFilePath.size()>0){
973  if(!Overwrite){
974  sprintf(str,"%sHcalDetDiagPedestalData_run%06i_%i.root",OutputFilePath.c_str(),run_number,dataset_seq_number);
975  }else{
976  sprintf(str,"%sHcalDetDiagPedestalData.root",OutputFilePath.c_str());
977  }
978  TFile *theFile = new TFile(str, "RECREATE");
979  if(!theFile->IsOpen()) return;
980  theFile->cd();
981  sprintf(str,"%d",run_number); TObjString run(str); run.Write("run number");
982  sprintf(str,"%d",ievt_); TObjString events(str); events.Write("Total events processed");
983  sprintf(str,"%d",dataset_seq_number); TObjString dsnum(str); dsnum.Write("Dataset number");
984  Long_t t; t=time(0); strftime(str,30,"%F %T",localtime(&t)); TObjString tm(str); tm.Write("Dataset creation time");
985 
986  TTree *tree =new TTree("HCAL Pedestal data","HCAL Pedestal data");
987  if(tree==0) return;
988  tree->Branch("Subdet", &Subdet, "Subdet/C");
989  tree->Branch("eta", &Eta, "Eta/I");
990  tree->Branch("phi", &Phi, "Phi/I");
991  tree->Branch("depth", &Depth, "Depth/I");
992  tree->Branch("statistic",&Statistic, "Statistic/I");
993  tree->Branch("status", &Status, "Status/I");
994  tree->Branch("cap0_ped", &ped[0], "cap0_ped/D");
995  tree->Branch("cap0_rms", &rms[0], "cap0_rms/D");
996  tree->Branch("cap1_ped", &ped[1], "cap1_ped/D");
997  tree->Branch("cap1_rms", &rms[1], "cap1_rms/D");
998  tree->Branch("cap2_ped", &ped[2], "cap2_ped/D");
999  tree->Branch("cap2_rms", &rms[2], "cap2_rms/D");
1000  tree->Branch("cap3_ped", &ped[3], "cap3_ped/D");
1001  tree->Branch("cap3_rms", &rms[3], "cap3_rms/D");
1002  sprintf(Subdet,"HB");
1003  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
1004  if((Statistic=hb_data[eta+42][phi-1][depth-1][0].get_statistics())>100){
1005  Eta=eta; Phi=phi; Depth=depth;
1006  Status=hb_data[eta+42][phi-1][depth-1][0].get_status();
1007  hb_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1008  hb_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1009  hb_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1010  hb_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1011  tree->Fill();
1012  }
1013  }
1014  sprintf(Subdet,"HE");
1015  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=3;depth++){
1016  if((Statistic=he_data[eta+42][phi-1][depth-1][0].get_statistics())>100){
1017  Eta=eta; Phi=phi; Depth=depth;
1018  Status=he_data[eta+42][phi-1][depth-1][0].get_status();
1019  he_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1020  he_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1021  he_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1022  he_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1023  tree->Fill();
1024  }
1025  }
1026  sprintf(Subdet,"HO");
1027  for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++) for(int depth=4;depth<=4;depth++){
1028  if((Statistic=ho_data[eta+42][phi-1][depth-1][0].get_statistics())>100){
1029  Eta=eta; Phi=phi; Depth=depth;
1030  Status=ho_data[eta+42][phi-1][depth-1][0].get_status();
1031  ho_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1032  ho_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1033  ho_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1034  ho_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1035  tree->Fill();
1036  }
1037  }
1038  sprintf(Subdet,"HF");
1039  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
1040  if((Statistic=hf_data[eta+42][phi-1][depth-1][0].get_statistics())>100){
1041  Eta=eta; Phi=phi; Depth=depth;
1042  Status=hf_data[eta+42][phi-1][depth-1][0].get_status();
1043  hf_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1044  hf_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1045  hf_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1046  hf_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1047  tree->Fill();
1048  }
1049  }
1050  theFile->Write();
1051  theFile->Close();
1052  theFile->Delete();
1053  }
1054 
1055  if(XmlFilePath.size()>0){
1056  //create XML file
1057  if(!Overwrite){
1058  sprintf(str,"HcalDetDiagPedestals_%i_%i.xml",run_number,dataset_seq_number);
1059  }else{
1060  sprintf(str,"HcalDetDiagPedestals.xml");
1061  }
1062  printf("%s\n",str);
1063  std::string xmlName=str;
1064  std::ofstream xmlFile;
1065  xmlFile.open(xmlName.c_str());
1066 
1067  xmlFile<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
1068  xmlFile<<"<ROOT>\n";
1069  xmlFile<<" <HEADER>\n";
1070  xmlFile<<" <HINTS mode='only-det-root'/>\n";
1071  xmlFile<<" <TYPE>\n";
1072  xmlFile<<" <EXTENSION_TABLE_NAME>HCAL_DETMON_PEDESTALS_V1</EXTENSION_TABLE_NAME>\n";
1073  xmlFile<<" <NAME>HCAL Pedestals [abort gap global]</NAME>\n";
1074  xmlFile<<" </TYPE>\n";
1075  xmlFile<<" <!-- run details -->\n";
1076  xmlFile<<" <RUN>\n";
1077  xmlFile<<" <RUN_TYPE>GLOBAL-RUN</RUN_TYPE>\n";
1078  xmlFile<<" <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
1079  xmlFile<<" <RUN_BEGIN_TIMESTAMP>2009-01-01 00:00:00</RUN_BEGIN_TIMESTAMP>\n";
1080  xmlFile<<" <COMMENT_DESCRIPTION>hcal ped data</COMMENT_DESCRIPTION>\n";
1081  xmlFile<<" <LOCATION>P5</LOCATION>\n";
1082  xmlFile<<" <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
1083  xmlFile<<" </RUN>\n";
1084  xmlFile<<" </HEADER>\n";
1085  xmlFile<<" <DATA_SET>\n";
1086  xmlFile<<" <!-- optional dataset metadata -->\n\n";
1087  xmlFile<<" <SET_NUMBER>"<<dataset_seq_number<<"</SET_NUMBER>\n";
1088  xmlFile<<" <SET_BEGIN_TIMESTAMP>2009-01-01 00:00:00</SET_BEGIN_TIMESTAMP>\n";
1089  xmlFile<<" <SET_END_TIMESTAMP>2009-01-01 00:00:00</SET_END_TIMESTAMP>\n";
1090  xmlFile<<" <NUMBER_OF_EVENTS_IN_SET>"<<ievt_<<"</NUMBER_OF_EVENTS_IN_SET>\n";
1091  xmlFile<<" <COMMENT_DESCRIPTION>Automatic DQM output</COMMENT_DESCRIPTION>\n";
1092  xmlFile<<" <DATA_FILE_NAME>"<< xmlName <<"</DATA_FILE_NAME>\n";
1093  xmlFile<<" <IMAGE_FILE_NAME>data plot url or file path</IMAGE_FILE_NAME>\n";
1094  xmlFile<<" <!-- who and when created this dataset-->\n\n";
1095  Long_t t; t=time(0); strftime(str,30,"%F %T",localtime(&t));
1096  xmlFile<<" <CREATE_TIMESTAMP>"<<str<<"</CREATE_TIMESTAMP>\n";
1097  xmlFile<<" <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
1098  xmlFile<<" <!-- version (string) and subversion (number) -->\n";
1099  xmlFile<<" <!-- fields are used to read data back from the database -->\n\n";
1100  xmlFile<<" <VERSION>"<<run_number<<dataset_seq_number<<"</VERSION>\n";
1101  xmlFile<<" <SUBVERSION>1</SUBVERSION>\n";
1102  xmlFile<<" <!-- Assign predefined dataset attributes -->\n\n";
1103  xmlFile<<" <PREDEFINED_ATTRIBUTES>\n";
1104  xmlFile<<" <ATTRIBUTE>\n";
1105  xmlFile<<" <NAME>HCAL Dataset Status</NAME>\n";
1106  xmlFile<<" <VALUE>VALID</VALUE>\n";
1107  xmlFile<<" </ATTRIBUTE>\n";
1108  xmlFile<<" </PREDEFINED_ATTRIBUTES>\n";
1109  xmlFile<<" <!-- multiple data block records -->\n\n";
1110 
1111  std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
1112  for(std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
1113  DetId detid=emap->lookup(*eid);
1114  if (detid.det()!=DetId::Hcal) continue;
1115  HcalGenericDetId gid(emap->lookup(*eid));
1116  if(!(!(gid.null()) &&
1117  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
1118  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
1119  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
1120  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
1121  int eta,phi,depth;
1122  std::string subdet="";
1123  HcalDetId hid(detid);
1124  eta=hid.ieta();
1125  phi=hid.iphi();
1126  depth=hid.depth();
1127 
1128  double ped[4]={0,0,0,0},rms[4]={0,0,0,0};
1129  if(detid.subdetId()==HcalBarrel){
1130  subdet="HB";
1131  Statistic=hb_data[eta+42][phi-1][depth-1][0].get_statistics();
1132  Status =hb_data[eta+42][phi-1][depth-1][0].get_status();
1133  hb_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1134  hb_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1135  hb_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1136  hb_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1137  }else if(detid.subdetId()==HcalEndcap){
1138  subdet="HE";
1139  he_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1140  he_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1141  he_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1142  he_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1143  Statistic=he_data[eta+42][phi-1][depth-1][0].get_statistics();
1144  Status =he_data[eta+42][phi-1][depth-1][0].get_status();
1145  }else if(detid.subdetId()==HcalForward){
1146  subdet="HF";
1147  hf_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1148  hf_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1149  hf_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1150  hf_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1151  Statistic=hf_data[eta+42][phi-1][depth-1][0].get_statistics();
1152  Status =hf_data[eta+42][phi-1][depth-1][0].get_status();
1153  }else if(detid.subdetId()==HcalOuter){
1154  subdet="HO";
1155  ho_data[eta+42][phi-1][depth-1][0].get_average(&ped[0],&rms[0]);
1156  ho_data[eta+42][phi-1][depth-1][1].get_average(&ped[1],&rms[1]);
1157  ho_data[eta+42][phi-1][depth-1][2].get_average(&ped[2],&rms[2]);
1158  ho_data[eta+42][phi-1][depth-1][3].get_average(&ped[3],&rms[3]);
1159  Statistic=ho_data[eta+42][phi-1][depth-1][0].get_statistics();
1160  Status =ho_data[eta+42][phi-1][depth-1][0].get_status();
1161  }else continue;
1162  xmlFile<<" <DATA>\n";
1163  xmlFile<<" <NUMBER_OF_EVENTS_USED>"<<Statistic<<"</NUMBER_OF_EVENTS_USED>\n";
1164  xmlFile<<" <MEAN0>"<<ped[0]<<"</MEAN0>\n";
1165  xmlFile<<" <MEAN1>"<<ped[1]<<"</MEAN1>\n";
1166  xmlFile<<" <MEAN2>"<<ped[2]<<"</MEAN2>\n";
1167  xmlFile<<" <MEAN3>"<<ped[3]<<"</MEAN3>\n";
1168  xmlFile<<" <RMS0>"<<rms[0]<<"</RMS0>\n";
1169  xmlFile<<" <RMS1>"<<rms[1]<<"</RMS1>\n";
1170  xmlFile<<" <RMS2>"<<rms[2]<<"</RMS2>\n";
1171  xmlFile<<" <RMS3>"<<rms[3]<<"</RMS3>\n";
1172  xmlFile<<" <CHANNEL_STATUS_WORD>"<<Status<<"</CHANNEL_STATUS_WORD>\n";
1173  xmlFile<<" <CHANNEL_OBJECTNAME>HcalDetId</CHANNEL_OBJECTNAME>\n";
1174  xmlFile<<" <SUBDET>"<<subdet<<"</SUBDET>\n";
1175  xmlFile<<" <IETA>"<<eta<<"</IETA>\n";
1176  xmlFile<<" <IPHI>"<<phi<<"</IPHI>\n";
1177  xmlFile<<" <DEPTH>"<<depth<<"</DEPTH>\n";
1178  xmlFile<<" <TYPE>0</TYPE>\n";
1179  xmlFile<<" </DATA>\n";
1180  }
1182  xmlFile<<" </DATA_SET>\n";
1183  xmlFile<<"</ROOT>\n";
1184  xmlFile.close();
1185  sprintf(str,"zip %s.zip %s",xmlName.c_str(),xmlName.c_str());
1186  system(str);
1187  sprintf(str,"rm -f %s",xmlName.c_str());
1188  system(str);
1189  sprintf(str,"mv -f %s.zip %s",xmlName.c_str(),XmlFilePath.c_str());
1190  system(str);
1191  }
1192  dataset_seq_number++;
1193 }
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
HcalDetDiagPedestalData ho_data[85][72][4][4]
HcalDetDiagPedestalData he_data[85][72][4][4]
bool get_average(double *ave, double *rms)
HcalDetDiagPedestalData hb_data[85][72][4][4]
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
Statistic
bool xmlFile(const std::string fParam)
tuple events
Definition: patZpeak.py:19
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
HcalDetDiagPedestalData hf_data[85][72][4][4]

Member Data Documentation

bool HcalDetDiagPedestalMonitor::createHTMLonly
private
int HcalDetDiagPedestalMonitor::dataset_seq_number
private
std::string HcalDetDiagPedestalMonitor::DatasetName
private
const HcalElectronicsMap* HcalDetDiagPedestalMonitor::emap
private
HcalDetDiagPedestalData HcalDetDiagPedestalMonitor::hb_data[85][72][4][4]
private
double HcalDetDiagPedestalMonitor::HBMeanTreshold
private

Definition at line 171 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

double HcalDetDiagPedestalMonitor::HBRmsTreshold
private

Definition at line 172 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

HcalDetDiagPedestalData HcalDetDiagPedestalMonitor::he_data[85][72][4][4]
private
double HcalDetDiagPedestalMonitor::HEMeanTreshold
private

Definition at line 173 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

double HcalDetDiagPedestalMonitor::HERmsTreshold
private

Definition at line 174 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

HcalDetDiagPedestalData HcalDetDiagPedestalMonitor::hf_data[85][72][4][4]
private
double HcalDetDiagPedestalMonitor::HFMeanTreshold
private

Definition at line 177 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

double HcalDetDiagPedestalMonitor::HFRmsTreshold
private

Definition at line 178 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

HcalDetDiagPedestalData HcalDetDiagPedestalMonitor::ho_data[85][72][4][4]
private
double HcalDetDiagPedestalMonitor::HOMeanTreshold
private

Definition at line 175 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

double HcalDetDiagPedestalMonitor::HORmsTreshold
private

Definition at line 176 of file HcalDetDiagPedestalMonitor.cc.

Referenced by CheckStatus(), and HcalDetDiagPedestalMonitor().

MonitorElement * HcalDetDiagPedestalMonitor::htmlFolder
private

Definition at line 195 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms().

std::string HcalDetDiagPedestalMonitor::htmlOutputPath
private

Definition at line 187 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and HcalDetDiagPedestalMonitor().

int HcalDetDiagPedestalMonitor::ievt_
private
edm::InputTag HcalDetDiagPedestalMonitor::inputLabelDigi_
private

Definition at line 150 of file HcalDetDiagPedestalMonitor.cc.

Referenced by HcalDetDiagPedestalMonitor().

bool HcalDetDiagPedestalMonitor::IsReference
private

Definition at line 167 of file HcalDetDiagPedestalMonitor.cc.

Referenced by HcalDetDiagPedestalMonitor(), and LoadReference().

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

Definition at line 241 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

int HcalDetDiagPedestalMonitor::lastPEDorbit_
private

Definition at line 245 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze().

bool HcalDetDiagPedestalMonitor::LocalRun
private

Definition at line 168 of file HcalDetDiagPedestalMonitor.cc.

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

MonitorElement* HcalDetDiagPedestalMonitor::meEVT_
private

Definition at line 195 of file HcalDetDiagPedestalMonitor.cc.

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

MonitorElement * HcalDetDiagPedestalMonitor::meRUN_
private

Definition at line 195 of file HcalDetDiagPedestalMonitor.cc.

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

int HcalDetDiagPedestalMonitor::nChecksPED_
private

Definition at line 245 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze().

int HcalDetDiagPedestalMonitor::nHB
private
int HcalDetDiagPedestalMonitor::nHE
private
int HcalDetDiagPedestalMonitor::nHF
private
int HcalDetDiagPedestalMonitor::nHO
private
int HcalDetDiagPedestalMonitor::nTS_HBHE
private

Definition at line 194 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), CheckStatus(), and HcalDetDiagPedestalMonitor().

int HcalDetDiagPedestalMonitor::nTS_HF
private

Definition at line 194 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), CheckStatus(), and HcalDetDiagPedestalMonitor().

int HcalDetDiagPedestalMonitor::nTS_HO
private

Definition at line 194 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), CheckStatus(), and HcalDetDiagPedestalMonitor().

bool HcalDetDiagPedestalMonitor::Online_
private

Definition at line 191 of file HcalDetDiagPedestalMonitor.cc.

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

std::string HcalDetDiagPedestalMonitor::OutputFilePath
private

Definition at line 182 of file HcalDetDiagPedestalMonitor.cc.

Referenced by HcalDetDiagPedestalMonitor(), and SaveReference().

bool HcalDetDiagPedestalMonitor::Overwrite
private

Definition at line 192 of file HcalDetDiagPedestalMonitor.cc.

Referenced by HcalDetDiagPedestalMonitor(), and SaveReference().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DErrorHBHEHF
private

Definition at line 222 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DErrorHO
private

Definition at line 223 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DHBHEHF
private

Definition at line 220 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DHO
private

Definition at line 221 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DRmsHBHEHF
private

Definition at line 218 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DRmsHO
private

Definition at line 219 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HB
private

Definition at line 197 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HBref
private

Definition at line 203 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HE
private

Definition at line 198 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HEref
private

Definition at line 204 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HF
private

Definition at line 200 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HFref
private

Definition at line 206 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HO
private

Definition at line 199 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HOref
private

Definition at line 205 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4Simp
private

Definition at line 201 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHB
private

Definition at line 207 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHBref
private

Definition at line 213 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHE
private

Definition at line 208 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHEref
private

Definition at line 214 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHF
private

Definition at line 210 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHFref
private

Definition at line 216 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHO
private

Definition at line 209 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHOref
private

Definition at line 215 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsSimp
private

Definition at line 211 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and fillHistos().

bool HcalDetDiagPedestalMonitor::PEDseq_
private

Definition at line 244 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze().

std::string HcalDetDiagPedestalMonitor::prefixME_
private

Definition at line 190 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and HcalDetDiagPedestalMonitor().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badped
private
EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badped_val
private
EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badrms
private
EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badrms_val
private
EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_missing
private
EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_missing_val
private
EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_unstable
private
EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_unstable_val
private
std::vector<std::string> HcalDetDiagPedestalMonitor::problemnames_
private

Definition at line 234 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms().

std::string HcalDetDiagPedestalMonitor::ReferenceData
private

Definition at line 180 of file HcalDetDiagPedestalMonitor.cc.

Referenced by HcalDetDiagPedestalMonitor(), and LoadReference().

std::string HcalDetDiagPedestalMonitor::ReferenceRun
private

Definition at line 181 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms(), and LoadReference().

MonitorElement* HcalDetDiagPedestalMonitor::RefRun_
private

Definition at line 196 of file HcalDetDiagPedestalMonitor.cc.

Referenced by bookHistograms().

int HcalDetDiagPedestalMonitor::run_number
private
edm::EDGetTokenT<HBHEDigiCollection> HcalDetDiagPedestalMonitor::tok_hbhe_
private

Definition at line 152 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), and HcalDetDiagPedestalMonitor().

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

Definition at line 154 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), and HcalDetDiagPedestalMonitor().

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

Definition at line 153 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), and HcalDetDiagPedestalMonitor().

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

Definition at line 155 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), and HcalDetDiagPedestalMonitor().

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

Definition at line 156 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), and HcalDetDiagPedestalMonitor().

std::string HcalDetDiagPedestalMonitor::XmlFilePath
private

Definition at line 183 of file HcalDetDiagPedestalMonitor.cc.

Referenced by HcalDetDiagPedestalMonitor(), and SaveReference().