29 outputFileName_ = pset.
getParameter<
string>(
"OutputFileName");
31 isRunCentrally_ = pset.
getParameter<
bool>(
"isRunCentrally");
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/";
83 string histname =
"h_simConvEtaMTotal";
85 histname =
"h_simConvPhiMTotal";
87 histname =
"h_simConvRMTotal";
89 histname =
"h_simConvZMTotal";
91 histname =
"h_simConvEtMTotal";
96 histname =
"recoEffVsEta";
98 histname =
"recoEffVsPhi";
100 histname =
"recoEffVsEt";
103 histname =
"deadChVsEta";
106 histname =
"deadChVsPhi";
109 histname =
"deadChVsEt";
112 if (!isRunCentrally_) {
113 histname =
"convVsEt";
121 histname =
"convEffVsEtaTwoTracks";
124 histname =
"convEffVsPhiTwoTracks";
127 histname =
"convEffVsRTwoTracks";
130 histname =
"convEffVsZTwoTracks";
133 histname =
"convEffVsEtTwoTracks";
136 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0";
138 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0005";
140 histname =
"convEffVsRTwoTracksAndVtxProbGT0";
142 histname =
"convEffVsRTwoTracksAndVtxProbGT0005";
145 histname =
"convEffVsEtaOneTrack";
147 histname =
"convEffVsROneTrack";
149 histname =
"convEffVsZOneTrack";
151 histname =
"convEffVsEtOneTrack";
153 histname =
"convEffVsPhiOneTrack";
156 histname =
"convEffVsEtaTotal";
158 histname =
"convEffVsRTotal";
160 histname =
"convEffVsZTotal";
162 histname =
"convEffVsEtTotal";
164 histname =
"convEffVsPhiTotal";
167 histname =
"convFakeRateVsEtaTwoTracks";
169 histname =
"convFakeRateVsPhiTwoTracks";
171 histname =
"convFakeRateVsRTwoTracks";
173 histname =
"convFakeRateVsZTwoTracks";
175 histname =
"convFakeRateVsEtTwoTracks";
178 histname =
"bkgEffVsEta";
180 histname =
"bkgEffVsPhi";
182 histname =
"bkgEffVsEt";
185 histname =
"deadChVsEtaBkg";
188 histname =
"deadChVsPhiBkg";
191 histname =
"deadChVsEtBkg";
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(),
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(),
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(),
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(),
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(),
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"),
398 if (
nullptr == dividend
or nullptr == denominator
or nullptr == numerator) {
407 else if (type ==
"fakerate")
425 if (
nullptr == dividend
or nullptr == numerator) {
429 if (denominator != 0) {
431 err =
sqrt(value * (1 - value) / denominator);
T getParameter(std::string const &) const
~PhotonPostprocessing() override
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")
virtual int getNbinsX() const
get # of bins in X-axis
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
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)
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)
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
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")