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
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void 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_
 
bool LocalRun
 
MonitorElementmeEVT_
 
MonitorElementmeRUN_
 
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
 
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
 
- 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::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 245 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.

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

303 {
304 
313 
314 }

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 460 of file HcalDetDiagPedestalMonitor.cc.

References HcalDetDiagPedestalData::add_statistics(), HcalBaseDQMonitor::analyze(), diJetCalib::calibType, CheckStatus(), createHTMLonly, FEDRawData::data(), 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, roll_playback::k, prof2calltree::l, LocalRun, FEDNumbering::MAXHCALFEDID, meEVT_, meRUN_, FEDNumbering::MINHCALFEDID, nTS_HBHE, nTS_HF, nTS_HO, Online_, edm::EventBase::orbitNumber(), 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.

460  {
461  if(createHTMLonly) return;
462  HcalBaseDQMonitor::analyze(iEvent, iSetup); // increments counters
463 int eta,phi,depth,nTS;
464 static bool PEDseq;
465 static int lastPEDorbit,nChecksPED;
466  if(ievt_==-1){ ievt_=0; PEDseq=false; lastPEDorbit=-1;nChecksPED=0; }
467  int orbit=iEvent.orbitNumber();
468  meRUN_->Fill(iEvent.id().run());
469 
470  bool PedestalEvent=false;
471 
472  // for local runs
473  edm::Handle<HcalTBTriggerData> trigger_data;
474  iEvent.getByToken(tok_tb_, trigger_data);
475  if(trigger_data.isValid()){
476  if((trigger_data->triggerWord())==5) PedestalEvent=true;
477  LocalRun=true;
478  }
479 
480  if(LocalRun && !PedestalEvent) return;
481 
482  if(!LocalRun && Online_){
483  if(PEDseq && (orbit-lastPEDorbit)>(11223*10) && ievt_>500){
484  PEDseq=false;
485  fillHistos();
486  CheckStatus();
487  nChecksPED++;
488  if(nChecksPED==1 || (nChecksPED>1 && ((nChecksPED-1)%12)==0)){
489  SaveReference();
490  }
491  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();
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++) he_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++) ho_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++) hf_data[i][j][k][l].reset();
495  ievt_=0;
496  }
497  }
498 
499 
500  // Abort Gap pedestals
501  int calibType = -1 ;
502  if(LocalRun==false){
504  iEvent.getByToken(tok_raw_,rawdata);
505  //checking FEDs for calibration information
507  const FEDRawData& fedData = rawdata->FEDData(i) ;
508  if ( fedData.size() < 24 ) continue ;
509  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
510  if ( calibType < 0 ) calibType = value ;
511  if(value==hc_Pedestal){ PEDseq=true; lastPEDorbit=orbit; break;}
512  }
513  }
514  if(!LocalRun && calibType!=hc_Pedestal) return;
515 
516  ievt_++;
517  meEVT_->Fill(ievt_);
518  run_number=iEvent.id().run();
519 
521  iEvent.getByToken(tok_hbhe_,hbhe);
522  if(hbhe.isValid()){
523  if(hbhe->size()<30 && calibType==hc_Pedestal){
524  ievt_--;
525  meEVT_->Fill(ievt_);
526  return;
527  }
528  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
529  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
530  if(nTS>8) nTS=8;
531  if(nTS<8 && nTS>=4) nTS=4;
532  nTS_HBHE=nTS;
533  if(digi->id().subdet()==HcalBarrel){
534  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());
535  }
536  if(digi->id().subdet()==HcalEndcap){
537  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());
538  }
539  }
540  }
542  iEvent.getByToken(tok_ho_,ho);
543  if(ho.isValid()){
544  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
545  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
546  if(nTS>8) nTS=8;
547  if(nTS<8 && nTS>=4) nTS=4;
548  nTS_HO=nTS;
549  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());
550  }
551  }
553  iEvent.getByToken(tok_hf_,hf);
554  if(hf.isValid()){
555  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
556  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
557  if(nTS>8) nTS=8;
558  if(nTS<8 && nTS>=4) nTS=4;
559  nTS_HF=nTS;
560  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());
561  }
562  }
563 }
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:446
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]
T eta() const
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:63
void add_statistics(unsigned int val)
bool isValid() const
Definition: HandleBase.h:76
edm::EDGetTokenT< HODigiCollection > tok_ho_
virtual void reset(void)
edm::EventID id() const
Definition: EventBase.h:56
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]
Definition: DDAxes.h:10
void HcalDetDiagPedestalMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1335 of file HcalDetDiagPedestalMonitor.cc.

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

Reimplemented from HcalBaseDQMonitor.

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

316  {
317  edm::ESHandle<HcalDbService> conditions_;
318  c.get<HcalDbRecord>().get(conditions_);
319  emap=conditions_->getHcalMapping();
320 
322  c.get<HcalChannelQualityRcd>().get("withTopo",p);
323  const HcalChannelQuality* chanquality= p.product();
324  std::vector<DetId> mydetids = chanquality->getAllChannels();
325  KnownBadCells_.clear();
326 
327  for (std::vector<DetId>::const_iterator i = mydetids.begin();i!=mydetids.end();++i){
328  if (i->det()!=DetId::Hcal) continue; // not an hcal cell
329  HcalDetId id=HcalDetId(*i);
330  int status=(chanquality->getValues(id))->getValue();
332  KnownBadCells_[id.rawId()]=status;
333  }
334  }
335 
336 
339 
341  meEVT_ = ib.bookInt("HcalDetDiagPedestalMonitor Event Number");
342  meRUN_ = ib.bookInt("HcalDetDiagPedestalMonitor Run Number");
343 
344  ReferenceRun="UNKNOWN";
345  LoadReference();
346  LoadDataset();
348  RefRun_= ib.bookString("HcalDetDiagPedestalMonitor Reference Run",ReferenceRun);
349  if(DatasetName.size()>0 && createHTMLonly){
350  char str[200]; sprintf(str,"%sHcalDetDiagPedestalData_run%i_%i/",htmlOutputPath.c_str(),run_number,dataset_seq_number);
351  htmlFolder=ib.bookString("HcalDetDiagPedestalMonitor HTML folder",str);
352  MonitorElement *me;
353  ib.setCurrentFolder(prefixME_+"HcalInfo");
354  me=ib.bookInt("HBpresent");
355  if(nHB>0) me->Fill(1);
356  me=ib.bookInt("HEpresent");
357  if(nHE>0) me->Fill(1);
358  me=ib.bookInt("HOpresent");
359  if(nHO>0) me->Fill(1);
360  me=ib.bookInt("HFpresent");
361  if(nHF>0) me->Fill(1);
362  }
363 
365  ProblemCellsByDepth_missing->setup(ib," Problem Missing Channels");
366  for(unsigned int i=0;i<ProblemCellsByDepth_missing->depth.size();i++)
367  problemnames_.push_back(ProblemCellsByDepth_missing->depth[i]->getName());
369  ProblemCellsByDepth_unstable->setup(ib," Problem Unstable Channels");
370  for(unsigned int i=0;i<ProblemCellsByDepth_unstable->depth.size();i++)
371  problemnames_.push_back(ProblemCellsByDepth_unstable->depth[i]->getName());
373  ProblemCellsByDepth_badped->setup(ib," Problem Bad Pedestal Value");
374  for(unsigned int i=0;i<ProblemCellsByDepth_badped->depth.size();i++)
375  problemnames_.push_back(ProblemCellsByDepth_badped->depth[i]->getName());
377  ProblemCellsByDepth_badrms->setup(ib," Problem Bad Rms Value");
378  for(unsigned int i=0;i<ProblemCellsByDepth_badrms->depth.size();i++)
379  problemnames_.push_back(ProblemCellsByDepth_badrms->depth[i]->getName());
380 
381  ib.setCurrentFolder(subdir_+"Summary Plots");
382  name="HB Pedestal Distribution (average over 4 caps)"; PedestalsAve4HB = ib.book1D(name,name,200,0,6);
383  name="HE Pedestal Distribution (average over 4 caps)"; PedestalsAve4HE = ib.book1D(name,name,200,0,6);
384  name="HO Pedestal Distribution (average over 4 caps)"; PedestalsAve4HO = ib.book1D(name,name,200,0,6);
385  name="HF Pedestal Distribution (average over 4 caps)"; PedestalsAve4HF = ib.book1D(name,name,200,0,6);
386  name="SIPM Pedestal Distribution (average over 4 caps)"; PedestalsAve4Simp = ib.book1D(name,name,200,5,15);
387 
388  name="HB Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HBref= ib.book1D(name,name,1500,-3,3);
389  name="HE Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HEref= ib.book1D(name,name,1500,-3,3);
390  name="HO Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HOref= ib.book1D(name,name,1500,-3,3);
391  name="HF Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HFref= ib.book1D(name,name,1500,-3,3);
392 
393  name="HB Pedestal RMS Distribution (individual cap)"; PedestalsRmsHB = ib.book1D(name,name,200,0,2);
394  name="HE Pedestal RMS Distribution (individual cap)"; PedestalsRmsHE = ib.book1D(name,name,200,0,2);
395  name="HO Pedestal RMS Distribution (individual cap)"; PedestalsRmsHO = ib.book1D(name,name,200,0,2);
396  name="HF Pedestal RMS Distribution (individual cap)"; PedestalsRmsHF = ib.book1D(name,name,200,0,2);
397  name="SIPM Pedestal RMS Distribution (individual cap)"; PedestalsRmsSimp = ib.book1D(name,name,200,0,4);
398 
399  name="HB Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHBref = ib.book1D(name,name,1500,-3,3);
400  name="HE Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHEref = ib.book1D(name,name,1500,-3,3);
401  name="HO Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHOref = ib.book1D(name,name,1500,-3,3);
402  name="HF Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHFref = ib.book1D(name,name,1500,-3,3);
403 
404  name="HBHEHF pedestal mean map"; Pedestals2DHBHEHF = ib.book2D(name,name,87,-43,43,74,0,73);
405  name="HO pedestal mean map"; Pedestals2DHO = ib.book2D(name,name,33,-16,16,74,0,73);
406  name="HBHEHF pedestal rms map"; Pedestals2DRmsHBHEHF = ib.book2D(name,name,87,-43,43,74,0,73);
407  name="HO pedestal rms map"; Pedestals2DRmsHO = ib.book2D(name,name,33,-16,16,74,0,73);
408  name="HBHEHF pedestal problems map"; Pedestals2DErrorHBHEHF = ib.book2D(name,name,87,-43,43,74,0,73);
409  name="HO pedestal problems map"; Pedestals2DErrorHO = ib.book2D(name,name,33,-16,16,74,0,73);
410 
412  Pedestals2DHO->setAxisRange(1,5,3);
415 
416  Pedestals2DHBHEHF->setAxisTitle("i#eta",1);
417  Pedestals2DHBHEHF->setAxisTitle("i#phi",2);
418  Pedestals2DHO->setAxisTitle("i#eta",1);
419  Pedestals2DHO->setAxisTitle("i#phi",2);
422  Pedestals2DRmsHO->setAxisTitle("i#eta",1);
423  Pedestals2DRmsHO->setAxisTitle("i#phi",2);
426  Pedestals2DErrorHO->setAxisTitle("i#eta",1);
427  Pedestals2DErrorHO->setAxisTitle("i#phi",2);
428  PedestalsAve4HB->setAxisTitle("ADC counts",1);
429  PedestalsAve4HE->setAxisTitle("ADC counts",1);
430  PedestalsAve4HO->setAxisTitle("ADC counts",1);
431  PedestalsAve4HF->setAxisTitle("ADC counts",1);
432  PedestalsAve4Simp->setAxisTitle("ADC counts",1);
433  PedestalsAve4HBref->setAxisTitle("ADC counts",1);
434  PedestalsAve4HEref->setAxisTitle("ADC counts",1);
435  PedestalsAve4HOref->setAxisTitle("ADC counts",1);
436  PedestalsAve4HFref->setAxisTitle("ADC counts",1);
437  PedestalsRmsHB->setAxisTitle("ADC counts",1);
438  PedestalsRmsHE->setAxisTitle("ADC counts",1);
439  PedestalsRmsHO->setAxisTitle("ADC counts",1);
440  PedestalsRmsHF->setAxisTitle("ADC counts",1);
441  PedestalsRmsSimp->setAxisTitle("ADC counts",1);
442  PedestalsRmsHBref->setAxisTitle("ADC counts",1);
443  PedestalsRmsHEref->setAxisTitle("ADC counts",1);
444  PedestalsRmsHOref->setAxisTitle("ADC counts",1);
445  PedestalsRmsHFref->setAxisTitle("ADC counts",1);
446 
447  ib.setCurrentFolder(subdir_+"Plots for client");
449  ProblemCellsByDepth_missing_val->setup(ib," Missing channels");
451  ProblemCellsByDepth_unstable_val->setup(ib," Channel instability value");
453  ProblemCellsByDepth_badped_val->setup(ib," Bad Pedestal-Ref Value");
455  ProblemCellsByDepth_badrms_val->setup(ib," Bad Rms-ref Value");
456 }
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: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)
virtual void setup(DQMStore::IBooker &)
void HcalDetDiagPedestalMonitor::CheckStatus ( )
private

Definition at line 675 of file HcalDetDiagPedestalMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), CalcEtaBin(), HcalDetDiagPedestalData::change_status(), HcalDetId::depth(), EtaPhiHists::depth, DetId::det(), cond::rpcobgas::detid, 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, ntuplemaker::status, DetId::subdetId(), and tmp.

Referenced by analyze(), and endRun().

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 1336 of file HcalDetDiagPedestalMonitor.cc.

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

Definition at line 565 of file HcalDetDiagPedestalMonitor.cc.

References funct::abs(), 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().

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

Definition at line 1252 of file HcalDetDiagPedestalMonitor.cc.

References 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, HcalDetDiagPedestalData::set_data(), HcalDetDiagPedestalData::set_statistics(), and edmStreamStallGrapher::t.

Referenced by bookHistograms().

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

References 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 edmStreamStallGrapher::t.

Referenced by bookHistograms().

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

References HcalElectronicsMap::allElectronicsIdPrecision(), dataset_seq_number, HcalDetId::depth(), DetId::det(), cond::rpcobgas::detid, emap, reco::tau::disc::Eta(), 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, step1_ZMM_7Tev::Status, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), edmStreamStallGrapher::t, interactiveExample::theFile, cond::rpcobgas::time, MainPageGenerator::tree, xmlFile(), and XmlFilePath.

Referenced by analyze(), and endRun().

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

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().

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::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().

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().