CMS 3D CMS Logo

PhotonPostprocessing.cc
Go to the documentation of this file.
1 #include <iostream>
2 //
3 
5 
6 //#define TWOPI 6.283185308
7 //
8 
19 using namespace std;
20 
22  dbe_ = nullptr;
24  parameters_ = pset;
25 
26  analyzerName_ = pset.getParameter<std::string>("analyzerName");
27  standAlone_ = pset.getParameter<bool>("standAlone");
28  batch_ = pset.getParameter<bool>("batch");
29  outputFileName_ = pset.getParameter<string>("OutputFileName");
30  inputFileName_ = pset.getParameter<std::string>("InputFileName");
31  isRunCentrally_ = pset.getParameter<bool>("isRunCentrally");
32  fastSim_ = pset.getParameter<bool>("fastSim");
33 
34  etMin = parameters_.getParameter<double>("etMin");
35  etMax = parameters_.getParameter<double>("etMax");
36  etBin = parameters_.getParameter<int>("etBin");
37 
38  etaMin = parameters_.getParameter<double>("etaMin");
39  etaMax = parameters_.getParameter<double>("etaMax");
40  etaBin = parameters_.getParameter<int>("etaBin");
41  etaBin2 = parameters_.getParameter<int>("etaBin2");
42 
43  phiMin = parameters_.getParameter<double>("phiMin");
44  phiMax = parameters_.getParameter<double>("phiMax");
45  phiBin = parameters_.getParameter<int>("phiBin");
46 
47  rMin = parameters_.getParameter<double>("rMin");
48  rMax = parameters_.getParameter<double>("rMax");
49  rBin = parameters_.getParameter<int>("rBin");
50 
51  zMin = parameters_.getParameter<double>("zMin");
52  zMax = parameters_.getParameter<double>("zMax");
53  zBin = parameters_.getParameter<int>("zBin");
54 }
55 
57 
59 
61 
63  if (standAlone_)
64  runPostprocessing();
65 }
66 
68  if (!standAlone_)
69  runPostprocessing();
70 }
71 
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/";
77 
78  if (batch_)
79  dbe_->open(inputFileName_);
80 
81  dbe_->setCurrentFolder(simInfoPathName);
82  // Numerators for Total efficiency
83  string histname = "h_simConvEtaMTotal";
84  h_simConvEtaMTotal_ = dbe_->book1D(histname, histname, etaBin2, etaMin, etaMax);
85  histname = "h_simConvPhiMTotal";
86  h_simConvPhiMTotal_ = dbe_->book1D(histname, histname, phiBin, phiMin, phiMax);
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);
93 
94  dbe_->setCurrentFolder(effPathName);
95  // Photon reconstruction efficiencies
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);
102  // Fraction of photons with at least one dead channel
103  histname = "deadChVsEta";
104  phoDeadChEta_ =
105  dbe_->book1D(histname, "Fraction of photons with >=1 dead Xtal vs simulated #eta", etaBin, etaMin, etaMax);
106  histname = "deadChVsPhi";
107  phoDeadChPhi_ =
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);
111 
112  if (!isRunCentrally_) {
113  histname = "convVsEt";
114  convVsEt_[0] =
115  dbe_->book1D(histname + "Barrel", "Fraction of good conversions in R9<0.93 vs Et ", etBin, etMin, etMax);
116  convVsEt_[1] =
117  dbe_->book1D(histname + "Endcap", "Fraction of good conversions in R9<0.93 vs Et ", etBin, etMin, etMax);
118  }
119 
120  // Conversion reconstruction efficiency
121  histname = "convEffVsEtaTwoTracks";
122  convEffEtaTwoTracks_ = dbe_->book1D(histname, histname, etaBin2, etaMin, etaMax);
123 
124  histname = "convEffVsPhiTwoTracks";
125  convEffPhiTwoTracks_ = dbe_->book1D(histname, histname, phiBin, phiMin, phiMax);
126 
127  histname = "convEffVsRTwoTracks";
128  convEffRTwoTracks_ = dbe_->book1D(histname, histname, rBin, rMin, rMax);
129 
130  histname = "convEffVsZTwoTracks";
131  convEffZTwoTracks_ = dbe_->book1D(histname, histname, zBin, zMin, zMax);
132 
133  histname = "convEffVsEtTwoTracks";
134  convEffEtTwoTracks_ = dbe_->book1D(histname, histname, etBin, etMin, etMax);
135  //
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);
144  //
145  histname = "convEffVsEtaOneTrack";
146  convEffEtaOneTrack_ = dbe_->book1D(histname, histname, etaBin2, etaMin, etaMax);
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";
154  convEffPhiOneTrack_ = dbe_->book1D(histname, histname, phiBin, phiMin, phiMax);
155  //
156  histname = "convEffVsEtaTotal";
157  convEffEtaTotal_ = dbe_->book1D(histname, histname, etaBin2, etaMin, etaMax);
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";
165  convEffPhiTotal_ = dbe_->book1D(histname, histname, phiBin, phiMin, phiMax);
166  // Fake rate
167  histname = "convFakeRateVsEtaTwoTracks";
168  convFakeRateEtaTwoTracks_ = dbe_->book1D(histname, histname, etaBin2, etaMin, etaMax);
169  histname = "convFakeRateVsPhiTwoTracks";
170  convFakeRatePhiTwoTracks_ = dbe_->book1D(histname, histname, phiBin, phiMin, phiMax);
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);
177 
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);
184  // Fraction of photons with at least one dead channel
185  histname = "deadChVsEtaBkg";
186  bkgDeadChEta_ =
187  dbe_->book1D(histname, "Fraction of bkg with >=1 dead Xtal vs simulated #eta", etaBin, etaMin, etaMax);
188  histname = "deadChVsPhiBkg";
189  bkgDeadChPhi_ =
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);
193 
194  //
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());
199  }
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());
204  }
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());
209  }
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());
214  }
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());
219  }
220 
221  // efficiencies
222  if (!isRunCentrally_) {
223  dividePlots(dbe_->get(effPathName + "convVsEtBarrel"),
224  dbe_->get(photonPathName + "EtR9Less093ConvBarrel"),
225  dbe_->get(photonPathName + "EtR9Less093Barrel"),
226  "effic");
227  dividePlots(dbe_->get(effPathName + "convVsEtEndcap"),
228  dbe_->get(photonPathName + "EtR9Less093ConvEndcap"),
229  dbe_->get(photonPathName + "EtR9Less093Endcap"),
230  "effic");
231  }
232 
233  dividePlots(dbe_->get(effPathName + "recoEffVsEta"),
234  dbe_->get(simInfoPathName + "h_MatchedSimPhoEta"),
235  dbe_->get(simInfoPathName + "h_SimPhoEta"),
236  "effic");
237  dividePlots(dbe_->get(effPathName + "recoEffVsPhi"),
238  dbe_->get(simInfoPathName + "h_MatchedSimPhoPhi"),
239  dbe_->get(simInfoPathName + "h_SimPhoPhi"),
240  "effic");
241  dividePlots(dbe_->get(effPathName + "recoEffVsEt"),
242  dbe_->get(simInfoPathName + "h_MatchedSimPhoEt"),
243  dbe_->get(simInfoPathName + "h_SimPhoEt"),
244  "effic");
245  // fraction of photons with at least one dead channel
246  dividePlots(dbe_->get(effPathName + "deadChVsEta"),
247  dbe_->get(simInfoPathName + "h_MatchedSimPhoBadChEta"),
248  dbe_->get(simInfoPathName + "h_MatchedSimPhoEta"),
249  "effic");
250  dividePlots(dbe_->get(effPathName + "deadChVsPhi"),
251  dbe_->get(simInfoPathName + "h_MatchedSimPhoBadChPhi"),
252  dbe_->get(simInfoPathName + "h_MatchedSimPhoPhi"),
253  "effic");
254  dividePlots(dbe_->get(effPathName + "deadChVsEt"),
255  dbe_->get(simInfoPathName + "h_MatchedSimPhoBadChEt"),
256  dbe_->get(simInfoPathName + "h_MatchedSimPhoEt"),
257  "effic");
258  //
259  if (!fastSim_) {
260  dividePlots(dbe_->get(effPathName + "convEffVsEtaTwoTracks"),
261  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksEta"),
262  dbe_->get(simInfoPathName + "h_VisSimConvEta"),
263  "effic");
264  dividePlots(dbe_->get(effPathName + "convEffVsPhiTwoTracks"),
265  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksPhi"),
266  dbe_->get(simInfoPathName + "h_VisSimConvPhi"),
267  "effic");
268  dividePlots(dbe_->get(effPathName + "convEffVsRTwoTracks"),
269  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksR"),
270  dbe_->get(simInfoPathName + "h_VisSimConvR"),
271  "effic");
272  dividePlots(dbe_->get(effPathName + "convEffVsZTwoTracks"),
273  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksZ"),
274  dbe_->get(simInfoPathName + "h_VisSimConvZ"),
275  "effic");
276  dividePlots(dbe_->get(effPathName + "convEffVsEtTwoTracks"),
277  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksEt"),
278  dbe_->get(simInfoPathName + "h_VisSimConvEt"),
279  "effic");
280  dividePlots(dbe_->get(effPathName + "convEffVsEtaTwoTracksAndVtxProbGT0"),
281  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksEtaAndVtxPGT0"),
282  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksEta"),
283  "effic");
284  dividePlots(dbe_->get(effPathName + "convEffVsEtaTwoTracksAndVtxProbGT0005"),
285  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksEtaAndVtxPGT0005"),
286  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksEta"),
287  "effic");
288  dividePlots(dbe_->get(effPathName + "convEffVsRTwoTracksAndVtxProbGT0"),
289  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksRAndVtxPGT0"),
290  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksR"),
291  "effic");
292  dividePlots(dbe_->get(effPathName + "convEffVsRTwoTracksAndVtxProbGT0005"),
293  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksRAndVtxPGT0005"),
294  dbe_->get(simInfoPathName + "h_SimConvTwoMTracksR"),
295  "effic");
296  //
297  dividePlots(dbe_->get(effPathName + "convEffVsEtaOneTrack"),
298  dbe_->get(simInfoPathName + "h_SimConvOneMTracksEta"),
299  dbe_->get(simInfoPathName + "h_VisSimConvEta"),
300  "effic");
301  dividePlots(dbe_->get(effPathName + "convEffVsPhiOneTrack"),
302  dbe_->get(simInfoPathName + "h_SimConvOneMTracksPhi"),
303  dbe_->get(simInfoPathName + "h_VisSimConvPhi"),
304  "effic");
305  dividePlots(dbe_->get(effPathName + "convEffVsROneTrack"),
306  dbe_->get(simInfoPathName + "h_SimConvOneMTracksR"),
307  dbe_->get(simInfoPathName + "h_VisSimConvR"),
308  "effic");
309  dividePlots(dbe_->get(effPathName + "convEffVsZOneTrack"),
310  dbe_->get(simInfoPathName + "h_SimConvOneMTracksZ"),
311  dbe_->get(simInfoPathName + "h_VisSimConvZ"),
312  "effic");
313  dividePlots(dbe_->get(effPathName + "convEffVsEtOneTrack"),
314  dbe_->get(simInfoPathName + "h_SimConvOneMTracksEt"),
315  dbe_->get(simInfoPathName + "h_VisSimConvEt"),
316  "effic");
317  //
318  dividePlots(dbe_->get(effPathName + "convEffVsEtaTotal"),
319  dbe_->get(simInfoPathName + "h_simConvEtaMTotal"),
320  dbe_->get(simInfoPathName + "h_VisSimConvEta"),
321  "effic");
322  dividePlots(dbe_->get(effPathName + "convEffVsPhiTotal"),
323  dbe_->get(simInfoPathName + "h_simConvPhiMTotal"),
324  dbe_->get(simInfoPathName + "h_VisSimConvPhi"),
325  "effic");
326  dividePlots(dbe_->get(effPathName + "convEffVsRTotal"),
327  dbe_->get(simInfoPathName + "h_simConvRMTotal"),
328  dbe_->get(simInfoPathName + "h_VisSimConvR"),
329  "effic");
330  dividePlots(dbe_->get(effPathName + "convEffVsZTotal"),
331  dbe_->get(simInfoPathName + "h_simConvZMTotal"),
332  dbe_->get(simInfoPathName + "h_VisSimConvZ"),
333  "effic");
334  dividePlots(dbe_->get(effPathName + "convEffVsEtTotal"),
335  dbe_->get(simInfoPathName + "h_simConvEtMTotal"),
336  dbe_->get(simInfoPathName + "h_VisSimConvEt"),
337  "effic");
338  // fake rate
339  dividePlots(dbe_->get(effPathName + "convFakeRateVsEtaTwoTracks"),
340  dbe_->get(convPathName + "h_RecoConvTwoMTracksEta"),
341  dbe_->get(convPathName + "h_RecoConvTwoTracksEta"),
342  "fakerate");
343  dividePlots(dbe_->get(effPathName + "convFakeRateVsPhiTwoTracks"),
344  dbe_->get(convPathName + "h_RecoConvTwoMTracksPhi"),
345  dbe_->get(convPathName + "h_RecoConvTwoTracksPhi"),
346  "fakerate");
347  dividePlots(dbe_->get(effPathName + "convFakeRateVsRTwoTracks"),
348  dbe_->get(convPathName + "h_RecoConvTwoMTracksR"),
349  dbe_->get(convPathName + "h_RecoConvTwoTracksR"),
350  "fakerate");
351  dividePlots(dbe_->get(effPathName + "convFakeRateVsZTwoTracks"),
352  dbe_->get(convPathName + "h_RecoConvTwoMTracksZ"),
353  dbe_->get(convPathName + "h_RecoConvTwoTracksZ"),
354  "fakerate");
355  dividePlots(dbe_->get(effPathName + "convFakeRateVsEtTwoTracks"),
356  dbe_->get(convPathName + "h_RecoConvTwoMTracksEt"),
357  dbe_->get(convPathName + "h_RecoConvTwoTracksEt"),
358  "fakerate");
359  }
360  // Background efficiency
361  dividePlots(dbe_->get(effPathName + "bkgEffVsEta"),
362  dbe_->get(simInfoPathName + "h_MatchedSimJetEta"),
363  dbe_->get(simInfoPathName + "h_SimJetEta"),
364  "effic");
365  dividePlots(dbe_->get(effPathName + "bkgEffVsPhi"),
366  dbe_->get(simInfoPathName + "h_MatchedSimJetPhi"),
367  dbe_->get(simInfoPathName + "h_SimJetPhi"),
368  "effic");
369  dividePlots(dbe_->get(effPathName + "bkgEffVsEt"),
370  dbe_->get(simInfoPathName + "h_MatchedSimJetEt"),
371  dbe_->get(simInfoPathName + "h_SimJetEt"),
372  "effic");
373  // fraction of photons with at least one dead channel
374  dividePlots(dbe_->get(effPathName + "deadChVsEtaBkg"),
375  dbe_->get(simInfoPathName + "h_MatchedSimJetBadChEta"),
376  dbe_->get(simInfoPathName + "h_MatchedSimJetEta"),
377  "effic");
378  dividePlots(dbe_->get(effPathName + "deadChVsPhiBkg"),
379  dbe_->get(simInfoPathName + "h_MatchedSimJetBadChPhi"),
380  dbe_->get(simInfoPathName + "h_MatchedSimJetPhi"),
381  "effic");
382  dividePlots(dbe_->get(effPathName + "deadChVsEtBkg"),
383  dbe_->get(simInfoPathName + "h_MatchedSimJetBadChEt"),
384  dbe_->get(simInfoPathName + "h_MatchedSimJetEt"),
385  "effic");
386 
387  if (standAlone_)
388  dbe_->save(outputFileName_);
389  else if (batch_)
390  dbe_->save(inputFileName_);
391 }
392 
396  std::string type) {
397  double value, err;
398  if (nullptr == dividend or nullptr == denominator or nullptr == numerator) {
399  return;
400  }
401  for (int j = 1; j <= numerator->getNbinsX(); j++) {
402  dividend->setEfficiencyFlag();
403 
404  if (denominator->getBinContent(j) != 0) {
405  if (type == "effic")
406  value = ((double)numerator->getBinContent(j)) / ((double)denominator->getBinContent(j));
407  else if (type == "fakerate")
408  value = 1 - ((double)numerator->getBinContent(j)) / ((double)denominator->getBinContent(j));
409  else
410  return;
411  err = sqrt(value * (1 - value) / ((double)denominator->getBinContent(j)));
412  dividend->setBinContent(j, value);
413  if (err != 0)
414  dividend->setBinError(j, err);
415  } else {
416  dividend->setBinContent(j, 0);
417  dividend->setBinError(j, 0);
418  }
419  }
420 }
421 
423  double value, err;
424 
425  if (nullptr == dividend or nullptr == numerator) {
426  return;
427  }
428  for (int j = 1; j <= numerator->getNbinsX(); j++) {
429  if (denominator != 0) {
430  value = ((double)numerator->getBinContent(j)) / denominator;
431  err = sqrt(value * (1 - value) / denominator);
432  dividend->setBinContent(j, value);
433  dividend->setBinError(j, err);
434  } else {
435  dividend->setBinContent(j, 0);
436  }
437  }
438 }
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
virtual TH1F * getTH1F() const
dqm::legacy::DQMStore * dbe_
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1509
virtual int getNbinsX() const
get # of bins in X-axis
T sqrt(T t)
Definition: SSEVec.h:19
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
Definition: Activities.doc:12
virtual double getBinContent(int binx) const
get content of bin (1-D)
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 setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:639
void dividePlots(MonitorElement *dividend, MonitorElement *numerator, MonitorElement *denominator, std::string type)
bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2626
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
Definition: DQMStore.cc:1121
void analyze(const edm::Event &, const edm::EventSetup &) override
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
Definition: DQMStore.cc:2244
Definition: Run.h:45