48 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
50 std::string
path =
"ParticleFlow/"+(*ifolder);
52 for (std::vector<std::string>::const_iterator ihist =
histogramNames_.begin();
54 std::string hname = (*ihist);
63 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
65 std::string
path =
"ParticleFlow/"+(*ifolder);
69 std::string hname = (*ihist);
91 float ymin = th->GetYaxis()->GetXmin();
92 float ymax = th->GetYaxis()->GetXmax();
93 std::string xtit = th->GetXaxis()->GetTitle();
94 std::string ytit = th->GetYaxis()->GetTitle();
95 float*
xbins =
new float[nbinx+1];
96 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
97 xbins[ix-1] = th->GetBinLowEdge(ix);
98 if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
105 tit_new =
";"+xtit+
";Average_"+ytit;
107 tit_new =
";"+xtit+
";RMS_"+ytit;
109 tit_new =
";"+xtit+
";Mean_"+ytit;
111 tit_new =
";"+xtit+
";Sigma_"+ytit;
115 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
117 for (
size_t iy = 1; iy < nbiny+1; ++iy) {
134 double&
rms,
double&
mean,
double& sigma) {
140 if (!me_slice)
return;
144 TH1F* th_slice = me_slice->
getTH1F();
145 if (th_slice && th_slice->GetEntries() > 0) {
146 th_slice->Fit(
"gaus",
"Q0");
147 TF1* gaus = th_slice->GetFunction(
"gaus" );
149 sigma = gaus->GetParameter(2);
150 mean = gaus->GetParameter(1);
161 if (!me1 || !me2)
return;
168 float xmin = th1->GetXaxis()->GetXmin();
169 float xmax = th1->GetXaxis()->GetXmax();
172 tit_new =
";"+xtit+
";Efficiency";
175 me_eff =
dqmStore_->
book1D(
"efficiency_"+name,tit_new, nbinx, xmin, xmax);
179 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
182 if (val2 > 0.0) efficiency = val1/val2;
T getParameter(std::string const &) const
const std::string & getName(void) const
get name of ME
void setBinContent(int binx, double content)
set content of bin (1-D)
void createEfficiencyPlots(std::string &folder, std::string &name)
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)
std::vector< std::string > histogramNames_
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
int getNbinsY(void) const
get # of bins in Y-axis
void createResolutionPlots(std::string &folder, std::string &name)
void removeElement(const std::string &name)
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
PFClient(const edm::ParameterSet ¶meterSet)
std::vector< std::string > folderNames_
TH1F * getTH1F(void) const
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 > effHistogramNames_
int getNbinsX(void) const
get # of bins in X-axis
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
void setCurrentFolder(const std::string &fullpath)
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)