46 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin(); ifolder !=
folderNames_.end(); ifolder++) {
62 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
80 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
97 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
130 float ymin = th->GetYaxis()->GetXmin();
131 float ymax = th->GetYaxis()->GetXmax();
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);
143 tit_new =
";"+xtit+
";Average_"+ytit;
144 me_average = ibooker.
book1D(
"average_"+name,tit_new, nbinx, xbins);
146 tit_new =
";"+xtit+
";RMS_"+ytit;
147 me_rms = ibooker.
book1D(
"rms_"+name,tit_new, nbinx, xbins);
149 tit_new =
";"+xtit+
";Mean_"+ytit;
150 me_mean = ibooker.
book1D(
"mean_"+name,tit_new, nbinx, xbins);
152 tit_new =
";"+xtit+
";Sigma_"+ytit;
153 me_sigma = ibooker.
book1D(
"sigma_"+name,tit_new, nbinx, xbins);
158 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
160 for (
size_t iy = 1; iy < nbiny+1; ++iy) {
191 float ymin = th->GetYaxis()->GetXmin();
192 float ymax = th->GetYaxis()->GetXmax();
195 float*
xbins =
new float[nbinx+1];
196 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
197 xbins[ix-1] = th->GetXaxis()->GetBinLowEdge(ix);
198 if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
204 if (folder ==
"ParticleFlow/PFElectronValidation/CompWithGenElectron") {
205 if (name ==
"delta_et_Over_et_VS_et_") projection = ibooker.
book1D(
"delta_et_Over_et",
"E_{T} resolution;#DeltaE_{T}/E_{T}",nbiny,ymin,ymax) ;
206 if (name ==
"delta_et_VS_et_") projection = ibooker.
book1D(
"delta_et_",
"#DeltaE_{T};#DeltaE_{T}",nbiny,ymin,ymax) ;
207 if (name ==
"delta_eta_VS_et_") projection = ibooker.
book1D(
"delta_eta_",
"#Delta#eta;#Delta#eta",nbiny,ymin,ymax) ;
208 if (name ==
"delta_phi_VS_et_") projection = ibooker.
book1D(
"delta_phi_",
"#Delta#phi;#Delta#phi",nbiny,ymin,ymax) ;
212 for (
size_t iy = 1; iy < nbiny+1; ++iy) {
213 projection->
setBinContent(iy, th->ProjectionY(
"e")->GetBinContent(iy) ); }
235 float ymin = th->GetYaxis()->GetXmin();
236 float ymax = th->GetYaxis()->GetXmax();
239 double*
xbins =
new double[nbinx+1];
240 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
241 xbins[ix-1] = th->GetXaxis()->GetBinLowEdge(ix);
242 if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
249 me_profile[0] = ibooker.
bookProfile(
"profile_"+name, tit_new,
250 nbinx, xbins, ymin, ymax,
"" );
251 me_profile[1] = ibooker.
bookProfile(
"profileRMS_"+name, tit_new,
252 nbinx, xbins, ymin, ymax,
"s" );
253 TProfile* profileX = th->ProfileX();
256 static const Int_t NUM_STAT = 7;
257 Double_t stats[NUM_STAT] = {0}; th->GetStats(stats);
259 for (Int_t
i = 0;
i<2;
i++) {
261 for (
size_t ix = 0; ix <= nbinx+1; ++ix) {
262 me_profile[
i]->
setBinContent( ix, profileX->GetBinContent(ix)*profileX->GetBinEntries(ix) ) ;
265 me_profile[
i]->
getTProfile()->GetSumw2()->fArray[ix] = profileX->GetSumw2()->fArray[ix];
270 me_profile[
i]->
setEntries( profileX->GetEntries() ) ;
282 double&
rms,
double&
mean,
double& sigma) {
288 if (!me_slice)
return;
292 TH1F* th_slice = me_slice->
getTH1F();
293 if (th_slice && th_slice->GetEntries() > 0) {
295 TF1 gaus(
"mygaus",
"gaus");
296 th_slice->Fit( &gaus,
"Q0");
297 sigma = gaus.GetParameter(2);
298 mean = gaus.GetParameter(1);
310 if (!me1 || !me2)
return;
312 TH1F* me1_forEff = (TH1F*)me1->
getTH1F()->Rebin(2,
"me1_forEff");
313 TH1F* me2_forEff = (TH1F*)me2->
getTH1F()->Rebin(2,
"me2_forEff");
320 size_t nbinx = me1_forEff->GetNbinsX();
324 float xmin = me1_forEff->GetXaxis()->GetXmin();
325 float xmax = me1_forEff->GetXaxis()->GetXmax();
328 tit_new =
";"+xtit+
";"+xtit+
" efficiency";
331 me_eff = ibooker.
book1D(
"efficiency_"+name,tit_new, nbinx, xmin, xmax);
346 me_eff->
getTH1F()->Divide( me1_forEff, me2_forEff, 1, 1,
"B");
T getParameter(std::string const &) const
const std::string & getName(void) const
get name of ME
void setBinContent(int binx, double content)
set content of bin (1-D)
void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
MonitorElement * bookProfile(Args &&...args)
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
void doProjection(DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > projectionHistogramNames_
std::vector< std::string > histogramNames_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
double getEntries(void) const
get # of entries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
int getNbinsY(void) const
get # of bins in Y-axis
tuple path
else: Piece not in the list, fine.
MonitorElement * book1D(Args &&...args)
Kind kind(void) const
Get the type of the monitor element.
void setEntries(double nentries)
set # of entries
void createEfficiencyPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
std::vector< std::string > profileHistogramNames_
void createProfilePlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
void setCurrentFolder(const std::string &fullpath)
PFClient(const edm::ParameterSet ¶meterSet)
std::vector< std::string > folderNames_
TH1F * getTH1F(void) const
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
TProfile * getTProfile(void) const
std::vector< std::string > effHistogramNames_
int getNbinsX(void) const
get # of bins in X-axis
void doProfiles(DQMStore::IBooker &, DQMStore::IGetter &)
void createProjectionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
void setEfficiencyFlag(void)
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
void removeElement(Args &&...args)
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
ParameterSet const & parameterSet(Provenance const &provenance)
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)