79 std::vector<double> pTEntries(
PtBins_.size() - 1, 0);
83 std::vector<TString> pTRange(
PtBins_.size() - 1);
95 size_t nbinx =
PtBins_.size() - 1;
98 float ymin = th->GetYaxis()->GetXmin();
99 float ymax = th->GetYaxis()->GetXmax();
104 float *
xbins =
new float[nbinx + 1];
105 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
107 xbins[ix - 1] =
PtBins_[ix - 1];
110 pTRange[ix - 1] = TString::Format(
"Pt%d_%d",
PtBins_[ix - 1],
PtBins_[ix]);
111 if (name ==
"BRdelta_et_Over_et_VS_et_")
112 pTRange[ix - 1] = TString::Format(
"BRPt%d_%d",
PtBins_[ix - 1],
PtBins_[ix]);
113 else if (name ==
"ERdelta_et_Over_et_VS_et_")
114 pTRange[ix - 1] = TString::Format(
"ERPt%d_%d",
PtBins_[ix - 1],
PtBins_[ix]);
128 tit_new =
"Average " + ytit +
";" + xtit +
";Average_" + ytit;
129 me_average = ibooker.
book1D(
"average_" + name, tit_new, nbinx, xbins);
131 tit_new =
"RMS " + ytit +
";" + xtit +
";RMS_" + ytit;
132 me_rms = ibooker.
book1D(
"rms_" + name, tit_new, nbinx, xbins);
134 tit_new =
";" + xtit +
";Mean_" + ytit;
135 me_mean = ibooker.
book1D(
"mean_" + name, tit_new, nbinx, xbins);
137 tit_new =
";" + xtit +
";Sigma_" + ytit;
138 me_sigma = ibooker.
book1D(
"sigma_" + name, tit_new, nbinx, xbins);
142 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
144 if (name ==
"delta_et_Over_et_VS_et_")
145 pT[ix - 1] = ibooker.
book1D(
146 pTRange[ix - 1], TString::Format(
"Total %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
147 if (name ==
"BRdelta_et_Over_et_VS_et_")
148 pT[ix - 1] = ibooker.
book1D(
149 pTRange[ix - 1], TString::Format(
"Barrel %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
150 else if (name ==
"ERdelta_et_Over_et_VS_et_")
151 pT[ix - 1] = ibooker.
book1D(
152 pTRange[ix - 1], TString::Format(
"Endcap %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
154 for (
size_t iy = 0; iy <= nbiny + 1; ++iy)
155 if (th->GetBinContent(ix, iy)) {
158 pT[ix - 1]->
setBinError(iy, th->GetBinError(ix, iy));
159 pTEntries[ix - 1] += th->GetBinContent(ix, iy);
166 me_average->setBinContent(ix, average);
191 TH1F *th_slice = me_slice->
getTH1F();
192 if (th_slice && th_slice->GetEntries() > 0) {
194 TF1 gaus(
"mygaus",
"gaus");
195 th_slice->Fit(&gaus,
"Q0 SERIAL");
196 sigma = gaus.GetParameter(2);
197 mean = gaus.GetParameter(1);
218 float xmin = th1->GetXaxis()->GetXmin();
219 float xmax = th1->GetXaxis()->GetXmax();
222 tit_new =
";" + xtit +
";Efficiency";
225 me_eff = ibooker.
book1D(
"efficiency_" + name, tit_new, nbinx, xmin, xmax);
230 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
234 efficiency = val1 / val2;
T getParameter(std::string const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
void createEfficiencyPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string &folder, std::string &name)
PFClient_JetRes(const edm::ParameterSet ¶meterSet)
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
MonitorElement * book1D(Args &&...args)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setEntries(double nentries)
set # of entries
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
std::vector< std::string > effHistogramNames_
int getNbinsY() const
get # of bins in Y-axis
std::vector< int > PtBins_
double getBinContent(int binx) const
get content of bin (1-D)
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 > folderNames_
int getNbinsX() const
get # of bins in X-axis
std::vector< std::string > histogramNames_
Kind kind() const
Get the type of the monitor element.
ParameterSet const & parameterSet(Provenance const &provenance)