34 outputFileName_ = pset.
getParameter<
string>(
"OutputFileName");
38 etMin = parameters_.getParameter<
double>(
"etMin");
39 etMax = parameters_.getParameter<
double>(
"etMax");
40 etBin = parameters_.getParameter<
int>(
"etBin");
42 etaMin = parameters_.getParameter<
double>(
"etaMin");
43 etaMax = parameters_.getParameter<
double>(
"etaMax");
44 etaBin = parameters_.getParameter<
int>(
"etaBin");
45 etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
47 phiMin = parameters_.getParameter<
double>(
"phiMin");
48 phiMax = parameters_.getParameter<
double>(
"phiMax");
49 phiBin = parameters_.getParameter<
int>(
"phiBin");
51 rMin = parameters_.getParameter<
double>(
"rMin");
52 rMax = parameters_.getParameter<
double>(
"rMax");
53 rBin = parameters_.getParameter<
int>(
"rBin");
55 zMin = parameters_.getParameter<
double>(
"zMin");
56 zMax = parameters_.getParameter<
double>(
"zMax");
57 zBin = parameters_.getParameter<
int>(
"zBin");
79 if(standAlone_) runPostprocessing();
85 if(!standAlone_) runPostprocessing();
96 std::string simInfoPathName =
"EgammaV/ConversionValidator/SimulationInfo/";
97 std::string convPathName =
"EgammaV/ConversionValidator/ConversionInfo/";
98 std::string effPathName =
"EgammaV/ConversionValidator/EfficienciesAndFakeRate/";
101 if(batch_)
dbe_->open(inputFileName_);
103 dbe_->setCurrentFolder(effPathName);
106 convEffEtaTwoTracks_ =
dbe_->book1D(histname,histname,etaBin2,etaMin, etaMax);
108 histname =
"convEffVsPhiTwoTracks";
109 convEffPhiTwoTracks_ =
dbe_->book1D(histname,histname,phiBin,phiMin,phiMax);
111 histname =
"convEffVsRTwoTracks";
112 convEffRTwoTracks_ =
dbe_->book1D(histname,histname,rBin,rMin, rMax);
114 histname =
"convEffVsZTwoTracks";
115 convEffZTwoTracks_ =
dbe_->book1D(histname,histname,zBin,zMin,zMax);
117 histname =
"convEffVsEtTwoTracks";
118 convEffEtTwoTracks_ =
dbe_->book1D(histname,histname,etBin,etMin, etMax);
120 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0";
121 convEffEtaTwoTracksAndVtxProbGT0_ =
dbe_->book1D(histname,histname,etaBin2,etaMin, etaMax);
122 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0005";
123 convEffEtaTwoTracksAndVtxProbGT0005_ =
dbe_->book1D(histname,histname,etaBin2,etaMin, etaMax);
124 histname =
"convEffVsRTwoTracksAndVtxProbGT0";
125 convEffRTwoTracksAndVtxProbGT0_ =
dbe_->book1D(histname,histname,rBin,rMin,rMax);
126 histname =
"convEffVsRTwoTracksAndVtxProbGT0005";
127 convEffRTwoTracksAndVtxProbGT0005_ =
dbe_->book1D(histname,histname,rBin,rMin,rMax);
130 histname =
"convFakeRateVsEtaTwoTracks";
131 convFakeRateEtaTwoTracks_ =
dbe_->book1D(histname,histname,etaBin2,etaMin, etaMax);
132 histname =
"convFakeRateVsPhiTwoTracks";
133 convFakeRatePhiTwoTracks_ =
dbe_->book1D(histname,histname,phiBin,phiMin,phiMax);
134 histname =
"convFakeRateVsRTwoTracks";
135 convFakeRateRTwoTracks_ =
dbe_->book1D(histname,histname,rBin,rMin, rMax);
136 histname =
"convFakeRateVsZTwoTracks";
137 convFakeRateZTwoTracks_ =
dbe_->book1D(histname,histname,zBin,zMin,zMax);
138 histname =
"convFakeRateVsEtTwoTracks";
139 convFakeRateEtTwoTracks_ =
dbe_->book1D(histname,histname,etBin,etMin, etMax);
142 dividePlots(
dbe_->get(effPathName+
"convEffVsEtaTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
dbe_->get(simInfoPathName+
"h_VisSimConvEta"),
"effic");
143 dividePlots(
dbe_->get(effPathName+
"convEffVsPhiTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksPhi"),
dbe_->get(simInfoPathName+
"h_VisSimConvPhi"),
"effic");
144 dividePlots(
dbe_->get(effPathName+
"convEffVsRTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksR"),
dbe_->get(simInfoPathName+
"h_VisSimConvR"),
"effic");
145 dividePlots(
dbe_->get(effPathName+
"convEffVsZTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksZ"),
dbe_->get(simInfoPathName+
"h_VisSimConvZ"),
"effic");
146 dividePlots(
dbe_->get(effPathName+
"convEffVsEtTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEt"),
dbe_->get(simInfoPathName+
"h_VisSimConvEt"),
"effic");
147 dividePlots(
dbe_->get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
148 dividePlots(
dbe_->get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
149 dividePlots(
dbe_->get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
150 dividePlots(
dbe_->get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
154 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsEtaTwoTracks"),
dbe_->get(convPathName+
"convEtaAss2"),
dbe_->get(convPathName+
"convEta2"),
"fakerate");
155 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsPhiTwoTracks"),
dbe_->get(convPathName+
"convPhiAss"),
dbe_->get(convPathName+
"convPhi"),
"fakerate");
156 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsRTwoTracks"),
dbe_->get(convPathName+
"convRAss"),
dbe_->get(convPathName+
"convR"),
"fakerate");
157 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsZTwoTracks"),
dbe_->get(convPathName+
"convZAss"),
dbe_->get(convPathName+
"convZ"),
"fakerate");
158 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsEtTwoTracks"),
dbe_->get(convPathName+
"convPtAss"),
dbe_->get(convPathName+
"convPt"),
"fakerate");
162 if(standAlone_)
dbe_->save(outputFileName_);
163 else if(batch_)
dbe_->save(inputFileName_);
179 if (dividend==0 || numerator==0 || denominator==0)
return;
186 else if (type==
"fakerate")
208 if (dividend==0 || numerator==0 )
return;
213 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()
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)
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
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")