126 float ymin = th->GetYaxis()->GetXmin();
127 float ymax = th->GetYaxis()->GetXmax();
130 float *
xbins =
new float[nbinx + 1];
131 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
132 xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
134 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
140 tit_new =
";" + xtit +
";Average_" + ytit;
141 me_average = ibooker.
book1D(
"average_" + name, tit_new, nbinx, xbins);
143 tit_new =
";" + xtit +
";RMS_" + ytit;
144 me_rms = ibooker.
book1D(
"rms_" + name, tit_new, nbinx, xbins);
146 tit_new =
";" + xtit +
";Mean_" + ytit;
147 me_mean = ibooker.
book1D(
"mean_" + name, tit_new, nbinx, xbins);
149 tit_new =
";" + xtit +
";Sigma_" + ytit;
150 me_sigma = ibooker.
book1D(
"sigma_" + name, tit_new, nbinx, xbins);
155 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
157 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);
199 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
205 if (folder ==
"ParticleFlow/PFElectronValidation/CompWithGenElectron") {
206 if (name ==
"delta_et_Over_et_VS_et_")
207 projection = ibooker.
book1D(
"delta_et_Over_et",
"E_{T} resolution;#DeltaE_{T}/E_{T}", nbiny, ymin, ymax);
208 if (name ==
"delta_et_VS_et_")
209 projection = ibooker.
book1D(
"delta_et_",
"#DeltaE_{T};#DeltaE_{T}", nbiny, ymin, ymax);
210 if (name ==
"delta_eta_VS_et_")
211 projection = ibooker.
book1D(
"delta_eta_",
"#Delta#eta;#Delta#eta", nbiny, ymin, ymax);
212 if (name ==
"delta_phi_VS_et_")
213 projection = ibooker.
book1D(
"delta_phi_",
"#Delta#phi;#Delta#phi", nbiny, ymin, ymax);
217 for (
size_t iy = 1; iy < nbiny + 1; ++iy) {
218 projection->
setBinContent(iy, th->ProjectionY(
"e")->GetBinContent(iy));
243 float ymin = th->GetYaxis()->GetXmin();
244 float ymax = th->GetYaxis()->GetXmax();
247 double *
xbins =
new double[nbinx + 1];
248 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
249 xbins[ix - 1] = th->GetXaxis()->GetBinLowEdge(ix);
251 xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
258 me_profile[0] = ibooker.
bookProfile(
"profile_" + name, tit_new, nbinx, xbins, ymin, ymax,
"");
259 me_profile[1] = ibooker.
bookProfile(
"profileRMS_" + name, tit_new, nbinx, xbins, ymin, ymax,
"s");
260 TProfile *
profileX = th->ProfileX();
264 static const Int_t NUM_STAT = 7;
265 Double_t stats[NUM_STAT] = {0};
268 for (Int_t
i = 0;
i < 2;
i++) {
270 for (
size_t ix = 0; ix <= nbinx + 1; ++ix) {
271 me_profile[
i]->
setBinContent(ix, profileX->GetBinContent(ix) * profileX->GetBinEntries(ix));
275 me_profile[
i]->
getTProfile()->GetSumw2()->fArray[ix] = profileX->GetSumw2()->fArray[ix];
303 TH1F *th_slice = me_slice->
getTH1F();
304 if (th_slice && th_slice->GetEntries() > 0) {
306 TF1 gaus(
"mygaus",
"gaus");
307 th_slice->Fit(&gaus,
"Q0 SERIAL");
308 sigma = gaus.GetParameter(2);
309 mean = gaus.GetParameter(1);
326 TH1F *me1_forEff = (TH1F *)me1->
getTH1F()->Rebin(2,
"me1_forEff");
327 TH1F *me2_forEff = (TH1F *)me2->
getTH1F()->Rebin(2,
"me2_forEff");
333 size_t nbinx = me1_forEff->GetNbinsX();
337 float xmin = me1_forEff->GetXaxis()->GetXmin();
338 float xmax = me1_forEff->GetXaxis()->GetXmax();
341 tit_new =
";" + xtit +
";" + xtit +
" efficiency";
344 me_eff = ibooker.
book1D(
"efficiency_" + name, tit_new, nbinx, xmin, xmax);
360 me_eff->
getTH1F()->Divide(me1_forEff, me2_forEff, 1, 1,
"B");
TProfile * getTProfile() const
T getParameter(std::string const &) const
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)
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 &)
const std::string & getName() const
get name of ME
std::vector< std::string > projectionHistogramNames_
std::vector< std::string > histogramNames_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
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 &)
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
MonitorElement * book1D(Args &&...args)
void setEntries(double nentries)
set # of entries
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
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)
double getEntries() const
get # of entries
PFClient(const edm::ParameterSet ¶meterSet)
std::vector< std::string > folderNames_
int getNbinsY() const
get # of bins in Y-axis
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)
std::vector< std::string > effHistogramNames_
void doProfiles(DQMStore::IBooker &, DQMStore::IGetter &)
void createProjectionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
int getNbinsX() const
get # of bins in X-axis
void removeElement(Args &&...args)
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
Kind kind() const
Get the type of the monitor element.
ParameterSet const & parameterSet(Provenance const &provenance)
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)