25 standAlone_ =
pset.getParameter<
bool>(
"standAlone");
26 batch_ =
pset.getParameter<
bool>(
"batch");
27 outputFileName_ =
pset.getParameter<
string>(
"OutputFileName");
30 etMin = parameters_.getParameter<
double>(
"etMin");
31 etMax = parameters_.getParameter<
double>(
"etMax");
32 etBin = parameters_.getParameter<
int>(
"etBin");
34 etaMin = parameters_.getParameter<
double>(
"etaMin");
35 etaMax = parameters_.getParameter<
double>(
"etaMax");
36 etaBin = parameters_.getParameter<
int>(
"etaBin");
37 etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
39 phiMin = parameters_.getParameter<
double>(
"phiMin");
40 phiMax = parameters_.getParameter<
double>(
"phiMax");
41 phiBin = parameters_.getParameter<
int>(
"phiBin");
43 rMin = parameters_.getParameter<
double>(
"rMin");
44 rMax = parameters_.getParameter<
double>(
"rMax");
45 rBin = parameters_.getParameter<
int>(
"rBin");
47 zMin = parameters_.getParameter<
double>(
"zMin");
48 zMax = parameters_.getParameter<
double>(
"zMax");
49 zBin = parameters_.getParameter<
int>(
"zBin");
69 std::string simInfoPathName =
"EgammaV/ConversionValidator/SimulationInfo/";
70 std::string convPathName =
"EgammaV/ConversionValidator/ConversionInfo/";
71 std::string effPathName =
"EgammaV/ConversionValidator/EfficienciesAndFakeRate/";
74 dbe_->open(inputFileName_);
76 dbe_->setCurrentFolder(effPathName);
81 histname =
"convEffVsPhiTwoTracks";
84 histname =
"convEffVsRTwoTracks";
85 convEffRTwoTracks_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
87 histname =
"convEffVsZTwoTracks";
88 convEffZTwoTracks_ = dbe_->book1D(histname, histname,
zBin,
zMin,
zMax);
90 histname =
"convEffVsEtTwoTracks";
91 convEffEtTwoTracks_ = dbe_->book1D(histname, histname,
etBin,
etMin,
etMax);
93 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0";
94 convEffEtaTwoTracksAndVtxProbGT0_ = dbe_->book1D(histname, histname,
etaBin2,
etaMin,
etaMax);
95 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0005";
96 convEffEtaTwoTracksAndVtxProbGT0005_ = dbe_->book1D(histname, histname,
etaBin2,
etaMin,
etaMax);
97 histname =
"convEffVsRTwoTracksAndVtxProbGT0";
98 convEffRTwoTracksAndVtxProbGT0_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
99 histname =
"convEffVsRTwoTracksAndVtxProbGT0005";
100 convEffRTwoTracksAndVtxProbGT0005_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
103 histname =
"convFakeRateVsEtaTwoTracks";
105 histname =
"convFakeRateVsPhiTwoTracks";
107 histname =
"convFakeRateVsRTwoTracks";
108 convFakeRateRTwoTracks_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
109 histname =
"convFakeRateVsZTwoTracks";
110 convFakeRateZTwoTracks_ = dbe_->book1D(histname, histname,
zBin,
zMin,
zMax);
111 histname =
"convFakeRateVsEtTwoTracks";
112 convFakeRateEtTwoTracks_ = dbe_->book1D(histname, histname,
etBin,
etMin,
etMax);
115 dividePlots(dbe_->get(effPathName +
"convEffVsEtaTwoTracks"),
116 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEta"),
117 dbe_->get(simInfoPathName +
"h_VisSimConvEta"),
119 dividePlots(dbe_->get(effPathName +
"convEffVsPhiTwoTracks"),
120 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksPhi"),
121 dbe_->get(simInfoPathName +
"h_VisSimConvPhi"),
123 dividePlots(dbe_->get(effPathName +
"convEffVsRTwoTracks"),
124 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksR"),
125 dbe_->get(simInfoPathName +
"h_VisSimConvR"),
127 dividePlots(dbe_->get(effPathName +
"convEffVsZTwoTracks"),
128 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksZ"),
129 dbe_->get(simInfoPathName +
"h_VisSimConvZ"),
131 dividePlots(dbe_->get(effPathName +
"convEffVsEtTwoTracks"),
132 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEt"),
133 dbe_->get(simInfoPathName +
"h_VisSimConvEt"),
135 dividePlots(dbe_->get(effPathName +
"convEffVsEtaTwoTracksAndVtxProbGT0"),
136 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEtaAndVtxPGT0"),
137 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEta"),
139 dividePlots(dbe_->get(effPathName +
"convEffVsEtaTwoTracksAndVtxProbGT0005"),
140 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEtaAndVtxPGT0005"),
141 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEta"),
143 dividePlots(dbe_->get(effPathName +
"convEffVsRTwoTracksAndVtxProbGT0"),
144 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksRAndVtxPGT0"),
145 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksR"),
147 dividePlots(dbe_->get(effPathName +
"convEffVsRTwoTracksAndVtxProbGT0005"),
148 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksRAndVtxPGT0005"),
149 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksR"),
153 dividePlots(dbe_->get(effPathName +
"convFakeRateVsEtaTwoTracks"),
154 dbe_->get(convPathName +
"convEtaAss2"),
155 dbe_->get(convPathName +
"convEta2"),
157 dividePlots(dbe_->get(effPathName +
"convFakeRateVsPhiTwoTracks"),
158 dbe_->get(convPathName +
"convPhiAss"),
159 dbe_->get(convPathName +
"convPhi"),
161 dividePlots(dbe_->get(effPathName +
"convFakeRateVsRTwoTracks"),
162 dbe_->get(convPathName +
"convRAss"),
163 dbe_->get(convPathName +
"convR"),
165 dividePlots(dbe_->get(effPathName +
"convFakeRateVsZTwoTracks"),
166 dbe_->get(convPathName +
"convZAss"),
167 dbe_->get(convPathName +
"convZ"),
169 dividePlots(dbe_->get(effPathName +
"convFakeRateVsEtTwoTracks"),
170 dbe_->get(convPathName +
"convPtAss"),
171 dbe_->get(convPathName +
"convPt"),
175 dbe_->save(outputFileName_);
177 dbe_->save(inputFileName_);
194 else if (
type ==
"fakerate")
213 if (dividend ==
nullptr ||
numerator ==
nullptr)
virtual void runPostprocessing()
void analyze(const edm::Event &, const edm::EventSetup &) override
void dividePlots(MonitorElement *dividend, MonitorElement *numerator, MonitorElement *denominator, std::string type)
void endRun(const edm::Run &, const edm::EventSetup &) override
ConversionPostprocessing(const edm::ParameterSet &pset)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
~ConversionPostprocessing() override
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)