52 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
56 for (std::vector<std::string>::const_iterator ihist =
histogramNames_.begin();
67 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
86 std::vector<double> pTEntries(
PtBins_.size()-1, 0) ;
90 TString pTRange[
PtBins_.size() -1] ;
103 size_t nbinx =
PtBins_.size() -1;
106 float ymin = th->GetYaxis()->GetXmin();
107 float ymax = th->GetYaxis()->GetXmax();
112 float*
xbins =
new float[nbinx+1];
113 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
117 pTRange[ix-1] = TString::Format(
"Pt%d_%d",
PtBins_[ix-1],
PtBins_[ix]) ;
118 if (name ==
"BRdelta_et_Over_et_VS_et_") pTRange[ix-1] = TString::Format(
"BRPt%d_%d",
PtBins_[ix-1],
PtBins_[ix]) ;
119 else if (name ==
"ERdelta_et_Over_et_VS_et_") pTRange[ix-1] = TString::Format(
"ERPt%d_%d",
PtBins_[ix-1],
PtBins_[ix]) ;
132 tit_new =
"Average "+ytit+
";"+xtit+
";Average_"+ytit ;
135 tit_new =
"RMS "+ytit+
";"+xtit+
";RMS_"+ytit ;
138 tit_new =
";"+xtit+
";Mean_"+ytit;
141 tit_new =
";"+xtit+
";Sigma_"+ytit;
146 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
148 if (name ==
"delta_et_Over_et_VS_et_") pT[ix-1] =
dqmStore_->
book1D(pTRange[ix-1], TString::Format(
"Total %s;%s;Events", ytit.data(), ytit.data() ), nbiny, ymin, ymax) ;
149 if (name ==
"BRdelta_et_Over_et_VS_et_") pT[ix-1] =
dqmStore_->
book1D(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_") pT[ix-1] =
dqmStore_->
book1D(pTRange[ix-1], TString::Format(
"Endcap %s;%s;Events", ytit.data(), ytit.data() ), nbiny, ymin, ymax) ;
152 for (
size_t iy = 0; iy <= nbiny+1; ++iy)
153 if (th->GetBinContent(ix,iy)) {
157 pTEntries[ix-1] += th->GetBinContent(ix,iy); }
176 double&
rms,
double&
mean,
double& sigma) {
182 if (!me_slice)
return;
186 TH1F* th_slice = me_slice->
getTH1F();
187 if (th_slice && th_slice->GetEntries() > 0) {
188 th_slice->Fit(
"gaus",
"Q0");
189 TF1* gaus = th_slice->GetFunction(
"gaus" );
191 sigma = gaus->GetParameter(2);
192 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 =
dqmStore_->
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)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
#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)
PFClient_JetRes(const edm::ParameterSet ¶meterSet)
int getNbinsY(void) const
get # of bins in Y-axis
tuple path
else: Piece not in the list, fine.
void createEfficiencyPlots(std::string &folder, std::string &name)
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Kind kind(void) const
Get the type of the monitor element.
void setEntries(double nentries)
set # of entries
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::vector< std::string > effHistogramNames_
TH1F * getTH1F(void) const
void createResolutionPlots(std::string &folder, std::string &name)
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(void) const
get # of bins in X-axis
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
void setEfficiencyFlag(void)
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
std::vector< std::string > histogramNames_
ParameterSet const & parameterSet(Provenance const &provenance)
void setCurrentFolder(const std::string &fullpath)