53 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
57 for (std::vector<std::string>::const_iterator ihist =
histogramNames_.begin();
69 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
85 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
100 for (std::vector<std::string>::const_iterator ifolder =
folderNames_.begin();
130 float ymin = th->GetYaxis()->GetXmin();
131 float ymax = th->GetYaxis()->GetXmax();
134 float*
xbins =
new float[nbinx+1];
135 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
136 xbins[ix-1] = th->GetBinLowEdge(ix);
137 if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
143 tit_new =
";"+xtit+
";Average_"+ytit;
146 tit_new =
";"+xtit+
";RMS_"+ytit;
149 tit_new =
";"+xtit+
";Mean_"+ytit;
152 tit_new =
";"+xtit+
";Sigma_"+ytit;
158 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
160 for (
size_t iy = 1; iy < nbiny+1; ++iy) {
190 float ymin = th->GetYaxis()->GetXmin();
191 float ymax = th->GetYaxis()->GetXmax();
194 float*
xbins =
new float[nbinx+1];
195 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
196 xbins[ix-1] = th->GetBinLowEdge(ix);
197 if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
203 if (folder ==
"ParticleFlow/PFElectronValidation/CompWithGenElectron") {
204 if (name ==
"delta_et_Over_et_VS_et_") projection =
dqmStore_->
book1D(
"delta_et_Over_et",
"E_{T} resolution;#DeltaE_{T}/E_{T}",nbiny,ymin,ymax) ;
205 if (name ==
"delta_et_VS_et_") projection =
dqmStore_->
book1D(
"delta_et_",
"#DeltaE_{T};#DeltaE_{T}",nbiny,ymin,ymax) ;
206 if (name ==
"delta_eta_VS_et_") projection =
dqmStore_->
book1D(
"delta_eta_",
"#Delta#eta;#Delta#eta",nbiny,ymin,ymax) ;
207 if (name ==
"delta_phi_VS_et_") projection =
dqmStore_->
book1D(
"delta_phi_",
"#Delta#phi;#Delta#phi",nbiny,ymin,ymax) ;
211 for (
size_t iy = 1; iy < nbiny+1; ++iy) {
212 projection->
setBinContent(iy, th->ProjectionY(
"e")->GetBinContent(iy) ); }
233 float ymin = th->GetYaxis()->GetXmin();
234 float ymax = th->GetYaxis()->GetXmax();
237 double*
xbins =
new double[nbinx+1];
238 for (
size_t ix = 1; ix < nbinx+1; ++ix) {
239 xbins[ix-1] = th->GetBinLowEdge(ix);
240 if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix);
248 nbinx, xbins, ymin, ymax,
"" );
250 nbinx, xbins, ymin, ymax,
"s" );
251 TProfile* profileX = th->ProfileX();
254 static const Int_t NUM_STAT = 6;
255 Double_t stats[NUM_STAT] = {0}; th->GetStats(stats);
257 for (Int_t
i = 0;
i<2;
i++) {
259 for (
size_t ix = 0; ix <= nbinx+1; ++ix) {
260 me_profile[
i]->
setBinContent( ix, profileX->GetBinContent(ix)*profileX->GetBinEntries(ix) ) ;
263 me_profile[
i]->
getTProfile()->GetSumw2()->fArray[ix] = profileX->GetSumw2()->fArray[ix];
268 me_profile[
i]->
setEntries( profileX->GetEntries() ) ;
279 double&
rms,
double&
mean,
double& sigma) {
285 if (!me_slice)
return;
289 TH1F* th_slice = me_slice->
getTH1F();
290 if (th_slice && th_slice->GetEntries() > 0) {
291 th_slice->Fit(
"gaus",
"Q0");
292 TF1* gaus = th_slice->GetFunction(
"gaus" );
294 sigma = gaus->GetParameter(2);
295 mean = gaus->GetParameter(1);
306 if (!me1 || !me2)
return;
308 TH1F* me1_forEff = (TH1F*)me1->
getTH1F()->Rebin(2,
"me1_forEff");
309 TH1F* me2_forEff = (TH1F*)me2->
getTH1F()->Rebin(2,
"me2_forEff");
316 size_t nbinx = me1_forEff->GetNbinsX();
320 float xmin = me1_forEff->GetXaxis()->GetXmin();
321 float xmax = me1_forEff->GetXaxis()->GetXmax();
324 tit_new =
";"+xtit+
";"+xtit+
" efficiency";
327 me_eff =
dqmStore_->
book1D(
"efficiency_"+name,tit_new, nbinx, xmin, xmax);
342 me_eff->
getTH1F()->Divide( me1_forEff, me2_forEff, 1, 1,
"B");
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 > projectionHistogramNames_
std::vector< std::string > histogramNames_
double getEntries(void) const
get # of entries
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)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
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 > profileHistogramNames_
PFClient(const edm::ParameterSet ¶meterSet)
std::vector< std::string > folderNames_
TH1F * getTH1F(void) const
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
TProfile * getTProfile(void) const
std::vector< std::string > effHistogramNames_
int getNbinsX(void) const
get # of bins in X-axis
void setEfficiencyFlag(void)
void createProjectionPlots(std::string &folder, std::string &name)
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
ParameterSet const & parameterSet(Provenance const &provenance)
void setCurrentFolder(const std::string &fullpath)
void createProfilePlots(std::string &folder, std::string &name)
void getHistogramParameters(MonitorElement *me_slice, double &avarage, double &rms, double &mean, double &sigma)