78 std::vector<double> pTEntries(
PtBins_.size() - 1, 0);
82 std::vector<TString> pTRange(
PtBins_.size() - 1);
94 size_t nbinx =
PtBins_.size() - 1;
97 float ymin = th->GetYaxis()->GetXmin();
98 float ymax = th->GetYaxis()->GetXmax();
103 float *
xbins =
new float[nbinx + 1];
104 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
106 xbins[ix - 1] =
PtBins_[ix - 1];
109 pTRange[ix - 1] = TString::Format(
"Pt%d_%d",
PtBins_[ix - 1],
PtBins_[ix]);
110 if (name ==
"BRdelta_et_Over_et_VS_et_")
111 pTRange[ix - 1] = TString::Format(
"BRPt%d_%d",
PtBins_[ix - 1],
PtBins_[ix]);
112 else if (name ==
"ERdelta_et_Over_et_VS_et_")
113 pTRange[ix - 1] = TString::Format(
"ERPt%d_%d",
PtBins_[ix - 1],
PtBins_[ix]);
127 tit_new =
"Average " + ytit +
";" + xtit +
";Average_" + ytit;
128 me_average = ibooker.
book1D(
"average_" + name, tit_new, nbinx, xbins);
130 tit_new =
"RMS " + ytit +
";" + xtit +
";RMS_" + ytit;
131 me_rms = ibooker.
book1D(
"rms_" + name, tit_new, nbinx, xbins);
133 tit_new =
";" + xtit +
";Mean_" + ytit;
134 me_mean = ibooker.
book1D(
"mean_" + name, tit_new, nbinx, xbins);
136 tit_new =
";" + xtit +
";Sigma_" + ytit;
137 me_sigma = ibooker.
book1D(
"sigma_" + name, tit_new, nbinx, xbins);
141 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
143 if (name ==
"delta_et_Over_et_VS_et_")
144 pT[ix - 1] = ibooker.
book1D(
145 pTRange[ix - 1], TString::Format(
"Total %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
146 if (name ==
"BRdelta_et_Over_et_VS_et_")
147 pT[ix - 1] = ibooker.
book1D(
148 pTRange[ix - 1], TString::Format(
"Barrel %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
149 else if (name ==
"ERdelta_et_Over_et_VS_et_")
150 pT[ix - 1] = ibooker.
book1D(
151 pTRange[ix - 1], TString::Format(
"Endcap %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax);
153 for (
size_t iy = 0; iy <= nbiny + 1; ++iy)
154 if (th->GetBinContent(ix, iy)) {
157 pT[ix - 1]->
setBinError(iy, th->GetBinError(ix, iy));
158 pTEntries[ix - 1] += th->GetBinContent(ix, iy);
165 me_average->setBinContent(ix, average);
189 TH1F *th_slice = me_slice->
getTH1F();
190 if (th_slice && th_slice->GetEntries() > 0) {
192 TF1 gaus(
"mygaus",
"gaus");
193 th_slice->Fit(&gaus,
"Q0 SERIAL");
194 sigma = gaus.GetParameter(2);
195 mean = gaus.GetParameter(1);
216 float xmin = th1->GetXaxis()->GetXmin();
217 float xmax = th1->GetXaxis()->GetXmax();
220 tit_new =
";" + xtit +
";Efficiency";
223 me_eff = ibooker.
book1D(
"efficiency_" + name, tit_new, nbinx, xmin, xmax);
228 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
232 efficiency = val1 / val2;
virtual TH2F * getTH2F() const
void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &)
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
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.
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)
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
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
virtual MonitorElement * get(std::string const &fullpath) const
virtual double getBinContent(int binx) const
get content of bin (1-D)
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< std::string > effHistogramNames_
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
std::vector< int > PtBins_
std::vector< std::string > folderNames_
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::vector< std::string > histogramNames_