27 standAlone_ =
pset.getParameter<
bool>(
"standAlone");
28 batch_ =
pset.getParameter<
bool>(
"batch");
29 outputFileName_ =
pset.getParameter<
string>(
"OutputFileName");
31 isRunCentrally_ =
pset.getParameter<
bool>(
"isRunCentrally");
32 fastSim_ =
pset.getParameter<
bool>(
"fastSim");
34 etMin = parameters_.getParameter<
double>(
"etMin");
35 etMax = parameters_.getParameter<
double>(
"etMax");
36 etBin = parameters_.getParameter<
int>(
"etBin");
38 etaMin = parameters_.getParameter<
double>(
"etaMin");
39 etaMax = parameters_.getParameter<
double>(
"etaMax");
40 etaBin = parameters_.getParameter<
int>(
"etaBin");
41 etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
43 phiMin = parameters_.getParameter<
double>(
"phiMin");
44 phiMax = parameters_.getParameter<
double>(
"phiMax");
45 phiBin = parameters_.getParameter<
int>(
"phiBin");
47 rMin = parameters_.getParameter<
double>(
"rMin");
48 rMax = parameters_.getParameter<
double>(
"rMax");
49 rBin = parameters_.getParameter<
int>(
"rBin");
51 zMin = parameters_.getParameter<
double>(
"zMin");
52 zMax = parameters_.getParameter<
double>(
"zMax");
53 zBin = parameters_.getParameter<
int>(
"zBin");
73 std::string simInfoPathName =
"EgammaV/" + analyzerName_ +
"/SimulationInfo/";
74 std::string convPathName =
"EgammaV/" + analyzerName_ +
"/ConversionInfo/";
75 std::string effPathName =
"EgammaV/" + analyzerName_ +
"/Efficiencies/";
76 std::string photonPathName =
"EgammaV/" + analyzerName_ +
"/Photons/";
79 dbe_->open(inputFileName_);
81 dbe_->setCurrentFolder(simInfoPathName);
83 string histname =
"h_simConvEtaMTotal";
85 histname =
"h_simConvPhiMTotal";
87 histname =
"h_simConvRMTotal";
88 h_simConvRMTotal_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
89 histname =
"h_simConvZMTotal";
90 h_simConvZMTotal_ = dbe_->book1D(histname, histname,
zBin,
zMin,
zMax);
91 histname =
"h_simConvEtMTotal";
92 h_simConvEtMTotal_ = dbe_->book1D(histname, histname,
etBin,
etMin,
etMax);
94 dbe_->setCurrentFolder(effPathName);
96 histname =
"recoEffVsEta";
97 phoRecoEffEta_ = dbe_->book1D(histname,
"Photon reconstruction efficiency vs simulated #eta",
etaBin,
etaMin,
etaMax);
98 histname =
"recoEffVsPhi";
99 phoRecoEffPhi_ = dbe_->book1D(histname,
"Photon reconstruction efficiency vs simulated #phi",
phiBin,
phiMin,
phiMax);
100 histname =
"recoEffVsEt";
101 phoRecoEffEt_ = dbe_->book1D(histname,
"Photon reconstruction efficiency vs simulated Et",
etBin,
etMin,
etMax);
103 histname =
"deadChVsEta";
105 dbe_->book1D(histname,
"Fraction of photons with >=1 dead Xtal vs simulated #eta",
etaBin,
etaMin,
etaMax);
106 histname =
"deadChVsPhi";
108 dbe_->book1D(histname,
"Fraction of photons with >=1 dead Xtal vs simulated #phi",
phiBin,
phiMin,
phiMax);
109 histname =
"deadChVsEt";
110 phoDeadChEt_ = dbe_->book1D(histname,
"Fraction of photons with >=1 dead Xtal vs simulated Et",
etBin,
etMin,
etMax);
112 if (!isRunCentrally_) {
113 histname =
"convVsEt";
115 dbe_->book1D(histname +
"Barrel",
"Fraction of good conversions in R9<0.93 vs Et ",
etBin,
etMin,
etMax);
117 dbe_->book1D(histname +
"Endcap",
"Fraction of good conversions in R9<0.93 vs Et ",
etBin,
etMin,
etMax);
121 histname =
"convEffVsEtaTwoTracks";
124 histname =
"convEffVsPhiTwoTracks";
127 histname =
"convEffVsRTwoTracks";
128 convEffRTwoTracks_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
130 histname =
"convEffVsZTwoTracks";
131 convEffZTwoTracks_ = dbe_->book1D(histname, histname,
zBin,
zMin,
zMax);
133 histname =
"convEffVsEtTwoTracks";
134 convEffEtTwoTracks_ = dbe_->book1D(histname, histname,
etBin,
etMin,
etMax);
136 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0";
137 convEffEtaTwoTracksAndVtxProbGT0_ = dbe_->book1D(histname, histname,
etaBin2,
etaMin,
etaMax);
138 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0005";
139 convEffEtaTwoTracksAndVtxProbGT0005_ = dbe_->book1D(histname, histname,
etaBin2,
etaMin,
etaMax);
140 histname =
"convEffVsRTwoTracksAndVtxProbGT0";
141 convEffRTwoTracksAndVtxProbGT0_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
142 histname =
"convEffVsRTwoTracksAndVtxProbGT0005";
143 convEffRTwoTracksAndVtxProbGT0005_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
145 histname =
"convEffVsEtaOneTrack";
147 histname =
"convEffVsROneTrack";
148 convEffROneTrack_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
149 histname =
"convEffVsZOneTrack";
150 convEffZOneTrack_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
151 histname =
"convEffVsEtOneTrack";
152 convEffEtOneTrack_ = dbe_->book1D(histname, histname,
etBin,
etMin,
etMax);
153 histname =
"convEffVsPhiOneTrack";
156 histname =
"convEffVsEtaTotal";
158 histname =
"convEffVsRTotal";
159 convEffRTotal_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
160 histname =
"convEffVsZTotal";
161 convEffZTotal_ = dbe_->book1D(histname, histname,
zBin,
zMin,
zMax);
162 histname =
"convEffVsEtTotal";
163 convEffEtTotal_ = dbe_->book1D(histname, histname,
etBin,
etMin,
etMax);
164 histname =
"convEffVsPhiTotal";
167 histname =
"convFakeRateVsEtaTwoTracks";
169 histname =
"convFakeRateVsPhiTwoTracks";
171 histname =
"convFakeRateVsRTwoTracks";
172 convFakeRateRTwoTracks_ = dbe_->book1D(histname, histname,
rBin,
rMin,
rMax);
173 histname =
"convFakeRateVsZTwoTracks";
174 convFakeRateZTwoTracks_ = dbe_->book1D(histname, histname,
zBin,
zMin,
zMax);
175 histname =
"convFakeRateVsEtTwoTracks";
176 convFakeRateEtTwoTracks_ = dbe_->book1D(histname, histname,
etBin,
etMin,
etMax);
178 histname =
"bkgEffVsEta";
179 bkgRecoEffEta_ = dbe_->book1D(histname,
"Bkg reconstruction efficiency vs simulated #eta",
etaBin,
etaMin,
etaMax);
180 histname =
"bkgEffVsPhi";
181 bkgRecoEffPhi_ = dbe_->book1D(histname,
"Bkg reconstruction efficiency vs simulated #phi",
phiBin,
phiMin,
phiMax);
182 histname =
"bkgEffVsEt";
183 bkgRecoEffEt_ = dbe_->book1D(histname,
"Bkg reconstruction efficiency vs simulated Et",
etBin,
etMin,
etMax);
185 histname =
"deadChVsEtaBkg";
187 dbe_->book1D(histname,
"Fraction of bkg with >=1 dead Xtal vs simulated #eta",
etaBin,
etaMin,
etaMax);
188 histname =
"deadChVsPhiBkg";
190 dbe_->book1D(histname,
"Fraction of bkg with >=1 dead Xtal vs simulated #phi",
phiBin,
phiMin,
phiMax);
191 histname =
"deadChVsEtBkg";
192 bkgDeadChEt_ = dbe_->book1D(histname,
"Fraction of bkg with >=1 dead Xtal vs simulated Et",
etBin,
etMin,
etMax);
195 if ((dbe_->get(simInfoPathName +
"h_SimConvOneMTracksEta")) !=
nullptr and
196 (dbe_->get(convPathName +
"h_RecoConvTwoMTracksEta") !=
nullptr)) {
197 h_simConvEtaMTotal_->getTH1F()->Add(dbe_->get(simInfoPathName +
"h_SimConvOneMTracksEta")->getTH1F(),
198 dbe_->get(convPathName +
"h_RecoConvTwoMTracksEta")->getTH1F());
200 if ((dbe_->get(simInfoPathName +
"h_SimConvOneMTracksPhi") !=
nullptr) and
201 (dbe_->get(convPathName +
"h_RecoConvTwoMTracksPhi") !=
nullptr)) {
202 h_simConvPhiMTotal_->getTH1F()->Add(dbe_->get(simInfoPathName +
"h_SimConvOneMTracksPhi")->getTH1F(),
203 dbe_->get(convPathName +
"h_RecoConvTwoMTracksPhi")->getTH1F());
205 if ((dbe_->get(simInfoPathName +
"h_SimConvOneMTracksR")->getTH1F() !=
nullptr) and
206 (dbe_->get(convPathName +
"h_RecoConvTwoMTracksR") !=
nullptr)) {
207 h_simConvRMTotal_->getTH1F()->Add(dbe_->get(simInfoPathName +
"h_SimConvOneMTracksR")->getTH1F(),
208 dbe_->get(convPathName +
"h_RecoConvTwoMTracksR")->getTH1F());
210 if ((dbe_->get(simInfoPathName +
"h_SimConvOneMTracksZ") !=
nullptr) and
211 (dbe_->get(convPathName +
"h_RecoConvTwoMTracksZ") !=
nullptr)) {
212 h_simConvZMTotal_->getTH1F()->Add(dbe_->get(simInfoPathName +
"h_SimConvOneMTracksZ")->getTH1F(),
213 dbe_->get(convPathName +
"h_RecoConvTwoMTracksZ")->getTH1F());
215 if ((dbe_->get(simInfoPathName +
"h_SimConvOneMTracksEt") !=
nullptr) and
216 (dbe_->get(convPathName +
"h_RecoConvTwoMTracksEt") !=
nullptr)) {
217 h_simConvEtMTotal_->getTH1F()->Add(dbe_->get(simInfoPathName +
"h_SimConvOneMTracksEt")->getTH1F(),
218 dbe_->get(convPathName +
"h_RecoConvTwoMTracksEt")->getTH1F());
222 if (!isRunCentrally_) {
223 dividePlots(dbe_->get(effPathName +
"convVsEtBarrel"),
224 dbe_->get(photonPathName +
"EtR9Less093ConvBarrel"),
225 dbe_->get(photonPathName +
"EtR9Less093Barrel"),
227 dividePlots(dbe_->get(effPathName +
"convVsEtEndcap"),
228 dbe_->get(photonPathName +
"EtR9Less093ConvEndcap"),
229 dbe_->get(photonPathName +
"EtR9Less093Endcap"),
233 dividePlots(dbe_->get(effPathName +
"recoEffVsEta"),
234 dbe_->get(simInfoPathName +
"h_MatchedSimPhoEta"),
235 dbe_->get(simInfoPathName +
"h_SimPhoEta"),
237 dividePlots(dbe_->get(effPathName +
"recoEffVsPhi"),
238 dbe_->get(simInfoPathName +
"h_MatchedSimPhoPhi"),
239 dbe_->get(simInfoPathName +
"h_SimPhoPhi"),
241 dividePlots(dbe_->get(effPathName +
"recoEffVsEt"),
242 dbe_->get(simInfoPathName +
"h_MatchedSimPhoEt"),
243 dbe_->get(simInfoPathName +
"h_SimPhoEt"),
246 dividePlots(dbe_->get(effPathName +
"deadChVsEta"),
247 dbe_->get(simInfoPathName +
"h_MatchedSimPhoBadChEta"),
248 dbe_->get(simInfoPathName +
"h_MatchedSimPhoEta"),
250 dividePlots(dbe_->get(effPathName +
"deadChVsPhi"),
251 dbe_->get(simInfoPathName +
"h_MatchedSimPhoBadChPhi"),
252 dbe_->get(simInfoPathName +
"h_MatchedSimPhoPhi"),
254 dividePlots(dbe_->get(effPathName +
"deadChVsEt"),
255 dbe_->get(simInfoPathName +
"h_MatchedSimPhoBadChEt"),
256 dbe_->get(simInfoPathName +
"h_MatchedSimPhoEt"),
260 dividePlots(dbe_->get(effPathName +
"convEffVsEtaTwoTracks"),
261 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEta"),
262 dbe_->get(simInfoPathName +
"h_VisSimConvEta"),
264 dividePlots(dbe_->get(effPathName +
"convEffVsPhiTwoTracks"),
265 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksPhi"),
266 dbe_->get(simInfoPathName +
"h_VisSimConvPhi"),
268 dividePlots(dbe_->get(effPathName +
"convEffVsRTwoTracks"),
269 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksR"),
270 dbe_->get(simInfoPathName +
"h_VisSimConvR"),
272 dividePlots(dbe_->get(effPathName +
"convEffVsZTwoTracks"),
273 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksZ"),
274 dbe_->get(simInfoPathName +
"h_VisSimConvZ"),
276 dividePlots(dbe_->get(effPathName +
"convEffVsEtTwoTracks"),
277 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEt"),
278 dbe_->get(simInfoPathName +
"h_VisSimConvEt"),
280 dividePlots(dbe_->get(effPathName +
"convEffVsEtaTwoTracksAndVtxProbGT0"),
281 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEtaAndVtxPGT0"),
282 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEta"),
284 dividePlots(dbe_->get(effPathName +
"convEffVsEtaTwoTracksAndVtxProbGT0005"),
285 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEtaAndVtxPGT0005"),
286 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksEta"),
288 dividePlots(dbe_->get(effPathName +
"convEffVsRTwoTracksAndVtxProbGT0"),
289 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksRAndVtxPGT0"),
290 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksR"),
292 dividePlots(dbe_->get(effPathName +
"convEffVsRTwoTracksAndVtxProbGT0005"),
293 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksRAndVtxPGT0005"),
294 dbe_->get(simInfoPathName +
"h_SimConvTwoMTracksR"),
297 dividePlots(dbe_->get(effPathName +
"convEffVsEtaOneTrack"),
298 dbe_->get(simInfoPathName +
"h_SimConvOneMTracksEta"),
299 dbe_->get(simInfoPathName +
"h_VisSimConvEta"),
301 dividePlots(dbe_->get(effPathName +
"convEffVsPhiOneTrack"),
302 dbe_->get(simInfoPathName +
"h_SimConvOneMTracksPhi"),
303 dbe_->get(simInfoPathName +
"h_VisSimConvPhi"),
305 dividePlots(dbe_->get(effPathName +
"convEffVsROneTrack"),
306 dbe_->get(simInfoPathName +
"h_SimConvOneMTracksR"),
307 dbe_->get(simInfoPathName +
"h_VisSimConvR"),
309 dividePlots(dbe_->get(effPathName +
"convEffVsZOneTrack"),
310 dbe_->get(simInfoPathName +
"h_SimConvOneMTracksZ"),
311 dbe_->get(simInfoPathName +
"h_VisSimConvZ"),
313 dividePlots(dbe_->get(effPathName +
"convEffVsEtOneTrack"),
314 dbe_->get(simInfoPathName +
"h_SimConvOneMTracksEt"),
315 dbe_->get(simInfoPathName +
"h_VisSimConvEt"),
318 dividePlots(dbe_->get(effPathName +
"convEffVsEtaTotal"),
319 dbe_->get(simInfoPathName +
"h_simConvEtaMTotal"),
320 dbe_->get(simInfoPathName +
"h_VisSimConvEta"),
322 dividePlots(dbe_->get(effPathName +
"convEffVsPhiTotal"),
323 dbe_->get(simInfoPathName +
"h_simConvPhiMTotal"),
324 dbe_->get(simInfoPathName +
"h_VisSimConvPhi"),
326 dividePlots(dbe_->get(effPathName +
"convEffVsRTotal"),
327 dbe_->get(simInfoPathName +
"h_simConvRMTotal"),
328 dbe_->get(simInfoPathName +
"h_VisSimConvR"),
330 dividePlots(dbe_->get(effPathName +
"convEffVsZTotal"),
331 dbe_->get(simInfoPathName +
"h_simConvZMTotal"),
332 dbe_->get(simInfoPathName +
"h_VisSimConvZ"),
334 dividePlots(dbe_->get(effPathName +
"convEffVsEtTotal"),
335 dbe_->get(simInfoPathName +
"h_simConvEtMTotal"),
336 dbe_->get(simInfoPathName +
"h_VisSimConvEt"),
339 dividePlots(dbe_->get(effPathName +
"convFakeRateVsEtaTwoTracks"),
340 dbe_->get(convPathName +
"h_RecoConvTwoMTracksEta"),
341 dbe_->get(convPathName +
"h_RecoConvTwoTracksEta"),
343 dividePlots(dbe_->get(effPathName +
"convFakeRateVsPhiTwoTracks"),
344 dbe_->get(convPathName +
"h_RecoConvTwoMTracksPhi"),
345 dbe_->get(convPathName +
"h_RecoConvTwoTracksPhi"),
347 dividePlots(dbe_->get(effPathName +
"convFakeRateVsRTwoTracks"),
348 dbe_->get(convPathName +
"h_RecoConvTwoMTracksR"),
349 dbe_->get(convPathName +
"h_RecoConvTwoTracksR"),
351 dividePlots(dbe_->get(effPathName +
"convFakeRateVsZTwoTracks"),
352 dbe_->get(convPathName +
"h_RecoConvTwoMTracksZ"),
353 dbe_->get(convPathName +
"h_RecoConvTwoTracksZ"),
355 dividePlots(dbe_->get(effPathName +
"convFakeRateVsEtTwoTracks"),
356 dbe_->get(convPathName +
"h_RecoConvTwoMTracksEt"),
357 dbe_->get(convPathName +
"h_RecoConvTwoTracksEt"),
361 dividePlots(dbe_->get(effPathName +
"bkgEffVsEta"),
362 dbe_->get(simInfoPathName +
"h_MatchedSimJetEta"),
363 dbe_->get(simInfoPathName +
"h_SimJetEta"),
365 dividePlots(dbe_->get(effPathName +
"bkgEffVsPhi"),
366 dbe_->get(simInfoPathName +
"h_MatchedSimJetPhi"),
367 dbe_->get(simInfoPathName +
"h_SimJetPhi"),
369 dividePlots(dbe_->get(effPathName +
"bkgEffVsEt"),
370 dbe_->get(simInfoPathName +
"h_MatchedSimJetEt"),
371 dbe_->get(simInfoPathName +
"h_SimJetEt"),
374 dividePlots(dbe_->get(effPathName +
"deadChVsEtaBkg"),
375 dbe_->get(simInfoPathName +
"h_MatchedSimJetBadChEta"),
376 dbe_->get(simInfoPathName +
"h_MatchedSimJetEta"),
378 dividePlots(dbe_->get(effPathName +
"deadChVsPhiBkg"),
379 dbe_->get(simInfoPathName +
"h_MatchedSimJetBadChPhi"),
380 dbe_->get(simInfoPathName +
"h_MatchedSimJetPhi"),
382 dividePlots(dbe_->get(effPathName +
"deadChVsEtBkg"),
383 dbe_->get(simInfoPathName +
"h_MatchedSimJetBadChEt"),
384 dbe_->get(simInfoPathName +
"h_MatchedSimJetEt"),
388 dbe_->save(outputFileName_);
390 dbe_->save(inputFileName_);
407 else if (
type ==
"fakerate")
~PhotonPostprocessing() override
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
PhotonPostprocessing(const edm::ParameterSet &pset)
void endRun(const edm::Run &, const edm::EventSetup &) override
virtual 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)
void analyze(const edm::Event &, const edm::EventSetup &) override
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)