45 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
49 for (std::vector<std::string>::const_iterator ihist =
histogramNames_.begin();
62 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
83 std::vector<double> pTEntries(
PtBins_.size()-1, 0) ;
87 std::vector<TString> pTRange(
PtBins_.size() -1) ;
100 size_t nbinx =
PtBins_.size() -1;
103 float ymin = th->GetYaxis()->GetXmin();
104 float ymax = th->GetYaxis()->GetXmax();
109 float*
xbins =
new float[nbinx+1];
110 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
114 pTRange[ix-1] = TString::Format(
"Pt%d_%d",
PtBins_[ix-1],
PtBins_[ix]) ;
115 if (name ==
"BRdelta_et_Over_et_VS_et_") pTRange[ix-1] = TString::Format(
"BRPt%d_%d",
PtBins_[ix-1],
PtBins_[ix]) ;
116 else if (name ==
"ERdelta_et_Over_et_VS_et_") pTRange[ix-1] = TString::Format(
"ERPt%d_%d",
PtBins_[ix-1],
PtBins_[ix]) ;
129 tit_new =
"Average "+ytit+
";"+xtit+
";Average_"+ytit ;
130 me_average = ibooker.
book1D(
"average_"+name,tit_new, nbinx, xbins);
132 tit_new =
"RMS "+ytit+
";"+xtit+
";RMS_"+ytit ;
133 me_rms = ibooker.
book1D(
"rms_"+name,tit_new, nbinx, xbins);
135 tit_new =
";"+xtit+
";Mean_"+ytit;
136 me_mean = ibooker.
book1D(
"mean_"+name,tit_new, nbinx, xbins);
138 tit_new =
";"+xtit+
";Sigma_"+ytit;
139 me_sigma = ibooker.
book1D(
"sigma_"+name,tit_new, nbinx, xbins);
143 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
145 if (name ==
"delta_et_Over_et_VS_et_") pT[ix-1] = ibooker.
book1D(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_") pT[ix-1] = ibooker.
book1D(pTRange[ix-1], TString::Format(
"Barrel %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax) ;
147 else if (name ==
"ERdelta_et_Over_et_VS_et_") pT[ix-1] = ibooker.
book1D(pTRange[ix-1], TString::Format(
"Endcap %s;%s;Events", ytit.data(), ytit.data() ), nbiny, ymin, ymax) ;
149 for (
size_t iy = 0; iy <= nbiny+1; ++iy)
150 if (th->GetBinContent(ix,iy)) {
154 pTEntries[ix-1] += th->GetBinContent(ix,iy); }
160 me_average->setBinContent(ix,average);
175 double&
rms,
double&
mean,
double& sigma) {
181 if (!me_slice)
return;
185 TH1F* th_slice = me_slice->
getTH1F();
186 if (th_slice && th_slice->GetEntries() > 0) {
188 TF1 gaus(
"mygaus",
"gaus");
189 th_slice->Fit( &gaus,
"Q0");
190 sigma = gaus.GetParameter(2);
191 mean = gaus.GetParameter(1);
203 if (!me1 || !me2)
return;
210 float xmin = th1->GetXaxis()->GetXmin();
211 float xmax = th1->GetXaxis()->GetXmax();
214 tit_new =
";"+xtit+
";Efficiency";
217 me_eff = ibooker.
book1D(
"efficiency_"+name,tit_new, nbinx, xmin, xmax);
221 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
224 if (val2 > 0.0) 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 &)
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
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)
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)
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void setCurrentFolder(const std::string &fullpath)
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)