CMS 3D CMS Logo

List of all members | Protected Member Functions | Private Member Functions | Private Attributes
ElectronDqmAnalyzerBase Class Reference

#include <ElectronDqmAnalyzerBase.h>

Inheritance diagram for ElectronDqmAnalyzerBase:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator > ElectronAnalyzer ElectronGeneralAnalyzer ElectronMcFakeValidator ElectronMcSignalValidator ElectronMcSignalValidatorMiniAOD ElectronTagProbeAnalyzer

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
MonitorElementbookH1 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
 
MonitorElementbookH1withSumw2 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
 
MonitorElementbookH2 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
 
MonitorElementbookH2withSumw2 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
MonitorElementbookP1 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, const std::string &name, const std::string &original, const std::string &title="")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, const std::string &name, MonitorElement *original, const std::string &title="")
 
 ElectronDqmAnalyzerBase (const edm::ParameterSet &conf)
 
void setBookEfficiencyFlag (const bool &)
 
void setBookIndex (short)
 
void setBookPrefix (const std::string &)
 
void setBookStatOverflowFlag (const bool &)
 
int verbosity ()
 
 ~ElectronDqmAnalyzerBase () override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

std::string newName (const std::string &name)
 

Private Attributes

bool bookEfficiencyFlag_ = false
 
short bookIndex_
 
std::string bookPrefix_
 
bool bookStatOverflowFlag_ = false
 
std::string finalStep_
 
std::vector< std::string > histoNames_
 
bool histoNamesReady
 
std::string inputFile_
 
std::string inputInternalPath_
 
std::string outputFile_
 
std::string outputInternalPath_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 19 of file ElectronDqmAnalyzerBase.h.

Constructor & Destructor Documentation

◆ ElectronDqmAnalyzerBase()

ElectronDqmAnalyzerBase::ElectronDqmAnalyzerBase ( const edm::ParameterSet conf)
explicitprotected

◆ ~ElectronDqmAnalyzerBase()

ElectronDqmAnalyzerBase::~ElectronDqmAnalyzerBase ( )
overrideprotected

Definition at line 28 of file ElectronDqmAnalyzerBase.cc.

28 {}

Member Function Documentation

◆ analyze()

void ElectronDqmAnalyzerBase::analyze ( const edm::Event e,
const edm::EventSetup c 
)
inlineoverrideprotectedvirtual

◆ bookH1()

ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::bookH1 ( DQMStore::IBooker iBooker,
const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
const std::string &  titleX = "",
const std::string &  titleY = "Events",
Option_t *  option = "E1 P" 
)
protected

Definition at line 57 of file ElectronDqmAnalyzerBase.cc.

65  {
67  MonitorElement *me = iBooker.book1D(newName(name), title, nchX, lowX, highX);
68  if (!titleX.empty()) {
69  me->setAxisTitle(titleX);
70  }
71  if (!titleY.empty()) {
72  me->setAxisTitle(titleY, 2);
73  }
74  if (TString(option) != "") {
75  me->setOption(option);
76  }
78  me->setStatOverflows(kTRUE);
79  }
80  return me;
81 }

References dqm::implementation::IBooker::book1D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and runGCPTkAlMap::title.

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), ElectronGeneralAnalyzer::bookHistograms(), ElectronTagProbeAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

◆ bookH1withSumw2()

ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::bookH1withSumw2 ( DQMStore::IBooker iBooker,
const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
const std::string &  titleX = "",
const std::string &  titleY = "Events",
Option_t *  option = "E1 P" 
)
protected

Definition at line 83 of file ElectronDqmAnalyzerBase.cc.

91  {
93  MonitorElement *me = iBooker.book1D(newName(name), title, nchX, lowX, highX);
94  if (me->getTH1F()->GetSumw2N() == 0)
95  me->enableSumw2();
96  if (!titleX.empty()) {
97  me->setAxisTitle(titleX);
98  }
99  if (!titleY.empty()) {
100  me->setAxisTitle(titleY, 2);
101  }
102  if (TString(option) != "") {
103  me->setOption(option);
104  }
105  if (bookStatOverflowFlag_) {
106  me->setStatOverflows(kTRUE);
107  }
108  return me;
109 }

References dqm::implementation::IBooker::book1D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and runGCPTkAlMap::title.

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), ElectronTagProbeAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

◆ bookH2()

ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::bookH2 ( DQMStore::IBooker iBooker,
const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
const std::string &  titleX = "",
const std::string &  titleY = "",
Option_t *  option = "COLZ" 
)
protected

Definition at line 111 of file ElectronDqmAnalyzerBase.cc.

122  {
124  MonitorElement *me = iBooker.book2D(newName(name), title, nchX, lowX, highX, nchY, lowY, highY);
125  if (!titleX.empty()) {
126  me->setAxisTitle(titleX);
127  }
128  if (!titleY.empty()) {
129  me->setAxisTitle(titleY, 2);
130  }
131  if (TString(option) != "") {
132  me->setOption(option);
133  }
134  if (bookStatOverflowFlag_) {
135  me->setStatOverflows(kTRUE);
136  }
137  return me;
138 }

References dqm::implementation::IBooker::book2D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and runGCPTkAlMap::title.

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), ElectronGeneralAnalyzer::bookHistograms(), ElectronTagProbeAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

◆ bookH2withSumw2()

ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::bookH2withSumw2 ( DQMStore::IBooker iBooker,
const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
const std::string &  titleX = "",
const std::string &  titleY = "",
Option_t *  option = "COLZ" 
)
protected

Definition at line 140 of file ElectronDqmAnalyzerBase.cc.

151  {
153  MonitorElement *me = iBooker.book2D(newName(name), title, nchX, lowX, highX, nchY, lowY, highY);
154  if (me->getTH2F()->GetSumw2N() == 0)
155  me->enableSumw2();
156  if (!titleX.empty()) {
157  me->setAxisTitle(titleX);
158  }
159  if (!titleY.empty()) {
160  me->setAxisTitle(titleY, 2);
161  }
162  if (TString(option) != "") {
163  me->setOption(option);
164  }
165  if (bookStatOverflowFlag_) {
166  me->setStatOverflows(kTRUE);
167  }
168  return me;
169 }

References dqm::implementation::IBooker::book2D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and runGCPTkAlMap::title.

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), and ElectronMcSignalValidator::bookHistograms().

◆ bookHistograms()

void ElectronDqmAnalyzerBase::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Reimplemented in ElectronAnalyzer, ElectronMcFakeValidator, ElectronMcSignalValidator, ElectronTagProbeAnalyzer, ElectronGeneralAnalyzer, and ElectronMcSignalValidatorMiniAOD.

Definition at line 53 of file ElectronDqmAnalyzerBase.cc.

53  {
54  edm::LogInfo("DQMAnalyzeBase::bookHistograms") << std::endl;
55 }

◆ bookP1()

ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::bookP1 ( DQMStore::IBooker iBooker,
const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
double  lowY,
double  highY,
const std::string &  titleX = "",
const std::string &  titleY = "",
Option_t *  option = "E1 P" 
)
protected

Definition at line 171 of file ElectronDqmAnalyzerBase.cc.

181  {
183  MonitorElement *me = iBooker.bookProfile(newName(name), title, nchX, lowX, highX, lowY, highY, " ");
184  if (!titleX.empty()) {
185  me->getTProfile()->GetXaxis()->SetTitle(titleX.c_str());
186  }
187  if (!titleY.empty()) {
188  me->setAxisTitle(titleY, 2);
189  }
190  if (TString(option) != "") {
191  me->getTProfile()->SetOption(option);
192  }
193  if (bookStatOverflowFlag_) {
194  me->setStatOverflows(kTRUE);
195  }
196  return me;
197 }

References dqm::implementation::IBooker::bookProfile(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and runGCPTkAlMap::title.

Referenced by ElectronGeneralAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

◆ cloneH1() [1/2]

MonitorElement* ElectronDqmAnalyzerBase::cloneH1 ( DQMStore::IBooker iBooker,
const std::string &  name,
const std::string &  original,
const std::string &  title = "" 
)
protected

◆ cloneH1() [2/2]

MonitorElement* ElectronDqmAnalyzerBase::cloneH1 ( DQMStore::IBooker iBooker,
const std::string &  name,
MonitorElement original,
const std::string &  title = "" 
)
protected

◆ newName()

std::string ElectronDqmAnalyzerBase::newName ( const std::string &  name)
private

Definition at line 40 of file ElectronDqmAnalyzerBase.cc.

40  {
41  if (bookPrefix_.empty()) {
42  return name;
43  }
44  std::ostringstream oss;
45  oss << bookPrefix_;
46  if (bookIndex_ >= 0) {
47  oss << bookIndex_++;
48  }
49  oss << "_" << name;
50  return oss.str();
51 }

References bookIndex_, bookPrefix_, and Skims_PA_cff::name.

Referenced by bookH1(), bookH1withSumw2(), bookH2(), bookH2withSumw2(), and bookP1().

◆ setBookEfficiencyFlag()

void ElectronDqmAnalyzerBase::setBookEfficiencyFlag ( const bool &  eff_flag)
protected

◆ setBookIndex()

void ElectronDqmAnalyzerBase::setBookIndex ( short  index)
protected

◆ setBookPrefix()

void ElectronDqmAnalyzerBase::setBookPrefix ( const std::string &  prefix)
protected

◆ setBookStatOverflowFlag()

void ElectronDqmAnalyzerBase::setBookStatOverflowFlag ( const bool &  statOverflow_flag)
protected

◆ verbosity()

int ElectronDqmAnalyzerBase::verbosity ( )
inlineprotected

Definition at line 31 of file ElectronDqmAnalyzerBase.h.

31 { return verbosity_; }

References verbosity_.

Member Data Documentation

◆ bookEfficiencyFlag_

bool ElectronDqmAnalyzerBase::bookEfficiencyFlag_ = false
private

Definition at line 110 of file ElectronDqmAnalyzerBase.h.

Referenced by setBookEfficiencyFlag().

◆ bookIndex_

short ElectronDqmAnalyzerBase::bookIndex_
private

Definition at line 109 of file ElectronDqmAnalyzerBase.h.

Referenced by newName(), and setBookIndex().

◆ bookPrefix_

std::string ElectronDqmAnalyzerBase::bookPrefix_
private

Definition at line 108 of file ElectronDqmAnalyzerBase.h.

Referenced by newName(), and setBookPrefix().

◆ bookStatOverflowFlag_

bool ElectronDqmAnalyzerBase::bookStatOverflowFlag_ = false
private

◆ finalStep_

std::string ElectronDqmAnalyzerBase::finalStep_
private

Definition at line 114 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

◆ histoNames_

std::vector<std::string> ElectronDqmAnalyzerBase::histoNames_
private

Definition at line 113 of file ElectronDqmAnalyzerBase.h.

◆ histoNamesReady

bool ElectronDqmAnalyzerBase::histoNamesReady
private

Definition at line 112 of file ElectronDqmAnalyzerBase.h.

◆ inputFile_

std::string ElectronDqmAnalyzerBase::inputFile_
private

Definition at line 115 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

◆ inputInternalPath_

std::string ElectronDqmAnalyzerBase::inputInternalPath_
private

Definition at line 117 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

◆ outputFile_

std::string ElectronDqmAnalyzerBase::outputFile_
private

Definition at line 116 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

◆ outputInternalPath_

std::string ElectronDqmAnalyzerBase::outputInternalPath_
private

◆ verbosity_

int ElectronDqmAnalyzerBase::verbosity_
private

Definition at line 107 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase(), and verbosity().

runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
ElectronDqmAnalyzerBase::outputInternalPath_
std::string outputInternalPath_
Definition: ElectronDqmAnalyzerBase.h:118
ElectronDqmAnalyzerBase::histoNamesReady
bool histoNamesReady
Definition: ElectronDqmAnalyzerBase.h:112
ElectronDqmAnalyzerBase::outputFile_
std::string outputFile_
Definition: ElectronDqmAnalyzerBase.h:116
ElectronDqmAnalyzerBase::inputFile_
std::string inputFile_
Definition: ElectronDqmAnalyzerBase.h:115
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
ElectronDqmAnalyzerBase::verbosity_
int verbosity_
Definition: ElectronDqmAnalyzerBase.h:107
ElectronDqmAnalyzerBase::finalStep_
std::string finalStep_
Definition: ElectronDqmAnalyzerBase.h:114
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
ElectronDqmAnalyzerBase::inputInternalPath_
std::string inputInternalPath_
Definition: ElectronDqmAnalyzerBase.h:117
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ElectronDqmAnalyzerBase::bookEfficiencyFlag_
bool bookEfficiencyFlag_
Definition: ElectronDqmAnalyzerBase.h:110
ElectronDqmAnalyzerBase::bookPrefix_
std::string bookPrefix_
Definition: ElectronDqmAnalyzerBase.h:108
ElectronDqmAnalyzerBase::newName
std::string newName(const std::string &name)
Definition: ElectronDqmAnalyzerBase.cc:40
ElectronDqmAnalyzerBase::bookStatOverflowFlag_
bool bookStatOverflowFlag_
Definition: ElectronDqmAnalyzerBase.h:111
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
ElectronDqmAnalyzerBase::bookIndex_
short bookIndex_
Definition: ElectronDqmAnalyzerBase.h:109
hcallasereventfilter2012_cfi.prefix
prefix
Definition: hcallasereventfilter2012_cfi.py:10
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98