120 TH2 *th =
me->getTH2F();
121 size_t nbinx =
me->getNbinsX();
122 size_t nbiny =
me->getNbinsY();
124 float ymin = th->GetYaxis()->GetXmin();
125 float ymax = th->GetYaxis()->GetXmax();
128 float *
xbins =
new float[nbinx + 1];
129 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
130 xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
132 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
138 tit_new =
";" + xtit +
";Average_" + ytit;
141 tit_new =
";" + xtit +
";RMS_" + ytit;
144 tit_new =
";" + xtit +
";Mean_" + ytit;
147 tit_new =
";" + xtit +
";Sigma_" + ytit;
153 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
155 for (
size_t iy = 1; iy < nbiny + 1; ++iy) {
183 TH2 *th =
me->getTH2F();
184 size_t nbinx =
me->getNbinsX();
185 size_t nbiny =
me->getNbinsY();
187 float ymin = th->GetYaxis()->GetXmin();
188 float ymax = th->GetYaxis()->GetXmax();
191 float *
xbins =
new float[nbinx + 1];
192 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
193 xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
195 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
201 if (
folder ==
"ParticleFlow/PFElectronValidation/CompWithGenElectron") {
202 if (
name ==
"delta_et_Over_et_VS_et_")
203 projection = ibooker.
book1D(
"delta_et_Over_et",
"E_{T} resolution;#DeltaE_{T}/E_{T}", nbiny,
ymin,
ymax);
204 if (
name ==
"delta_et_VS_et_")
205 projection = ibooker.
book1D(
"delta_et_",
"#DeltaE_{T};#DeltaE_{T}", nbiny,
ymin,
ymax);
206 if (
name ==
"delta_eta_VS_et_")
207 projection = ibooker.
book1D(
"delta_eta_",
"#Delta#eta;#Delta#eta", nbiny,
ymin,
ymax);
208 if (
name ==
"delta_phi_VS_et_")
209 projection = ibooker.
book1D(
"delta_phi_",
"#Delta#phi;#Delta#phi", nbiny,
ymin,
ymax);
213 for (
size_t iy = 1; iy < nbiny + 1; ++iy) {
214 projection->
setBinContent(iy, th->ProjectionY(
"e")->GetBinContent(iy));
236 TH2 *th =
me->getTH2F();
237 size_t nbinx =
me->getNbinsX();
239 float ymin = th->GetYaxis()->GetXmin();
240 float ymax = th->GetYaxis()->GetXmax();
243 double *
xbins =
new double[nbinx + 1];
244 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
245 xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
247 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
256 TProfile *
profileX = th->ProfileX();
260 static const Int_t NUM_STAT = 7;
261 Double_t
stats[NUM_STAT] = {0};
264 for (Int_t
i = 0;
i < 2;
i++) {
266 for (
size_t ix = 0; ix <= nbinx + 1; ++ix) {
299 TH1F *th_slice = me_slice->
getTH1F();
300 if (th_slice && th_slice->GetEntries() > 0) {
302 TF1 gaus(
"mygaus",
"gaus");
303 th_slice->Fit(&gaus,
"Q0 SERIAL");
304 sigma = gaus.GetParameter(2);
305 mean = gaus.GetParameter(1);
322 TH1F *me1_forEff = (TH1F *)
me1->getTH1F()->Rebin(2,
"me1_forEff");
323 TH1F *me2_forEff = (TH1F *)
me2->getTH1F()->Rebin(2,
"me2_forEff");
329 size_t nbinx = me1_forEff->GetNbinsX();
333 float xmin = me1_forEff->GetXaxis()->GetXmin();
334 float xmax = me1_forEff->GetXaxis()->GetXmax();
337 tit_new =
";" + xtit +
";" + xtit +
" efficiency";
356 me_eff->
getTH1F()->Divide(me1_forEff, me2_forEff, 1, 1,
"B");
T getParameter(std::string const &) const
virtual TProfile * getTProfile() const
void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
virtual void setCurrentFolder(std::string const &fullpath)
virtual void setEntries(double nentries)
set # of entries
void doProjection(DQMStore::IBooker &, DQMStore::IGetter &)
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
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
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())
#define DEFINE_FWK_MODULE(type)
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)
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 TH1F * getTH1F() const
virtual MonitorElement * get(std::string const &fullpath) const
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
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)