CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFClient Class Reference

#include <PFClient.h>

Inheritance diagram for PFClient:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PFClient (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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
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 endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) 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::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
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 createProfilePlots (DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
 
void createProjectionPlots (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 doProfiles (DQMStore::IBooker &, DQMStore::IGetter &)
 
void doProjection (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_
 
bool profileFlag_
 
std::vector< std::string > profileHistogramNames_
 
std::vector< std::string > projectionHistogramNames_
 

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<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 12 of file PFClient.h.

Constructor & Destructor Documentation

◆ PFClient()

PFClient::PFClient ( const edm::ParameterSet parameterSet)

Definition at line 14 of file PFClient.cc.

14  {
15  folderNames_ = parameterSet.getParameter<std::vector<std::string>>("FolderNames");
16  histogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNames");
17  efficiencyFlag_ = parameterSet.getParameter<bool>("CreateEfficiencyPlots");
18  effHistogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNamesForEfficiencyPlots");
19  projectionHistogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNamesForProjectionPlots");
20  profileFlag_ = parameterSet.getParameter<bool>("CreateProfilePlots");
21  profileHistogramNames_ = parameterSet.getParameter<std::vector<std::string>>("HistogramNamesForProfilePlots");
22 }

References effHistogramNames_, efficiencyFlag_, folderNames_, edm::ParameterSet::getParameter(), histogramNames_, edm::parameterSet(), profileFlag_, profileHistogramNames_, and projectionHistogramNames_.

Member Function Documentation

◆ createEfficiencyPlots()

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

Definition at line 314 of file PFClient.cc.

317  {
318  MonitorElement *me1 = igetter.get(folder + "/" + name + "ref_");
319  MonitorElement *me2 = igetter.get(folder + "/" + name + "gen_");
320  if (!me1 || !me2)
321  return;
322 
323  TH1F *me1_forEff = (TH1F *)me1->getTH1F()->Rebin(2, "me1_forEff");
324  TH1F *me2_forEff = (TH1F *)me2->getTH1F()->Rebin(2, "me2_forEff");
325 
326  MonitorElement *me_eff;
327  if ((me1->kind() == MonitorElement::Kind::TH1F) && (me1->kind() == MonitorElement::Kind::TH1F)) {
328  // TH1* th1 = me1->getTH1F();
329  // size_t nbinx = me1->getNbinsX();
330  size_t nbinx = me1_forEff->GetNbinsX();
331 
332  // float xmin = th1->GetXaxis()->GetXmin();
333  // float xmax = th1->GetXaxis()->GetXmax();
334  float xmin = me1_forEff->GetXaxis()->GetXmin();
335  float xmax = me1_forEff->GetXaxis()->GetXmax();
336  std::string xtit = me1->getAxisTitle(1);
337  std::string tit_new;
338  tit_new = ";" + xtit + ";" + xtit + " efficiency";
339 
340  ibooker.setCurrentFolder(folder);
341  me_eff = ibooker.book1D("efficiency_" + name, tit_new, nbinx, xmin, xmax);
342 
343  me_eff->Reset();
344  me_eff->setEfficiencyFlag();
345  /*
346  double efficiency;
347  for (size_t ix = 1; ix < nbinx+1; ++ix) {
348  float val1 = me1->getBinContent(ix);
349  float val2 = me2->getBinContent(ix);
350  if (val2 > 0.0) efficiency = val1/val2;
351  else efficiency = 0;
352  me_eff->setBinContent(ix,efficiency);
353  }
354  */
355  // Binomial errors "B" asked by Florian
356  /*me1_forEff->Sumw2(); me2_forEff->Sumw2();*/ me_eff->enableSumw2();
357  me_eff->getTH1F()->Divide(me1_forEff, me2_forEff, 1, 1, "B");
358  }
359 }

References dqm::implementation::IBooker::book1D(), dqm::impl::MonitorElement::enableSumw2(), printsummarytable::folder, dqm::implementation::IGetter::get(), dqm::legacy::MonitorElement::getTH1F(), hlt_dqm_clientPB-live_cfg::me1, hlt_dqm_clientPB-live_cfg::me2, Skims_PA_cff::name, dqm::impl::MonitorElement::Reset(), 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().

◆ createProfilePlots()

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

Definition at line 227 of file PFClient.cc.

230  {
231  MonitorElement *me = igetter.get(folder + "/" + name);
232  if (!me)
233  return;
234 
235  if ((me->kind() == MonitorElement::Kind::TH2F) || (me->kind() == MonitorElement::Kind::TH2S) ||
236  (me->kind() == MonitorElement::Kind::TH2D)) {
237  TH2 *th = me->getTH2F();
238  size_t nbinx = me->getNbinsX();
239 
240  float ymin = th->GetYaxis()->GetXmin();
241  float ymax = th->GetYaxis()->GetXmax();
242  std::string xtit = th->GetXaxis()->GetTitle();
243  std::string ytit = th->GetYaxis()->GetTitle();
244  double *xbins = new double[nbinx + 1];
245  for (size_t ix = 1; ix < nbinx + 1; ++ix) {
246  xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
247  if (ix == nbinx)
248  xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
249  }
250 
251  std::string tit_new;
252  ibooker.setCurrentFolder(folder);
253  // TProfiles
254  MonitorElement *me_profile[2];
255  me_profile[0] = ibooker.bookProfile("profile_" + name, tit_new, nbinx, xbins, ymin, ymax, "");
256  me_profile[1] = ibooker.bookProfile("profileRMS_" + name, tit_new, nbinx, xbins, ymin, ymax, "s");
257  TProfile *profileX = th->ProfileX();
258  // size_t nbiny = me->getNbinsY();
259  // TProfile* profileX = th->ProfileX("",0,nbiny+1); add underflow and
260  // overflow
261  static const Int_t NUM_STAT = 7;
262  Double_t stats[NUM_STAT] = {0};
263  th->GetStats(stats);
264 
265  for (Int_t i = 0; i < 2; i++) {
266  if (me_profile[i]) {
267  for (size_t ix = 0; ix <= nbinx + 1; ++ix) {
268  me_profile[i]->setBinContent(ix, profileX->GetBinContent(ix) * profileX->GetBinEntries(ix));
269  // me_profile[i]->Fill( profileX->GetBinCenter(ix),
270  // profileX->GetBinContent(ix)*profileX->GetBinEntries(ix) ) ;
271  me_profile[i]->setBinEntries(ix, profileX->GetBinEntries(ix));
272  me_profile[i]->getTProfile()->GetSumw2()->fArray[ix] = profileX->GetSumw2()->fArray[ix];
273  // me_profile[i]->getTProfile()->GetBinSumw2()->fArray[ix] =
274  // profileX->GetBinSumw2()->fArray[ix]; // segmentation violation
275  }
276  }
277  me_profile[i]->getTProfile()->PutStats(stats);
278  me_profile[i]->setEntries(profileX->GetEntries());
279  }
280 
281  delete[] xbins;
282  }
283 }

References dqm::implementation::IBooker::bookProfile(), printsummarytable::folder, dqm::implementation::IGetter::get(), dqm::legacy::MonitorElement::getTProfile(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, hlt_dqm_clientPB-live_cfg::profileX, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinEntries(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setEntries(), dqmMemoryStats::stats, AlCaHLTBitMon_QueryRunRegistry::string, MonitorElementData::TH2D, MonitorElementData::TH2F, MonitorElementData::TH2S, fw3dlego::xbins, L1TOccupancyClient_cfi::ymax, and L1TOccupancyClient_cfi::ymin.

Referenced by doProfiles().

◆ createProjectionPlots()

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

Definition at line 172 of file PFClient.cc.

175  {
176  MonitorElement *me = igetter.get(folder + "/" + name);
177  if (!me)
178  return;
179 
180  MonitorElement *projection = nullptr;
181 
182  if ((me->kind() == MonitorElement::Kind::TH2F) || (me->kind() == MonitorElement::Kind::TH2S) ||
183  (me->kind() == MonitorElement::Kind::TH2D)) {
184  TH2 *th = me->getTH2F();
185  size_t nbinx = me->getNbinsX();
186  size_t nbiny = me->getNbinsY();
187 
188  float ymin = th->GetYaxis()->GetXmin();
189  float ymax = th->GetYaxis()->GetXmax();
190  std::string xtit = th->GetXaxis()->GetTitle();
191  std::string ytit = th->GetYaxis()->GetTitle();
192  float *xbins = new float[nbinx + 1];
193  for (size_t ix = 1; ix < nbinx + 1; ++ix) {
194  xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
195  if (ix == nbinx)
196  xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
197  }
198 
199  std::string tit_new;
200  ibooker.setCurrentFolder(folder);
201 
202  if (folder == "ParticleFlow/PFElectronValidation/CompWithGenElectron") {
203  if (name == "delta_et_Over_et_VS_et_")
204  projection = ibooker.book1D("delta_et_Over_et", "E_{T} resolution;#DeltaE_{T}/E_{T}", nbiny, ymin, ymax);
205  if (name == "delta_et_VS_et_")
206  projection = ibooker.book1D("delta_et_", "#DeltaE_{T};#DeltaE_{T}", nbiny, ymin, ymax);
207  if (name == "delta_eta_VS_et_")
208  projection = ibooker.book1D("delta_eta_", "#Delta#eta;#Delta#eta", nbiny, ymin, ymax);
209  if (name == "delta_phi_VS_et_")
210  projection = ibooker.book1D("delta_phi_", "#Delta#phi;#Delta#phi", nbiny, ymin, ymax);
211  }
212 
213  if (projection) {
214  for (size_t iy = 1; iy < nbiny + 1; ++iy) {
215  projection->setBinContent(iy, th->ProjectionY("e")->GetBinContent(iy));
216  }
217  projection->setEntries(me->getEntries());
218  }
219 
220  delete[] xbins;
221  }
222 }

References dqm::implementation::IBooker::book1D(), printsummarytable::folder, dqm::implementation::IGetter::get(), hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, dqm::impl::MonitorElement::setBinContent(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setEntries(), AlCaHLTBitMon_QueryRunRegistry::string, MonitorElementData::TH2D, MonitorElementData::TH2F, MonitorElementData::TH2S, fw3dlego::xbins, L1TOccupancyClient_cfi::ymax, and L1TOccupancyClient_cfi::ymin.

Referenced by doProjection().

◆ createResolutionPlots()

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

Definition at line 105 of file PFClient.cc.

108  {
109  MonitorElement *me = igetter.get(folder + "/" + name);
110 
111  if (!me)
112  return;
113 
114  MonitorElement *me_average;
115  MonitorElement *me_rms;
116  MonitorElement *me_mean;
117  MonitorElement *me_sigma;
118 
119  if ((me->kind() == MonitorElement::Kind::TH2F) || (me->kind() == MonitorElement::Kind::TH2S) ||
120  (me->kind() == MonitorElement::Kind::TH2D)) {
121  TH2 *th = me->getTH2F();
122  size_t nbinx = me->getNbinsX();
123  size_t nbiny = me->getNbinsY();
124 
125  float ymin = th->GetYaxis()->GetXmin();
126  float ymax = th->GetYaxis()->GetXmax();
127  std::string xtit = th->GetXaxis()->GetTitle();
128  std::string ytit = th->GetYaxis()->GetTitle();
129  float *xbins = new float[nbinx + 1];
130  for (size_t ix = 1; ix < nbinx + 1; ++ix) {
131  xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
132  if (ix == nbinx)
133  xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
134  }
135  std::string tit_new = ";" + xtit + ";" + ytit;
136  ibooker.setCurrentFolder(folder);
137  MonitorElement *me_slice = ibooker.book1D("PFlowSlice", "PFlowSlice", nbiny, ymin, ymax);
138 
139  tit_new = ";" + xtit + ";Average_" + ytit;
140  me_average = ibooker.book1D("average_" + name, tit_new, nbinx, xbins);
141  me_average->setEfficiencyFlag();
142  tit_new = ";" + xtit + ";RMS_" + ytit;
143  me_rms = ibooker.book1D("rms_" + name, tit_new, nbinx, xbins);
144  me_rms->setEfficiencyFlag();
145  tit_new = ";" + xtit + ";Mean_" + ytit;
146  me_mean = ibooker.book1D("mean_" + name, tit_new, nbinx, xbins);
147  me_mean->setEfficiencyFlag();
148  tit_new = ";" + xtit + ";Sigma_" + ytit;
149  me_sigma = ibooker.book1D("sigma_" + name, tit_new, nbinx, xbins);
150  me_sigma->setEfficiencyFlag();
151 
152  double average, rms, mean, sigma;
153 
154  for (size_t ix = 1; ix < nbinx + 1; ++ix) {
155  me_slice->Reset();
156  for (size_t iy = 1; iy < nbiny + 1; ++iy) {
157  me_slice->setBinContent(iy, th->GetBinContent(ix, iy));
158  }
159  getHistogramParameters(me_slice, average, rms, mean, sigma);
160  me_average->setBinContent(ix, average);
161  me_rms->setBinContent(ix, rms);
162  me_mean->setBinContent(ix, mean);
163  me_sigma->setBinContent(ix, sigma);
164  }
165  delete[] xbins;
166  }
167 }

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, dqm::impl::MonitorElement::Reset(), 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().

◆ doEfficiency()

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

Definition at line 89 of file PFClient.cc.

89  {
90  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end();
91  ifolder++) {
92  std::string path = "ParticleFlow/" + (*ifolder);
93 
94  for (std::vector<std::string>::const_iterator ihist = effHistogramNames_.begin(); ihist != effHistogramNames_.end();
95  ihist++) {
96  std::string hname = (*ihist);
97  createEfficiencyPlots(ibooker, igetter, path, hname);
98  }
99  }
100 }

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

Referenced by dqmEndJob().

◆ doProfiles()

void PFClient::doProfiles ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 72 of file PFClient.cc.

72  {
73  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end();
74  ifolder++) {
75  std::string path = "ParticleFlow/" + (*ifolder);
76 
77  for (std::vector<std::string>::const_iterator ihist = profileHistogramNames_.begin();
78  ihist != profileHistogramNames_.end();
79  ihist++) {
80  std::string hname = (*ihist);
81  createProfilePlots(ibooker, igetter, path, hname);
82  }
83  }
84 }

References createProfilePlots(), folderNames_, castor_dqm_sourceclient_file_cfg::path, profileHistogramNames_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

◆ doProjection()

void PFClient::doProjection ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 55 of file PFClient.cc.

55  {
56  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end();
57  ifolder++) {
58  std::string path = "ParticleFlow/" + (*ifolder);
59 
60  for (std::vector<std::string>::const_iterator ihist = projectionHistogramNames_.begin();
61  ihist != projectionHistogramNames_.end();
62  ihist++) {
63  std::string hname = (*ihist);
64  createProjectionPlots(ibooker, igetter, path, hname);
65  }
66  }
67 }

References createProjectionPlots(), folderNames_, castor_dqm_sourceclient_file_cfg::path, projectionHistogramNames_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

◆ doSummaries()

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

Definition at line 39 of file PFClient.cc.

39  {
40  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end();
41  ifolder++) {
42  std::string path = "ParticleFlow/" + (*ifolder);
43 
44  for (std::vector<std::string>::const_iterator ihist = histogramNames_.begin(); ihist != histogramNames_.end();
45  ihist++) {
46  std::string hname = (*ihist);
47  createResolutionPlots(ibooker, igetter, path, hname);
48  }
49  }
50 }

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

Referenced by dqmEndJob().

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 27 of file PFClient.cc.

27  {
28  doSummaries(ibooker, igetter);
29  doProjection(ibooker, igetter);
30  if (efficiencyFlag_)
31  doEfficiency(ibooker, igetter);
32  if (profileFlag_)
33  doProfiles(ibooker, igetter);
34 }

References doEfficiency(), doProfiles(), doProjection(), doSummaries(), efficiencyFlag_, and profileFlag_.

◆ getHistogramParameters()

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

Definition at line 288 of file PFClient.cc.

289  {
290  average = 0.0;
291  rms = 0.0;
292  mean = 0.0;
293  sigma = 0.0;
294 
295  if (!me_slice)
296  return;
297  if (me_slice->kind() == MonitorElement::Kind::TH1F) {
298  average = me_slice->getMean();
299  rms = me_slice->getRMS();
300  TH1F *th_slice = me_slice->getTH1F();
301  if (th_slice && th_slice->GetEntries() > 0) {
302  // need our own copy for thread safety
303  TF1 gaus("mygaus", "gaus");
304  th_slice->Fit(&gaus, "Q0 SERIAL");
305  sigma = gaus.GetParameter(2);
306  mean = gaus.GetParameter(1);
307  }
308  }
309 }

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

Referenced by createResolutionPlots().

Member Data Documentation

◆ effHistogramNames_

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

Definition at line 32 of file PFClient.h.

Referenced by doEfficiency(), and PFClient().

◆ efficiencyFlag_

bool PFClient::efficiencyFlag_
private

Definition at line 35 of file PFClient.h.

Referenced by dqmEndJob(), and PFClient().

◆ folderNames_

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

Definition at line 30 of file PFClient.h.

Referenced by doEfficiency(), doProfiles(), doProjection(), doSummaries(), and PFClient().

◆ histogramNames_

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

Definition at line 31 of file PFClient.h.

Referenced by doSummaries(), and PFClient().

◆ profileFlag_

bool PFClient::profileFlag_
private

Definition at line 36 of file PFClient.h.

Referenced by dqmEndJob(), and PFClient().

◆ profileHistogramNames_

std::vector<std::string> PFClient::profileHistogramNames_
private

Definition at line 34 of file PFClient.h.

Referenced by doProfiles(), and PFClient().

◆ projectionHistogramNames_

std::vector<std::string> PFClient::projectionHistogramNames_
private

Definition at line 33 of file PFClient.h.

Referenced by doProjection(), and PFClient().

PFClient::profileHistogramNames_
std::vector< std::string > profileHistogramNames_
Definition: PFClient.h:34
fw3dlego::xbins
const double xbins[]
Definition: fw3dlego_xbins.cc:16
mps_fire.i
i
Definition: mps_fire.py:355
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
dqm::impl::MonitorElement::setEntries
virtual void setEntries(double nentries)
set # of entries
Definition: MonitorElement.cc:738
PFClient::histogramNames_
std::vector< std::string > histogramNames_
Definition: PFClient.h:31
PFClient::createProfilePlots
void createProfilePlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
Definition: PFClient.cc:227
PFClient::doProjection
void doProjection(DQMStore::IBooker &, DQMStore::IGetter &)
Definition: PFClient.cc:55
printsummarytable.folder
folder
Definition: printsummarytable.py:7
MonitorElementData::Kind::TH1F
dqm::impl::MonitorElement::setEfficiencyFlag
void setEfficiencyFlag()
Definition: MonitorElement.h:267
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
PFClient::folderNames_
std::vector< std::string > folderNames_
Definition: PFClient.h:30
tools.TF1
TF1
Definition: tools.py:23
SiStripPI::rms
Definition: SiStripPayloadInspectorHelper.h:169
dqm::impl::MonitorElement::kind
Kind kind() const
Get the type of the monitor element.
Definition: MonitorElement.h:247
PFClient::projectionHistogramNames_
std::vector< std::string > projectionHistogramNames_
Definition: PFClient.h:33
dqm::legacy::MonitorElement::getTH1F
virtual TH1F * getTH1F() const
Definition: MonitorElement.h:478
MonitorElementData::Kind::TH2D
MonitorElementData::Kind::TH2F
PDRates.average
average
Definition: PDRates.py:139
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
PFClient::getHistogramParameters
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
Definition: PFClient.cc:288
hlt_dqm_clientPB-live_cfg.me2
me2
Definition: hlt_dqm_clientPB-live_cfg.py:73
PFClient::doSummaries
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
Definition: PFClient.cc:39
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
dqm::impl::MonitorElement::getRMS
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:562
dqm::legacy::MonitorElement::getTProfile
virtual TProfile * getTProfile() const
Definition: MonitorElement.h:506
PFClient::createProjectionPlots
void createProjectionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
Definition: PFClient.cc:172
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PFClient::createEfficiencyPlots
void createEfficiencyPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
Definition: PFClient.cc:314
dqm::impl::MonitorElement::setBinEntries
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
Definition: MonitorElement.cc:727
PFClient::efficiencyFlag_
bool efficiencyFlag_
Definition: PFClient.h:35
average
Definition: average.py:1
dqmMemoryStats.stats
stats
Definition: dqmMemoryStats.py:134
hlt_dqm_clientPB-live_cfg.me1
me1
Definition: hlt_dqm_clientPB-live_cfg.py:68
PFClient::doEfficiency
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
Definition: PFClient.cc:89
PFClient::effHistogramNames_
std::vector< std::string > effHistogramNames_
Definition: PFClient.h:32
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
MonitorElementData::Kind::TH2S
hlt_dqm_clientPB-live_cfg.profileX
profileX
Definition: hlt_dqm_clientPB-live_cfg.py:71
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
PFClient::createResolutionPlots
void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
Definition: PFClient.cc:105
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqm::impl::MonitorElement::getMean
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:549
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
PFClient::profileFlag_
bool profileFlag_
Definition: PFClient.h:36
dqm::impl::MonitorElement::enableSumw2
virtual void enableSumw2()
Definition: MonitorElement.cc:872
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:56
PFClient::doProfiles
void doProfiles(DQMStore::IBooker &, DQMStore::IGetter &)
Definition: PFClient.cc:72