125 float ymin = th->GetYaxis()->GetXmin();
126 float ymax = th->GetYaxis()->GetXmax();
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);
133 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
139 tit_new =
";" + xtit +
";Average_" + ytit;
140 me_average = ibooker.
book1D(
"average_" + name, tit_new, nbinx, xbins);
142 tit_new =
";" + xtit +
";RMS_" + ytit;
143 me_rms = ibooker.
book1D(
"rms_" + name, tit_new, nbinx, xbins);
145 tit_new =
";" + xtit +
";Mean_" + ytit;
146 me_mean = ibooker.
book1D(
"mean_" + name, tit_new, nbinx, xbins);
148 tit_new =
";" + xtit +
";Sigma_" + ytit;
149 me_sigma = ibooker.
book1D(
"sigma_" + name, tit_new, nbinx, xbins);
154 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
156 for (
size_t iy = 1; iy < nbiny + 1; ++iy) {
188 float ymin = th->GetYaxis()->GetXmin();
189 float ymax = th->GetYaxis()->GetXmax();
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);
196 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
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);
214 for (
size_t iy = 1; iy < nbiny + 1; ++iy) {
215 projection->
setBinContent(iy, th->ProjectionY(
"e")->GetBinContent(iy));
240 float ymin = th->GetYaxis()->GetXmin();
241 float ymax = th->GetYaxis()->GetXmax();
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);
248 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
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();
261 static const Int_t NUM_STAT = 7;
262 Double_t
stats[NUM_STAT] = {0};
265 for (Int_t
i = 0;
i < 2;
i++) {
267 for (
size_t ix = 0; ix <= nbinx + 1; ++ix) {
268 me_profile[
i]->
setBinContent(ix, profileX->GetBinContent(ix) * profileX->GetBinEntries(ix));
272 me_profile[
i]->
getTProfile()->GetSumw2()->fArray[ix] = profileX->GetSumw2()->fArray[ix];
300 TH1F *th_slice = me_slice->
getTH1F();
301 if (th_slice && th_slice->GetEntries() > 0) {
303 TF1 gaus(
"mygaus",
"gaus");
304 th_slice->Fit(&gaus,
"Q0 SERIAL");
305 sigma = gaus.GetParameter(2);
306 mean = gaus.GetParameter(1);
323 TH1F *me1_forEff = (TH1F *)me1->
getTH1F()->Rebin(2,
"me1_forEff");
324 TH1F *me2_forEff = (TH1F *)me2->
getTH1F()->Rebin(2,
"me2_forEff");
330 size_t nbinx = me1_forEff->GetNbinsX();
334 float xmin = me1_forEff->GetXaxis()->GetXmin();
335 float xmax = me1_forEff->GetXaxis()->GetXmax();
338 tit_new =
";" + xtit +
";" + xtit +
" efficiency";
341 me_eff = ibooker.
book1D(
"efficiency_" + name, tit_new, nbinx, xmin, xmax);
357 me_eff->
getTH1F()->Divide(me1_forEff, me2_forEff, 1, 1,
"B");
virtual TH2F * getTH2F() const
void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setCurrentFolder(std::string const &fullpath)
virtual void setEntries(double nentries)
set # of entries
#define DEFINE_FWK_MODULE(type)
virtual TH1F * getTH1F() const
void doProjection(DQMStore::IBooker &, DQMStore::IGetter &)
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.
std::vector< std::string > projectionHistogramNames_
std::vector< std::string > histogramNames_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
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
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
virtual double getEntries() const
get # of entries
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
virtual MonitorElement * get(std::string const &fullpath) const
void createEfficiencyPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
std::vector< std::string > profileHistogramNames_
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void createProfilePlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
PFClient(const edm::ParameterSet ¶meterSet)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< std::string > folderNames_
virtual TProfile * getTProfile() const
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
T getParameter(std::string const &) const
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > effHistogramNames_
virtual void enableSumw2()
void doProfiles(DQMStore::IBooker &, DQMStore::IGetter &)
void createProjectionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)