78 std::vector<double> pTEntries(
PtBins_.size() - 1, 0);
82 std::vector<TString> pTRange(
PtBins_.size() - 1);
92 TH2 *th =
me->getTH2F();
94 size_t nbinx =
PtBins_.size() - 1;
95 size_t nbiny =
me->getNbinsY();
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) {
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;
130 tit_new =
"RMS " + ytit +
";" + xtit +
";RMS_" + ytit;
133 tit_new =
";" + xtit +
";Mean_" + ytit;
136 tit_new =
";" + xtit +
";Sigma_" + ytit;
141 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
143 if (
name ==
"delta_et_Over_et_VS_et_")
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_")
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_")
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)) {
156 pT[ix - 1]->setBinContent(iy, th->GetBinContent(ix, iy));
157 pT[ix - 1]->setBinError(iy, th->GetBinError(ix, iy));
158 pTEntries[ix - 1] += th->GetBinContent(ix, iy);
161 pT[ix - 1]->setEntries(pTEntries[ix - 1]);
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);
213 TH1 *th1 =
me1->getTH1F();
214 size_t nbinx =
me1->getNbinsX();
216 float xmin = th1->GetXaxis()->GetXmin();
217 float xmax = th1->GetXaxis()->GetXmax();
220 tit_new =
";" + xtit +
";Efficiency";
228 for (
size_t ix = 1; ix < nbinx + 1; ++ix) {
229 float val1 =
me1->getBinContent(ix);
230 float val2 =
me2->getBinContent(ix);