35 outputFileName_ = pset.
getParameter<
string>(
"OutputFileName");
39 etMin = parameters_.getParameter<
double>(
"etMin");
40 etMax = parameters_.getParameter<
double>(
"etMax");
41 etBin = parameters_.getParameter<
int>(
"etBin");
43 etaMin = parameters_.getParameter<
double>(
"etaMin");
44 etaMax = parameters_.getParameter<
double>(
"etaMax");
45 etaBin = parameters_.getParameter<
int>(
"etaBin");
46 etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
48 phiMin = parameters_.getParameter<
double>(
"phiMin");
49 phiMax = parameters_.getParameter<
double>(
"phiMax");
50 phiBin = parameters_.getParameter<
int>(
"phiBin");
52 rMin = parameters_.getParameter<
double>(
"rMin");
53 rMax = parameters_.getParameter<
double>(
"rMax");
54 rBin = parameters_.getParameter<
int>(
"rBin");
56 zMin = parameters_.getParameter<
double>(
"zMin");
57 zMax = parameters_.getParameter<
double>(
"zMax");
58 zBin = parameters_.getParameter<
int>(
"zBin");
80 if(standAlone_) runPostprocessing();
86 if(!standAlone_) runPostprocessing();
97 std::string simInfoPathName =
"EgammaV/ConversionValidator/SimulationInfo/";
98 std::string convPathName =
"EgammaV/ConversionValidator/ConversionInfo/";
99 std::string effPathName =
"EgammaV/ConversionValidator/EfficienciesAndFakeRate/";
102 if(batch_)
dbe_->
open(inputFileName_);
109 histname =
"convEffVsPhiTwoTracks";
112 histname =
"convEffVsRTwoTracks";
113 convEffRTwoTracks_ =
dbe_->
book1D(histname,histname,rBin,rMin, rMax);
115 histname =
"convEffVsZTwoTracks";
116 convEffZTwoTracks_ =
dbe_->
book1D(histname,histname,zBin,zMin,zMax);
118 histname =
"convEffVsEtTwoTracks";
121 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0";
123 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0005";
125 histname =
"convEffVsRTwoTracksAndVtxProbGT0";
126 convEffRTwoTracksAndVtxProbGT0_ =
dbe_->
book1D(histname,histname,rBin,rMin,rMax);
127 histname =
"convEffVsRTwoTracksAndVtxProbGT0005";
128 convEffRTwoTracksAndVtxProbGT0005_ =
dbe_->
book1D(histname,histname,rBin,rMin,rMax);
131 histname =
"convFakeRateVsEtaTwoTracks";
133 histname =
"convFakeRateVsPhiTwoTracks";
135 histname =
"convFakeRateVsRTwoTracks";
136 convFakeRateRTwoTracks_ =
dbe_->
book1D(histname,histname,rBin,rMin, rMax);
137 histname =
"convFakeRateVsZTwoTracks";
138 convFakeRateZTwoTracks_ =
dbe_->
book1D(histname,histname,zBin,zMin,zMax);
139 histname =
"convFakeRateVsEtTwoTracks";
143 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtaTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
dbe_->
get(simInfoPathName+
"h_VisSimConvEta"),
"effic");
144 dividePlots(
dbe_->
get(effPathName+
"convEffVsPhiTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksPhi"),
dbe_->
get(simInfoPathName+
"h_VisSimConvPhi"),
"effic");
145 dividePlots(
dbe_->
get(effPathName+
"convEffVsRTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksR"),
dbe_->
get(simInfoPathName+
"h_VisSimConvR"),
"effic");
146 dividePlots(
dbe_->
get(effPathName+
"convEffVsZTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksZ"),
dbe_->
get(simInfoPathName+
"h_VisSimConvZ"),
"effic");
147 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEt"),
dbe_->
get(simInfoPathName+
"h_VisSimConvEt"),
"effic");
148 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
149 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
150 dividePlots(
dbe_->
get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
151 dividePlots(
dbe_->
get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
155 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsEtaTwoTracks"),
dbe_->
get(convPathName+
"convEtaAss2"),
dbe_->
get(convPathName+
"convEta2"),
"fakerate");
156 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsPhiTwoTracks"),
dbe_->
get(convPathName+
"convPhiAss"),
dbe_->
get(convPathName+
"convPhi"),
"fakerate");
157 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsRTwoTracks"),
dbe_->
get(convPathName+
"convRAss"),
dbe_->
get(convPathName+
"convR"),
"fakerate");
158 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsZTwoTracks"),
dbe_->
get(convPathName+
"convZAss"),
dbe_->
get(convPathName+
"convZ"),
"fakerate");
159 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsEtTwoTracks"),
dbe_->
get(convPathName+
"convPtAss"),
dbe_->
get(convPathName+
"convPt"),
"fakerate");
163 if(standAlone_)
dbe_->
save(outputFileName_);
164 else if(batch_)
dbe_->
save(inputFileName_);
180 if (dividend==0 || numerator==0 || denominator==0)
return;
187 else if (type==
"fakerate")
209 if (dividend==0 || numerator==0 )
return;
214 err =
sqrt( value*(1-value) / denominator);
T getParameter(std::string const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void runPostprocessing()
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
void dividePlots(MonitorElement *dividend, MonitorElement *numerator, MonitorElement *denominator, std::string type)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void endRun(const edm::Run &, const edm::EventSetup &)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setVerbose(unsigned level)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
bool etMin(const PFCandidate &cand, double cut)
ConversionPostprocessing(const edm::ParameterSet &pset)
virtual ~ConversionPostprocessing()
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void setCurrentFolder(const std::string &fullpath)