CMS 3D CMS Logo

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< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > 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< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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< Bconsumes (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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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 11 of file PFClient_JetRes.h.

Constructor & Destructor Documentation

◆ PFClient_JetRes()

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

Definition at line 15 of file PFClient_JetRes.cc.

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

15  {
16  folderNames_ = parameterSet.getParameter<std::vector<std::string>>("FolderNames");
17  histogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNames");
18  efficiencyFlag_ = parameterSet.getParameter<bool>("CreateEfficiencyPlots");
19  effHistogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNamesForEfficiencyPlots");
20  PtBins_ = parameterSet.getParameter<std::vector<int>>("VariablePtBins");
21 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
std::vector< std::string > effHistogramNames_
std::vector< int > PtBins_
std::vector< std::string > folderNames_
std::vector< std::string > histogramNames_

Member Function Documentation

◆ createEfficiencyPlots()

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

Definition at line 201 of file PFClient_JetRes.cc.

References dqm::implementation::IBooker::book1D(), L1TObjectsTimingClient_cff::efficiency, printsummarytable::folder, dqm::implementation::IGetter::get(), hlt_dqm_clientPB-live_cfg::me1, hlt_dqm_clientPB-live_cfg::me2, Skims_PA_cff::name, dqm::impl::MonitorElement::Reset(), dqm::impl::MonitorElement::setBinContent(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setEfficiencyFlag(), AlCaHLTBitMon_QueryRunRegistry::string, MonitorElementData::TH1F, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

Referenced by doEfficiency().

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

◆ createResolutionPlots()

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

Definition at line 67 of file PFClient_JetRes.cc.

References PDRates::average, dqm::implementation::IBooker::book1D(), printsummarytable::folder, dqm::implementation::IGetter::get(), getHistogramParameters(), hlt_dqm_clientPB-live_cfg::me, SiStripPI::mean, Skims_PA_cff::name, PVValHelper::pT, PtBins_, SiStripPI::rms, dqm::impl::MonitorElement::setBinContent(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setEfficiencyFlag(), AlCaHLTBitMon_QueryRunRegistry::string, MonitorElementData::TH2D, MonitorElementData::TH2F, MonitorElementData::TH2S, fw3dlego::xbins, L1TOccupancyClient_cfi::ymax, and L1TOccupancyClient_cfi::ymin.

Referenced by doSummaries().

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

◆ doEfficiency()

void PFClient_JetRes::doEfficiency ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 51 of file PFClient_JetRes.cc.

References createEfficiencyPlots(), effHistogramNames_, folderNames_, castor_dqm_sourceclient_file_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

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

◆ doSummaries()

void PFClient_JetRes::doSummaries ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 35 of file PFClient_JetRes.cc.

References createResolutionPlots(), folderNames_, histogramNames_, castor_dqm_sourceclient_file_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

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

◆ dqmEndJob()

void PFClient_JetRes::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 26 of file PFClient_JetRes.cc.

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

26  {
27  doSummaries(ibooker, igetter);
28  if (efficiencyFlag_)
29  doEfficiency(ibooker, igetter);
30 }
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)

◆ getHistogramParameters()

void PFClient_JetRes::getHistogramParameters ( MonitorElement me_slice,
double &  avarage,
double &  rms,
double &  mean,
double &  sigma 
)
private

Definition at line 175 of file PFClient_JetRes.cc.

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

Referenced by createResolutionPlots().

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

Member Data Documentation

◆ effHistogramNames_

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

Definition at line 26 of file PFClient_JetRes.h.

Referenced by doEfficiency(), and PFClient_JetRes().

◆ efficiencyFlag_

bool PFClient_JetRes::efficiencyFlag_
private

Definition at line 29 of file PFClient_JetRes.h.

Referenced by dqmEndJob(), and PFClient_JetRes().

◆ folderNames_

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

Definition at line 24 of file PFClient_JetRes.h.

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

◆ histogramNames_

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

Definition at line 25 of file PFClient_JetRes.h.

Referenced by doSummaries(), and PFClient_JetRes().

◆ PtBins_

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

Definition at line 27 of file PFClient_JetRes.h.

Referenced by createResolutionPlots(), and PFClient_JetRes().