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 edm::EDAnalyzer 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 edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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 beginRun (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::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void beginJob ()
 
virtual void cleanup (void)
 
virtual void endJob (void)
 
void getLogicalMap (const edm::EventSetup &c)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
virtual void reset (void)
 
virtual void setup (void)
 
void SetupEtaPhiHists (EtaPhiHists &hh, std::string Name, std::string Units)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from HcalBaseDQMonitor
std::vector< int > AllowedCalibTypes_
 
int badChannelStatusMask_
 
int currentLS
 
int currenttype_
 
DQMStoredbe_
 
int debug_
 
bool enableCleanup_
 
bool eventAllowed_
 
bool HBpresent_
 
bool HEpresent_
 
bool HFpresent_
 
bool HOpresent_
 
int ievt_
 
std::map< unsigned int, int > KnownBadCells_
 
int levt_
 
HcalLogicalMaplogicalMap_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
bool needLogicalMap_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemsCurrentLB
 
MonitorElementProblemsVsLB
 
MonitorElementProblemsVsLB_HB
 
MonitorElementProblemsVsLB_HBHEHF
 
MonitorElementProblemsVsLB_HE
 
MonitorElementProblemsVsLB_HF
 
MonitorElementProblemsVsLB_HO
 
bool skipOutOfOrderLS_
 
std::string subdir_
 
int tevt_
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 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_, ReferenceData, run_number, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, tok_hbhe_, tok_hf_, tok_ho_, tok_raw_, tok_tb_, and XmlFilePath.

245  {
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 }
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 291 of file HcalDetDiagPedestalMonitor.cc.

291 {}

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 438 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, gen::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.

438  {
439  if(createHTMLonly) return;
440  HcalBaseDQMonitor::analyze(iEvent, iSetup); // increments counters
441 int eta,phi,depth,nTS;
442 static bool PEDseq;
443 static int lastPEDorbit,nChecksPED;
444  if(ievt_==-1){ ievt_=0; PEDseq=false; lastPEDorbit=-1;nChecksPED=0; }
445  int orbit=iEvent.orbitNumber();
446  meRUN_->Fill(iEvent.id().run());
447 
448  bool PedestalEvent=false;
449 
450  // for local runs
451  edm::Handle<HcalTBTriggerData> trigger_data;
452  iEvent.getByToken(tok_tb_, trigger_data);
453  if(trigger_data.isValid()){
454  if((trigger_data->triggerWord())==5) PedestalEvent=true;
455  LocalRun=true;
456  }
457 
458  if(LocalRun && !PedestalEvent) return;
459 
460  if(!LocalRun && Online_){
461  if(PEDseq && (orbit-lastPEDorbit)>(11223*10) && ievt_>500){
462  PEDseq=false;
463  fillHistos();
464  CheckStatus();
465  nChecksPED++;
466  if(nChecksPED==1 || (nChecksPED>1 && ((nChecksPED-1)%12)==0)){
467  SaveReference();
468  }
469  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();
470  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();
471  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();
472  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();
473  ievt_=0;
474  }
475  }
476 
477 
478  // Abort Gap pedestals
479  int calibType = -1 ;
480  if(LocalRun==false){
482  iEvent.getByToken(tok_raw_,rawdata);
483  //checking FEDs for calibration information
485  const FEDRawData& fedData = rawdata->FEDData(i) ;
486  if ( fedData.size() < 24 ) continue ;
487  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
488  if ( calibType < 0 ) calibType = value ;
489  if(value==hc_Pedestal){ PEDseq=true; lastPEDorbit=orbit; break;}
490  }
491  }
492  if(!LocalRun && calibType!=hc_Pedestal) return;
493 
494  ievt_++;
495  meEVT_->Fill(ievt_);
496  run_number=iEvent.id().run();
497 
499  iEvent.getByToken(tok_hbhe_,hbhe);
500  if(hbhe.isValid()){
501  if(hbhe->size()<30 && calibType==hc_Pedestal){
502  ievt_--;
503  meEVT_->Fill(ievt_);
504  return;
505  }
506  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
507  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
508  if(nTS>8) nTS=8;
509  if(nTS<8 && nTS>=4) nTS=4;
510  nTS_HBHE=nTS;
511  if(digi->id().subdet()==HcalBarrel){
512  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());
513  }
514  if(digi->id().subdet()==HcalEndcap){
515  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());
516  }
517  }
518  }
520  iEvent.getByToken(tok_ho_,ho);
521  if(ho.isValid()){
522  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
523  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
524  if(nTS>8) nTS=8;
525  if(nTS<8 && nTS>=4) nTS=4;
526  nTS_HO=nTS;
527  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());
528  }
529  }
531  iEvent.getByToken(tok_hf_,hf);
532  if(hf.isValid()){
533  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
534  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
535  if(nTS>8) nTS=8;
536  if(nTS<8 && nTS>=4) nTS=4;
537  nTS_HF=nTS;
538  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());
539  }
540  }
541 }
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
int k[5][pyjets_maxn]
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 1310 of file HcalDetDiagPedestalMonitor.cc.

1310 {}
void HcalDetDiagPedestalMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 293 of file HcalDetDiagPedestalMonitor.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), DQMStore::bookString(), createHTMLonly, dataset_seq_number, DatasetName, HcalBaseDQMonitor::dbe_, 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::setCurrentFolder(), EtaPhiHists::setup(), HcalBaseDQMonitor::setup(), ntuplemaker::status, AlCaHLTBitMon_QueryRunRegistry::string, and HcalBaseDQMonitor::subdir_.

293  {
294  edm::ESHandle<HcalDbService> conditions_;
295  c.get<HcalDbRecord>().get(conditions_);
296  emap=conditions_->getHcalMapping();
297 
299  c.get<HcalChannelQualityRcd>().get(p);
300  HcalChannelQuality* chanquality= new HcalChannelQuality(*p.product());
301  std::vector<DetId> mydetids = chanquality->getAllChannels();
302  KnownBadCells_.clear();
303 
304  for (std::vector<DetId>::const_iterator i = mydetids.begin();i!=mydetids.end();++i){
305  if (i->det()!=DetId::Hcal) continue; // not an hcal cell
306  HcalDetId id=HcalDetId(*i);
307  int status=(chanquality->getValues(id))->getValue();
309  KnownBadCells_[id.rawId()]=status;
310  }
311  }
312 
313 
315  if (!dbe_) return;
317 
319  meEVT_ = dbe_->bookInt("HcalDetDiagPedestalMonitor Event Number");
320  meRUN_ = dbe_->bookInt("HcalDetDiagPedestalMonitor Run Number");
321 
322  ReferenceRun="UNKNOWN";
323  LoadReference();
324  LoadDataset();
326  RefRun_= dbe_->bookString("HcalDetDiagPedestalMonitor Reference Run",ReferenceRun);
327  if(DatasetName.size()>0 && createHTMLonly){
328  char str[200]; sprintf(str,"%sHcalDetDiagPedestalData_run%i_%i/",htmlOutputPath.c_str(),run_number,dataset_seq_number);
329  htmlFolder=dbe_->bookString("HcalDetDiagPedestalMonitor HTML folder",str);
330  MonitorElement *me;
331  dbe_->setCurrentFolder(prefixME_+"HcalInfo");
332  me=dbe_->bookInt("HBpresent");
333  if(nHB>0) me->Fill(1);
334  me=dbe_->bookInt("HEpresent");
335  if(nHE>0) me->Fill(1);
336  me=dbe_->bookInt("HOpresent");
337  if(nHO>0) me->Fill(1);
338  me=dbe_->bookInt("HFpresent");
339  if(nHF>0) me->Fill(1);
340  }
341 
343  ProblemCellsByDepth_missing->setup(dbe_," Problem Missing Channels");
344  for(unsigned int i=0;i<ProblemCellsByDepth_missing->depth.size();i++)
345  problemnames_.push_back(ProblemCellsByDepth_missing->depth[i]->getName());
347  ProblemCellsByDepth_unstable->setup(dbe_," Problem Unstable Channels");
348  for(unsigned int i=0;i<ProblemCellsByDepth_unstable->depth.size();i++)
349  problemnames_.push_back(ProblemCellsByDepth_unstable->depth[i]->getName());
351  ProblemCellsByDepth_badped->setup(dbe_," Problem Bad Pedestal Value");
352  for(unsigned int i=0;i<ProblemCellsByDepth_badped->depth.size();i++)
353  problemnames_.push_back(ProblemCellsByDepth_badped->depth[i]->getName());
355  ProblemCellsByDepth_badrms->setup(dbe_," Problem Bad Rms Value");
356  for(unsigned int i=0;i<ProblemCellsByDepth_badrms->depth.size();i++)
357  problemnames_.push_back(ProblemCellsByDepth_badrms->depth[i]->getName());
358 
359  dbe_->setCurrentFolder(subdir_+"Summary Plots");
360  name="HB Pedestal Distribution (average over 4 caps)"; PedestalsAve4HB = dbe_->book1D(name,name,200,0,6);
361  name="HE Pedestal Distribution (average over 4 caps)"; PedestalsAve4HE = dbe_->book1D(name,name,200,0,6);
362  name="HO Pedestal Distribution (average over 4 caps)"; PedestalsAve4HO = dbe_->book1D(name,name,200,0,6);
363  name="HF Pedestal Distribution (average over 4 caps)"; PedestalsAve4HF = dbe_->book1D(name,name,200,0,6);
364  name="SIPM Pedestal Distribution (average over 4 caps)"; PedestalsAve4Simp = dbe_->book1D(name,name,200,5,15);
365 
366  name="HB Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HBref= dbe_->book1D(name,name,1500,-3,3);
367  name="HE Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HEref= dbe_->book1D(name,name,1500,-3,3);
368  name="HO Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HOref= dbe_->book1D(name,name,1500,-3,3);
369  name="HF Pedestal-Reference Distribution (average over 4 caps)"; PedestalsAve4HFref= dbe_->book1D(name,name,1500,-3,3);
370 
371  name="HB Pedestal RMS Distribution (individual cap)"; PedestalsRmsHB = dbe_->book1D(name,name,200,0,2);
372  name="HE Pedestal RMS Distribution (individual cap)"; PedestalsRmsHE = dbe_->book1D(name,name,200,0,2);
373  name="HO Pedestal RMS Distribution (individual cap)"; PedestalsRmsHO = dbe_->book1D(name,name,200,0,2);
374  name="HF Pedestal RMS Distribution (individual cap)"; PedestalsRmsHF = dbe_->book1D(name,name,200,0,2);
375  name="SIPM Pedestal RMS Distribution (individual cap)"; PedestalsRmsSimp = dbe_->book1D(name,name,200,0,4);
376 
377  name="HB Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHBref = dbe_->book1D(name,name,1500,-3,3);
378  name="HE Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHEref = dbe_->book1D(name,name,1500,-3,3);
379  name="HO Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHOref = dbe_->book1D(name,name,1500,-3,3);
380  name="HF Pedestal_rms-Reference_rms Distribution"; PedestalsRmsHFref = dbe_->book1D(name,name,1500,-3,3);
381 
382  name="HBHEHF pedestal mean map"; Pedestals2DHBHEHF = dbe_->book2D(name,name,87,-43,43,74,0,73);
383  name="HO pedestal mean map"; Pedestals2DHO = dbe_->book2D(name,name,33,-16,16,74,0,73);
384  name="HBHEHF pedestal rms map"; Pedestals2DRmsHBHEHF = dbe_->book2D(name,name,87,-43,43,74,0,73);
385  name="HO pedestal rms map"; Pedestals2DRmsHO = dbe_->book2D(name,name,33,-16,16,74,0,73);
386  name="HBHEHF pedestal problems map"; Pedestals2DErrorHBHEHF = dbe_->book2D(name,name,87,-43,43,74,0,73);
387  name="HO pedestal problems map"; Pedestals2DErrorHO = dbe_->book2D(name,name,33,-16,16,74,0,73);
388 
390  Pedestals2DHO->setAxisRange(1,5,3);
393 
394  Pedestals2DHBHEHF->setAxisTitle("i#eta",1);
395  Pedestals2DHBHEHF->setAxisTitle("i#phi",2);
396  Pedestals2DHO->setAxisTitle("i#eta",1);
397  Pedestals2DHO->setAxisTitle("i#phi",2);
400  Pedestals2DRmsHO->setAxisTitle("i#eta",1);
401  Pedestals2DRmsHO->setAxisTitle("i#phi",2);
404  Pedestals2DErrorHO->setAxisTitle("i#eta",1);
405  Pedestals2DErrorHO->setAxisTitle("i#phi",2);
406  PedestalsAve4HB->setAxisTitle("ADC counts",1);
407  PedestalsAve4HE->setAxisTitle("ADC counts",1);
408  PedestalsAve4HO->setAxisTitle("ADC counts",1);
409  PedestalsAve4HF->setAxisTitle("ADC counts",1);
410  PedestalsAve4Simp->setAxisTitle("ADC counts",1);
411  PedestalsAve4HBref->setAxisTitle("ADC counts",1);
412  PedestalsAve4HEref->setAxisTitle("ADC counts",1);
413  PedestalsAve4HOref->setAxisTitle("ADC counts",1);
414  PedestalsAve4HFref->setAxisTitle("ADC counts",1);
415  PedestalsRmsHB->setAxisTitle("ADC counts",1);
416  PedestalsRmsHE->setAxisTitle("ADC counts",1);
417  PedestalsRmsHO->setAxisTitle("ADC counts",1);
418  PedestalsRmsHF->setAxisTitle("ADC counts",1);
419  PedestalsRmsSimp->setAxisTitle("ADC counts",1);
420  PedestalsRmsHBref->setAxisTitle("ADC counts",1);
421  PedestalsRmsHEref->setAxisTitle("ADC counts",1);
422  PedestalsRmsHOref->setAxisTitle("ADC counts",1);
423  PedestalsRmsHFref->setAxisTitle("ADC counts",1);
424 
425  dbe_->setCurrentFolder(subdir_+"Plots for client");
427  ProblemCellsByDepth_missing_val->setup(dbe_," Missing channels");
429  ProblemCellsByDepth_unstable_val->setup(dbe_," Channel instability value");
431  ProblemCellsByDepth_badped_val->setup(dbe_," Bad Pedestal-Ref Value");
433  ProblemCellsByDepth_badrms_val->setup(dbe_," Bad Rms-ref Value");
434 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:964
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_
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::map< unsigned int, int > KnownBadCells_
void Fill(long long x)
std::vector< MonitorElement * > depth
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:930
std::vector< DetId > getAllChannels() const
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
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:871
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1092
virtual void setup(void)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:677
void HcalDetDiagPedestalMonitor::CheckStatus ( )
private

Definition at line 653 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().

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

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

Definition at line 543 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().

543  {
557  Pedestals2DHO->Reset();
558  // HBHEHF summary map
559  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
560  double PED=0,RMS=0,nped=0,nrms=0,ave=0,rms=0;
561  for(int depth=1;depth<=3;depth++){
562  if(hb_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
563  hb_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
564  hb_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
565  hb_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
566  hb_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
567  }
568  if(he_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
569  he_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
570  he_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
571  he_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
572  he_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
573  }
574  if(hf_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
575  hf_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
576  hf_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
577  hf_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
578  hf_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
579  }
580  }
581  if(nped>0) Pedestals2DHBHEHF->Fill(eta,phi,PED/nped);
582  if(nrms>0) Pedestals2DRmsHBHEHF->Fill(eta,phi,RMS/nrms);
583  if(nped>0 && abs(eta)>20) Pedestals2DHBHEHF->Fill(eta,phi+1,PED/nped);
584  if(nrms>0 && abs(eta)>20) Pedestals2DRmsHBHEHF->Fill(eta,phi+1,RMS/nrms);
585  }
586  // HO summary map
587  for(int eta=-10;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
588  if(eta>10 && !isSiPM(eta,phi,4)) continue;
589  double PED=0,RMS=0,nped=0,nrms=0,ave=0,rms=0;
590  if(ho_data[eta+42][phi-1][4-1][0].get_statistics()>100){
591  ho_data[eta+42][phi-1][4-1][0].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
592  ho_data[eta+42][phi-1][4-1][1].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
593  ho_data[eta+42][phi-1][4-1][2].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
594  ho_data[eta+42][phi-1][4-1][3].get_average(&ave,&rms); PED+=ave; nped++; RMS+=rms; nrms++;
595  }
596  if(nped>0) Pedestals2DHO->Fill(eta,phi,PED/nped);
597  if(nrms>0) Pedestals2DRmsHO->Fill(eta,phi,RMS/nrms);
598  }
599  // HB histograms
600  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
601  if(hb_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
602  double ave=0,rms=0,sum=0;
603  hb_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
604  hb_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
605  hb_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
606  hb_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHB->Fill(rms);
607  PedestalsAve4HB->Fill(sum/4.0);
608  }
609  }
610  // HE histograms
611  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=3;depth++){
612  if(he_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
613  double ave=0,rms=0,sum=0;
614  he_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
615  he_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
616  he_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
617  he_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHE->Fill(rms);
618  PedestalsAve4HE->Fill(sum/4.0);
619  }
620  }
621  // HO histograms
622  for(int eta=-10;eta<=15;eta++) for(int phi=1;phi<=72;phi++) for(int depth=4;depth<=4;depth++){
623  if(eta>10 && !isSiPM(eta,phi,4)) continue;
624  if(ho_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
625  double ave=0,rms=0,sum=0;
626  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
627  ho_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
628  ho_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
629  ho_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
630  ho_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsSimp->Fill(rms);
631  PedestalsAve4Simp->Fill(sum/4.0);
632  }else{
633  ho_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
634  ho_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
635  ho_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
636  ho_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHO->Fill(rms);
637  PedestalsAve4HO->Fill(sum/4.0);
638  }
639  }
640  }
641  // HF histograms
642  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
643  if(hf_data[eta+42][phi-1][depth-1][0].get_statistics()>100){
644  double ave=0,rms=0,sum=0;
645  hf_data[eta+42][phi-1][depth-1][0].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
646  hf_data[eta+42][phi-1][depth-1][1].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
647  hf_data[eta+42][phi-1][depth-1][2].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
648  hf_data[eta+42][phi-1][depth-1][3].get_average(&ave,&rms); sum+=ave; PedestalsRmsHF->Fill(rms);
649  PedestalsAve4HF->Fill(sum/4.0);
650  }
651  }
652 }
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 1228 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 beginRun().

1228  {
1229  double ped[4],rms[4];
1230  int Eta,Phi,Depth,Statistic;
1231  char subdet[10];
1232  TFile *f;
1233  if(DatasetName.size()==0) return;
1234  createHTMLonly=true;
1235  if(gSystem->AccessPathName(DatasetName.c_str())) return;
1236  f = new TFile(DatasetName.c_str(),"READ");
1237  if(!f->IsOpen()) return ;
1238 
1239  TTree* t=0;
1240  t=(TTree*)f->Get("HCAL Pedestal data");
1241  if(!t) return;
1242  t->SetBranchAddress("Subdet", subdet);
1243  t->SetBranchAddress("eta", &Eta);
1244  t->SetBranchAddress("phi", &Phi);
1245  t->SetBranchAddress("depth", &Depth);
1246  t->SetBranchAddress("cap0_ped", &ped[0]);
1247  t->SetBranchAddress("cap0_rms", &rms[0]);
1248  t->SetBranchAddress("cap1_ped", &ped[1]);
1249  t->SetBranchAddress("cap1_rms", &rms[1]);
1250  t->SetBranchAddress("cap2_ped", &ped[2]);
1251  t->SetBranchAddress("cap2_rms", &rms[2]);
1252  t->SetBranchAddress("cap3_ped", &ped[3]);
1253  t->SetBranchAddress("cap3_rms", &rms[3]);
1254  t->SetBranchAddress("statistic",&Statistic);
1255 
1256  for(int ievt=0;ievt<t->GetEntries();ievt++){
1257  t->GetEntry(ievt);
1258  if(strcmp(subdet,"HB")==0){ nHB++;
1259  hb_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1260  hb_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1261  hb_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1262  hb_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1263  hb_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1264  hb_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1265  hb_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1266  hb_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1267  }
1268  if(strcmp(subdet,"HE")==0){ nHE++;
1269  he_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1270  he_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1271  he_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1272  he_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1273  he_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1274  he_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1275  he_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1276  he_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1277  }
1278  if(strcmp(subdet,"HO")==0){ nHO++;
1279  ho_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1280  ho_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1281  ho_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1282  ho_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1283  ho_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1284  ho_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1285  ho_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1286  ho_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1287  }
1288  if(strcmp(subdet,"HF")==0){ nHF++;
1289  hf_data[Eta+42][Phi-1][Depth-1][0].set_data(ped[0],rms[0]);
1290  hf_data[Eta+42][Phi-1][Depth-1][1].set_data(ped[1],rms[1]);
1291  hf_data[Eta+42][Phi-1][Depth-1][2].set_data(ped[2],rms[2]);
1292  hf_data[Eta+42][Phi-1][Depth-1][3].set_data(ped[3],rms[3]);
1293  hf_data[Eta+42][Phi-1][Depth-1][0].set_statistics(Statistic);
1294  hf_data[Eta+42][Phi-1][Depth-1][1].set_statistics(Statistic);
1295  hf_data[Eta+42][Phi-1][Depth-1][2].set_statistics(Statistic);
1296  hf_data[Eta+42][Phi-1][Depth-1][3].set_statistics(Statistic);
1297  }
1298  }
1299  TObjString *STR1=(TObjString *)f->Get("run number");
1300  if(STR1){ int run; sscanf(STR1->String(),"%i",&run); meRUN_->Fill(run); run_number=run;}
1301 
1302  TObjString *STR2=(TObjString *)f->Get("Total events processed");
1303  if(STR2){ int events; sscanf(STR2->String(),"%i",&events); meEVT_->Fill(events); ievt_=events;}
1304 
1305  TObjString *STR3=(TObjString *)f->Get("Dataset number");
1306  if(STR3){ int ds; sscanf(STR3->String(),"%i",&ds); dataset_seq_number=ds;}
1307 
1308  f->Close();
1309 }
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 1171 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 beginRun().

1171  {
1172  double ped[4],rms[4];
1173  int Eta,Phi,Depth;
1174  char subdet[10];
1175  TFile *f;
1176  if(gSystem->AccessPathName(ReferenceData.c_str())) return;
1177  f = new TFile(ReferenceData.c_str(),"READ");
1178  if(!f->IsOpen()) return ;
1179  TObjString *STR=(TObjString *)f->Get("run number");
1180 
1181  if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
1182 
1183  TTree* t=(TTree*)f->Get("HCAL Pedestal data");
1184  if(!t) return;
1185  t->SetBranchAddress("Subdet", subdet);
1186  t->SetBranchAddress("eta", &Eta);
1187  t->SetBranchAddress("phi", &Phi);
1188  t->SetBranchAddress("depth", &Depth);
1189  t->SetBranchAddress("cap0_ped", &ped[0]);
1190  t->SetBranchAddress("cap0_rms", &rms[0]);
1191  t->SetBranchAddress("cap1_ped", &ped[1]);
1192  t->SetBranchAddress("cap1_rms", &rms[1]);
1193  t->SetBranchAddress("cap2_ped", &ped[2]);
1194  t->SetBranchAddress("cap2_rms", &rms[2]);
1195  t->SetBranchAddress("cap3_ped", &ped[3]);
1196  t->SetBranchAddress("cap3_rms", &rms[3]);
1197  for(int ievt=0;ievt<t->GetEntries();ievt++){
1198  t->GetEntry(ievt);
1199  if(strcmp(subdet,"HB")==0){
1200  hb_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1201  hb_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1202  hb_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1203  hb_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1204  }
1205  if(strcmp(subdet,"HE")==0){
1206  he_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1207  he_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1208  he_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1209  he_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1210  }
1211  if(strcmp(subdet,"HO")==0){
1212  ho_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1213  ho_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1214  ho_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1215  ho_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1216  }
1217  if(strcmp(subdet,"HF")==0){
1218  hf_data[Eta+42][Phi-1][Depth-1][0].set_reference(ped[0],rms[0]);
1219  hf_data[Eta+42][Phi-1][Depth-1][1].set_reference(ped[1],rms[1]);
1220  hf_data[Eta+42][Phi-1][Depth-1][2].set_reference(ped[2],rms[2]);
1221  hf_data[Eta+42][Phi-1][Depth-1][3].set_reference(ped[3],rms[3]);
1222  }
1223  }
1224  f->Close();
1225  IsReference=true;
1226 }
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 945 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().

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

std::string HcalDetDiagPedestalMonitor::htmlOutputPath
private

Definition at line 187 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), 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 beginRun(), 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(), beginRun(), and LoadDataset().

MonitorElement * HcalDetDiagPedestalMonitor::meRUN_
private

Definition at line 195 of file HcalDetDiagPedestalMonitor.cc.

Referenced by analyze(), beginRun(), 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 beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DErrorHO
private

Definition at line 223 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DHBHEHF
private

Definition at line 220 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DHO
private

Definition at line 221 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DRmsHBHEHF
private

Definition at line 218 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::Pedestals2DRmsHO
private

Definition at line 219 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HB
private

Definition at line 197 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HBref
private

Definition at line 203 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HE
private

Definition at line 198 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HEref
private

Definition at line 204 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HF
private

Definition at line 200 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HFref
private

Definition at line 206 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HO
private

Definition at line 199 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4HOref
private

Definition at line 205 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsAve4Simp
private

Definition at line 201 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHB
private

Definition at line 207 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHBref
private

Definition at line 213 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHE
private

Definition at line 208 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHEref
private

Definition at line 214 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHF
private

Definition at line 210 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHFref
private

Definition at line 216 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHO
private

Definition at line 209 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsHOref
private

Definition at line 215 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

MonitorElement* HcalDetDiagPedestalMonitor::PedestalsRmsSimp
private

Definition at line 211 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagPedestalMonitor::prefixME_
private

Definition at line 190 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and HcalDetDiagPedestalMonitor().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badped
private

Definition at line 227 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badped_val
private

Definition at line 232 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badrms
private

Definition at line 228 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_badrms_val
private

Definition at line 233 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_missing
private

Definition at line 225 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_missing_val
private

Definition at line 230 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_unstable
private

Definition at line 226 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

EtaPhiHists* HcalDetDiagPedestalMonitor::ProblemCellsByDepth_unstable_val
private

Definition at line 231 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun(), and CheckStatus().

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

Definition at line 234 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun().

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 beginRun(), and LoadReference().

MonitorElement* HcalDetDiagPedestalMonitor::RefRun_
private

Definition at line 196 of file HcalDetDiagPedestalMonitor.cc.

Referenced by beginRun().

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