CMS 3D CMS Logo

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

#include <PFClient.h>

Inheritance diagram for PFClient:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 PFClient (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginJob ()
 
void createEfficiencyPlots (std::string &folder, std::string &name)
 
void createProfilePlots (std::string &folder, std::string &name)
 
void createProjectionPlots (std::string &folder, std::string &name)
 
void createResolutionPlots (std::string &folder, std::string &name)
 
void doEfficiency ()
 
void doProfiles ()
 
void doProjection ()
 
void doSummaries ()
 
void endJob ()
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 
void getHistogramParameters (MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
 

Private Attributes

DQMStoredqmStore_
 
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 edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 12 of file PFClient.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file PFClient.cc.

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

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  projectionHistogramNames_ = parameterSet.getParameter< std::vector<std::string> >( "HistogramNamesForProjectionPlots" );
23  profileFlag_ = parameterSet.getParameter< bool> ("CreateProfilePlots" );
24  profileHistogramNames_ = parameterSet.getParameter< std::vector<std::string> >( "HistogramNamesForProfilePlots" );
25 }
T getParameter(std::string const &) const
std::vector< std::string > projectionHistogramNames_
Definition: PFClient.h:38
std::vector< std::string > histogramNames_
Definition: PFClient.h:36
std::vector< std::string > profileHistogramNames_
Definition: PFClient.h:39
std::vector< std::string > folderNames_
Definition: PFClient.h:35
bool profileFlag_
Definition: PFClient.h:41
std::vector< std::string > effHistogramNames_
Definition: PFClient.h:37
bool efficiencyFlag_
Definition: PFClient.h:40

Member Function Documentation

void PFClient::analyze ( edm::Event const &  ,
edm::EventSetup const &   
)
inlineprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 19 of file PFClient.h.

19 {;}
void PFClient::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 29 of file PFClient.cc.

References dqmStore_, and cppFunctionSkipper::operator.

29  {
30 
32 }
DQMStore * dqmStore_
Definition: PFClient.h:43
void PFClient::createEfficiencyPlots ( std::string &  folder,
std::string &  name 
)
private

Definition at line 303 of file PFClient.cc.

References DQMStore::book1D(), MonitorElement::DQM_KIND_TH1F, dqmStore_, DQMStore::get(), MonitorElement::getAxisTitle(), MonitorElement::getTH1F(), MonitorElement::kind(), MonitorElement::Reset(), DQMStore::setCurrentFolder(), MonitorElement::setEfficiencyFlag(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripMonitorClusterAlca_cfi::xmax, and SiStripMonitorClusterAlca_cfi::xmin.

Referenced by doEfficiency().

303  {
304  MonitorElement* me1 = dqmStore_->get(folder+"/"+name+"ref_");
305  MonitorElement* me2 = dqmStore_->get(folder+"/"+name+"gen_");
306  if (!me1 || !me2) return;
307 
308  TH1F* me1_forEff = (TH1F*)me1->getTH1F()->Rebin(2,"me1_forEff");
309  TH1F* me2_forEff = (TH1F*)me2->getTH1F()->Rebin(2,"me2_forEff");
310 
311  MonitorElement* me_eff;
312  if ( (me1->kind() == MonitorElement::DQM_KIND_TH1F) &&
313  (me1->kind() == MonitorElement::DQM_KIND_TH1F) ) {
314  //TH1* th1 = me1->getTH1F();
315  //size_t nbinx = me1->getNbinsX();
316  size_t nbinx = me1_forEff->GetNbinsX();
317 
318  //float xmin = th1->GetXaxis()->GetXmin();
319  //float xmax = th1->GetXaxis()->GetXmax();
320  float xmin = me1_forEff->GetXaxis()->GetXmin();
321  float xmax = me1_forEff->GetXaxis()->GetXmax();
322  std::string xtit = me1->getAxisTitle(1);
323  std::string tit_new;
324  tit_new = ";"+xtit+";"+xtit+" efficiency";
325 
326  dqmStore_->setCurrentFolder(folder);
327  me_eff = dqmStore_->book1D("efficiency_"+name,tit_new, nbinx, xmin, xmax);
328 
329  me_eff->Reset(); me_eff->setEfficiencyFlag();
330  /*
331  double efficiency;
332  for (size_t ix = 1; ix < nbinx+1; ++ix) {
333  float val1 = me1->getBinContent(ix);
334  float val2 = me2->getBinContent(ix);
335  if (val2 > 0.0) efficiency = val1/val2;
336  else efficiency = 0;
337  me_eff->setBinContent(ix,efficiency);
338  }
339  */
340  // Binomial errors "B" asked by Florian
341  /*me1_forEff->Sumw2(); me2_forEff->Sumw2();*/ me_eff->getTH1F()->Sumw2();
342  me_eff->getTH1F()->Divide( me1_forEff, me2_forEff, 1, 1, "B");
343  }
344 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:928
std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1679
TH1F * getTH1F(void) const
void setEfficiencyFlag(void)
void Reset(void)
reset ME (ie. contents, errors, etc)
DQMStore * dqmStore_
Definition: PFClient.h:43
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:639
void PFClient::createProfilePlots ( std::string &  folder,
std::string &  name 
)
private

Definition at line 223 of file PFClient.cc.

References DQMStore::bookProfile(), MonitorElement::DQM_KIND_TH2D, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH2S, dqmStore_, DQMStore::get(), MonitorElement::getNbinsX(), MonitorElement::getTH2F(), MonitorElement::getTProfile(), i, MonitorElement::kind(), MonitorElement::setBinContent(), MonitorElement::setBinEntries(), DQMStore::setCurrentFolder(), MonitorElement::setEntries(), AlCaHLTBitMon_QueryRunRegistry::string, fw3dlego::xbins, SiStripMonitorClusterAlca_cfi::ymax, and SiStripMonitorClusterAlca_cfi::ymin.

Referenced by doProfiles().

223  {
224  MonitorElement* me = dqmStore_->get(folder+"/"+name);
225  if (!me) return;
226 
227  if ( (me->kind() == MonitorElement::DQM_KIND_TH2F) ||
228  (me->kind() == MonitorElement::DQM_KIND_TH2S) ||
229  (me->kind() == MonitorElement::DQM_KIND_TH2D) ) {
230  TH2* th = me->getTH2F();
231  size_t nbinx = me->getNbinsX();
232 
233  float ymin = th->GetYaxis()->GetXmin();
234  float ymax = th->GetYaxis()->GetXmax();
235  std::string xtit = th->GetXaxis()->GetTitle();
236  std::string ytit = th->GetYaxis()->GetTitle();
237  double* xbins = new double[nbinx+1];
238  for (size_t ix = 1; ix < nbinx+1; ++ix) {
239  xbins[ix-1] = th->GetXaxis()->GetBinLowEdge(ix);
240  if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
241  }
242 
243  std::string tit_new;
244  dqmStore_->setCurrentFolder(folder);
245  //TProfiles
246  MonitorElement* me_profile[2];
247  me_profile[0] = dqmStore_->bookProfile("profile_"+name, tit_new,
248  nbinx, xbins, ymin, ymax, "" );
249  me_profile[1] = dqmStore_->bookProfile("profileRMS_"+name, tit_new,
250  nbinx, xbins, ymin, ymax, "s" );
251  TProfile* profileX = th->ProfileX();
252  //size_t nbiny = me->getNbinsY();
253  //TProfile* profileX = th->ProfileX("",0,nbiny+1); add underflow and overflow
254  static const Int_t NUM_STAT = 6;
255  Double_t stats[NUM_STAT] = {0}; th->GetStats(stats);
256 
257  for (Int_t i = 0; i<2; i++) {
258  if (me_profile[i]) {
259  for (size_t ix = 0; ix <= nbinx+1; ++ix) {
260  me_profile[i]->setBinContent( ix, profileX->GetBinContent(ix)*profileX->GetBinEntries(ix) ) ;
261  //me_profile[i]->Fill( profileX->GetBinCenter(ix), profileX->GetBinContent(ix)*profileX->GetBinEntries(ix) ) ;
262  me_profile[i]->setBinEntries( ix, profileX->GetBinEntries(ix) );
263  me_profile[i]->getTProfile()->GetSumw2()->fArray[ix] = profileX->GetSumw2()->fArray[ix];
264  //me_profile[i]->getTProfile()->GetBinSumw2()->fArray[ix] = profileX->GetBinSumw2()->fArray[ix]; // segmentation violation
265  }
266  }
267  me_profile[i]->getTProfile()->PutStats(stats);
268  me_profile[i]->setEntries( profileX->GetEntries() ) ;
269  }
270 
271  delete [] xbins;
272  }
273 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
const double xbins[]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1242
Kind kind(void) const
Get the type of the monitor element.
void setEntries(double nentries)
set # of entries
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1679
TProfile * getTProfile(void) const
int getNbinsX(void) const
get # of bins in X-axis
TH2F * getTH2F(void) const
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
DQMStore * dqmStore_
Definition: PFClient.h:43
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:639
void PFClient::createProjectionPlots ( std::string &  folder,
std::string &  name 
)
private

Definition at line 177 of file PFClient.cc.

References DQMStore::book1D(), MonitorElement::DQM_KIND_TH2D, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH2S, dqmStore_, DQMStore::get(), MonitorElement::getEntries(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), MonitorElement::getTH2F(), MonitorElement::kind(), MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), MonitorElement::setEntries(), AlCaHLTBitMon_QueryRunRegistry::string, fw3dlego::xbins, SiStripMonitorClusterAlca_cfi::ymax, and SiStripMonitorClusterAlca_cfi::ymin.

Referenced by doProjection().

177  {
178  MonitorElement* me = dqmStore_->get(folder+"/"+name);
179  if (!me) return;
180 
181  MonitorElement* projection = 0;
182 
183  if ( (me->kind() == MonitorElement::DQM_KIND_TH2F) ||
184  (me->kind() == MonitorElement::DQM_KIND_TH2S) ||
185  (me->kind() == MonitorElement::DQM_KIND_TH2D) ) {
186  TH2* th = me->getTH2F();
187  size_t nbinx = me->getNbinsX();
188  size_t nbiny = me->getNbinsY();
189 
190  float ymin = th->GetYaxis()->GetXmin();
191  float ymax = th->GetYaxis()->GetXmax();
192  std::string xtit = th->GetXaxis()->GetTitle();
193  std::string ytit = th->GetYaxis()->GetTitle();
194  float* xbins = new float[nbinx+1];
195  for (size_t ix = 1; ix < nbinx+1; ++ix) {
196  xbins[ix-1] = th->GetXaxis()->GetBinLowEdge(ix);
197  if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
198  }
199 
200  std::string tit_new;
201  dqmStore_->setCurrentFolder(folder);
202 
203  if (folder == "ParticleFlow/PFElectronValidation/CompWithGenElectron") {
204  if (name == "delta_et_Over_et_VS_et_") projection = dqmStore_->book1D("delta_et_Over_et","E_{T} resolution;#DeltaE_{T}/E_{T}",nbiny,ymin,ymax) ;
205  if (name == "delta_et_VS_et_") projection = dqmStore_->book1D("delta_et_","#DeltaE_{T};#DeltaE_{T}",nbiny,ymin,ymax) ;
206  if (name == "delta_eta_VS_et_") projection = dqmStore_->book1D("delta_eta_","#Delta#eta;#Delta#eta",nbiny,ymin,ymax) ;
207  if (name == "delta_phi_VS_et_") projection = dqmStore_->book1D("delta_phi_","#Delta#phi;#Delta#phi",nbiny,ymin,ymax) ;
208  }
209 
210  if (projection) {
211  for (size_t iy = 1; iy < nbiny+1; ++iy) {
212  projection->setBinContent(iy, th->ProjectionY("e")->GetBinContent(iy) ); }
213  projection->setEntries( me->getEntries() ) ;
214  }
215 
216  delete [] xbins;
217  }
218 }
void setBinContent(int binx, double content)
set content of bin (1-D)
const double xbins[]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:928
double getEntries(void) const
get # of entries
int getNbinsY(void) const
get # of bins in Y-axis
Kind kind(void) const
Get the type of the monitor element.
void setEntries(double nentries)
set # of entries
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1679
int getNbinsX(void) const
get # of bins in X-axis
TH2F * getTH2F(void) const
DQMStore * dqmStore_
Definition: PFClient.h:43
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:639
void PFClient::createResolutionPlots ( std::string &  folder,
std::string &  name 
)
private

Definition at line 114 of file PFClient.cc.

References PDRates::average, DQMStore::book1D(), MonitorElement::DQM_KIND_TH2D, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH2S, dqmStore_, DQMStore::get(), getHistogramParameters(), MonitorElement::getName(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), MonitorElement::getTH2F(), MonitorElement::kind(), timingPdfMaker::mean, DQMStore::removeElement(), MonitorElement::Reset(), plotscripts::rms(), MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), MonitorElement::setEfficiencyFlag(), AlCaHLTBitMon_QueryRunRegistry::string, fw3dlego::xbins, SiStripMonitorClusterAlca_cfi::ymax, and SiStripMonitorClusterAlca_cfi::ymin.

Referenced by doSummaries().

114  {
115  MonitorElement* me = dqmStore_->get(folder+"/"+name);
116  if (!me) return;
117 
118  MonitorElement* me_average;
119  MonitorElement* me_rms;
120  MonitorElement* me_mean;
121  MonitorElement* me_sigma;
122 
123  if ( (me->kind() == MonitorElement::DQM_KIND_TH2F) ||
124  (me->kind() == MonitorElement::DQM_KIND_TH2S) ||
125  (me->kind() == MonitorElement::DQM_KIND_TH2D) ) {
126  TH2* th = me->getTH2F();
127  size_t nbinx = me->getNbinsX();
128  size_t nbiny = me->getNbinsY();
129 
130  float ymin = th->GetYaxis()->GetXmin();
131  float ymax = th->GetYaxis()->GetXmax();
132  std::string xtit = th->GetXaxis()->GetTitle();
133  std::string ytit = th->GetYaxis()->GetTitle();
134  float* xbins = new float[nbinx+1];
135  for (size_t ix = 1; ix < nbinx+1; ++ix) {
136  xbins[ix-1] = th->GetXaxis()->GetBinLowEdge(ix);
137  if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
138  }
139  std::string tit_new = ";"+xtit+";"+ytit;
140  dqmStore_->setCurrentFolder(folder);
141  MonitorElement* me_slice = dqmStore_->book1D("PFlowSlice","PFlowSlice",nbiny,ymin,ymax);
142 
143  tit_new = ";"+xtit+";Average_"+ytit;
144  me_average = dqmStore_->book1D("average_"+name,tit_new, nbinx, xbins);
145  me_average->setEfficiencyFlag();
146  tit_new = ";"+xtit+";RMS_"+ytit;
147  me_rms = dqmStore_->book1D("rms_"+name,tit_new, nbinx, xbins);
148  me_rms->setEfficiencyFlag();
149  tit_new = ";"+xtit+";Mean_"+ytit;
150  me_mean = dqmStore_->book1D("mean_"+name,tit_new, nbinx, xbins);
151  me_mean->setEfficiencyFlag();
152  tit_new = ";"+xtit+";Sigma_"+ytit;
153  me_sigma = dqmStore_->book1D("sigma_"+name,tit_new, nbinx, xbins);
154  me_sigma->setEfficiencyFlag();
155 
156  double average, rms, mean, sigma;
157 
158  for (size_t ix = 1; ix < nbinx+1; ++ix) {
159  me_slice->Reset();
160  for (size_t iy = 1; iy < nbiny+1; ++iy) {
161  me_slice->setBinContent(iy,th->GetBinContent(ix,iy));
162  }
163  getHistogramParameters(me_slice, average, rms, mean, sigma);
164  me_average->setBinContent(ix,average);
165  me_rms->setBinContent(ix,rms);
166  me_mean->setBinContent(ix,mean);
167  me_sigma->setBinContent(ix,sigma);
168  }
169  if (me_slice) dqmStore_->removeElement(me_slice->getName());
170  delete [] xbins;
171  }
172 }
const std::string & getName(void) const
get name of ME
void setBinContent(int binx, double content)
set content of bin (1-D)
const double xbins[]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:928
int getNbinsY(void) const
get # of bins in Y-axis
void removeElement(const std::string &name)
Definition: DQMStore.cc:2986
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1679
int average
Definition: PDRates.py:137
int getNbinsX(void) const
get # of bins in X-axis
void setEfficiencyFlag(void)
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
DQMStore * dqmStore_
Definition: PFClient.h:43
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:639
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
Definition: PFClient.cc:278
void PFClient::doEfficiency ( )
private

Definition at line 99 of file PFClient.cc.

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

Referenced by endRun().

99  {
100  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin();
101  ifolder != folderNames_.end(); ifolder++) {
102  std::string path = "ParticleFlow/"+(*ifolder);
103 
104  for (std::vector<std::string>::const_iterator ihist = effHistogramNames_.begin();
105  ihist != effHistogramNames_.end(); ihist++) {
106  std::string hname = (*ihist);
107  createEfficiencyPlots(path, hname);
108  }
109  }
110 }
void createEfficiencyPlots(std::string &folder, std::string &name)
Definition: PFClient.cc:303
std::vector< std::string > folderNames_
Definition: PFClient.h:35
std::vector< std::string > effHistogramNames_
Definition: PFClient.h:37
void PFClient::doProfiles ( )
private

Definition at line 83 of file PFClient.cc.

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

Referenced by endRun().

83  {
84 
85  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin();
86  ifolder != folderNames_.end(); ifolder++) {
87  std::string path = "ParticleFlow/"+(*ifolder);
88 
89  for (std::vector<std::string>::const_iterator ihist = profileHistogramNames_.begin();
90  ihist != profileHistogramNames_.end(); ihist++) {
91  std::string hname = (*ihist);
92  createProfilePlots(path, hname);
93  }
94  }
95 }
std::vector< std::string > profileHistogramNames_
Definition: PFClient.h:39
std::vector< std::string > folderNames_
Definition: PFClient.h:35
void createProfilePlots(std::string &folder, std::string &name)
Definition: PFClient.cc:223
void PFClient::doProjection ( )
private

Definition at line 67 of file PFClient.cc.

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

Referenced by endRun().

67  {
68 
69  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin();
70  ifolder != folderNames_.end(); ifolder++) {
71  std::string path = "ParticleFlow/"+(*ifolder);
72 
73  for (std::vector<std::string>::const_iterator ihist = projectionHistogramNames_.begin();
74  ihist != projectionHistogramNames_.end(); ihist++) {
75  std::string hname = (*ihist);
76  createProjectionPlots(path, hname);
77  }
78  }
79 }
std::vector< std::string > projectionHistogramNames_
Definition: PFClient.h:38
std::vector< std::string > folderNames_
Definition: PFClient.h:35
void createProjectionPlots(std::string &folder, std::string &name)
Definition: PFClient.cc:177
void PFClient::doSummaries ( )
private

Definition at line 51 of file PFClient.cc.

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

Referenced by endRun().

51  {
52 
53  for (std::vector<std::string>::const_iterator ifolder = folderNames_.begin();
54  ifolder != folderNames_.end(); ifolder++) {
55  std::string path = "ParticleFlow/"+(*ifolder);
56 
57  for (std::vector<std::string>::const_iterator ihist = histogramNames_.begin();
58  ihist != histogramNames_.end(); ihist++) {
59  std::string hname = (*ihist);
60  createResolutionPlots(path, hname);
61  }
62  }
63 }
std::vector< std::string > histogramNames_
Definition: PFClient.h:36
void createResolutionPlots(std::string &folder, std::string &name)
Definition: PFClient.cc:114
std::vector< std::string > folderNames_
Definition: PFClient.h:35
void PFClient::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 45 of file PFClient.cc.

45  {
46 
47 }
void PFClient::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 36 of file PFClient.cc.

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

36  {
37  doSummaries();
38  doProjection();
40  if (profileFlag_) doProfiles();
41 }
void doSummaries()
Definition: PFClient.cc:51
void doEfficiency()
Definition: PFClient.cc:99
void doProfiles()
Definition: PFClient.cc:83
bool profileFlag_
Definition: PFClient.h:41
void doProjection()
Definition: PFClient.cc:67
bool efficiencyFlag_
Definition: PFClient.h:40
void PFClient::getHistogramParameters ( MonitorElement me_slice,
double &  avarage,
double &  rms,
double &  mean,
double &  sigma 
)
private

Definition at line 278 of file PFClient.cc.

References MonitorElement::DQM_KIND_TH1F, MonitorElement::getMean(), MonitorElement::getRMS(), MonitorElement::getTH1F(), and MonitorElement::kind().

Referenced by createResolutionPlots().

279  {
280  average = 0.0;
281  rms = 0.0;
282  mean = 0.0;
283  sigma = 0.0;
284 
285  if (!me_slice) return;
286  if (me_slice->kind() == MonitorElement::DQM_KIND_TH1F) {
287  average = me_slice->getMean();
288  rms = me_slice->getRMS();
289  TH1F* th_slice = me_slice->getTH1F();
290  if (th_slice && th_slice->GetEntries() > 0) {
291  th_slice->Fit( "gaus","Q0");
292  TF1* gaus = th_slice->GetFunction( "gaus" );
293  if (gaus) {
294  sigma = gaus->GetParameter(2);
295  mean = gaus->GetParameter(1);
296  }
297  }
298  }
299 }
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Kind kind(void) const
Get the type of the monitor element.
TH1F * getTH1F(void) const
int average
Definition: PDRates.py:137
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)

Member Data Documentation

DQMStore* PFClient::dqmStore_
private
std::vector<std::string> PFClient::effHistogramNames_
private

Definition at line 37 of file PFClient.h.

Referenced by doEfficiency(), and PFClient().

bool PFClient::efficiencyFlag_
private

Definition at line 40 of file PFClient.h.

Referenced by endRun(), and PFClient().

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

Definition at line 35 of file PFClient.h.

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

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

Definition at line 36 of file PFClient.h.

Referenced by doSummaries(), and PFClient().

bool PFClient::profileFlag_
private

Definition at line 41 of file PFClient.h.

Referenced by endRun(), and PFClient().

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

Definition at line 39 of file PFClient.h.

Referenced by doProfiles(), and PFClient().

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

Definition at line 38 of file PFClient.h.

Referenced by doProjection(), and PFClient().