CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFClient_JetRes Class Reference

#include <PFClient_JetRes.h>

Inheritance diagram for PFClient_JetRes:
DQMEDHarvester edm::one::EDProducer< T > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PFClient_JetRes (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< T >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector
< edm::ProductResolverIndex >
const & 
indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector
< edm::ProductResolverIndex >
const & 
putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void createEfficiencyPlots (DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
 
void createResolutionPlots (DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
 
void doEfficiency (DQMStore::IBooker &, DQMStore::IGetter &)
 
void doSummaries (DQMStore::IBooker &, DQMStore::IGetter &)
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void getHistogramParameters (MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
 

Private Attributes

std::vector< std::string > effHistogramNames_
 
bool efficiencyFlag_
 
std::vector< std::string > folderNames_
 
std::vector< std::string > histogramNames_
 
std::vector< int > PtBins_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef
dqm::harvesting::MonitorElement 
MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 12 of file PFClient_JetRes.h.

Constructor & Destructor Documentation

PFClient_JetRes::PFClient_JetRes ( const edm::ParameterSet parameterSet)

Definition at line 17 of file PFClient_JetRes.cc.

References effHistogramNames_, efficiencyFlag_, folderNames_, edm::ParameterSet::getParameter(), histogramNames_, and PtBins_.

17  {
18  folderNames_ = parameterSet.getParameter<std::vector<std::string>>("FolderNames");
19  histogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNames");
20  efficiencyFlag_ = parameterSet.getParameter<bool>("CreateEfficiencyPlots");
21  effHistogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNamesForEfficiencyPlots");
22  PtBins_ = parameterSet.getParameter<std::vector<int>>("VariablePtBins");
23 }
std::vector< std::string > effHistogramNames_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< int > PtBins_
std::vector< std::string > folderNames_
std::vector< std::string > histogramNames_

Member Function Documentation

void PFClient_JetRes::createEfficiencyPlots ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
std::string &  folder,
std::string &  name 
)
private

Definition at line 203 of file PFClient_JetRes.cc.

References dqm::implementation::IBooker::book1D(), postValidation_cfi::efficiency, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getAxisTitle(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsX(), dqm::legacy::MonitorElement::getTH1F(), dqm::impl::MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me1, hlt_dqm_clientPB-live_cfg::me2, dqm::impl::MonitorElement::Reset(), dqm::impl::MonitorElement::setBinContent(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setEfficiencyFlag(), AlCaHLTBitMon_QueryRunRegistry::string, MonitorElementData::TH1F, hlt_dqm_clientPB-live_cfg::xmax, and hlt_dqm_clientPB-live_cfg::xmin.

Referenced by doEfficiency().

206  {
207  MonitorElement *me1 = igetter.get(folder + "/" + name);
208  MonitorElement *me2 = igetter.get(folder + "/" + name + "ref_");
209  if (!me1 || !me2)
210  return;
211  MonitorElement *me_eff;
212  if ((me1->kind() == MonitorElement::Kind::TH1F) && (me1->kind() == MonitorElement::Kind::TH1F)) {
213  TH1 *th1 = me1->getTH1F();
214  size_t nbinx = me1->getNbinsX();
215 
216  float xmin = th1->GetXaxis()->GetXmin();
217  float xmax = th1->GetXaxis()->GetXmax();
218  std::string xtit = me1->getAxisTitle(1);
219  std::string tit_new;
220  tit_new = ";" + xtit + ";Efficiency";
221 
222  ibooker.setCurrentFolder(folder);
223  me_eff = ibooker.book1D("efficiency_" + name, tit_new, nbinx, xmin, xmax);
224 
225  double efficiency;
226  me_eff->Reset();
227  me_eff->setEfficiencyFlag();
228  for (size_t ix = 1; ix < nbinx + 1; ++ix) {
229  float val1 = me1->getBinContent(ix);
230  float val2 = me2->getBinContent(ix);
231  if (val2 > 0.0)
232  efficiency = val1 / val2;
233  else
234  efficiency = 0;
235  me_eff->setBinContent(ix, efficiency);
236  }
237  }
238 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual TH1F * getTH1F() const
virtual std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
Kind kind() const
Get the type of the monitor element.
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
virtual int getNbinsX() const
get # of bins in X-axis
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void PFClient_JetRes::createResolutionPlots ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
std::string &  folder,
std::string &  name 
)
private

Definition at line 69 of file PFClient_JetRes.cc.

References PDRates::average, dqm::implementation::IBooker::book1D(), dqm::implementation::IGetter::get(), getHistogramParameters(), dqm::impl::MonitorElement::getNbinsY(), dqm::legacy::MonitorElement::getTH2F(), dqm::impl::MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me, SiStripPI::mean, PVValHelper::pT, PtBins_, SiStripPI::rms, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinError(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setEfficiencyFlag(), dqm::impl::MonitorElement::setEntries(), AlCaHLTBitMon_QueryRunRegistry::string, MonitorElementData::TH2D, MonitorElementData::TH2F, MonitorElementData::TH2S, fw3dlego::xbins, SiStrip_OfflineMonitoring_cff::ymax, and SiStrip_OfflineMonitoring_cff::ymin.

Referenced by doSummaries().

72  {
73  MonitorElement *me = igetter.get(folder + "/" + name);
74  if (!me)
75  return;
76 
77  MonitorElement *pT[PtBins_.size() - 1];
78  std::vector<double> pTEntries(PtBins_.size() - 1, 0);
79 
80  // std::vector<std::string> pTRange (PtBins_.size() -1) ;
81  // char* pTRange[PtBins_.size() -1] ;
82  std::vector<TString> pTRange(PtBins_.size() - 1);
83  // float pTCenter[PtBins_.size() -1] ;
84 
85  MonitorElement *me_average;
86  MonitorElement *me_rms;
87  MonitorElement *me_mean;
88  MonitorElement *me_sigma;
89 
90  if ((me->kind() == MonitorElement::Kind::TH2F) || (me->kind() == MonitorElement::Kind::TH2S) ||
91  (me->kind() == MonitorElement::Kind::TH2D)) {
92  TH2 *th = me->getTH2F();
93  // size_t nbinx = me->getNbinsX();
94  size_t nbinx = PtBins_.size() - 1;
95  size_t nbiny = me->getNbinsY();
96 
97  float ymin = th->GetYaxis()->GetXmin();
98  float ymax = th->GetYaxis()->GetXmax();
99  std::string xtit = th->GetXaxis()->GetTitle();
100  // std::string ytit = th->GetYaxis()->GetTitle();
101  std::string ytit = "#Deltap_{T}/p_{T}";
102 
103  float *xbins = new float[nbinx + 1];
104  for (size_t ix = 1; ix < nbinx + 1; ++ix) {
105  // xbins[ix-1] = th->GetBinLowEdge(ix);
106  xbins[ix - 1] = PtBins_[ix - 1];
107  // snprintf(pTRange[ix-1].data(), 15, "Pt%d_%d", PtBins_[ix-1],
108  // PtBins_[ix]);
109  pTRange[ix - 1] = TString::Format("Pt%d_%d", PtBins_[ix - 1], PtBins_[ix]);
110  if (name == "BRdelta_et_Over_et_VS_et_")
111  pTRange[ix - 1] = TString::Format("BRPt%d_%d", PtBins_[ix - 1], PtBins_[ix]);
112  else if (name == "ERdelta_et_Over_et_VS_et_")
113  pTRange[ix - 1] = TString::Format("ERPt%d_%d", PtBins_[ix - 1], PtBins_[ix]);
114 
115  // pTCenter[ix-1] = (PtBins_[ix] - PtBins_[ix-1]) / 2. ;
116  if (ix == nbinx) {
117  // xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
118  xbins[ix] = PtBins_[ix];
119  }
120  }
121 
122  std::string tit_new;
123  ibooker.setCurrentFolder(folder);
124  // MonitorElement* me_slice = ibooker.book1D("PFlowSlice", "PFlowSlice",
125  // nbiny, ymin, ymax);
126 
127  tit_new = "Average " + ytit + ";" + xtit + ";Average_" + ytit;
128  me_average = ibooker.book1D("average_" + name, tit_new, nbinx, xbins);
129  me_average->setEfficiencyFlag();
130  tit_new = "RMS " + ytit + ";" + xtit + ";RMS_" + ytit;
131  me_rms = ibooker.book1D("rms_" + name, tit_new, nbinx, xbins);
132  me_rms->setEfficiencyFlag();
133  tit_new = ";" + xtit + ";Mean_" + ytit;
134  me_mean = ibooker.book1D("mean_" + name, tit_new, nbinx, xbins);
135  me_mean->setEfficiencyFlag();
136  tit_new = ";" + xtit + ";Sigma_" + ytit;
137  me_sigma = ibooker.book1D("sigma_" + name, tit_new, nbinx, xbins);
138  me_sigma->setEfficiencyFlag();
139 
140  double average, rms, mean, sigma;
141  for (size_t ix = 1; ix < nbinx + 1; ++ix) {
142  // me_slice->Reset();
143  if (name == "delta_et_Over_et_VS_et_")
144  pT[ix - 1] = ibooker.book1D(
145  pTRange[ix - 1], TString::Format("Total %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
146  if (name == "BRdelta_et_Over_et_VS_et_")
147  pT[ix - 1] = ibooker.book1D(
148  pTRange[ix - 1], TString::Format("Barrel %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
149  else if (name == "ERdelta_et_Over_et_VS_et_")
150  pT[ix - 1] = ibooker.book1D(
151  pTRange[ix - 1], TString::Format("Endcap %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
152 
153  for (size_t iy = 0; iy <= nbiny + 1; ++iy) // add under and overflow
154  if (th->GetBinContent(ix, iy)) {
155  // me_slice->setBinContent(iy,th->GetBinContent(ix,iy));
156  pT[ix - 1]->setBinContent(iy, th->GetBinContent(ix, iy));
157  pT[ix - 1]->setBinError(iy, th->GetBinError(ix, iy));
158  pTEntries[ix - 1] += th->GetBinContent(ix, iy);
159  }
160 
161  pT[ix - 1]->setEntries(pTEntries[ix - 1]);
162 
163  // getHistogramParameters(me_slice, average, rms, mean, sigma);
164  getHistogramParameters(pT[ix - 1], average, rms, mean, sigma);
165  me_average->setBinContent(ix, average);
166  me_rms->setBinContent(ix, rms);
167  me_mean->setBinContent(ix, mean);
168  me_sigma->setBinContent(ix, sigma);
169  }
170  delete[] xbins;
171  }
172 }
virtual TH2F * getTH2F() const
const double xbins[]
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual void setEntries(double nentries)
set # of entries
Kind kind() const
Get the type of the monitor element.
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< int > PtBins_
int average
Definition: PDRates.py:138
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void PFClient_JetRes::doEfficiency ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 53 of file PFClient_JetRes.cc.

References createEfficiencyPlots(), effHistogramNames_, folderNames_, fed_dqm_sourceclient-live_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

53  {
54  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end();
55  ifolder++) {
56  std::string path = "ParticleFlow/" + (*ifolder);
57 
58  for (std::vector<std::string>::const_iterator ihist = effHistogramNames_.begin(); ihist != effHistogramNames_.end();
59  ihist++) {
60  std::string hname = (*ihist);
61  createEfficiencyPlots(ibooker, igetter, path, hname);
62  }
63  }
64 }
void createEfficiencyPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
std::vector< std::string > effHistogramNames_
std::vector< std::string > folderNames_
void PFClient_JetRes::doSummaries ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 37 of file PFClient_JetRes.cc.

References createResolutionPlots(), folderNames_, histogramNames_, fed_dqm_sourceclient-live_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

37  {
38  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end();
39  ifolder++) {
40  std::string path = "ParticleFlow/" + (*ifolder);
41 
42  for (std::vector<std::string>::const_iterator ihist = histogramNames_.begin(); ihist != histogramNames_.end();
43  ihist++) {
44  std::string hname = (*ihist);
45  createResolutionPlots(ibooker, igetter, path, hname);
46  }
47  }
48 }
void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
std::vector< std::string > folderNames_
std::vector< std::string > histogramNames_
void PFClient_JetRes::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 28 of file PFClient_JetRes.cc.

References doEfficiency(), doSummaries(), and efficiencyFlag_.

28  {
29  doSummaries(ibooker, igetter);
30  if (efficiencyFlag_)
31  doEfficiency(ibooker, igetter);
32 }
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
void PFClient_JetRes::getHistogramParameters ( MonitorElement me_slice,
double &  avarage,
double &  rms,
double &  mean,
double &  sigma 
)
private

Definition at line 177 of file PFClient_JetRes.cc.

References dqm::impl::MonitorElement::getMean(), dqm::impl::MonitorElement::getRMS(), dqm::legacy::MonitorElement::getTH1F(), dqm::impl::MonitorElement::kind(), and MonitorElementData::TH1F.

Referenced by createResolutionPlots().

178  {
179  average = 0.0;
180  rms = 0.0;
181  mean = 0.0;
182  sigma = 0.0;
183 
184  if (!me_slice)
185  return;
186  if (me_slice->kind() == MonitorElement::Kind::TH1F) {
187  average = me_slice->getMean();
188  rms = me_slice->getRMS();
189  TH1F *th_slice = me_slice->getTH1F();
190  if (th_slice && th_slice->GetEntries() > 0) {
191  // need our own copy for thread safety
192  TF1 gaus("mygaus", "gaus");
193  th_slice->Fit(&gaus, "Q0 SERIAL");
194  sigma = gaus.GetParameter(2);
195  mean = gaus.GetParameter(1);
196  }
197  }
198 }
virtual TH1F * getTH1F() const
Kind kind() const
Get the type of the monitor element.
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
int average
Definition: PDRates.py:138

Member Data Documentation

std::vector<std::string> PFClient_JetRes::effHistogramNames_
private

Definition at line 27 of file PFClient_JetRes.h.

Referenced by doEfficiency(), and PFClient_JetRes().

bool PFClient_JetRes::efficiencyFlag_
private

Definition at line 30 of file PFClient_JetRes.h.

Referenced by dqmEndJob(), and PFClient_JetRes().

std::vector<std::string> PFClient_JetRes::folderNames_
private

Definition at line 25 of file PFClient_JetRes.h.

Referenced by doEfficiency(), doSummaries(), and PFClient_JetRes().

std::vector<std::string> PFClient_JetRes::histogramNames_
private

Definition at line 26 of file PFClient_JetRes.h.

Referenced by doSummaries(), and PFClient_JetRes().

std::vector<int> PFClient_JetRes::PtBins_
private

Definition at line 28 of file PFClient_JetRes.h.

Referenced by createResolutionPlots(), and PFClient_JetRes().