33 #include "CLHEP/Units/GlobalPhysicalConstants.h"
90 verbosity_ =
pset.getUntrackedParameter<
int>(
"Verbosity");
92 fastSim_ =
pset.getParameter<
bool>(
"fastSim");
93 isRunCentrally_ =
pset.getParameter<
bool>(
"isRunCentrally");
95 photonCollectionProducer_ =
pset.getParameter<
std::string>(
"phoProducer");
97 photonCollectionToken_ =
98 consumes<reco::PhotonCollection>(
edm::InputTag(photonCollectionProducer_, photonCollection_));
100 token_tp_ = consumes<TrackingParticleCollection>(
pset.getParameter<
edm::InputTag>(
"label_tp"));
102 barrelEcalHits_ = consumes<EcalRecHitCollection>(
pset.getParameter<
edm::InputTag>(
"barrelEcalHits"));
103 endcapEcalHits_ = consumes<EcalRecHitCollection>(
pset.getParameter<
edm::InputTag>(
"endcapEcalHits"));
105 conversionOITrackProducer_ =
pset.getParameter<
std::string>(
"conversionOITrackProducer");
106 conversionIOTrackProducer_ =
pset.getParameter<
std::string>(
"conversionIOTrackProducer");
107 conversionOITrackPr_Token_ = consumes<edm::View<reco::Track> >(
edm::InputTag(conversionOITrackProducer_));
108 conversionIOTrackPr_Token_ = consumes<edm::View<reco::Track> >(
edm::InputTag(conversionIOTrackProducer_));
110 pfCandidates_ = consumes<reco::PFCandidateCollection>(
pset.getParameter<
edm::InputTag>(
"pfCandidates"));
111 valueMapPhoPFCandIso_ =
pset.getParameter<
std::string>(
"valueMapPhoToParticleBasedIso");
112 particleBasedIso_token =
113 consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(
pset.getUntrackedParameter<
edm::InputTag>(
114 "particleBasedIso",
edm::InputTag(
"particleBasedIsolation", valueMapPhoPFCandIso_)));
116 minPhoEtCut_ =
pset.getParameter<
double>(
"minPhoEtCut");
117 convTrackMinPtCut_ =
pset.getParameter<
double>(
"convTrackMinPtCut");
118 likelihoodCut_ =
pset.getParameter<
double>(
"likelihoodCut");
120 trkIsolExtRadius_ =
pset.getParameter<
double>(
"trkIsolExtR");
121 trkIsolInnRadius_ =
pset.getParameter<
double>(
"trkIsolInnR");
122 trkPtLow_ =
pset.getParameter<
double>(
"minTrackPtCut");
123 lip_ =
pset.getParameter<
double>(
"lipCut");
124 ecalIsolRadius_ =
pset.getParameter<
double>(
"ecalIsolR");
125 bcEtLow_ =
pset.getParameter<
double>(
"minBcEtCut");
126 hcalIsolExtRadius_ =
pset.getParameter<
double>(
"hcalIsolExtR");
127 hcalIsolInnRadius_ =
pset.getParameter<
double>(
"hcalIsolInnR");
128 hcalHitEtLow_ =
pset.getParameter<
double>(
"minHcalHitEtCut");
130 numOfTracksInCone_ =
pset.getParameter<
int>(
"maxNumOfTracksInCone");
131 trkPtSumCut_ =
pset.getParameter<
double>(
"trkPtSumCut");
132 ecalEtSumCut_ =
pset.getParameter<
double>(
"ecalEtSumCut");
133 hcalEtSumCut_ =
pset.getParameter<
double>(
"hcalEtSumCut");
134 dCotCutOn_ =
pset.getParameter<
bool>(
"dCotCutOn");
135 dCotCutValue_ =
pset.getParameter<
double>(
"dCotCutValue");
136 dCotHardCutValue_ =
pset.getParameter<
double>(
"dCotHardCutValue");
138 offline_pvToken_ = consumes<reco::VertexCollection>(
140 g4_simTk_Token_ = consumes<edm::SimTrackContainer>(
edm::InputTag(
"g4SimHits"));
141 g4_simVtx_Token_ = consumes<edm::SimVertexContainer>(
edm::InputTag(
"g4SimHits"));
142 famos_simTk_Token_ = consumes<edm::SimTrackContainer>(
edm::InputTag(
"fastSimProducer"));
143 famos_simVtx_Token_ = consumes<edm::SimVertexContainer>(
edm::InputTag(
"fastSimProducer"));
144 hepMC_Token_ = consumes<edm::HepMCProduct>(
edm::InputTag(
"generatorSmeared"));
145 genjets_Token_ = consumes<reco::GenJetCollection>(
edm::InputTag(
"ak4GenJets"));
147 genpartToken_ = consumes<reco::GenParticleCollection>(
edm::InputTag(
"genParticles"));
149 consumes<reco::TrackToTrackingParticleAssociator>(
edm::InputTag(
"trackAssociatorByHitsForPhotonValidation"));
155 nRecConvAssWithEcal_ = 0;
162 double resMin = parameters_.getParameter<
double>(
"resMin");
163 double resMax = parameters_.getParameter<
double>(
"resMax");
164 int resBin = parameters_.getParameter<
int>(
"resBin");
166 double eMin = parameters_.getParameter<
double>(
"eMin");
167 double eMax = parameters_.getParameter<
double>(
"eMax");
168 int eBin = parameters_.getParameter<
int>(
"eBin");
170 double etMin = parameters_.getParameter<
double>(
"etMin");
171 double etMax = parameters_.getParameter<
double>(
"etMax");
172 int etBin = parameters_.getParameter<
int>(
"etBin");
174 double etScale = parameters_.getParameter<
double>(
"etScale");
176 double etaMin = parameters_.getParameter<
double>(
"etaMin");
177 double etaMax = parameters_.getParameter<
double>(
"etaMax");
178 int etaBin = parameters_.getParameter<
int>(
"etaBin");
179 int etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
181 double dEtaMin = parameters_.getParameter<
double>(
"dEtaMin");
182 double dEtaMax = parameters_.getParameter<
double>(
"dEtaMax");
183 int dEtaBin = parameters_.getParameter<
int>(
"dEtaBin");
185 double phiMin = parameters_.getParameter<
double>(
"phiMin");
186 double phiMax = parameters_.getParameter<
double>(
"phiMax");
187 int phiBin = parameters_.getParameter<
int>(
"phiBin");
189 double dPhiMin = parameters_.getParameter<
double>(
"dPhiMin");
190 double dPhiMax = parameters_.getParameter<
double>(
"dPhiMax");
191 int dPhiBin = parameters_.getParameter<
int>(
"dPhiBin");
193 double rMin = parameters_.getParameter<
double>(
"rMin");
194 double rMax = parameters_.getParameter<
double>(
"rMax");
195 int rBin = parameters_.getParameter<
int>(
"rBin");
197 double zMin = parameters_.getParameter<
double>(
"zMin");
198 double zMax = parameters_.getParameter<
double>(
"zMax");
199 int zBin = parameters_.getParameter<
int>(
"zBin");
201 double r9Min = parameters_.getParameter<
double>(
"r9Min");
202 double r9Max = parameters_.getParameter<
double>(
"r9Max");
203 int r9Bin = parameters_.getParameter<
int>(
"r9Bin");
205 double dPhiTracksMin = parameters_.getParameter<
double>(
"dPhiTracksMin");
206 double dPhiTracksMax = parameters_.getParameter<
double>(
"dPhiTracksMax");
207 int dPhiTracksBin = parameters_.getParameter<
int>(
"dPhiTracksBin");
209 double dEtaTracksMin = parameters_.getParameter<
double>(
"dEtaTracksMin");
210 double dEtaTracksMax = parameters_.getParameter<
double>(
"dEtaTracksMax");
211 int dEtaTracksBin = parameters_.getParameter<
int>(
"dEtaTracksBin");
213 double dCotTracksMin = parameters_.getParameter<
double>(
"dCotTracksMin");
214 double dCotTracksMax = parameters_.getParameter<
double>(
"dCotTracksMax");
215 int dCotTracksBin = parameters_.getParameter<
int>(
"dCotTracksBin");
217 double povereMin = parameters_.getParameter<
double>(
"povereMin");
218 double povereMax = parameters_.getParameter<
double>(
"povereMax");
219 int povereBin = parameters_.getParameter<
int>(
"povereBin");
221 double eoverpMin = parameters_.getParameter<
double>(
"eoverpMin");
222 double eoverpMax = parameters_.getParameter<
double>(
"eoverpMax");
223 int eoverpBin = parameters_.getParameter<
int>(
"eoverpBin");
225 double chi2Min = parameters_.getParameter<
double>(
"chi2Min");
226 double chi2Max = parameters_.getParameter<
double>(
"chi2Max");
228 int ggMassBin = parameters_.getParameter<
int>(
"ggMassBin");
229 double ggMassMin = parameters_.getParameter<
double>(
"ggMassMin");
230 double ggMassMax = parameters_.getParameter<
double>(
"ggMassMax");
232 double rMinForXray = parameters_.getParameter<
double>(
"rMinForXray");
233 double rMaxForXray = parameters_.getParameter<
double>(
"rMaxForXray");
234 int rBinForXray = parameters_.getParameter<
int>(
"rBinForXray");
235 double zMinForXray = parameters_.getParameter<
double>(
"zMinForXray");
236 double zMaxForXray = parameters_.getParameter<
double>(
"zMaxForXray");
237 int zBinForXray = parameters_.getParameter<
int>(
"zBinForXray");
238 int zBin2ForXray = parameters_.getParameter<
int>(
"zBin2ForXray");
247 if (!isRunCentrally_) {
248 h_nSimPho_[0] = iBooker.
book1D(histname,
"# of Sim photons per event ", 20, -0.5, 19.5);
249 histname =
"SimPhoMotherEt";
250 h_SimPhoMotherEt_[0] = iBooker.
book1D(histname,
"Sim photon Mother tranverse energy spectrum",
etBin,
etMin,
etMax);
252 histname =
"SimPhoMotherEtMatched";
253 h_SimPhoMotherEt_[1] = iBooker.
book1D(
254 histname,
"Sim photon matched by a reco Photon: Mother tranverse energy spectrum",
etBin,
etMin,
etMax);
255 h_SimPhoMotherEta_[1] = iBooker.
book1D(
256 "SimPhoMotherEtaMatched",
" Sim Photon matched by a reco Photon: Mother Eta ",
etaBin,
etaMin,
etaMax);
259 histname =
"h_SimPhoEta";
261 histname =
"h_SimPhoPhi";
263 histname =
"h_SimPhoEt";
266 histname =
"nOfSimPhotonsMatched";
267 h_nSimPho_[1] = iBooker.
book1D(histname,
"# of Sim photons matched by a reco Photon per event ", 20, -0.5, 19.5);
268 histname =
"h_MatchedSimPhoEta";
270 histname =
"h_MatchedSimPhoPhi";
272 histname =
"h_MatchedSimPhoEt";
273 h_MatchedSimPho_[2] = iBooker.
book1D(histname,
" Matching photons simulated Et",
etBin,
etMin,
etMax);
275 histname =
"h_MatchedSimPhoBadChEta";
277 histname =
"h_MatchedSimPhoBadChPhi";
279 histname =
"h_MatchedSimPhoBadChEt";
280 h_MatchedSimPhoBadCh_[2] = iBooker.
book1D(histname,
" Matching photons simulated Et",
etBin,
etMin,
etMax);
283 histname =
"nOfSimConversions";
284 if (!isRunCentrally_) {
285 h_nSimConv_[0] = iBooker.
book1D(histname,
"# of Sim conversions per event ", 20, -0.5, 19.5);
286 histname =
"nOfVisSimConversions";
287 h_nSimConv_[1] = iBooker.
book1D(histname,
"# of Sim conversions per event ", 20, -0.5, 19.5);
290 histname =
"h_AllSimConvEta";
292 histname =
"h_AllSimConvPhi";
294 histname =
"h_AllSimConvR";
295 h_AllSimConv_[2] = iBooker.
book1D(histname,
" All conversions: simulated R",
rBin,
rMin,
rMax);
296 histname =
"h_AllSimConvZ";
297 h_AllSimConv_[3] = iBooker.
book1D(histname,
" All conversions: simulated Z",
zBin,
zMin,
zMax);
298 histname =
"h_AllSimConvEt";
301 histname =
"h_VisSimConvEta";
303 histname =
"h_VisSimConvPhi";
305 histname =
"h_VisSimConvR";
306 h_VisSimConv_[2] = iBooker.
book1D(histname,
" All vis conversions: simulated R",
rBin,
rMin,
rMax);
307 histname =
"h_VisSimConvZ";
308 h_VisSimConv_[3] = iBooker.
book1D(histname,
" All vis conversions: simulated Z",
zBin,
zMin,
zMax);
309 histname =
"h_VisSimConvEt";
310 h_VisSimConv_[4] = iBooker.
book1D(histname,
" All vis conversions: simulated Et",
etBin,
etMin,
etMax);
312 histname =
"h_SimConvOneTracksEta";
313 h_SimConvOneTracks_[0] =
315 histname =
"h_SimConvOneTracksPhi";
316 h_SimConvOneTracks_[1] =
318 histname =
"h_SimConvOneTracksR";
319 h_SimConvOneTracks_[2] =
320 iBooker.
book1D(histname,
" All vis conversions with 1 reco tracks: simulated R",
rBin,
rMin,
rMax);
321 histname =
"h_SimConvOneTracksZ";
322 h_SimConvOneTracks_[3] =
323 iBooker.
book1D(histname,
" All vis conversions with 1 reco tracks: simulated Z",
zBin,
zMin,
zMax);
324 histname =
"h_SimConvOneTracksEt";
325 h_SimConvOneTracks_[4] =
326 iBooker.
book1D(histname,
" All vis conversions with 1 reco tracks: simulated Et",
etBin,
etMin,
etMax);
328 histname =
"h_SimConvTwoMTracksEta";
329 h_SimConvTwoMTracks_[0] = iBooker.
book1D(
330 histname,
" All vis conversions with 2 reco-matching tracks: simulated #eta",
etaBin2,
etaMin,
etaMax);
331 histname =
"h_SimConvTwoMTracksPhi";
332 h_SimConvTwoMTracks_[1] = iBooker.
book1D(
333 histname,
" All vis conversions with 2 reco-matching tracks: simulated #phi",
phiBin,
phiMin,
phiMax);
334 histname =
"h_SimConvTwoMTracksR";
335 h_SimConvTwoMTracks_[2] =
336 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated R",
rBin,
rMin,
rMax);
337 histname =
"h_SimConvTwoMTracksZ";
338 h_SimConvTwoMTracks_[3] =
339 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Z",
zBin,
zMin,
zMax);
340 histname =
"h_SimConvTwoMTracksEt";
341 h_SimConvTwoMTracks_[4] =
342 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Et",
etBin,
etMin,
etMax);
344 histname =
"h_SimConvTwoTracksEta";
345 h_SimConvTwoTracks_[0] =
347 histname =
"h_SimConvTwoTracksPhi";
348 h_SimConvTwoTracks_[1] =
350 histname =
"h_SimConvTwoTracksR";
351 h_SimConvTwoTracks_[2] =
352 iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated R",
rBin,
rMin,
rMax);
353 histname =
"h_SimConvTwoTracksZ";
354 h_SimConvTwoTracks_[3] =
355 iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Z",
zBin,
zMin,
zMax);
356 histname =
"h_SimConvTwoTracksEt";
357 h_SimConvTwoTracks_[4] =
358 iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Et",
etBin,
etMin,
etMax);
360 histname =
"h_SimConvOneMTracksEta";
361 h_SimConvOneMTracks_[0] = iBooker.
book1D(
362 histname,
" All vis conversions with 1 reco-matching tracks: simulated #eta",
etaBin2,
etaMin,
etaMax);
363 histname =
"h_SimConvOneMTracksPhi";
364 h_SimConvOneMTracks_[1] = iBooker.
book1D(
365 histname,
" All vis conversions with 1 reco-matching tracks: simulated #phi",
phiBin,
phiMin,
phiMax);
366 histname =
"h_SimConvOneMTracksR";
367 h_SimConvOneMTracks_[2] =
368 iBooker.
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated R",
rBin,
rMin,
rMax);
369 histname =
"h_SimConvOneMTracksZ";
370 h_SimConvOneMTracks_[3] =
371 iBooker.
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated Z",
zBin,
zMin,
zMax);
372 histname =
"h_SimConvOneMTracksEt";
373 h_SimConvOneMTracks_[4] =
374 iBooker.
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated Et",
etBin,
etMin,
etMax);
376 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0";
377 h_SimConvTwoMTracksAndVtxPGT0_[0] = iBooker.
book1D(
378 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",
etaBin2,
etaMin,
etaMax);
379 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0";
380 h_SimConvTwoMTracksAndVtxPGT0_[1] = iBooker.
book1D(
381 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",
phiBin,
phiMin,
phiMax);
382 histname =
"h_SimConvTwoMTracksRAndVtxPGT0";
383 h_SimConvTwoMTracksAndVtxPGT0_[2] = iBooker.
book1D(
384 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",
rBin,
rMin,
rMax);
385 histname =
"h_SimConvTwoMTracksZAndVtxPGT0";
386 h_SimConvTwoMTracksAndVtxPGT0_[3] = iBooker.
book1D(
387 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",
zBin,
zMin,
zMax);
388 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0";
389 h_SimConvTwoMTracksAndVtxPGT0_[4] = iBooker.
book1D(
390 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",
etBin,
etMin,
etMax);
392 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0005";
393 h_SimConvTwoMTracksAndVtxPGT0005_[0] = iBooker.
book1D(
394 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",
etaBin2,
etaMin,
etaMax);
395 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0005";
396 h_SimConvTwoMTracksAndVtxPGT0005_[1] = iBooker.
book1D(
397 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",
phiBin,
phiMin,
phiMax);
398 histname =
"h_SimConvTwoMTracksRAndVtxPGT0005";
399 h_SimConvTwoMTracksAndVtxPGT0005_[2] = iBooker.
book1D(
400 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",
rBin,
rMin,
rMax);
401 histname =
"h_SimConvTwoMTracksZAndVtxPGT0005";
402 h_SimConvTwoMTracksAndVtxPGT0005_[3] = iBooker.
book1D(
403 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",
zBin,
zMin,
zMax);
404 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0005";
405 h_SimConvTwoMTracksAndVtxPGT0005_[4] = iBooker.
book1D(
406 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",
etBin,
etMin,
etMax);
408 if (!isRunCentrally_) {
410 h_simTkPt_ = iBooker.
book1D(
"simTkPt",
"Sim conversion tracks pt ",
etBin * 3, 0.,
etMax);
412 h_simConvVtxRvsZ_[0] = iBooker.
book2D(
"simConvVtxRvsZAll",
413 " Photon Sim conversion vtx position",
420 h_simConvVtxRvsZ_[1] = iBooker.
book2D(
"simConvVtxRvsZBarrel",
421 " Photon Sim conversion vtx position",
428 h_simConvVtxRvsZ_[2] = iBooker.
book2D(
"simConvVtxRvsZEndcap",
429 " Photon Sim conversion vtx position",
436 h_simConvVtxYvsX_ = iBooker.
book2D(
437 "simConvVtxYvsXTrkBarrel",
" Photon Sim conversion vtx position, (x,y) eta<1 ", 100, -80., 80., 100, -80., 80.);
441 histname =
"h_SimJetEta";
443 histname =
"h_SimJetPhi";
445 histname =
"h_SimJetEt";
448 histname =
"h_MatchedSimJetEta";
450 histname =
"h_MatchedSimJetPhi";
452 histname =
"h_MatchedSimJetEt";
455 histname =
"h_MatchedSimJetBadChEta";
457 histname =
"h_MatchedSimJetBadChPhi";
459 histname =
"h_MatchedSimJetBadChEt";
460 h_MatchedSimJetBadCh_[2] = iBooker.
book1D(histname,
" Matching jet simulated Et",
etBin,
etMin,
etMax);
464 histname =
"nOfPhotons";
465 h_nPho_ = iBooker.
book1D(histname,
"# of Reco photons per event ", 20, -0.5, 19.5);
476 histname =
"phoBkgE";
477 h_phoBkgE_[0] = iBooker.
book1D(histname +
"All",
" Photon Bkg Energy: All ecal ",
eBin,
eMin,
eMax);
478 h_phoBkgE_[1] = iBooker.
book1D(histname +
"Barrel",
" Photon Bkg Energy: barrel ",
eBin,
eMin,
eMax);
479 h_phoBkgE_[2] = iBooker.
book1D(histname +
"Endcap",
" Photon Bkg Energy: Endcap ",
eBin,
eMin,
eMax);
481 histname =
"phoBkgEt";
482 h_phoBkgEt_[0] = iBooker.
book1D(histname +
"All",
" Photon Bkg Transverse Energy: All ecal ",
etBin,
etMin,
etMax);
483 h_phoBkgEt_[1] = iBooker.
book1D(histname +
"Barrel",
" Photon Bkg Transverse Energy: Barrel ",
etBin,
etMin,
etMax);
484 h_phoBkgEt_[2] = iBooker.
book1D(histname +
"Endcap",
" Photon BkgTransverse Energy: Endcap ",
etBin,
etMin,
etMax);
488 h_scBkgE_[0] = iBooker.
book1D(histname +
"All",
" SC bkg Energy: All Ecal ",
eBin,
eMin,
eMax);
489 h_scBkgE_[1] = iBooker.
book1D(histname +
"Barrel",
" SC bkg Energy: Barrel ",
eBin,
eMin,
eMax);
490 h_scBkgE_[2] = iBooker.
book1D(histname +
"Endcap",
" SC bkg Energy: Endcap ",
eBin,
eMin,
eMax);
491 histname =
"scBkgEt";
492 h_scBkgEt_[0] = iBooker.
book1D(histname +
"All",
" SC bkg Et: All Ecal ",
eBin,
eMin,
eMax);
493 h_scBkgEt_[1] = iBooker.
book1D(histname +
"Barrel",
" SC bkg Et: Barrel ",
eBin,
eMin,
eMax);
494 h_scBkgEt_[2] = iBooker.
book1D(histname +
"Endcap",
" SC bkg Et: Endcap ",
eBin,
eMin,
eMax);
501 histname =
"R9VsEtaBkg";
502 if (!isRunCentrally_)
506 histname =
"R9VsEtBkg";
507 if (!isRunCentrally_)
509 iBooker.
book2D(histname +
"All",
" Bkg photons r9 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
512 h_r1Bkg_[0] = iBooker.
book1D(histname +
"All",
" Bkg photon e1x5/e5x5: All Ecal",
r9Bin,
r9Min,
r9Max);
513 h_r1Bkg_[1] = iBooker.
book1D(histname +
"Barrel",
" Bkg photon e1x5/e5x5: Barrel ",
r9Bin,
r9Min,
r9Max);
514 h_r1Bkg_[2] = iBooker.
book1D(histname +
"Endcap",
" Bkg photon e1x5/e5x5: Endcap ",
r9Bin,
r9Min,
r9Max);
516 histname =
"R1VsEtaBkg";
517 if (!isRunCentrally_)
518 h2_r1VsEtaBkg_ = iBooker.
book2D(
519 histname +
"All",
" Bkg photons e1x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
520 histname =
"pR1VsEtaBkg";
521 if (!isRunCentrally_)
523 histname +
"All",
" Bkg photons e1x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
525 histname =
"R1VsEtBkg";
526 if (!isRunCentrally_)
528 iBooker.
book2D(histname +
"All",
" Bkg photons e1x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
529 histname =
"pR1VsEtBkg";
530 if (!isRunCentrally_)
532 histname +
"All",
" Bkg photons e2x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
535 h_r2Bkg_[0] = iBooker.
book1D(histname +
"All",
" Bkg photon e2x5/e5x5: All Ecal",
r9Bin,
r9Min,
r9Max);
536 h_r2Bkg_[1] = iBooker.
book1D(histname +
"Barrel",
" Bkg photon e2x5/e5x5: Barrel ",
r9Bin,
r9Min,
r9Max);
537 h_r2Bkg_[2] = iBooker.
book1D(histname +
"Endcap",
" Bkg photon e2x5/e5x5: Endcap ",
r9Bin,
r9Min,
r9Max);
539 histname =
"R2VsEtaBkg";
540 if (!isRunCentrally_)
541 h2_r2VsEtaBkg_ = iBooker.
book2D(
542 histname +
"All",
" Bkg photons e2x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
543 histname =
"pR2VsEtaBkg";
544 if (!isRunCentrally_)
546 histname +
"All",
" Bkg photons e2x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
548 histname =
"R2VsEtBkg";
549 if (!isRunCentrally_)
551 iBooker.
book2D(histname +
"All",
" Bkg photons e2x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
552 histname =
"pR2VsEtBkg";
553 if (!isRunCentrally_)
555 histname +
"All",
" Bkg photons e2x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
557 histname =
"sigmaIetaIetaBkg";
558 h_sigmaIetaIetaBkg_[0] = iBooker.
book1D(histname +
"All",
"Bkg sigmaIetaIeta: All Ecal", 100, 0., 0.1);
559 h_sigmaIetaIetaBkg_[1] = iBooker.
book1D(histname +
"Barrel",
"Bkg sigmaIetaIeta: Barrel ", 100, 0., 0.05);
560 h_sigmaIetaIetaBkg_[2] = iBooker.
book1D(histname +
"Endcap",
"Bkg sigmaIetaIeta: Endcap ", 100, 0., 0.1);
562 histname =
"sigmaIetaIetaVsEtaBkg";
563 if (!isRunCentrally_)
564 h2_sigmaIetaIetaVsEtaBkg_ = iBooker.
book2D(
565 histname +
"All",
" Bkg photons sigmaIetaIeta vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
566 histname =
"pSigmaIetaIetaVsEtaBkg";
567 if (!isRunCentrally_)
569 histname +
"All",
" Bkg photons sigmaIetaIeta vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
571 histname =
"sigmaIetaIetaVsEtBkg";
572 if (!isRunCentrally_)
573 h2_sigmaIetaIetaVsEtBkg_[0] = iBooker.
book2D(
574 histname +
"All",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
575 if (!isRunCentrally_)
576 h2_sigmaIetaIetaVsEtBkg_[1] = iBooker.
book2D(
577 histname +
"Barrel",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
578 if (!isRunCentrally_)
579 h2_sigmaIetaIetaVsEtBkg_[2] = iBooker.
book2D(
580 histname +
"Endcap",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
582 histname =
"pSigmaIetaIetaVsEtBkg";
583 if (!isRunCentrally_)
585 histname +
"All",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
586 if (!isRunCentrally_)
588 histname +
"Barrel",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
589 if (!isRunCentrally_)
591 histname +
"Endcap",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
593 histname =
"hOverEBkg";
594 h_hOverEBkg_[0] = iBooker.
book1D(histname +
"All",
"H/E bkg: All Ecal", 100, 0., 1.);
595 h_hOverEBkg_[1] = iBooker.
book1D(histname +
"Barrel",
"H/E bkg: Barrel ", 100, 0., 1.);
596 h_hOverEBkg_[2] = iBooker.
book1D(histname +
"Endcap",
"H/E bkg: Endcap ", 100, 0., 1.);
598 histname =
"pHOverEVsEtaBkg";
599 if (!isRunCentrally_)
602 histname =
"pHOverEVsEtBkg";
603 if (!isRunCentrally_)
606 if (!isRunCentrally_) {
607 histname =
"hOverEVsEtaBkg";
611 histname =
"hOverEVsEtBkg";
613 iBooker.
book2D(histname +
"All",
" Bkg photons H/E vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
616 histname =
"ecalRecHitSumEtConeDR04Bkg";
617 h_ecalRecHitSumEtConeDR04Bkg_[0] =
618 iBooker.
book1D(histname +
"All",
"bkg ecalRecHitSumEtDR04: All Ecal",
etBin,
etMin, 50.);
619 h_ecalRecHitSumEtConeDR04Bkg_[1] =
620 iBooker.
book1D(histname +
"Barrel",
"bkg ecalRecHitSumEtDR04: Barrel ",
etBin,
etMin, 50.);
621 h_ecalRecHitSumEtConeDR04Bkg_[2] =
622 iBooker.
book1D(histname +
"Endcap",
"bkg ecalRecHitSumEtDR04: Endcap ",
etBin,
etMin, 50.);
624 if (!isRunCentrally_) {
625 histname =
"ecalRecHitSumEtConeDR04VsEtaBkg";
626 h2_ecalRecHitSumEtConeDR04VsEtaBkg_ = iBooker.
book2D(histname +
"All",
627 " bkg ecalRecHitSumEtDR04 vs #eta: all Ecal ",
634 histname =
"ecalRecHitSumEtConeDR04VsEtBkg";
635 h2_ecalRecHitSumEtConeDR04VsEtBkg_[0] = iBooker.
book2D(histname +
"All",
636 " Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ",
643 h2_ecalRecHitSumEtConeDR04VsEtBkg_[1] = iBooker.
book2D(histname +
"Barrel",
644 " Bkg ecalRecHitSumEtDR04 vs Et: Barrel ",
651 h2_ecalRecHitSumEtConeDR04VsEtBkg_[2] = iBooker.
book2D(histname +
"Endcap",
652 " Bkg ecalRecHitSumEtDR04 vs Et: Endcap ",
659 histname =
"hcalTowerSumEtConeDR04VsEtaBkg";
660 h2_hcalTowerSumEtConeDR04VsEtaBkg_ = iBooker.
book2D(histname +
"All",
661 " bkg hcalTowerSumEtDR04 vs #eta: all Ecal ",
668 histname =
"hcalTowerSumEtConeDR04VsEtBkg";
669 h2_hcalTowerSumEtConeDR04VsEtBkg_[0] = iBooker.
book2D(histname +
"All",
670 " Bkg hcalTowerSumEtDR04 vs Et: all Ecal ",
677 h2_hcalTowerSumEtConeDR04VsEtBkg_[1] = iBooker.
book2D(histname +
"Barrel",
678 " Bkg hcalTowerSumEtDR04 vs Et: Barrel ",
685 h2_hcalTowerSumEtConeDR04VsEtBkg_[2] = iBooker.
book2D(histname +
"Endcap",
686 " Bkg hcalTowerSumEtDR04 vs Et: Endcap ",
695 histname =
"pEcalRecHitSumEtConeDR04VsEtaBkg";
696 if (!isRunCentrally_)
697 p_ecalRecHitSumEtConeDR04VsEtaBkg_ = iBooker.
bookProfile(histname +
"All",
698 "bkg photons ecalRecHitSumEtDR04 vs #eta: all Ecal ",
707 histname =
"pEcalRecHitSumEtConeDR04VsEtBkg";
708 if (!isRunCentrally_)
709 p_ecalRecHitSumEtConeDR04VsEtBkg_[0] = iBooker.
bookProfile(histname +
"All",
710 "Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ",
718 if (!isRunCentrally_)
719 p_ecalRecHitSumEtConeDR04VsEtBkg_[1] = iBooker.
bookProfile(histname +
"Barrel",
720 "Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ",
728 if (!isRunCentrally_)
729 p_ecalRecHitSumEtConeDR04VsEtBkg_[2] = iBooker.
bookProfile(histname +
"Endcap",
730 "Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ",
739 histname =
"hcalTowerSumEtConeDR04Bkg";
740 h_hcalTowerSumEtConeDR04Bkg_[0] =
741 iBooker.
book1D(histname +
"All",
"bkg hcalTowerSumEtDR04: All Ecal",
etBin,
etMin, 20.);
742 h_hcalTowerSumEtConeDR04Bkg_[1] =
743 iBooker.
book1D(histname +
"Barrel",
"bkg hcalTowerSumEtDR04: Barrel ",
etBin,
etMin, 20.);
744 h_hcalTowerSumEtConeDR04Bkg_[2] =
745 iBooker.
book1D(histname +
"Endcap",
"bkg hcalTowerSumEtDR04: Endcap ",
etBin,
etMin, 20.);
747 histname =
"pHcalTowerSumEtConeDR04VsEtaBkg";
748 if (!isRunCentrally_)
749 p_hcalTowerSumEtConeDR04VsEtaBkg_ = iBooker.
bookProfile(histname +
"All",
750 "bkg photons hcalTowerSumEtDR04 vs #eta: all Ecal ",
759 histname =
"pHcalTowerSumEtConeDR04VsEtBkg";
760 if (!isRunCentrally_)
761 p_hcalTowerSumEtConeDR04VsEtBkg_[0] = iBooker.
bookProfile(histname +
"All",
762 "Bkg hcalTowerSumEtDR04 vs Et: all Ecal ",
770 if (!isRunCentrally_)
771 p_hcalTowerSumEtConeDR04VsEtBkg_[1] = iBooker.
bookProfile(histname +
"Barrel",
772 "Bkg hcalTowerSumEtDR04 vs Et: all Ecal ",
780 if (!isRunCentrally_)
781 p_hcalTowerSumEtConeDR04VsEtBkg_[2] = iBooker.
bookProfile(histname +
"Endcap",
782 "Bkg hcalTowerSumEtDR04 vs Et: all Ecal ",
791 histname =
"isoTrkSolidConeDR04Bkg";
792 h_isoTrkSolidConeDR04Bkg_[0] =
794 h_isoTrkSolidConeDR04Bkg_[1] =
796 h_isoTrkSolidConeDR04Bkg_[2] =
799 histname =
"isoTrkSolidConeDR04VsEtaBkg";
800 if (!isRunCentrally_)
801 h2_isoTrkSolidConeDR04VsEtaBkg_ = iBooker.
book2D(histname +
"All",
802 " Bkg photons isoTrkSolidConeDR04 vs #eta: all Ecal ",
809 histname =
"pIsoTrkSolidConeDR04VsEtaBkg";
810 if (!isRunCentrally_)
811 p_isoTrkSolidConeDR04VsEtaBkg_ = iBooker.
bookProfile(histname +
"All",
812 " Bkg photons isoTrkSolidConeDR04 vs #eta: all Ecal ",
820 histname =
"isoTrkSolidConeDR04VsEtBkg";
821 if (!isRunCentrally_)
822 h2_isoTrkSolidConeDR04VsEtBkg_[0] = iBooker.
book2D(histname +
"All",
823 " Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",
830 if (!isRunCentrally_)
831 h2_isoTrkSolidConeDR04VsEtBkg_[1] = iBooker.
book2D(histname +
"Barrel",
832 " Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",
839 if (!isRunCentrally_)
840 h2_isoTrkSolidConeDR04VsEtBkg_[2] = iBooker.
book2D(histname +
"Endcap",
841 " Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",
848 histname =
"pIsoTrkSolidConeDR04VsEtBkg";
849 if (!isRunCentrally_)
850 p_isoTrkSolidConeDR04VsEtBkg_[0] = iBooker.
bookProfile(histname +
"All",
851 " Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",
858 if (!isRunCentrally_)
859 p_isoTrkSolidConeDR04VsEtBkg_[1] = iBooker.
bookProfile(histname +
"Barrel",
860 " Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",
867 if (!isRunCentrally_)
868 p_isoTrkSolidConeDR04VsEtBkg_[2] = iBooker.
bookProfile(histname +
"Endcap",
869 " Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",
877 histname =
"nTrkSolidConeDR04Bkg";
878 h_nTrkSolidConeDR04Bkg_[0] = iBooker.
book1D(histname +
"All",
"Bkg nTrkSolidConeDR04: All Ecal", 20, 0., 20);
879 h_nTrkSolidConeDR04Bkg_[1] = iBooker.
book1D(histname +
"Barrel",
"Bkg nTrkSolidConeDR04: Barrel ", 20, 0., 20);
880 h_nTrkSolidConeDR04Bkg_[2] = iBooker.
book1D(histname +
"Endcap",
"Bkg nTrkSolidConeDR04: Endcap ", 20, 0., 20);
882 histname =
"nTrkSolidConeDR04VsEtaBkg";
883 if (!isRunCentrally_)
884 h2_nTrkSolidConeDR04VsEtaBkg_ = iBooker.
book2D(
885 histname +
"All",
" Bkg photons nTrkSolidConeDR04 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 20, 0., 20);
886 histname =
"p_nTrkSolidConeDR04VsEtaBkg";
887 if (!isRunCentrally_)
888 p_nTrkSolidConeDR04VsEtaBkg_ = iBooker.
bookProfile(
889 histname +
"All",
" Bkg photons nTrkSolidConeDR04 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 20, 0., 20);
891 histname =
"nTrkSolidConeDR04VsEtBkg";
892 if (!isRunCentrally_)
893 h2_nTrkSolidConeDR04VsEtBkg_[0] = iBooker.
book2D(
894 histname +
"All",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
895 if (!isRunCentrally_)
896 h2_nTrkSolidConeDR04VsEtBkg_[1] = iBooker.
book2D(
897 histname +
"Barrel",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
898 if (!isRunCentrally_)
899 h2_nTrkSolidConeDR04VsEtBkg_[2] = iBooker.
book2D(
900 histname +
"Endcap",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
902 histname =
"pnTrkSolidConeDR04VsEtBkg";
903 if (!isRunCentrally_)
904 p_nTrkSolidConeDR04VsEtBkg_[0] = iBooker.
bookProfile(
905 histname +
"All",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
906 if (!isRunCentrally_)
907 p_nTrkSolidConeDR04VsEtBkg_[1] = iBooker.
bookProfile(
908 histname +
"Barrel",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
909 if (!isRunCentrally_)
910 p_nTrkSolidConeDR04VsEtBkg_[2] = iBooker.
bookProfile(
911 histname +
"Endcap",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
916 histname =
"mvaOutBkg";
917 h_mvaOutBkg_[0] = iBooker.
book1D(histname +
"All",
" mvaOut conversions bkg : All Ecal", 100, 0., 1.);
918 h_mvaOutBkg_[1] = iBooker.
book1D(histname +
"Barrel",
" mvaOut conversions bkg: Barrel Ecal", 100, 0., 1.);
919 h_mvaOutBkg_[2] = iBooker.
book1D(histname +
"Endcap",
" mvaOut conversions bkg: Endcap Ecal", 100, 0., 1.);
921 histname =
"PoverEtracksBkg";
922 h_PoverETracksBkg_[0] =
924 h_PoverETracksBkg_[1] =
926 h_PoverETracksBkg_[2] =
929 histname =
"EoverPtracksBkg";
930 h_EoverPTracksBkg_[0] =
932 h_EoverPTracksBkg_[1] =
934 h_EoverPTracksBkg_[2] =
937 histname =
"hDCotTracksBkg";
938 h_DCotTracksBkg_[0] = iBooker.
book1D(histname +
"All",
939 " bkg Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",
943 h_DCotTracksBkg_[1] = iBooker.
book1D(histname +
"Barrel",
944 " bkg Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",
948 h_DCotTracksBkg_[2] = iBooker.
book1D(histname +
"Endcap",
949 " bkg Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",
954 histname =
"hDPhiTracksAtVtxBkg";
955 h_DPhiTracksAtVtxBkg_[0] =
956 iBooker.
book1D(histname +
"All",
957 " Bkg Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",
961 h_DPhiTracksAtVtxBkg_[1] =
962 iBooker.
book1D(histname +
"Barrel",
963 " Bkg Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",
967 h_DPhiTracksAtVtxBkg_[2] =
968 iBooker.
book1D(histname +
"Endcap",
969 " Bkg Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",
974 if (!isRunCentrally_) {
975 h_convVtxRvsZBkg_[0] = iBooker.
book2D(
"convVtxRvsZAllBkg",
976 " Bkg Photon Reco conversion vtx position",
983 h_convVtxRvsZBkg_[1] = iBooker.
book2D(
"convVtxRvsZBarrelBkg",
984 " Bkg Photon Reco conversion vtx position",
991 h_convVtxYvsXBkg_ = iBooker.
book2D(
"convVtxYvsXTrkBarrelBkg",
992 " Bkg Photon Reco conversion vtx position, (x,y) eta<1 ",
1004 histname =
"nOfflineVtx";
1005 h_nRecoVtx_ = iBooker.
book1D(histname,
"# of Offline Vertices", 200, -0.5, 199.5);
1016 if (!isRunCentrally_) {
1017 h_scEtaWidth_[0] = iBooker.
book1D(
"scEtaWidth",
" SC Eta Width ", 100, 0., 0.1);
1018 h_scPhiWidth_[0] = iBooker.
book1D(
"scPhiWidth",
" SC Phi Width ", 100, 0., 1.);
1022 h_scE_[0][0] = iBooker.
book1D(histname +
"All",
" SC Energy: All Ecal ",
eBin,
eMin,
eMax);
1023 h_scE_[0][1] = iBooker.
book1D(histname +
"Barrel",
" SC Energy: Barrel ",
eBin,
eMin,
eMax);
1024 h_scE_[0][2] = iBooker.
book1D(histname +
"Endcap",
" SC Energy: Endcap ",
eBin,
eMin,
eMax);
1027 h_psE_ = iBooker.
book1D(histname +
"Endcap",
" ES Energy ",
eBin,
eMin, 50.);
1040 if (!isRunCentrally_) {
1041 histname =
"r9ConvFromMC";
1046 histname =
"r9ConvFromReco";
1051 histname =
"EtR9Less093";
1052 h_EtR9Less093_[0][0] = iBooker.
book1D(histname +
"All",
" r9 < 0.94 or 0.95 : All Ecal",
etBin,
etMin,
etMax);
1053 h_EtR9Less093_[0][1] = iBooker.
book1D(histname +
"Barrel",
" r9 < 0.94 : Barrel ",
etBin,
etMin,
etMax);
1054 h_EtR9Less093_[0][2] = iBooker.
book1D(histname +
"Endcap",
" r9 < 0.95 : Endcap ",
etBin,
etMin,
etMax);
1055 histname =
"EtR9Less093Conv";
1056 h_EtR9Less093_[1][0] =
1058 h_EtR9Less093_[1][1] =
1060 h_EtR9Less093_[1][2] =
1065 histname =
"pR9VsEta";
1067 histname +
"All",
" All photons r9 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
1069 histname +
"Unconv",
" Unconv photons r9 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
1071 histname +
"Conv",
" Conv photons r9 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
1073 histname =
"R9VsEt";
1074 if (!isRunCentrally_)
1076 iBooker.
book2D(histname +
"All",
" All photons r9 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
1077 if (!isRunCentrally_)
1079 iBooker.
book2D(histname +
"Unconv",
" All photons r9 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
1086 histname =
"R1VsEta";
1087 if (!isRunCentrally_)
1088 h2_r1VsEta_[0] = iBooker.
book2D(
1089 histname +
"All",
" All photons e1x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
1090 if (!isRunCentrally_)
1091 h2_r1VsEta_[1] = iBooker.
book2D(
1092 histname +
"Unconv",
" All photons e1x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
1094 histname =
"R1VsEt";
1095 if (!isRunCentrally_)
1097 iBooker.
book2D(histname +
"All",
" All photons e1x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
1098 if (!isRunCentrally_)
1099 h2_r1VsEt_[1] = iBooker.
book2D(
1100 histname +
"Unconv",
" All photons e1x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
1107 histname =
"R2VsEta";
1108 if (!isRunCentrally_)
1109 h2_r2VsEta_[0] = iBooker.
book2D(
1110 histname +
"All",
" All photons e2x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
1111 if (!isRunCentrally_)
1112 h2_r2VsEta_[1] = iBooker.
book2D(
1113 histname +
"Unconv",
" All photons e2x5/e5x5 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 1.1);
1115 histname =
"R2VsEt";
1116 if (!isRunCentrally_)
1118 iBooker.
book2D(histname +
"All",
" All photons e2x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
1119 if (!isRunCentrally_)
1120 h2_r2VsEt_[1] = iBooker.
book2D(
1121 histname +
"Unconv",
" All photons e2x5/e5x5 vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 1.1);
1123 histname =
"sigmaIetaIeta";
1124 h_sigmaIetaIeta_[0][0] = iBooker.
book1D(histname +
"All",
"sigmaIetaIeta: All Ecal", 100, 0., 0.1);
1125 h_sigmaIetaIeta_[0][1] = iBooker.
book1D(histname +
"Barrel",
"sigmaIetaIeta: Barrel ", 100, 0., 0.05);
1126 h_sigmaIetaIeta_[0][2] = iBooker.
book1D(histname +
"Endcap",
"sigmaIetaIeta: Endcap ", 100, 0., 0.1);
1128 histname =
"sigmaIetaIetaVsEta";
1129 if (!isRunCentrally_)
1130 h2_sigmaIetaIetaVsEta_[0] = iBooker.
book2D(
1131 histname +
"All",
" All photons sigmaIetaIeta vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
1132 if (!isRunCentrally_)
1133 h2_sigmaIetaIetaVsEta_[1] = iBooker.
book2D(
1134 histname +
"Unconv",
" All photons sigmaIetaIeta vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
1136 histname =
"sigmaIetaIetaVsEt";
1137 if (!isRunCentrally_)
1138 h2_sigmaIetaIetaVsEt_[0] = iBooker.
book2D(
1139 histname +
"All",
" All photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
1140 if (!isRunCentrally_)
1141 h2_sigmaIetaIetaVsEt_[1] = iBooker.
book2D(
1142 histname +
"Unconv",
" All photons sigmaIetaIeta vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
1144 histname =
"hOverE";
1145 h_hOverE_[0][0] = iBooker.
book1D(histname +
"All",
"H/E: All Ecal", 100, 0., 0.1);
1146 h_hOverE_[0][1] = iBooker.
book1D(histname +
"Barrel",
"H/E: Barrel ", 100, 0., 0.1);
1147 h_hOverE_[0][2] = iBooker.
book1D(histname +
"Endcap",
"H/E: Endcap ", 100, 0., 0.1);
1149 histname =
"newhOverE";
1150 h_newhOverE_[0][0] = iBooker.
book1D(histname +
"All",
"new H/E: All Ecal", 100, 0., 0.1);
1151 h_newhOverE_[0][1] = iBooker.
book1D(histname +
"Barrel",
"new H/E: Barrel ", 100, 0., 0.1);
1152 h_newhOverE_[0][2] = iBooker.
book1D(histname +
"Endcap",
"new H/E: Endcap ", 100, 0., 0.1);
1155 if (!isRunCentrally_) {
1156 histname =
"hOverEVsEta";
1157 h2_hOverEVsEta_[0] =
1159 h2_hOverEVsEta_[1] = iBooker.
book2D(
1160 histname +
"Unconv",
" All photons H/E vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
1162 histname =
"hOverEVsEt";
1164 iBooker.
book2D(histname +
"All",
" All photons H/E vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
1166 iBooker.
book2D(histname +
"Unconv",
" All photons H/E vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
1169 histname =
"pHoverEVsEta";
1171 histname +
"All",
" All photons H/E vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
1173 histname +
"Unconv",
" All photons H/E vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
1175 histname =
"pHoverEVsEt";
1181 histname =
"pnewHoverEVsEta";
1183 histname +
"All",
" All photons new H/E vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
1185 histname +
"Unconv",
" All photons new H/E vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 0.1);
1187 histname =
"pnewHoverEVsEt";
1188 p_newhOverEVsEt_[0] =
1191 histname +
"Unconv",
" All photons new H/E vs Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0., 0.1);
1193 histname =
"ecalRecHitSumEtConeDR04";
1194 h_ecalRecHitSumEtConeDR04_[0][0] =
1195 iBooker.
book1D(histname +
"All",
"ecalRecHitSumEtDR04: All Ecal",
etBin,
etMin, 20.);
1196 h_ecalRecHitSumEtConeDR04_[0][1] =
1197 iBooker.
book1D(histname +
"Barrel",
"ecalRecHitSumEtDR04: Barrel ",
etBin,
etMin, 20.);
1198 h_ecalRecHitSumEtConeDR04_[0][2] =
1199 iBooker.
book1D(histname +
"Endcap",
"ecalRecHitSumEtDR04: Endcap ",
etBin,
etMin, 20.);
1202 if (!isRunCentrally_) {
1203 histname =
"ecalRecHitSumEtConeDR04VsEta";
1204 h2_ecalRecHitSumEtConeDR04VsEta_[0] = iBooker.
book2D(histname +
"All",
1205 " All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ",
1212 h2_ecalRecHitSumEtConeDR04VsEta_[1] = iBooker.
book2D(histname +
"Unconv",
1213 " All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ",
1221 histname =
"pEcalRecHitSumEtConeDR04VsEta";
1222 p_ecalRecHitSumEtConeDR04VsEta_[0] = iBooker.
bookProfile(histname +
"All",
1223 "All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ",
1231 p_ecalRecHitSumEtConeDR04VsEta_[1] = iBooker.
bookProfile(histname +
"Unconv",
1232 "All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ",
1241 if (!isRunCentrally_) {
1242 histname =
"ecalRecHitSumEtConeDR04VsEt";
1243 h2_ecalRecHitSumEtConeDR04VsEt_[0] = iBooker.
book2D(histname +
"All",
1244 " All photons ecalRecHitSumEtDR04 vs Et: all Ecal ",
1251 h2_ecalRecHitSumEtConeDR04VsEt_[1] = iBooker.
book2D(histname +
"Barrel",
1252 " All photons ecalRecHitSumEtDR04 vs Et: Barrel ",
1259 h2_ecalRecHitSumEtConeDR04VsEt_[2] = iBooker.
book2D(histname +
"Endcap",
1260 " All photons ecalRecHitSumEtDR04 vs Et: Endcap ",
1268 histname =
"pEcalRecHitSumEtConeDR04VsEt";
1269 if (!isRunCentrally_)
1270 p_ecalRecHitSumEtConeDR04VsEt_[0] = iBooker.
bookProfile(histname +
"All",
1271 "All photons ecalRecHitSumEtDR04 vs Et: all Ecal ",
1279 p_ecalRecHitSumEtConeDR04VsEt_[1] = iBooker.
bookProfile(histname +
"Barrel",
1280 "All photons ecalRecHitSumEtDR04 vs Et: all Ecal ",
1288 p_ecalRecHitSumEtConeDR04VsEt_[2] = iBooker.
bookProfile(histname +
"Endcap",
1289 "All photons ecalRecHitSumEtDR04 vs Et: all Ecal ",
1298 histname =
"hcalTowerSumEtConeDR04";
1299 h_hcalTowerSumEtConeDR04_[0][0] =
1300 iBooker.
book1D(histname +
"All",
"hcalTowerSumEtConeDR04: All Ecal",
etBin,
etMin, 20.);
1301 h_hcalTowerSumEtConeDR04_[0][1] =
1302 iBooker.
book1D(histname +
"Barrel",
"hcalTowerSumEtConeDR04: Barrel ",
etBin,
etMin, 20.);
1303 h_hcalTowerSumEtConeDR04_[0][2] =
1304 iBooker.
book1D(histname +
"Endcap",
"hcalTowerSumEtConeDR04: Endcap ",
etBin,
etMin, 20.);
1306 histname =
"hcalTowerBcSumEtConeDR04";
1307 if (!isRunCentrally_)
1308 h_hcalTowerBcSumEtConeDR04_[0][0] =
1309 iBooker.
book1D(histname +
"All",
"hcalTowerBcSumEtConeDR04: All Ecal",
etBin,
etMin, 20.);
1310 h_hcalTowerBcSumEtConeDR04_[0][1] =
1311 iBooker.
book1D(histname +
"Barrel",
"hcalTowerBcSumEtConeDR04: Barrel ",
etBin,
etMin, 20.);
1312 h_hcalTowerBcSumEtConeDR04_[0][2] =
1313 iBooker.
book1D(histname +
"Endcap",
"hcalTowerBcSumEtConeDR04: Endcap ",
etBin,
etMin, 20.);
1316 if (!isRunCentrally_) {
1317 histname =
"hcalTowerSumEtConeDR04VsEta";
1318 h2_hcalTowerSumEtConeDR04VsEta_[0] = iBooker.
book2D(histname +
"All",
1319 " All photons hcalTowerSumEtConeDR04 vs #eta: all Ecal ",
1326 h2_hcalTowerSumEtConeDR04VsEta_[1] = iBooker.
book2D(histname +
"Unconv",
1327 " All photons hcalTowerSumEtConeDR04 vs #eta: all Ecal ",
1335 histname =
"pHcalTowerSumEtConeDR04VsEta";
1336 p_hcalTowerSumEtConeDR04VsEta_[0] = iBooker.
bookProfile(histname +
"All",
1337 "All photons hcalTowerSumEtDR04 vs #eta: all Ecal ",
1345 p_hcalTowerSumEtConeDR04VsEta_[1] = iBooker.
bookProfile(histname +
"Unconv",
1346 "All photons hcalTowerSumEtDR04 vs #eta: all Ecal ",
1354 histname =
"pHcalTowerBcSumEtConeDR04VsEta";
1355 p_hcalTowerBcSumEtConeDR04VsEta_[0] = iBooker.
bookProfile(histname +
"All",
1356 "All photons hcalTowerBcSumEtDR04 vs #eta: all Ecal ",
1364 p_hcalTowerBcSumEtConeDR04VsEta_[1] = iBooker.
bookProfile(histname +
"Unconv",
1365 "All photons hcalTowerBcSumEtDR04 vs #eta: all Ecal ",
1374 if (!isRunCentrally_) {
1375 histname =
"hcalTowerSumEtConeDR04VsEt";
1376 h2_hcalTowerSumEtConeDR04VsEt_[0] = iBooker.
book2D(histname +
"All",
1377 " All photons hcalTowerSumEtConeDR04 vs Et: all Ecal ",
1384 h2_hcalTowerSumEtConeDR04VsEt_[1] = iBooker.
book2D(histname +
"Barrel",
1385 " All photons hcalTowerSumEtConeDR04 vs Et: Barrel ",
1392 h2_hcalTowerSumEtConeDR04VsEt_[2] = iBooker.
book2D(histname +
"Endcap",
1393 " All photons hcalTowerSumEtConeDR04 vs Et: Endcap ",
1401 histname =
"pHcalTowerSumEtConeDR04VsEt";
1402 if (!isRunCentrally_)
1403 p_hcalTowerSumEtConeDR04VsEt_[0] = iBooker.
bookProfile(histname +
"All",
1404 "All photons hcalTowerSumEtDR04 vs Et: all Ecal ",
1412 p_hcalTowerSumEtConeDR04VsEt_[1] = iBooker.
bookProfile(histname +
"Barrel",
1413 "All photons hcalTowerSumEtDR04 vs Et: all Ecal ",
1421 p_hcalTowerSumEtConeDR04VsEt_[2] = iBooker.
bookProfile(histname +
"Endcap",
1422 "All photons hcalTowerSumEtDR04 vs Et: all Ecal ",
1431 histname =
"pHcalTowerBcSumEtConeDR04VsEt";
1432 if (!isRunCentrally_)
1433 p_hcalTowerBcSumEtConeDR04VsEt_[0] = iBooker.
bookProfile(histname +
"All",
1434 "All photons hcalTowerBcSumEtDR04 vs Et: all Ecal ",
1442 p_hcalTowerBcSumEtConeDR04VsEt_[1] = iBooker.
bookProfile(histname +
"Barrel",
1443 "All photons hcalTowerBcSumEtDR04 vs Et: all Ecal ",
1451 p_hcalTowerBcSumEtConeDR04VsEt_[2] = iBooker.
bookProfile(histname +
"Endcap",
1452 "All photons hcalTowerBcSumEtDR04 vs Et: all Ecal ",
1462 histname =
"isoTrkSolidConeDR04";
1463 h_isoTrkSolidConeDR04_[0][0] =
1465 h_isoTrkSolidConeDR04_[0][1] =
1467 h_isoTrkSolidConeDR04_[0][2] =
1471 histname =
"isoTrkSolidConeDR04VsEta";
1472 if (!isRunCentrally_)
1473 h2_isoTrkSolidConeDR04VsEta_[0] = iBooker.
book2D(histname +
"All",
1474 " All photons isoTrkSolidConeDR04 vs #eta: all Ecal ",
1481 if (!isRunCentrally_)
1482 h2_isoTrkSolidConeDR04VsEta_[1] = iBooker.
book2D(histname +
"Unconv",
1483 " All photons isoTrkSolidConeDR04 vs #eta: all Ecal ",
1492 histname =
"isoTrkSolidConeDR04VsEt";
1493 if (!isRunCentrally_)
1494 h2_isoTrkSolidConeDR04VsEt_[0] = iBooker.
book2D(histname +
"All",
1495 " All photons isoTrkSolidConeDR04 vs Et: all Ecal ",
1502 if (!isRunCentrally_)
1503 h2_isoTrkSolidConeDR04VsEt_[1] = iBooker.
book2D(histname +
"Unconv",
1504 " All photons isoTrkSolidConeDR04 vs Et: all Ecal ",
1512 histname =
"nTrkSolidConeDR04";
1513 h_nTrkSolidConeDR04_[0][0] = iBooker.
book1D(histname +
"All",
"nTrkSolidConeDR04: All Ecal", 20, 0., 20);
1514 h_nTrkSolidConeDR04_[0][1] = iBooker.
book1D(histname +
"Barrel",
"nTrkSolidConeDR04: Barrel ", 20, 0., 20);
1515 h_nTrkSolidConeDR04_[0][2] = iBooker.
book1D(histname +
"Endcap",
"nTrkSolidConeDR04: Endcap ", 20, 0., 20);
1517 histname =
"nTrkSolidConeDR04VsEta";
1518 if (!isRunCentrally_)
1519 h2_nTrkSolidConeDR04VsEta_[0] = iBooker.
book2D(
1520 histname +
"All",
" All photons nTrkSolidConeDR04 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 20, 0., 20);
1521 if (!isRunCentrally_)
1522 h2_nTrkSolidConeDR04VsEta_[1] = iBooker.
book2D(
1523 histname +
"Unconv",
" All photons nTrkSolidConeDR04 vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 20, 0., 20);
1525 histname =
"nTrkSolidConeDR04VsEt";
1526 if (!isRunCentrally_)
1527 h2_nTrkSolidConeDR04VsEt_[0] = iBooker.
book2D(
1528 histname +
"All",
" All photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
1529 if (!isRunCentrally_)
1530 h2_nTrkSolidConeDR04VsEt_[1] = iBooker.
book2D(
1531 histname +
"Unconv",
" All photons nTrkSolidConeDR04 vs Et: all Ecal ",
etBin,
etMin,
etMax, 20, 0., 20);
1534 h_phoE_[0][0] = iBooker.
book1D(histname +
"All",
" Photon Energy: All ecal ",
eBin,
eMin,
eMax);
1535 h_phoE_[0][1] = iBooker.
book1D(histname +
"Barrel",
" Photon Energy: barrel ",
eBin,
eMin,
eMax);
1536 h_phoE_[0][2] = iBooker.
book1D(histname +
"Endcap",
" Photon Energy: Endcap ",
eBin,
eMin,
eMax);
1539 h_phoEt_[0][0] = iBooker.
book1D(histname +
"All",
" Photon Transverse Energy: All ecal ",
etBin,
etMin,
etMax);
1540 h_phoEt_[0][1] = iBooker.
book1D(histname +
"Barrel",
" Photon Transverse Energy: Barrel ",
etBin,
etMin,
etMax);
1541 h_phoEt_[0][2] = iBooker.
book1D(histname +
"Endcap",
" Photon Transverse Energy: Endcap ",
etBin,
etMin,
etMax);
1551 h_phoERes_[1][0] = iBooker.
book1D(
1552 histname +
"unconvAll",
" Photon E/E_{true} if r9>0.94, 0.95: All ecal; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
1553 h_phoERes_[1][1] = iBooker.
book1D(
1554 histname +
"unconvBarrel",
" Photon E/E_{true} if r9>0.94: Barrel; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
1555 h_phoERes_[1][2] = iBooker.
book1D(
1556 histname +
"unconvEndcap",
" Photon E/E_{true} if r9>0.95: Endcap; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
1558 h_phoERes_[2][0] = iBooker.
book1D(
1559 histname +
"convAll",
" Photon E/E_{true} if r9<0.0.94, 0.95: All ecal; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
1560 h_phoERes_[2][1] = iBooker.
book1D(
1561 histname +
"convBarrel",
" Photon E/E_{true} if r9<0.94: Barrel; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
1562 h_phoERes_[2][2] = iBooker.
book1D(
1563 histname +
"convEndcap",
" Photon E/E_{true} if r9<0.95: Endcap; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
1565 histname =
"sigmaEoE";
1566 h_phoSigmaEoE_[0][0] = iBooker.
book1D(histname +
"All",
"#sigma_{E}/E: All ecal; #sigma_{E}/E", 100, 0., 0.08);
1567 h_phoSigmaEoE_[0][1] = iBooker.
book1D(histname +
"Barrel",
"#sigma_{E}/E: Barrel; #sigma_{E}/E", 100, 0., 0.08);
1568 h_phoSigmaEoE_[0][2] = iBooker.
book1D(histname +
"Endcap",
"#sigma_{E}/E: Endcap, #sigma_{E}/E", 100, 0., 0.08);
1570 h_phoSigmaEoE_[1][0] =
1571 iBooker.
book1D(histname +
"unconvAll",
"#sigma_{E}/E if r9>0.94, 0.95: All ecal; #sigma_{E}/E", 100, 0., 0.08);
1572 h_phoSigmaEoE_[1][1] =
1573 iBooker.
book1D(histname +
"unconvBarrel",
"#sigma_{E}/E if r9>0.94: Barrel; #sigma_{E}/E", 100, 0., 0.08);
1574 h_phoSigmaEoE_[1][2] =
1575 iBooker.
book1D(histname +
"unconvEndcap",
"#sigma_{E}/E r9>0.95: Endcap; #sigma_{E}/E", 100, 0., 0.08);
1577 h_phoSigmaEoE_[2][0] =
1578 iBooker.
book1D(histname +
"convAll",
"#sigma_{E}/E if r9<0.0.94, 0.95: All ecal, #sigma_{E}/E", 100, 0., 0.08);
1579 h_phoSigmaEoE_[2][1] =
1580 iBooker.
book1D(histname +
"convBarrel",
"#sigma_{E}/E if r9<0.94: Barrel, #sigma_{E}/E", 100, 0., 0.08);
1581 h_phoSigmaEoE_[2][2] =
1582 iBooker.
book1D(histname +
"convEndcap",
"#sigma_{E}/E if r9<0.95: Endcap, #sigma_{E}/E", 100, 0., 0.08);
1584 histname =
"eResVsEta";
1585 if (!isRunCentrally_)
1586 h2_eResVsEta_[0] = iBooker.
book2D(
1587 histname +
"All",
" All photons E/Etrue vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 2.5);
1588 if (!isRunCentrally_)
1589 h2_eResVsEta_[1] = iBooker.
book2D(
1590 histname +
"Unconv",
" Unconv photons E/Etrue vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 2.5);
1592 histname =
"pEResVsEta";
1595 p_eResVsEta_[1] = iBooker.
bookProfile(histname +
"Unconv",
1596 "Unconv photons E/Etrue vs #eta: all Ecal",
1607 histname =
"pSigmaEoEVsEta";
1608 p_sigmaEoEVsEta_[0] = iBooker.
bookProfile(histname +
"All",
1609 "All photons: #sigma_{E}/E vs #eta: all Ecal; #eta; #sigma_{E}/E",
1617 p_sigmaEoEVsEta_[1] = iBooker.
bookProfile(histname +
"Unconv",
1618 "Unconv photons #sigma_{E}/E vs #eta: all Ecal; #eta; #sigma_{E}/E ",
1626 p_sigmaEoEVsEta_[2] = iBooker.
bookProfile(histname +
"Conv",
1627 "Conv photons #sigma_{E}/E vs #eta: all Ecal; #eta; #sigma_{E}/E",
1636 histname =
"pSigmaEoEVsEt";
1637 p_sigmaEoEVsEt_[1][0] = iBooker.
bookProfile(histname +
"Barrel",
1638 "All photons #sigma_{E}/E vs E_{T}: Barrel; E_{T} (GeV); #sigma_{E}/E ",
1646 p_sigmaEoEVsEt_[1][1] =
1648 "Unconv photons #sigma_{E}/E vs E_{T}: Barrel; E_{T} (GeV); #sigma_{E}/E ",
1656 p_sigmaEoEVsEt_[1][2] = iBooker.
bookProfile(histname +
"convBarrel",
1657 "Conv photons #sigma_{E}/E vs E_{T}: Barrel; E_{T} (GeV); #sigma_{E}/E",
1665 p_sigmaEoEVsEt_[2][0] = iBooker.
bookProfile(histname +
"Endcap",
1666 "All photons #sigma_{E}/E vs E_{T}: Endcap; E_{T} (GeV); #sigma_{E}/E ",
1674 p_sigmaEoEVsEt_[2][1] =
1676 "Unconv photons #sigma_{E}/E vs E_{T}: Endcap; E_{T} (GeV); #sigma_{E}/E ",
1684 p_sigmaEoEVsEt_[2][2] = iBooker.
bookProfile(histname +
"convEndcap",
1685 "Conv photons #sigma_{E}/E vs E_{T}: Endcap; E_{T} (GeV); #sigma_{E}/E",
1694 histname =
"pSigmaEoEVsNVtx";
1695 p_sigmaEoEVsNVtx_[1][0] = iBooker.
bookProfile(histname +
"Barrel",
1696 "All photons: #sigma_{E}/E vs N_{vtx}: Barrel; N_{vtx}; #sigma_{E}/E",
1704 p_sigmaEoEVsNVtx_[1][1] =
1706 "Unconv photons #sigma_{E}/E vs N_{vtx}: Barrel; N_{vtx}; #sigma_{E}/E ",
1714 p_sigmaEoEVsNVtx_[1][2] = iBooker.
bookProfile(histname +
"convBarrel",
1715 "Conv photons #sigma_{E}/E vs N_{vtx}: Barrel; N_{vtx}; #sigma_{E}/E",
1723 p_sigmaEoEVsNVtx_[2][0] = iBooker.
bookProfile(histname +
"Endcap",
1724 "All photons: #sigma_{E}/E vs N_{vtx}: Endcap; N_{vtx}; #sigma_{E}/E",
1732 p_sigmaEoEVsNVtx_[2][1] =
1734 "Unconv photons #sigma_{E}/E vs N_{vtx}: Endcap; N_{vtx}; #sigma_{E}/E ",
1742 p_sigmaEoEVsNVtx_[2][2] = iBooker.
bookProfile(histname +
"convEndcap",
1743 "Conv photons #sigma_{E}/E vs N_{vtx}: Endcap; N_{vtx}; #sigma_{E}/E",
1752 if (!isRunCentrally_) {
1753 histname =
"eResVsEt";
1754 h2_eResVsEt_[0][0] = iBooker.
book2D(
1755 histname +
"All",
" All photons E/Etrue vs true Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1756 h2_eResVsEt_[0][1] = iBooker.
book2D(
1757 histname +
"unconv",
" All photons E/Etrue vs true Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1758 h2_eResVsEt_[0][2] = iBooker.
book2D(
1759 histname +
"conv",
" All photons E/Etrue vs true Et: all Ecal ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1760 h2_eResVsEt_[1][0] = iBooker.
book2D(
1761 histname +
"Barrel",
" All photons E/Etrue vs true Et: Barrel ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1762 h2_eResVsEt_[1][1] = iBooker.
book2D(
1763 histname +
"unconvBarrel",
" All photons E/Etrue vs true Et: Barrel ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1764 h2_eResVsEt_[1][2] = iBooker.
book2D(
1765 histname +
"convBarrel",
" All photons E/Etrue vs true Et: Barrel ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1766 h2_eResVsEt_[2][0] = iBooker.
book2D(
1767 histname +
"Endcap",
" All photons E/Etrue vs true Et: Endcap ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1768 h2_eResVsEt_[2][1] = iBooker.
book2D(
1769 histname +
"unconvEndcap",
" All photons E/Etrue vs true Et: Endcap ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1770 h2_eResVsEt_[2][2] = iBooker.
book2D(
1771 histname +
"convEndcap",
" All photons E/Etrue vs true Et: Endcap ",
etBin,
etMin,
etMax, 100, 0.9, 1.1);
1774 histname =
"pEResVsEt";
1794 histname =
"pEResVsNVtx";
1795 p_eResVsNVtx_[1][0] = iBooker.
bookProfile(histname +
"Barrel",
1796 "All photons E/E_{true} vs N_{vtx}: Barrel; N_{vtx}; E}/E_{true}",
1804 p_eResVsNVtx_[1][1] =
1806 "Unconverted photons E/E_{true} vs N_{vtx}: Barrel; N_{vtx}; E}/E_{true} ",
1814 p_eResVsNVtx_[1][2] =
1816 " Converted photons E/E_{true} vs N_{vtx}: Barrel; N_{vtx}; E}/E_{true} ",
1824 p_eResVsNVtx_[2][0] = iBooker.
bookProfile(histname +
"Endcap",
1825 "All photons E/E_{true} vs N_{vtx}: Endcap; N_{vtx}; E}/E_{true} ",
1833 p_eResVsNVtx_[2][1] =
1835 "Uncoverted photons E/E_{true} vs N_{vtx}: Endcap; N_{vtx}; E}/E_{true} ",
1843 p_eResVsNVtx_[2][2] = iBooker.
bookProfile(histname +
"convEndcap",
1844 "Converted photons E/E_{true} vs N_{vtx}: Endcap; N_{vtx}; E}/E_{true} ",
1853 histname =
"eResVsR9";
1854 if (!isRunCentrally_)
1855 h2_eResVsR9_[0] = iBooker.
book2D(
1856 histname +
"All",
" All photons E/Etrue vs R9: all Ecal ",
r9Bin * 2,
r9Min,
r9Max, 100, 0., 2.5);
1857 if (!isRunCentrally_)
1858 h2_eResVsR9_[1] = iBooker.
book2D(
1859 histname +
"Barrel",
" All photons E/Etrue vs R9: Barrel ",
r9Bin * 2,
r9Min,
r9Max, 100, 0., 2.5);
1860 if (!isRunCentrally_)
1861 h2_eResVsR9_[2] = iBooker.
book2D(
1862 histname +
"Endcap",
" All photons E/Etrue vs R9: Endcap ",
r9Bin * 2,
r9Min,
r9Max, 100, 0., 2.5);
1863 histname =
"pEResVsR9";
1864 if (!isRunCentrally_)
1871 histname =
"sceResVsR9";
1872 if (!isRunCentrally_)
1873 h2_sceResVsR9_[0] = iBooker.
book2D(
1874 histname +
"All",
" All photons scE/Etrue vs R9: all Ecal ",
r9Bin * 2,
r9Min,
r9Max, 100, 0., 2.5);
1875 if (!isRunCentrally_)
1876 h2_sceResVsR9_[1] = iBooker.
book2D(
1877 histname +
"Barrel",
" All photons scE/Etrue vs R9: Barrel ",
r9Bin * 2,
r9Min,
r9Max, 100, 0., 2.5);
1878 if (!isRunCentrally_)
1879 h2_sceResVsR9_[2] = iBooker.
book2D(
1880 histname +
"Endcap",
" All photons scE/Etrue vs R9: Endcap ",
r9Bin * 2,
r9Min,
r9Max, 100, 0., 2.5);
1881 histname =
"scpEResVsR9";
1882 if (!isRunCentrally_)
1883 p_sceResVsR9_[0] = iBooker.
bookProfile(histname +
"All",
1884 " All photons scE/Etrue vs R9: all Ecal ",
1892 p_sceResVsR9_[1] = iBooker.
bookProfile(histname +
"Barrel",
1893 " All photons scE/Etrue vs R9: Barrel ",
1901 p_sceResVsR9_[2] = iBooker.
bookProfile(histname +
"Endcap",
1902 " All photons scE/Etrue vs R9: Endcap ",
1912 histname =
"eResRegr1";
1913 h_phoEResRegr1_[0][0] =
1915 h_phoEResRegr1_[0][1] =
1917 h_phoEResRegr1_[0][2] =
1920 h_phoEResRegr1_[1][0] = iBooker.
book1D(histname +
"unconvAll",
1921 " Photon rec/true Energy from Regression1 if r9>0.94, 0.95: All ecal ",
1925 h_phoEResRegr1_[1][1] = iBooker.
book1D(
1926 histname +
"unconvBarrel",
" Photon rec/true Energy from Regression1 if r9>0.94: Barrel ",
resBin,
resMin,
resMax);
1927 h_phoEResRegr1_[1][2] = iBooker.
book1D(
1928 histname +
"unconvEndcap",
" Photon rec/true Energy from Regression1 if r9>0.95: Endcap ",
resBin,
resMin,
resMax);
1930 h_phoEResRegr1_[2][0] = iBooker.
book1D(histname +
"convAll",
1931 " Photon rec/true Energy from Regression1if r9<0.0.94, 0.95: All ecal ",
1935 h_phoEResRegr1_[2][1] = iBooker.
book1D(
1936 histname +
"convBarrel",
" Photon rec/true Energy from Regression1 if r9<0.94: Barrel ",
resBin,
resMin,
resMax);
1937 h_phoEResRegr1_[2][2] = iBooker.
book1D(
1938 histname +
"convEndcap",
" Photon rec/true Energy from Regression1 if r9<0.95: Endcap ",
resBin,
resMin,
resMax);
1940 histname =
"eResRegr2";
1941 h_phoEResRegr2_[0][0] =
1943 h_phoEResRegr2_[0][1] =
1945 h_phoEResRegr2_[0][2] =
1948 h_phoEResRegr2_[1][0] = iBooker.
book1D(histname +
"unconvAll",
1949 " Photon rec/true Energy from Regression2 if r9>0.94, 0.95: All ecal ",
1953 h_phoEResRegr2_[1][1] = iBooker.
book1D(
1954 histname +
"unconvBarrel",
" Photon rec/true Energy from Regression2 if r9>0.94: Barrel ",
resBin,
resMin,
resMax);
1955 h_phoEResRegr2_[1][2] = iBooker.
book1D(
1956 histname +
"unconvEndcap",
" Photon rec/true Energy from Regression2 if r9>0.95: Endcap ",
resBin,
resMin,
resMax);
1958 h_phoEResRegr2_[2][0] = iBooker.
book1D(histname +
"convAll",
1959 " Photon rec/true Energy from Regression2 if r9<0.0.94, 0.95: All ecal ",
1963 h_phoEResRegr2_[2][1] = iBooker.
book1D(
1964 histname +
"convBarrel",
" Photon rec/true Energy from Regression2 if r9<0.94: Barrel ",
resBin,
resMin,
resMax);
1965 h_phoEResRegr2_[2][2] = iBooker.
book1D(
1966 histname +
"convEndcap",
" Photon rec/true Energy from Regression2 if r9<0.95: Endcap ",
resBin,
resMin,
resMax);
1968 histname =
"phoPixSeedSize";
1969 h_phoPixSeedSize_[0] = iBooker.
book1D(histname +
"Barrel",
"Pixel seeds size ", 100, 0., 100.);
1970 h_phoPixSeedSize_[1] = iBooker.
book1D(histname +
"Endcap",
"Pixel seeds size ", 100, 0., 100.);
1973 histname =
"chargedHadIso";
1974 h_chHadIso_[0] = iBooker.
book1D(histname +
"All",
"PF chargedHadIso: All Ecal",
etBin,
etMin, 20.);
1975 h_chHadIso_[1] = iBooker.
book1D(histname +
"Barrel",
"PF chargedHadIso: Barrel",
etBin,
etMin, 20.);
1976 h_chHadIso_[2] = iBooker.
book1D(histname +
"Endcap",
"PF chargedHadIso: Endcap",
etBin,
etMin, 20.);
1977 histname =
"neutralHadIso";
1978 h_nHadIso_[0] = iBooker.
book1D(histname +
"All",
"PF neutralHadIso: All Ecal",
etBin,
etMin, 20.);
1979 h_nHadIso_[1] = iBooker.
book1D(histname +
"Barrel",
"PF neutralHadIso: Barrel",
etBin,
etMin, 20.);
1980 h_nHadIso_[2] = iBooker.
book1D(histname +
"Endcap",
"PF neutralHadIso: Endcap",
etBin,
etMin, 20.);
1981 histname =
"photonIso";
1982 h_phoIso_[0] = iBooker.
book1D(histname +
"All",
"PF photonIso: All Ecal",
etBin,
etMin, 20.);
1983 h_phoIso_[1] = iBooker.
book1D(histname +
"Barrel",
"PF photonIso: Barrel",
etBin,
etMin, 20.);
1984 h_phoIso_[2] = iBooker.
book1D(histname +
"Endcap",
"PF photonIso: Endcap",
etBin,
etMin, 20.);
1985 histname =
"nCluOutMustache";
1986 h_nCluOutsideMustache_[0] =
1987 iBooker.
book1D(histname +
"All",
"PF number of clusters outside Mustache: All Ecal", 50, 0., 50.);
1988 h_nCluOutsideMustache_[1] =
1989 iBooker.
book1D(histname +
"Barrel",
"PF number of clusters outside Mustache: Barrel", 50, 0., 50.);
1990 h_nCluOutsideMustache_[2] =
1991 iBooker.
book1D(histname +
"Endcap",
"PF number of clusters outside Mustache: Endcap", 50, 0., 50.);
1992 histname =
"etOutMustache";
1993 h_etOutsideMustache_[0] = iBooker.
book1D(histname +
"All",
"PF et outside Mustache: All Ecal",
etBin,
etMin, 20.);
1994 h_etOutsideMustache_[1] = iBooker.
book1D(histname +
"Barrel",
"PF et outside Mustache: Barrel",
etBin,
etMin, 20.);
1995 h_etOutsideMustache_[2] = iBooker.
book1D(histname +
"Endcap",
"PF et outside Mustache: Endcap",
etBin,
etMin, 20.);
1997 h_pfMva_[0] = iBooker.
book1D(histname +
"All",
"PF MVA output: All Ecal", 50, -1., 2.);
1998 h_pfMva_[1] = iBooker.
book1D(histname +
"Barrel",
"PF MVA output: Barrel", 50, -1., 2.);
1999 h_pfMva_[2] = iBooker.
book1D(histname +
"Endcap",
"PF MVA output: Endcap", 50, -1, 2.);
2001 histname =
"SumPtOverPhoPt_ChHad_Cleaned";
2002 h_SumPtOverPhoPt_ChHad_Cleaned_[0] =
2003 iBooker.
book1D(histname +
"All",
"Pf Cand SumPt/P_{T}_{#gamma}: Charged Hadrons: All Ecal",
etBin,
etMin, 2.);
2004 h_SumPtOverPhoPt_ChHad_Cleaned_[1] =
2005 iBooker.
book1D(histname +
"Barrel",
"PF Cand SumPt/P_{T}_{#gamma}: Charged Hadrons: Barrel",
etBin,
etMin, 2.);
2006 h_SumPtOverPhoPt_ChHad_Cleaned_[2] =
2007 iBooker.
book1D(histname +
"Endcap",
"PF Cand SumPt/P_{T}_{#gamma}: Charged Hadrons: Endcap",
etBin,
etMin, 2.);
2008 histname =
"SumPtOverPhoPt_NeuHad_Cleaned";
2009 h_SumPtOverPhoPt_NeuHad_Cleaned_[0] =
2010 iBooker.
book1D(histname +
"All",
"Pf Cand SumPt/P_{T}_{#gamma}: Neutral Hadrons: All Ecal",
etBin,
etMin, 2.);
2011 h_SumPtOverPhoPt_NeuHad_Cleaned_[1] =
2012 iBooker.
book1D(histname +
"Barrel",
"PF Cand SumPt/P_{T}_{#gamma}: Neutral Hadrons: Barrel",
etBin,
etMin, 2.);
2013 h_SumPtOverPhoPt_NeuHad_Cleaned_[2] =
2014 iBooker.
book1D(histname +
"Endcap",
"PF Cand SumPt/P_{T}_{#gamma}: Neutral Hadrons: Endcap",
etBin,
etMin, 2.);
2015 histname =
"SumPtOverPhoPt_Pho_Cleaned";
2016 h_SumPtOverPhoPt_Pho_Cleaned_[0] =
2017 iBooker.
book1D(histname +
"All",
"Pf Cand SumPt/P_{T}_{#gamma}: Photons: All Ecal",
etBin,
etMin, 2.);
2018 h_SumPtOverPhoPt_Pho_Cleaned_[1] =
2019 iBooker.
book1D(histname +
"Barrel",
"PF Cand SumPt/P_{T}_{#gamma}: Photons: Barrel",
etBin,
etMin, 2.);
2020 h_SumPtOverPhoPt_Pho_Cleaned_[2] =
2021 iBooker.
book1D(histname +
"Endcap",
"PF Cand SumPt/P_{T}_{#gamma}: Photons: Endcap",
etBin,
etMin, 2.);
2023 histname =
"dRPhoPFcand_ChHad_Cleaned";
2024 h_dRPhoPFcand_ChHad_Cleaned_[0] =
2025 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Charged Hadrons : All Ecal",
etBin,
etMin, 0.7);
2026 h_dRPhoPFcand_ChHad_Cleaned_[1] =
2027 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Charged Hadrons : Barrel",
etBin,
etMin, 0.7);
2028 h_dRPhoPFcand_ChHad_Cleaned_[2] =
2029 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Charged Hadrons : Endcap",
etBin,
etMin, 0.7);
2030 histname =
"dRPhoPFcand_NeuHad_Cleaned";
2031 h_dRPhoPFcand_NeuHad_Cleaned_[0] =
2032 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Neutral Hadrons : All Ecal",
etBin,
etMin, 0.7);
2033 h_dRPhoPFcand_NeuHad_Cleaned_[1] =
2034 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Neutral Hadrons : Barrel",
etBin,
etMin, 0.7);
2035 h_dRPhoPFcand_NeuHad_Cleaned_[2] =
2036 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Neutral Hadrons : Endcap",
etBin,
etMin, 0.7);
2037 histname =
"dRPhoPFcand_Pho_Cleaned";
2038 h_dRPhoPFcand_Pho_Cleaned_[0] =
2039 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Photons : All Ecal",
etBin,
etMin, 0.7);
2040 h_dRPhoPFcand_Pho_Cleaned_[1] =
2041 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Photons : Barrel",
etBin,
etMin, 0.7);
2042 h_dRPhoPFcand_Pho_Cleaned_[2] =
2043 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Photons : Endcap",
etBin,
etMin, 0.7);
2046 histname =
"SumPtOverPhoPt_ChHad_unCleaned";
2047 h_SumPtOverPhoPt_ChHad_unCleaned_[0] =
2048 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Charged Hadrons : All Ecal",
etBin,
etMin, 2.);
2049 h_SumPtOverPhoPt_ChHad_unCleaned_[1] =
2050 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Barrel",
etBin,
etMin, 2.);
2051 h_SumPtOverPhoPt_ChHad_unCleaned_[2] =
2052 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Endcap",
etBin,
etMin, 2.);
2053 histname =
"SumPtOverPhoPt_NeuHad_unCleaned";
2054 h_SumPtOverPhoPt_NeuHad_unCleaned_[0] =
2055 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Neutral Hadrons : All Ecal",
etBin,
etMin, 2.);
2056 h_SumPtOverPhoPt_NeuHad_unCleaned_[1] =
2057 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Barrel",
etBin,
etMin, 2.);
2058 h_SumPtOverPhoPt_NeuHad_unCleaned_[2] =
2059 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Endcap",
etBin,
etMin, 2.);
2060 histname =
"SumPtOverPhoPt_Pho_unCleaned";
2061 h_SumPtOverPhoPt_Pho_unCleaned_[0] =
2062 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Photons: All Ecal",
etBin,
etMin, 2.);
2063 h_SumPtOverPhoPt_Pho_unCleaned_[1] =
2064 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Photons: Barrel",
etBin,
etMin, 2.);
2065 h_SumPtOverPhoPt_Pho_unCleaned_[2] =
2066 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Photons: Endcap",
etBin,
etMin, 2.);
2067 histname =
"dRPhoPFcand_ChHad_unCleaned";
2068 h_dRPhoPFcand_ChHad_unCleaned_[0] =
2069 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Charged Hadrons : All Ecal",
etBin,
etMin, 0.7);
2070 h_dRPhoPFcand_ChHad_unCleaned_[1] =
2071 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Charged Hadrons : Barrel",
etBin,
etMin, 0.7);
2072 h_dRPhoPFcand_ChHad_unCleaned_[2] =
2073 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Charged Hadrons : Endcap",
etBin,
etMin, 0.7);
2074 histname =
"dRPhoPFcand_NeuHad_unCleaned";
2075 h_dRPhoPFcand_NeuHad_unCleaned_[0] =
2076 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Neutral Hadrons : All Ecal",
etBin,
etMin, 0.7);
2077 h_dRPhoPFcand_NeuHad_unCleaned_[1] =
2078 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Neutral Hadrons : Barrel",
etBin,
etMin, 0.7);
2079 h_dRPhoPFcand_NeuHad_unCleaned_[2] =
2080 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Neutral Hadrons : Endcap",
etBin,
etMin, 0.7);
2081 histname =
"dRPhoPFcand_Pho_unCleaned";
2082 h_dRPhoPFcand_Pho_unCleaned_[0] =
2083 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Photons: All Ecal",
etBin,
etMin, 0.7);
2084 h_dRPhoPFcand_Pho_unCleaned_[1] =
2085 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Photons: Barrel",
etBin,
etMin, 0.7);
2086 h_dRPhoPFcand_Pho_unCleaned_[2] =
2087 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Photons: Endcap",
etBin,
etMin, 0.7);
2091 histname =
"gamgamMass";
2092 h_gamgamMass_[0][0] =
2094 h_gamgamMass_[0][1] =
2096 h_gamgamMass_[0][2] =
2099 histname =
"gamgamMassNoConv";
2100 h_gamgamMass_[1][0] = iBooker.
book1D(
2102 h_gamgamMass_[1][1] = iBooker.
book1D(
2104 h_gamgamMass_[1][2] = iBooker.
book1D(
2107 histname =
"gamgamMassConv";
2108 h_gamgamMass_[2][0] = iBooker.
book1D(
2110 h_gamgamMass_[2][1] = iBooker.
book1D(
2112 h_gamgamMass_[2][2] = iBooker.
book1D(
2115 histname =
"gamgamMassRegr1";
2116 h_gamgamMassRegr1_[0][0] =
2118 h_gamgamMassRegr1_[0][1] =
2120 h_gamgamMassRegr1_[0][2] =
2123 histname =
"gamgamMassRegr1NoConv";
2124 h_gamgamMassRegr1_[1][0] = iBooker.
book1D(
2126 h_gamgamMassRegr1_[1][1] = iBooker.
book1D(histname +
"Barrel",
2127 "2 photons with no conversion invariant mass Regr1: Barrel ",
2131 h_gamgamMassRegr1_[1][2] = iBooker.
book1D(histname +
"Endcap",
2132 "2 photons with no conversion invariant mass Regr1: Endcap ",
2137 histname =
"gamgamMassRegr1Conv";
2138 h_gamgamMassRegr1_[2][0] = iBooker.
book1D(
2140 h_gamgamMassRegr1_[2][1] = iBooker.
book1D(histname +
"Barrel",
2141 "2 photons with conversion invariant mass Regr1: Barrel ",
2145 h_gamgamMassRegr1_[2][2] = iBooker.
book1D(histname +
"Endcap",
2146 "2 photons with conversion invariant mass Regr1: Endcap ",
2151 histname =
"gamgamMassRegr2";
2152 h_gamgamMassRegr2_[0][0] =
2154 h_gamgamMassRegr2_[0][1] =
2156 h_gamgamMassRegr2_[0][2] =
2159 histname =
"gamgamMassRegr2NoConv";
2160 h_gamgamMassRegr2_[1][0] = iBooker.
book1D(
2162 h_gamgamMassRegr2_[1][1] = iBooker.
book1D(histname +
"Barrel",
2163 "2 photons with no conversion invariant mass Regr2: Barrel ",
2167 h_gamgamMassRegr2_[1][2] = iBooker.
book1D(histname +
"Endcap",
2168 "2 photons with no conversion invariant mass Regr2: Endcap ",
2173 histname =
"gamgamMassRegr2Conv";
2174 h_gamgamMassRegr2_[2][0] = iBooker.
book1D(
2176 h_gamgamMassRegr2_[2][1] = iBooker.
book1D(histname +
"Barrel",
2177 "2 photons with conversion invariant mass Regr2: Barrel ",
2181 h_gamgamMassRegr2_[2][2] = iBooker.
book1D(histname +
"Endcap",
2182 "2 photons with conversion invariant mass Regr2: Endcap ",
2194 h_phoE_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
" Photon Energy: All ecal ",
eBin,
eMin,
eMax);
2195 h_phoE_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
" Photon Energy: barrel ",
eBin,
eMin,
eMax);
2196 h_phoE_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
" Photon Energy: Endcap ",
eBin,
eMin,
eMax);
2199 h_phoEt_miniAOD_[0][0] =
2200 iBooker.
book1D(histname +
"All_miniAOD",
" Photon Transverse Energy: All ecal ",
etBin,
etMin,
etMax);
2201 h_phoEt_miniAOD_[0][1] =
2202 iBooker.
book1D(histname +
"Barrel_miniAOD",
" Photon Transverse Energy: Barrel ",
etBin,
etMin,
etMax);
2203 h_phoEt_miniAOD_[0][2] =
2204 iBooker.
book1D(histname +
"Endcap_miniAOD",
" Photon Transverse Energy: Endcap ",
etBin,
etMin,
etMax);
2207 h_phoERes_miniAOD_[0][0] = iBooker.
book1D(
2208 histname +
"All_miniAOD",
" Photon E/E_{true}: All ecal; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
2209 h_phoERes_miniAOD_[0][1] = iBooker.
book1D(
2210 histname +
"Barrel_miniAOD",
"Photon E/E_{true}: Barrel; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
2211 h_phoERes_miniAOD_[0][2] = iBooker.
book1D(
2212 histname +
"Endcap_miniAOD",
" Photon E/E_{true}: Endcap; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
2214 histname =
"sigmaEoE";
2215 h_phoSigmaEoE_miniAOD_[0][0] =
2216 iBooker.
book1D(histname +
"All_miniAOD",
"#sigma_{E}/E: All ecal; #sigma_{E}/E", 100, 0., 0.08);
2217 h_phoSigmaEoE_miniAOD_[0][1] =
2218 iBooker.
book1D(histname +
"Barrel_miniAOD",
"#sigma_{E}/E: Barrel; #sigma_{E}/E", 100, 0., 0.08);
2219 h_phoSigmaEoE_miniAOD_[0][2] =
2220 iBooker.
book1D(histname +
"Endcap_miniAOD",
"#sigma_{E}/E: Endcap, #sigma_{E}/E", 100, 0., 0.08);
2223 h_r9_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
" r9: All Ecal",
r9Bin,
r9Min,
r9Max);
2224 h_r9_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
" r9: Barrel ",
r9Bin,
r9Min,
r9Max);
2225 h_r9_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
" r9: Endcap ",
r9Bin,
r9Min,
r9Max);
2226 histname =
"full5x5_r9";
2227 h_full5x5_r9_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
" r9: All Ecal",
r9Bin,
r9Min,
r9Max);
2228 h_full5x5_r9_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
" r9: Barrel ",
r9Bin,
r9Min,
r9Max);
2229 h_full5x5_r9_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
" r9: Endcap ",
r9Bin,
r9Min,
r9Max);
2231 h_r1_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
" e1x5/e5x5: All Ecal",
r9Bin,
r9Min,
r9Max);
2232 h_r1_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
" e1x5/e5x5: Barrel ",
r9Bin,
r9Min,
r9Max);
2233 h_r1_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
" e1x5/e5x5: Endcap ",
r9Bin,
r9Min,
r9Max);
2235 h_r2_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
" e2x5/e5x5: All Ecal",
r9Bin,
r9Min,
r9Max);
2236 h_r2_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
" e2x5/e5x5: Barrel ",
r9Bin,
r9Min,
r9Max);
2237 h_r2_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
" e2x5/e5x5: Endcap ",
r9Bin,
r9Min,
r9Max);
2238 histname =
"hOverE";
2239 h_hOverE_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
"H/E: All Ecal", 100, 0., 0.2);
2240 h_hOverE_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"H/E: Barrel ", 100, 0., 0.2);
2241 h_hOverE_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"H/E: Endcap ", 100, 0., 0.2);
2243 histname =
"newhOverE";
2244 h_newhOverE_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
"new H/E: All Ecal", 100, 0., 0.2);
2245 h_newhOverE_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"new H/E: Barrel ", 100, 0., 0.2);
2246 h_newhOverE_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"new H/E: Endcap ", 100, 0., 0.2);
2248 histname =
"sigmaIetaIeta";
2249 h_sigmaIetaIeta_miniAOD_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
"sigmaIetaIeta: All Ecal", 100, 0., 0.1);
2250 h_sigmaIetaIeta_miniAOD_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"sigmaIetaIeta: Barrel ", 100, 0., 0.05);
2251 h_sigmaIetaIeta_miniAOD_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"sigmaIetaIeta: Endcap ", 100, 0., 0.1);
2252 histname =
"full5x5_sigmaIetaIeta";
2253 h_full5x5_sigmaIetaIeta_miniAOD_[0][0] =
2254 iBooker.
book1D(histname +
"All_miniAOD",
"Full5x5 sigmaIetaIeta: All Ecal", 100, 0., 0.1);
2255 h_full5x5_sigmaIetaIeta_miniAOD_[0][1] =
2256 iBooker.
book1D(histname +
"Barrel_miniAOD",
"Full5x5 sigmaIetaIeta: Barrel ", 100, 0., 0.05);
2257 h_full5x5_sigmaIetaIeta_miniAOD_[0][2] =
2258 iBooker.
book1D(histname +
"Endcap_miniAOD",
"Full5x5 sigmaIetaIeta: Endcap ", 100, 0., 0.1);
2260 histname =
"ecalRecHitSumEtConeDR04";
2261 h_ecalRecHitSumEtConeDR04_miniAOD_[0][0] =
2262 iBooker.
book1D(histname +
"All_miniAOD",
"ecalRecHitSumEtDR04: All Ecal",
etBin,
etMin, 20.);
2263 h_ecalRecHitSumEtConeDR04_miniAOD_[0][1] =
2264 iBooker.
book1D(histname +
"Barrel_miniAOD",
"ecalRecHitSumEtDR04: Barrel ",
etBin,
etMin, 20.);
2265 h_ecalRecHitSumEtConeDR04_miniAOD_[0][2] =
2266 iBooker.
book1D(histname +
"Endcap_miniAOD",
"ecalRecHitSumEtDR04: Endcap ",
etBin,
etMin, 20.);
2267 histname =
"hcalTowerSumEtConeDR04";
2268 h_hcalTowerSumEtConeDR04_miniAOD_[0][0] =
2269 iBooker.
book1D(histname +
"All_miniAOD",
"hcalTowerSumEtConeDR04: All Ecal",
etBin,
etMin, 20.);
2270 h_hcalTowerSumEtConeDR04_miniAOD_[0][1] =
2271 iBooker.
book1D(histname +
"Barrel_miniAOD",
"hcalTowerSumEtConeDR04: Barrel ",
etBin,
etMin, 20.);
2272 h_hcalTowerSumEtConeDR04_miniAOD_[0][2] =
2273 iBooker.
book1D(histname +
"Endcap_miniAOD",
"hcalTowerSumEtConeDR04: Endcap ",
etBin,
etMin, 20.);
2275 histname =
"hcalTowerBcSumEtConeDR04";
2276 h_hcalTowerBcSumEtConeDR04_miniAOD_[0][0] =
2277 iBooker.
book1D(histname +
"All_miniAOD",
"hcalTowerBcSumEtConeDR04: All Ecal",
etBin,
etMin, 20.);
2278 h_hcalTowerBcSumEtConeDR04_miniAOD_[0][1] =
2279 iBooker.
book1D(histname +
"Barrel_miniAOD",
"hcalTowerBcSumEtConeDR04: Barrel ",
etBin,
etMin, 20.);
2280 h_hcalTowerBcSumEtConeDR04_miniAOD_[0][2] =
2281 iBooker.
book1D(histname +
"Endcap_miniAOD",
"hcalTowerBcSumEtConeDR04: Endcap ",
etBin,
etMin, 20.);
2282 histname =
"isoTrkSolidConeDR04";
2283 h_isoTrkSolidConeDR04_miniAOD_[0][0] =
2284 iBooker.
book1D(histname +
"All_miniAOD",
"isoTrkSolidConeDR04: All Ecal",
etBin,
etMin,
etMax * 0.1);
2285 h_isoTrkSolidConeDR04_miniAOD_[0][1] =
2286 iBooker.
book1D(histname +
"Barrel_miniAOD",
"isoTrkSolidConeDR04: Barrel ",
etBin,
etMin,
etMax * 0.1);
2287 h_isoTrkSolidConeDR04_miniAOD_[0][2] =
2288 iBooker.
book1D(histname +
"Endcap_miniAOD",
"isoTrkSolidConeDR04: Endcap ",
etBin,
etMin,
etMax * 0.1);
2289 histname =
"nTrkSolidConeDR04";
2290 h_nTrkSolidConeDR04_miniAOD_[0][0] =
2291 iBooker.
book1D(histname +
"All_miniAOD",
"nTrkSolidConeDR04: All Ecal", 20, 0., 20);
2292 h_nTrkSolidConeDR04_miniAOD_[0][1] =
2293 iBooker.
book1D(histname +
"Barrel_miniAOD",
"nTrkSolidConeDR04: Barrel ", 20, 0., 20);
2294 h_nTrkSolidConeDR04_miniAOD_[0][2] =
2295 iBooker.
book1D(histname +
"Endcap_miniAOD",
"nTrkSolidConeDR04: Endcap ", 20, 0., 20);
2298 histname =
"chargedHadIso";
2299 h_chHadIso_miniAOD_[0] = iBooker.
book1D(histname +
"All_miniAOD",
"PF chargedHadIso: All Ecal",
etBin,
etMin, 20.);
2300 h_chHadIso_miniAOD_[1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"PF chargedHadIso: Barrel",
etBin,
etMin, 20.);
2301 h_chHadIso_miniAOD_[2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"PF chargedHadIso: Endcap",
etBin,
etMin, 20.);
2302 histname =
"neutralHadIso";
2303 h_nHadIso_miniAOD_[0] = iBooker.
book1D(histname +
"All_miniAOD",
"PF neutralHadIso: All Ecal",
etBin,
etMin, 20.);
2304 h_nHadIso_miniAOD_[1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"PF neutralHadIso: Barrel",
etBin,
etMin, 20.);
2305 h_nHadIso_miniAOD_[2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"PF neutralHadIso: Endcap",
etBin,
etMin, 20.);
2306 histname =
"photonIso";
2307 h_phoIso_miniAOD_[0] = iBooker.
book1D(histname +
"All_miniAOD",
"PF photonIso: All Ecal",
etBin,
etMin, 20.);
2308 h_phoIso_miniAOD_[1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"PF photonIso: Barrel",
etBin,
etMin, 20.);
2309 h_phoIso_miniAOD_[2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"PF photonIso: Endcap",
etBin,
etMin, 20.);
2314 h_nConv_[0][0] = iBooker.
book1D(histname +
"All",
2315 "Number Of two-tracks Conversions per isolated candidates per events: All Ecal ",
2319 h_nConv_[0][1] = iBooker.
book1D(histname +
"Barrel",
2320 "Number Of two-tracks Conversions per isolated candidates per events: Ecal Barrel ",
2324 h_nConv_[0][2] = iBooker.
book1D(histname +
"Endcap",
2325 "Number Of two-tracks Conversions per isolated candidates per events: Ecal Endcap ",
2329 h_nConv_[1][0] = iBooker.
book1D(histname +
"OneLegAll",
2330 "Number Of single leg Conversions per isolated candidates per events: All Ecal ",
2334 h_nConv_[1][1] = iBooker.
book1D(histname +
"OneLegBarrel",
2335 "Number Of single leg Conversions per isolated candidates per events: Ecal Barrel ",
2339 h_nConv_[1][2] = iBooker.
book1D(histname +
"OneLegEndcap",
2340 "Number Of single leg Conversions per isolated candidates per events: Ecal Endcap ",
2347 h_convEta_[2] = iBooker.
book1D(
"convEta2ass",
" converted Photon Eta =2 tracks, both ass ",
etaBin,
etaMin,
etaMax);
2350 histname =
"convERes";
2358 histname =
"p_EResVsR";
2360 histname +
"All",
" photons conversion E/Etrue vs R: all Ecal ",
rBin,
rMin,
rMax, 100, 0., 1.5,
"");
2362 histname =
"convPtRes";
2363 h_convPtRes_[1][0] =
2364 iBooker.
book1D(histname +
"All",
" Conversion Pt rec/true from tracks : All ecal ",
resBin, 0., 1.5);
2365 h_convPtRes_[1][1] =
2366 iBooker.
book1D(histname +
"Barrel",
" Conversion Pt rec/true from tracks: Barrel ",
resBin, 0., 1.5);
2367 h_convPtRes_[1][2] =
2368 iBooker.
book1D(histname +
"Endcap",
" Conversion Pt rec/true from tracks: Endcap ",
resBin, 0., 1.5);
2370 if (!isRunCentrally_) {
2371 histname =
"r9VsTracks";
2372 h_r9VsNofTracks_[0][0] = iBooker.
book2D(
2373 histname +
"All",
" photons r9 vs nTracks from conversions: All Ecal",
r9Bin,
r9Min,
r9Max, 3, -0.5, 2.5);
2374 h_r9VsNofTracks_[0][1] = iBooker.
book2D(
2375 histname +
"Barrel",
" photons r9 vs nTracks from conversions: Barrel Ecal",
r9Bin,
r9Min,
r9Max, 3, -0.5, 2.5);
2376 h_r9VsNofTracks_[0][2] = iBooker.
book2D(
2377 histname +
"Endcap",
" photons r9 vs nTracks from conversions: Endcap Ecal",
r9Bin,
r9Min,
r9Max, 3, -0.5, 2.5);
2380 histname =
"mvaOut";
2381 h_mvaOut_[0] = iBooker.
book1D(histname +
"All",
" mvaOut for all conversions : All Ecal", 100, 0., 1.);
2382 h_mvaOut_[1] = iBooker.
book1D(histname +
"Barrel",
" mvaOut for all conversions : Barrel Ecal", 100, 0., 1.);
2383 h_mvaOut_[2] = iBooker.
book1D(histname +
"Endcap",
" mvaOut for all conversions : Endcap Ecal", 100, 0., 1.);
2385 histname =
"EoverPtracks";
2386 h_EoverPTracks_[0][0] =
2388 h_EoverPTracks_[0][1] =
2390 h_EoverPTracks_[0][2] =
2393 h_EoverPTracks_[1][0] = iBooker.
book1D(histname +
"All",
" photons conversion E/p: all Ecal ", 100, 0., 5.);
2394 h_EoverPTracks_[1][1] = iBooker.
book1D(histname +
"Barrel",
" photons conversion E/p: Barrel Ecal", 100, 0., 5.);
2395 h_EoverPTracks_[1][2] = iBooker.
book1D(histname +
"Endcap",
" photons conversion E/p: Endcap Ecal ", 100, 0., 5.);
2396 histname =
"EoverP_SL";
2397 h_EoverP_SL_[0] = iBooker.
book1D(histname +
"All",
" photons single leg conversion E/p: all Ecal ", 100, 0., 5.);
2398 h_EoverP_SL_[1] = iBooker.
book1D(histname +
"Barrel",
" photons single leg conversion E/p: Barrel Ecal", 100, 0., 5.);
2400 iBooker.
book1D(histname +
"Endcap",
" photons single leg conversion E/p: Endcap Ecal ", 100, 0., 5.);
2402 histname =
"PoverEtracks";
2403 h_PoverETracks_[1][0] =
2405 h_PoverETracks_[1][1] =
2407 h_PoverETracks_[1][2] =
2410 histname =
"pEoverEtrueVsEta";
2411 p_EoverEtrueVsEta_[0] =
2413 " photons conversion with 2 (associated) reco tracks E/Etrue vs #eta: all Ecal ",
2422 histname =
"pEoverEtrueVsR";
2424 histname +
"All",
" photons conversion E/Etrue vs R: all Ecal ",
rBin,
rMin,
rMax, 100, 0., 2.5,
"");
2426 histname =
"pEoverEtrueVsEta";
2427 p_EoverEtrueVsEta_[1] = iBooker.
bookProfile(histname +
"All2",
2428 " photons conversion 2 reco tracks E/Etrue vs #eta: all Ecal ",
2437 histname =
"pPoverPtrueVsEta";
2439 histname +
"All",
" photons conversion P/Ptrue vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 5.,
"");
2441 histname =
"pEoverPVsEta";
2443 histname +
"All",
" photons conversion E/P vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 5.,
"");
2445 if (!isRunCentrally_) {
2446 histname =
"EoverEtrueVsEoverP";
2447 h2_EoverEtrueVsEoverP_[0] =
2448 iBooker.
book2D(histname +
"All",
" photons conversion E/Etrue vs E/P: all Ecal ", 100, 0., 5., 100, 0.5, 1.5);
2449 h2_EoverEtrueVsEoverP_[1] = iBooker.
book2D(
2450 histname +
"Barrel",
" photons conversion E/Etrue vs E/: Barrel Ecal", 100, 0., 5., 100, 0.5, 1.5);
2451 h2_EoverEtrueVsEoverP_[2] = iBooker.
book2D(
2452 histname +
"Endcap",
" photons conversion E/Etrue vs E/: Endcap Ecal ", 100, 0., 5., 100, 0.5, 1.5);
2453 histname =
"PoverPtrueVsEoverP";
2454 h2_PoverPtrueVsEoverP_[0] =
2455 iBooker.
book2D(histname +
"All",
" photons conversion P/Ptrue vs E/P: all Ecal ", 100, 0., 5., 100, 0., 2.5);
2456 h2_PoverPtrueVsEoverP_[1] = iBooker.
book2D(
2457 histname +
"Barrel",
" photons conversion P/Ptrue vs E/: Barrel Ecal", 100, 0., 5., 100, 0., 2.5);
2458 h2_PoverPtrueVsEoverP_[2] = iBooker.
book2D(
2459 histname +
"Endcap",
" photons conversion P/Ptrue vs E/: Endcap Ecal ", 100, 0., 5., 100, 0., 2.5);
2461 histname =
"EoverEtrueVsEta";
2462 h2_EoverEtrueVsEta_[0] =
2463 iBooker.
book2D(histname +
"All",
2464 " photons conversion with 2 (associated) reco tracks E/Etrue vs #eta: all Ecal ",
2472 histname =
"EoverEtrueVsEta";
2473 h2_EoverEtrueVsEta_[1] = iBooker.
book2D(histname +
"All2",
2474 " photons conversion 2 reco tracks E/Etrue vs #eta: all Ecal ",
2482 histname =
"EoverEtrueVsR";
2483 h2_EoverEtrueVsR_[0] =
2484 iBooker.
book2D(histname +
"All",
" photons conversion E/Etrue vs R: all Ecal ",
rBin,
rMin,
rMax, 100, 0., 2.5);
2486 histname =
"PoverPtrueVsEta";
2487 h2_PoverPtrueVsEta_[0] = iBooker.
book2D(
2488 histname +
"All",
" photons conversion P/Ptrue vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 5.);
2490 histname =
"EoverPVsEta";
2491 h2_EoverPVsEta_[0] = iBooker.
book2D(
2492 histname +
"All",
" photons conversion E/P vs #eta: all Ecal ",
etaBin2,
etaMin,
etaMax, 100, 0., 5.);
2494 histname =
"EoverPVsR";
2496 iBooker.
book2D(histname +
"All",
" photons conversion E/P vs R: all Ecal ",
rBin,
rMin,
rMax, 100, 0., 5.);
2498 histname =
"etaVsRsim";
2499 h2_etaVsRsim_[0] = iBooker.
book2D(histname +
"All",
2500 " eta(sim) vs R (sim) for associated conversions: all Ecal ",
2507 histname =
"etaVsRreco";
2508 h2_etaVsRreco_[0] = iBooker.
book2D(histname +
"All",
2509 " eta(reco) vs R (reco) for associated conversions: all Ecal ",
2518 histname =
"pEoverPVsR";
2520 histname +
"All",
" photons conversion E/P vs R: all Ecal ",
rBin,
rMin,
rMax, 100, 0., 5.,
"");
2522 histname =
"hInvMass";
2523 h_invMass_[0][0] = iBooker.
book1D(
2524 histname +
"All_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ", 100, 0., 1.5);
2525 h_invMass_[0][1] = iBooker.
book1D(
2526 histname +
"Barrel_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ", 100, 0., 1.5);
2527 h_invMass_[0][2] = iBooker.
book1D(
2528 histname +
"Endcap_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ", 100, 0., 1.5);
2529 histname =
"hInvMass";
2530 h_invMass_[1][0] = iBooker.
book1D(
2531 histname +
"All_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ", 100, 0., 1.5);
2532 h_invMass_[1][1] = iBooker.
book1D(
2533 histname +
"Barrel_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ", 100, 0., 1.5);
2534 h_invMass_[1][2] = iBooker.
book1D(
2535 histname +
"Endcap_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ", 100, 0., 1.5);
2537 histname =
"hDPhiTracksAtVtx";
2538 h_DPhiTracksAtVtx_[1][0] = iBooker.
book1D(histname +
"All",
2539 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",
2543 h_DPhiTracksAtVtx_[1][1] =
2544 iBooker.
book1D(histname +
"Barrel",
2545 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",
2549 h_DPhiTracksAtVtx_[1][2] =
2550 iBooker.
book1D(histname +
"Endcap",
2551 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",
2556 if (!isRunCentrally_) {
2557 histname =
"hDPhiTracksAtVtxVsEta";
2558 h2_DPhiTracksAtVtxVsEta_ = iBooker.
book2D(histname +
"All",
2559 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta",
2567 histname =
"hDPhiTracksAtVtxVsR";
2568 h2_DPhiTracksAtVtxVsR_ = iBooker.
book2D(histname +
"All",
2569 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R",
2577 histname =
"hDCotTracksVsEta";
2578 h2_DCotTracksVsEta_ = iBooker.
book2D(histname +
"All",
2579 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta",
2587 histname =
"hDCotTracksVsR";
2588 h2_DCotTracksVsR_ = iBooker.
book2D(histname +
"All",
2589 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R",
2597 histname =
"h2_DPhiTracksAtEcalVsR";
2598 if (fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator")
2599 h2_DPhiTracksAtEcalVsR_ = iBooker.
book2D(histname +
"All",
2600 " Photons:Tracks from conversions: #delta#phi at Ecal vs R : all Ecal ",
2608 histname =
"h2_DPhiTracksAtEcalVsEta";
2609 if (fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator")
2610 h2_DPhiTracksAtEcalVsEta_ =
2611 iBooker.
book2D(histname +
"All",
2612 " Photons:Tracks from conversions: #delta#phi at Ecal vs #eta : all Ecal ",
2621 histname =
"pDPhiTracksAtVtxVsEta";
2622 p_DPhiTracksAtVtxVsEta_ =
2624 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta ",
2633 histname =
"pDPhiTracksAtVtxVsR";
2634 p_DPhiTracksAtVtxVsR_ = iBooker.
bookProfile(histname +
"All",
2635 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R ",
2644 histname =
"hDCotTracks";
2645 h_DCotTracks_[1][0] = iBooker.
book1D(histname +
"All",
2646 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",
2650 h_DCotTracks_[1][1] = iBooker.
book1D(histname +
"Barrel",
2651 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",
2655 h_DCotTracks_[1][2] = iBooker.
book1D(histname +
"Endcap",
2656 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",
2661 histname =
"pDCotTracksVsEta";
2662 p_DCotTracksVsEta_ = iBooker.
bookProfile(histname +
"All",
2663 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta ",
2672 histname =
"pDCotTracksVsR";
2675 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R ",
2684 histname =
"hDistMinAppTracks";
2685 h_distMinAppTracks_[1][0] = iBooker.
book1D(histname +
"All",
2686 " Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",
2690 h_distMinAppTracks_[1][1] = iBooker.
book1D(histname +
"Barrel",
2691 " Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",
2695 h_distMinAppTracks_[1][2] = iBooker.
book1D(histname +
"Endcap",
2696 " Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",
2702 histname =
"hDPhiTracksAtEcal";
2703 h_DPhiTracksAtEcal_[1][0] = iBooker.
book1D(histname +
"All",
2704 " Photons:Tracks from conversions: #delta#phi at Ecal : all Ecal ",
2708 h_DPhiTracksAtEcal_[1][1] = iBooker.
book1D(histname +
"Barrel",
2709 " Photons:Tracks from conversions: #delta#phi at Ecal : Barrel Ecal ",
2713 h_DPhiTracksAtEcal_[1][2] = iBooker.
book1D(histname +
"Endcap",
2714 " Photons:Tracks from conversions: #delta#phi at Ecal : Endcap Ecal ",
2719 histname =
"pDPhiTracksAtEcalVsR";
2720 p_DPhiTracksAtEcalVsR_ = iBooker.
bookProfile(histname +
"All",
2721 " Photons:Tracks from conversions: #delta#phi at Ecal vs R ",
2730 histname =
"pDPhiTracksAtEcalVsEta";
2731 p_DPhiTracksAtEcalVsEta_ = iBooker.
bookProfile(histname +
"All",
2732 " Photons:Tracks from conversions: #delta#phi at Ecal vs #eta ",
2741 histname =
"hDEtaTracksAtEcal";
2742 h_DEtaTracksAtEcal_[1][0] = iBooker.
book1D(histname +
"All",
2743 " Photons:Tracks from conversions: #delta#eta at Ecal : all Ecal ",
2747 h_DEtaTracksAtEcal_[1][1] = iBooker.
book1D(histname +
"Barrel",
2748 " Photons:Tracks from conversions: #delta#eta at Ecal : Barrel Ecal ",
2752 h_DEtaTracksAtEcal_[1][2] = iBooker.
book1D(histname +
"Endcap",
2753 " Photons:Tracks from conversions: #delta#eta at Ecal : Endcap Ecal ",
2760 h_convVtxRvsZ_[0] = iBooker.
book2D(
"convVtxRvsZAll",
2761 " Photon Reco conversion vtx position",
2768 h_convVtxRvsZ_[1] = iBooker.
book2D(
"convVtxRvsZBarrel",
2769 " Photon Reco conversion vtx position",
2776 h_convVtxRvsZ_[2] = iBooker.
book2D(
"convVtxRvsZEndcap",
2777 " Photon Reco conversion vtx position",
2784 h_convVtxYvsX_ = iBooker.
book2D(
2785 "convVtxYvsXTrkBarrel",
" Photon Reco conversion vtx position, (x,y) eta<1 ", 100, -80., 80., 100, -80., 80.);
2787 h_convSLVtxRvsZ_[0] = iBooker.
book2D(
"convSLVtxRvsZAll",
2788 " Photon Reco single leg conversion innermost hit position",
2795 h_convSLVtxRvsZ_[1] = iBooker.
book2D(
"convSLVtxRvsZBarrel",
2796 " Photon Reco single leg conversion innermost hit position",
2803 h_convSLVtxRvsZ_[2] = iBooker.
book2D(
"convSLVtxRvsZEndcap",
2804 " Photon Reco single leg conversion innermost hit position",
2813 if (!isRunCentrally_) {
2814 h_convVtxRvsZ_zoom_[0] = iBooker.
book2D(
"convVtxRvsZBarrelZoom1",
2815 " Photon Reco conversion vtx position",
2822 h_convVtxRvsZ_zoom_[1] = iBooker.
book2D(
"convVtxRvsZBarrelZoom2",
2823 " Photon Reco conversion vtx position",
2830 h_convVtxYvsX_zoom_[0] = iBooker.
book2D(
"convVtxYvsXTrkBarrelZoom1",
2831 " Photon Reco conversion vtx position, (x,y) eta<1 ",
2838 h_convVtxYvsX_zoom_[1] = iBooker.
book2D(
"convVtxYvsXTrkBarrelZoom2",
2839 " Photon Reco conversion vtx position, (x,y) eta<1 ",
2848 h_convVtxdX_ = iBooker.
book1D(
"convVtxdX",
" Photon Reco conversion vtx dX", 100, -20., 20.);
2849 h_convVtxdY_ = iBooker.
book1D(
"convVtxdY",
" Photon Reco conversion vtx dY", 100, -20., 20.);
2850 h_convVtxdZ_ = iBooker.
book1D(
"convVtxdZ",
" Photon Reco conversion vtx dZ", 100, -20., 20.);
2851 h_convVtxdR_ = iBooker.
book1D(
"convVtxdR",
" Photon Reco conversion vtx dR", 100, -20., 20.);
2853 h_convVtxdX_barrel_ =
2854 iBooker.
book1D(
"convVtxdX_barrel",
" Photon Reco conversion vtx dX, |eta|<=1.2", 100, -20., 20.);
2855 h_convVtxdY_barrel_ =
2856 iBooker.
book1D(
"convVtxdY_barrel",
" Photon Reco conversion vtx dY, |eta|<=1.2 ", 100, -20., 20.);
2857 h_convVtxdZ_barrel_ =
2858 iBooker.
book1D(
"convVtxdZ_barrel",
" Photon Reco conversion vtx dZ, |eta|<=1.2,", 100, -20., 20.);
2859 h_convVtxdR_barrel_ =
2860 iBooker.
book1D(
"convVtxdR_barrel",
" Photon Reco conversion vtx dR, |eta|<=1.2", 100, -20., 20.);
2861 h_convVtxdX_endcap_ =
2862 iBooker.
book1D(
"convVtxdX_endcap",
" Photon Reco conversion vtx dX, |eta|>1.2", 100, -20., 20.);
2863 h_convVtxdY_endcap_ =
2864 iBooker.
book1D(
"convVtxdY_endcap",
" Photon Reco conversion vtx dY, |eta|>1.2", 100, -20., 20.);
2865 h_convVtxdZ_endcap_ =
2866 iBooker.
book1D(
"convVtxdZ_endcap",
" Photon Reco conversion vtx dZ, |eta|>1.2", 100, -20., 20.);
2867 h_convVtxdR_endcap_ =
2868 iBooker.
book1D(
"convVtxdR_endcap",
" Photon Reco conversion vtx dR, |eta|>1.2 ", 100, -20., 20.);
2870 h_convVtxdPhi_ = iBooker.
book1D(
"convVtxdPhi",
" Photon Reco conversion vtx dPhi", 100, -0.005, 0.005);
2871 h_convVtxdEta_ = iBooker.
book1D(
"convVtxdEta",
" Photon Reco conversion vtx dEta", 100, -0.5, 0.5);
2873 if (!isRunCentrally_) {
2875 iBooker.
book2D(
"h2ConvVtxdRVsR",
"Photon Reco conversion vtx dR vsR",
rBin,
rMin,
rMax, 100, -20., 20.);
2876 h2_convVtxdRVsEta_ = iBooker.
book2D(
2877 "h2ConvVtxdRVsEta",
"Photon Reco conversion vtx dR vs Eta",
etaBin2,
etaMin,
etaMax, 100, -20., 20.);
2881 iBooker.
bookProfile(
"pConvVtxdRVsR",
"Photon Reco conversion vtx dR vsR",
rBin,
rMin,
rMax, 100, -20., 20.,
"");
2883 "pConvVtxdRVsEta",
"Photon Reco conversion vtx dR vs Eta",
etaBin2,
etaMin,
etaMax, 100, -20., 20.,
"");
2884 p_convVtxdXVsX_ = iBooker.
bookProfile(
"pConvVtxdXVsX",
"Conversion vtx dX vs X", 120, -60, 60, 100, -20., 20.,
"");
2885 p_convVtxdYVsY_ = iBooker.
bookProfile(
"pConvVtxdYVsY",
"Conversion vtx dY vs Y", 120, -60, 60, 100, -20., 20.,
"");
2889 if (!isRunCentrally_) {
2890 h2_convVtxRrecVsTrue_ = iBooker.
book2D(
2894 histname =
"vtxChi2";
2895 h_vtxChi2_[0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 100,
chi2Min,
chi2Max);
2896 h_vtxChi2_[1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 100,
chi2Min,
chi2Max);
2897 h_vtxChi2_[2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 100,
chi2Min,
chi2Max);
2898 histname =
"vtxChi2Prob";
2899 h_vtxChi2Prob_[0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 100, 0., 1.);
2900 h_vtxChi2Prob_[1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 100, 0., 1.);
2901 h_vtxChi2Prob_[2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 100, 0., 1.);
2903 histname =
"zPVFromTracks";
2904 h_zPVFromTracks_[0] = iBooker.
book1D(histname +
"All",
" Photons: PV z from conversion tracks", 100, -30., 30.);
2905 h_zPVFromTracks_[1] = iBooker.
book1D(histname +
"Barrel",
" Photons: PV z from conversion tracks", 100, -30., 30.);
2906 h_zPVFromTracks_[2] = iBooker.
book1D(histname +
"Endcap",
" Photons: PV z from conversion tracks", 100, -30., 30.);
2907 h_zPVFromTracks_[3] = iBooker.
book1D(histname +
"EndcapP",
" Photons: PV z from conversion tracks", 100, -30., 30.);
2908 h_zPVFromTracks_[4] = iBooker.
book1D(histname +
"EndcapM",
" Photons: PV z from conversion tracks", 100, -30., 30.);
2909 histname =
"dzPVFromTracks";
2910 h_dzPVFromTracks_[0] =
2911 iBooker.
book1D(histname +
"All",
" Photons: PV Z_rec - Z_true from conversion tracks", 100, -10., 10.);
2912 h_dzPVFromTracks_[1] =
2913 iBooker.
book1D(histname +
"Barrel",
" Photons: PV Z_rec - Z_true from conversion tracks", 100, -10., 10.);
2914 h_dzPVFromTracks_[2] =
2915 iBooker.
book1D(histname +
"Endcap",
" Photons: PV Z_rec - Z_true from conversion tracks", 100, -10., 10.);
2916 h_dzPVFromTracks_[3] =
2917 iBooker.
book1D(histname +
"EndcapP",
" Photons: PV Z_rec - Z_true from conversion tracks", 100, -10., 10.);
2918 h_dzPVFromTracks_[4] =
2919 iBooker.
book1D(histname +
"EndcapM",
" Photons: PV Z_rec - Z_true from conversion tracks", 100, -10., 10.);
2923 "pdzPVVsEta",
"Photon Reco conversions: dz(PV) vs Eta",
etaBin,
etaMin,
etaMax, 100, -3., 3.,
"");
2925 if (!isRunCentrally_) {
2926 h2_dzPVVsR_ = iBooker.
book2D(
"h2dzPVVsR",
"Photon Reco conversions: dz(PV) vs R",
rBin,
rMin,
rMax, 100, -3., 3.);
2930 if (!isRunCentrally_) {
2931 histname =
"nHitsVsEta";
2932 nHitsVsEta_[0] = iBooker.
book2D(histname +
"AllTracks",
2933 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
2941 histname =
"nHitsVsEta";
2942 nHitsVsEta_[1] = iBooker.
book2D(histname +
"AssTracks",
2943 "Photons:Tracks from conversions: # of hits vs #eta associated tracks",
2951 histname =
"nHitsVsR";
2952 nHitsVsR_[0] = iBooker.
book2D(histname +
"AllTracks",
2953 "Photons:Tracks from conversions: # of hits vs radius all tracks",
2961 histname =
"nHitsVsR";
2962 nHitsVsR_[1] = iBooker.
book2D(histname +
"AssTracks",
2963 "Photons:Tracks from conversions: # of hits vs radius associated tracks",
2971 histname =
"h2Chi2VsEta";
2972 h2_Chi2VsEta_[0] = iBooker.
book2D(
2975 histname =
"h2Chi2VsR";
2980 histname =
"h_nHitsVsEta";
2981 p_nHitsVsEta_[0] = iBooker.
bookProfile(histname +
"AllTracks",
2982 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
2991 histname =
"h_nHitsVsEta";
2992 p_nHitsVsEta_[1] = iBooker.
bookProfile(histname +
"AssTracks",
2993 "Photons:Tracks from conversions: # of hits vs #eta associated tracks",
3002 histname =
"p_nHitsVsEtaSL";
3003 p_nHitsVsEtaSL_[0] = iBooker.
bookProfile(histname +
"AllTracks",
3004 "Photons:Tracks from single leg conversions: # of hits vs #eta all tracks",
3013 histname =
"h_nHitsVsR";
3014 p_nHitsVsR_[0] = iBooker.
bookProfile(histname +
"AllTracks",
3015 "Photons:Tracks from conversions: # of hits vs radius all tracks",
3023 histname =
"p_nHitsVsRSL";
3024 p_nHitsVsRSL_[0] = iBooker.
bookProfile(histname +
"AllTracks",
3025 "Photons:Tracks from single leg conversions: # of hits vs radius all tracks",
3034 histname =
"tkChi2";
3035 h_tkChi2_[0] = iBooker.
book1D(
3036 histname +
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100,
chi2Min,
chi2Max);
3037 histname =
"tkChi2SL";
3038 h_tkChi2SL_[0] = iBooker.
book1D(histname +
"AllTracks",
3039 "Photons:Tracks from single leg conversions: #chi^{2} of associated tracks",
3043 histname =
"tkChi2Large";
3044 h_tkChi2Large_[0] = iBooker.
book1D(
3045 histname +
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
3047 histname =
"h_nHitsVsR";
3048 p_nHitsVsR_[1] = iBooker.
bookProfile(histname +
"AssTracks",
3049 "Photons:Tracks from conversions: # of hits vs radius associated tracks",
3058 histname =
"tkChi2";
3059 h_tkChi2_[1] = iBooker.
book1D(
3060 histname +
"AssTracks",
"Photons:Tracks from conversions: #chi^{2} of associated tracks", 100,
chi2Min,
chi2Max);
3061 histname =
"tkChi2Large";
3062 h_tkChi2Large_[1] = iBooker.
book1D(
3063 histname +
"AssTracks",
"Photons:Tracks from conversions: #chi^{2} of associated tracks", 1000, 0., 5000.0);
3065 histname =
"pChi2VsEta";
3069 histname =
"pChi2VsR";
3074 h_TkD0_[0] = iBooker.
book1D(histname +
"All",
" Reco Track D0*q: All ", 100, -0.1, 0.6);
3075 h_TkD0_[1] = iBooker.
book1D(histname +
"Barrel",
" Reco Track D0*q: Barrel ", 100, -0.1, 0.6);
3076 h_TkD0_[2] = iBooker.
book1D(histname +
"Endcap",
" Reco Track D0*q: Endcap ", 100, -0.1, 0.6);
3078 histname =
"hTkPtPull";
3079 h_TkPtPull_[0] = iBooker.
book1D(histname +
"All",
" Reco Track Pt pull: All ", 100, -10., 10.);
3080 histname =
"hTkPtPull";
3081 h_TkPtPull_[1] = iBooker.
book1D(histname +
"Barrel",
" Reco Track Pt pull: Barrel ", 100, -10., 10.);
3082 histname =
"hTkPtPull";
3083 h_TkPtPull_[2] = iBooker.
book1D(histname +
"Endcap",
" Reco Track Pt pull: Endcap ", 100, -10., 10.);
3085 histname =
"pTkPtPullEta";
3089 if (!isRunCentrally_) {
3090 histname =
"h2TkPtPullEta";
3094 histname =
"PtRecVsPtSim";
3095 h2_PtRecVsPtSim_[0] =
3097 h2_PtRecVsPtSim_[1] =
3099 h2_PtRecVsPtSim_[2] =
3101 histname =
"PtRecVsPtSimMixProv";
3102 h2_PtRecVsPtSimMixProv_ = iBooker.
book2D(
3107 histname =
"eBcOverTkPout";
3108 hBCEnergyOverTrackPout_[0] = iBooker.
book1D(histname +
"All",
"Matrching BC E/P_out: all Ecal ", 100, 0., 5.);
3109 hBCEnergyOverTrackPout_[1] = iBooker.
book1D(histname +
"Barrel",
"Matrching BC E/P_out: Barrel ", 100, 0., 5.);
3110 hBCEnergyOverTrackPout_[2] = iBooker.
book1D(histname +
"Endcap",
"Matrching BC E/P_out: Endcap ", 100, 0., 5.);
3114 h_OIinnermostHitR_ = iBooker.
book1D(
"OIinnermostHitR",
" R innermost hit for OI tracks ", 50, 0., 25);
3115 h_IOinnermostHitR_ = iBooker.
book1D(
"IOinnermostHitR",
" R innermost hit for IO tracks ", 50, 0., 25);
3118 h_trkProv_[0] = iBooker.
book1D(
"allTrkProv",
" Track pair provenance ", 4, 0., 4.);
3119 h_trkProv_[1] = iBooker.
book1D(
"assTrkProv",
" Track pair provenance ", 4, 0., 4.);
3123 h_convAlgo_ = iBooker.
book1D(
"allConvAlgo",
" Conv Algo ", 5, -0.5, 4.5);
3124 h_convQuality_ = iBooker.
book1D(
"allConvQuality",
"Conv quality ", 11, -0.5, 11.);
3127 histname =
"h_RecoConvTwoTracksEta";
3128 h_RecoConvTwoTracks_[0] =
3130 histname =
"h_RecoConvTwoTracksPhi";
3131 h_RecoConvTwoTracks_[1] =
3133 histname =
"h_RecoConvTwoTracksR";
3134 h_RecoConvTwoTracks_[2] =
3135 iBooker.
book1D(histname,
" All reco conversions with 2 reco tracks: simulated R",
rBin,
rMin,
rMax);
3136 histname =
"h_RecoConvTwoTracksZ";
3137 h_RecoConvTwoTracks_[3] =
3138 iBooker.
book1D(histname,
" All reco conversions with 2 reco tracks: simulated Z",
zBin,
zMin,
zMax);
3139 histname =
"h_RecoConvTwoTracksEt";
3140 h_RecoConvTwoTracks_[4] =
3141 iBooker.
book1D(histname,
" All reco conversions with 2 reco tracks: simulated Et",
etBin,
etMin,
etMax);
3143 histname =
"h_RecoConvTwoMTracksEta";
3144 h_RecoConvTwoMTracks_[0] =
3146 histname =
"h_RecoConvTwoMTracksPhi";
3147 h_RecoConvTwoMTracks_[1] =
3149 histname =
"h_RecoConvTwoMTracksR";
3150 h_RecoConvTwoMTracks_[2] =
3151 iBooker.
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated R",
rBin,
rMin,
rMax);
3152 histname =
"h_RecoConvTwoMTracksZ";
3153 h_RecoConvTwoMTracks_[3] =
3154 iBooker.
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated Z",
zBin,
zMin,
zMax);
3155 histname =
"h_RecoConvTwoMTracksEt";
3156 h_RecoConvTwoMTracks_[4] =
3157 iBooker.
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated Et",
etBin,
etMin,
etMax);
3162 edm::LogInfo(
"ConvertedPhotonProducer") <<
" get magnetic field"
3166 thePhotonMCTruthFinder_ = std::make_unique<PhotonMCTruthFinder>();
3170 thePhotonMCTruthFinder_.reset();
3174 thePhotonMCTruthFinder_->clear();
3175 using namespace edm;
3179 const float BARL = 1.4442;
3181 const float END_HI = 2.5;
3186 e.getByLabel(
"trackAssociatorByHitsForPhotonValidation", theHitsAssociator);
3190 LogInfo(
"PhotonValidator") <<
"PhotonValidator Analyzing event number: " <<
e.id() <<
" Global Counter " << nEvt_
3197 e.getByToken(offline_pvToken_, vtxH);
3198 h_nRecoVtx_->Fill(
float(vtxH->size()));
3206 e.getByToken(photonCollectionToken_, photonHandle);
3208 if (!photonHandle.
isValid()) {
3209 edm::LogError(
"PhotonProducer") <<
"Error! Can't get the Photon collection " << std::endl;
3215 e.getByToken(pfCandidates_, pfCandidateHandle);
3216 if (!pfCandidateHandle.
isValid()) {
3217 edm::LogError(
"PhotonValidator") <<
"Error! Can't get the product pfCandidates " << std::endl;
3222 if (fName_ ==
"pfPhotonValidator") {
3223 e.getByToken(particleBasedIso_token, phoToParticleBasedIsoMapHandle);
3224 if (!phoToParticleBasedIsoMapHandle.
isValid()) {
3225 edm::LogInfo(
"PhotonValidator") <<
"Error! Can't get the product: valueMap photons to particle based iso "
3228 phoToParticleBasedIsoMap = *(phoToParticleBasedIsoMapHandle.
product());
3235 e.getByToken(conversionOITrackPr_Token_, outInTrkHandle);
3237 e.getByToken(conversionIOTrackPr_Token_, inOutTrkHandle);
3243 h_OIinnermostHitR_->Fill(
sqrt(iTk->innerPosition().Perp2()));
3246 if ((*itHits)->isValid()) {
3257 h_IOinnermostHitR_->Fill(
sqrt(iTk->innerPosition().Perp2()));
3261 if ((*itHits)->isValid()) {
3272 std::vector<SimTrack> theSimTracks;
3273 std::vector<SimVertex> theSimVertices;
3278 e.getByToken(g4_simTk_Token_, SimTk);
3279 e.getByToken(g4_simVtx_Token_, SimVtx);
3281 e.getByToken(famos_simTk_Token_, SimTk);
3282 e.getByToken(famos_simVtx_Token_, SimVtx);
3285 theSimTracks.insert(theSimTracks.end(), SimTk->begin(), SimTk->end());
3286 theSimVertices.insert(theSimVertices.end(), SimVtx->begin(), SimVtx->end());
3287 std::vector<PhotonMCTruth> mcPhotons = thePhotonMCTruthFinder_->find(theSimTracks, theSimVertices);
3290 e.getByToken(hepMC_Token_,
hepMC);
3298 e.getByToken(genjets_Token_, GenJetsHandle);
3302 bool useTP = parameters_.getParameter<
bool>(
"useTP");
3307 e.getByToken(token_tp_, ElectronTPHandle);
3313 std::vector<reco::PhotonCollection::const_iterator> StoRMatchedConvertedPhotons;
3323 OISimToReco =
trackAssociator->associateSimToReco(outInTrkHandle, ElectronTPHandle);
3324 IOSimToReco =
trackAssociator->associateSimToReco(inOutTrkHandle, ElectronTPHandle);
3326 OIRecoToSim =
trackAssociator->associateRecoToSim(outInTrkHandle, ElectronTPHandle);
3327 IORecoToSim =
trackAssociator->associateRecoToSim(inOutTrkHandle, ElectronTPHandle);
3331 vector<reco::SimToRecoCollection*> StoRCollPtrs;
3332 StoRCollPtrs.push_back(&OISimToReco);
3333 StoRCollPtrs.push_back(&IOSimToReco);
3334 vector<reco::RecoToSimCollection*> RtoSCollPtrs;
3335 RtoSCollPtrs.push_back(&OIRecoToSim);
3336 RtoSCollPtrs.push_back(&IORecoToSim);
3338 for (
int i = 0;
i < 2;
i++)
3340 for (
int i = 0;
i < 2;
i++)
3343 std::vector<reco::PhotonRef> myPhotons;
3345 for (
unsigned int iPho = 0; iPho < photonHandle->size(); iPho++) {
3348 if (fabs(phoRef->eta()) > 2.5)
3350 myPhotons.push_back(phoRef);
3355 if (myPhotons.size() >= 2) {
3356 if (myPhotons[0]->
et() > 40 && myPhotons[1]->et() > 25) {
3362 float gamgamMass2 = p12.Dot(p12);
3363 float gamgamMass2_regr1 = p12_regr1.Dot(p12_regr1);
3364 float gamgamMass2_regr2 = p12_regr2.Dot(p12_regr2);
3367 if (gamgamMass2 > 0) {
3369 h_gamgamMass_[0][0]->Fill(
sqrt(gamgamMass2));
3370 if (myPhotons[0]->isEB() && myPhotons[1]->isEB())
3371 h_gamgamMass_[0][1]->Fill(
sqrt(gamgamMass2));
3372 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3373 (myPhotons[0]->isEB() && myPhotons[1]->isEE()))
3374 h_gamgamMass_[0][2]->Fill(
sqrt(gamgamMass2));
3376 if (myPhotons[0]->
r9() > 0.94 && myPhotons[1]->
r9() > 0.94) {
3377 h_gamgamMass_[1][0]->Fill(
sqrt(gamgamMass2));
3378 if (myPhotons[0]->isEB() && myPhotons[1]->isEB())
3379 h_gamgamMass_[1][1]->Fill(
sqrt(gamgamMass2));
3380 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3381 (myPhotons[0]->isEB() && myPhotons[1]->isEE()))
3382 h_gamgamMass_[1][2]->Fill(
sqrt(gamgamMass2));
3391 if (chi2Prob1 > 0.0005 && chi2Prob2 > 0.0005) {
3392 h_gamgamMass_[2][0]->Fill(
sqrt(gamgamMass2));
3393 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3394 h_gamgamMass_[2][1]->Fill(
sqrt(gamgamMass2));
3396 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3397 (myPhotons[0]->isEB() && myPhotons[1]->isEE())) {
3398 h_gamgamMass_[2][2]->Fill(
sqrt(gamgamMass2));
3403 myPhotons[1]->
r9() > 0.93) {
3407 if (chi2Prob1 > 0.0005) {
3408 h_gamgamMass_[2][0]->Fill(
sqrt(gamgamMass2));
3409 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3410 h_gamgamMass_[2][1]->Fill(
sqrt(gamgamMass2));
3412 if (myPhotons[0]->isEE() || myPhotons[1]->isEE()) {
3413 h_gamgamMass_[2][2]->Fill(
sqrt(gamgamMass2));
3418 myPhotons[0]->
r9() > 0.93) {
3422 if (chi2Prob1 > 0.0005) {
3423 h_gamgamMass_[2][0]->Fill(
sqrt(gamgamMass2));
3424 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3425 h_gamgamMass_[2][1]->Fill(
sqrt(gamgamMass2));
3427 if (myPhotons[0]->isEE() || myPhotons[1]->isEE()) {
3428 h_gamgamMass_[2][2]->Fill(
sqrt(gamgamMass2));
3436 if (gamgamMass2_regr1 > 0) {
3438 h_gamgamMassRegr1_[0][0]->Fill(
sqrt(gamgamMass2_regr1));
3439 if (myPhotons[0]->isEB() && myPhotons[1]->isEB())
3440 h_gamgamMassRegr1_[0][1]->Fill(
sqrt(gamgamMass2_regr1));
3441 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3442 (myPhotons[0]->isEB() && myPhotons[1]->isEE()))
3443 h_gamgamMassRegr1_[0][2]->Fill(
sqrt(gamgamMass2_regr1));
3445 if (myPhotons[0]->
r9() > 0.94 && myPhotons[1]->
r9() > 0.94) {
3446 h_gamgamMassRegr1_[1][0]->Fill(
sqrt(gamgamMass2_regr1));
3447 if (myPhotons[0]->isEB() && myPhotons[1]->isEB())
3448 h_gamgamMassRegr1_[1][1]->Fill(
sqrt(gamgamMass2_regr1));
3449 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3450 (myPhotons[0]->isEB() && myPhotons[1]->isEE()))
3451 h_gamgamMassRegr1_[1][2]->Fill(
sqrt(gamgamMass2_regr1));
3461 if (chi2Prob1 > 0.0005 && chi2Prob2 > 0.0005) {
3462 h_gamgamMassRegr1_[2][0]->Fill(
sqrt(gamgamMass2_regr1));
3463 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3464 h_gamgamMassRegr1_[2][1]->Fill(
sqrt(gamgamMass2_regr1));
3466 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3467 (myPhotons[0]->isEB() && myPhotons[1]->isEE())) {
3468 h_gamgamMassRegr1_[2][2]->Fill(
sqrt(gamgamMass2_regr1));
3473 myPhotons[1]->
r9() > 0.93) {
3477 if (chi2Prob1 > 0.0005) {
3478 h_gamgamMassRegr1_[2][0]->Fill(
sqrt(gamgamMass2_regr1));
3479 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3480 h_gamgamMassRegr1_[2][1]->Fill(
sqrt(gamgamMass2_regr1));
3482 if (myPhotons[0]->isEE() || myPhotons[1]->isEE()) {
3483 h_gamgamMassRegr1_[2][2]->Fill(
sqrt(gamgamMass2_regr1));
3488 myPhotons[0]->
r9() > 0.93) {
3492 if (chi2Prob1 > 0.0005) {
3493 h_gamgamMassRegr1_[2][0]->Fill(
sqrt(gamgamMass2_regr1));
3494 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3495 h_gamgamMassRegr1_[2][1]->Fill(
sqrt(gamgamMass2_regr1));
3497 if (myPhotons[0]->isEE() || myPhotons[1]->isEE()) {
3498 h_gamgamMassRegr1_[2][2]->Fill(
sqrt(gamgamMass2_regr1));
3506 if (gamgamMass2_regr2 > 0) {
3508 h_gamgamMassRegr2_[0][0]->Fill(
sqrt(gamgamMass2_regr2));
3509 if (myPhotons[0]->isEB() && myPhotons[1]->isEB())
3510 h_gamgamMassRegr2_[0][1]->Fill(
sqrt(gamgamMass2_regr2));
3511 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3512 (myPhotons[0]->isEB() && myPhotons[1]->isEE()))
3513 h_gamgamMassRegr2_[0][2]->Fill(
sqrt(gamgamMass2_regr2));
3515 if (myPhotons[0]->
r9() > 0.94 && myPhotons[1]->
r9() > 0.94) {
3516 h_gamgamMassRegr2_[1][0]->Fill(
sqrt(gamgamMass2_regr2));
3517 if (myPhotons[0]->isEB() && myPhotons[1]->isEB())
3518 h_gamgamMassRegr2_[1][1]->Fill(
sqrt(gamgamMass2_regr2));
3519 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3520 (myPhotons[0]->isEB() && myPhotons[1]->isEE()))
3521 h_gamgamMassRegr2_[1][2]->Fill(
sqrt(gamgamMass2_regr2));
3531 if (chi2Prob1 > 0.0005 && chi2Prob2 > 0.0005) {
3532 h_gamgamMassRegr2_[2][0]->Fill(
sqrt(gamgamMass2_regr2));
3533 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3534 h_gamgamMassRegr2_[2][1]->Fill(
sqrt(gamgamMass2_regr2));
3536 if ((myPhotons[0]->isEE() && myPhotons[1]->isEE()) || (myPhotons[0]->isEE() && myPhotons[1]->isEB()) ||
3537 (myPhotons[0]->isEB() && myPhotons[1]->isEE())) {
3538 h_gamgamMassRegr2_[2][2]->Fill(
sqrt(gamgamMass2_regr2));
3543 myPhotons[1]->
r9() > 0.93) {
3547 if (chi2Prob1 > 0.0005) {
3548 h_gamgamMassRegr2_[2][0]->Fill(
sqrt(gamgamMass2_regr2));
3549 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3550 h_gamgamMassRegr2_[2][1]->Fill(
sqrt(gamgamMass2_regr2));
3552 if (myPhotons[0]->isEE() || myPhotons[1]->isEE()) {
3553 h_gamgamMassRegr2_[2][2]->Fill(
sqrt(gamgamMass2_regr2));
3558 myPhotons[0]->
r9() > 0.93) {
3562 if (chi2Prob1 > 0.0005) {
3563 h_gamgamMassRegr2_[2][0]->Fill(
sqrt(gamgamMass2_regr2));
3564 if (myPhotons[0]->isEB() && myPhotons[1]->isEB()) {
3565 h_gamgamMassRegr2_[2][1]->Fill(
sqrt(gamgamMass2_regr2));
3567 if (myPhotons[0]->isEE() || myPhotons[1]->isEE()) {
3568 h_gamgamMassRegr2_[2][2]->Fill(
sqrt(gamgamMass2_regr2));
3578 for (std::vector<PhotonMCTruth>::const_iterator mcPho = mcPhotons.begin(); mcPho != mcPhotons.end(); mcPho++) {
3579 if ((*mcPho).fourMomentum().et() < minPhoEtCut_)
3582 for (HepMC::GenEvent::particle_const_iterator mcIter = myGenEvent->particles_begin();
3583 mcIter != myGenEvent->particles_end();
3585 if ((*mcIter)->pdg_id() != 22)
3587 bool isTheSame =
false;
3589 if ((*mcIter)->production_vertex()) {
3590 if ((*mcIter)->production_vertex()->particles_begin(
HepMC::parents) !=
3592 mother = *((*mcIter)->production_vertex()->particles_begin(
HepMC::parents));
3595 float mcPhi = (*mcPho).fourMomentum().phi();
3596 mcPhi_ = phiNormalization(mcPhi);
3597 mcEta_ = (*mcPho).fourMomentum().pseudoRapidity();
3598 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z());
3599 mcConvR_ = (*mcPho).vertex().perp();
3600 mcConvX_ = (*mcPho).vertex().x();
3601 mcConvY_ = (*mcPho).vertex().y();
3602 mcConvZ_ = (*mcPho).vertex().z();
3603 mcConvEta_ = (*mcPho).vertex().eta();
3604 mcConvPhi_ = (*mcPho).vertex().phi();
3606 if (fabs(mcEta_) > END_HI)
3609 if (mother ==
nullptr || (mother !=
nullptr && mother->pdg_id() == 22) ||
3610 (mother !=
nullptr && mother->pdg_id() == 25) || (mother !=
nullptr && mother->pdg_id() == 35)) {
3611 double dPt = fabs((*mcIter)->momentum().perp() - (*mcPho).fourMomentum().et());
3612 float phiMother = (*mcIter)->momentum().phi();
3613 double dPhi = phiNormalization(phiMother) - mcPhi_;
3614 double dEta = fabs((*mcIter)->momentum().eta() - (*mcPho).fourMomentum().pseudoRapidity());
3616 if (
dEta <= 0.0001 &&
dPhi <= 0.0001 && dPt <= 0.0001)
3623 if (!isRunCentrally_) {
3624 h_SimPhoMotherEt_[0]->Fill((*mcPho).motherMomentum().et());
3625 h_SimPhoMotherEta_[0]->Fill((*mcPho).motherMomentum().pseudoRapidity());
3628 h_SimPho_[0]->Fill(mcEta_);
3629 h_SimPho_[1]->Fill(mcPhi_);
3630 h_SimPho_[2]->Fill((*mcPho).fourMomentum().et());
3634 bool goodSimConversion =
false;
3635 bool visibleConversion =
false;
3636 bool visibleConversionsWithTwoSimTracks =
false;
3637 if ((*mcPho).isAConversion() == 1) {
3639 h_AllSimConv_[0]->Fill(mcEta_);
3640 h_AllSimConv_[1]->Fill(mcPhi_);
3641 h_AllSimConv_[2]->Fill(mcConvR_);
3642 h_AllSimConv_[3]->Fill(mcConvZ_);
3643 h_AllSimConv_[4]->Fill((*mcPho).fourMomentum().et());
3645 if (!isRunCentrally_) {
3647 h_SimConvEtaPix_[0]->Fill(mcEta_);
3650 if ((fabs(mcEta_) <= BARL && mcConvR_ < 85) ||
3651 (fabs(mcEta_) > BARL && fabs(mcEta_) <= END_HI && fabs((*mcPho).vertex().z()) < 210))
3652 visibleConversion =
true;
3657 if (fabs(
tp->vx() - (*mcPho).vertex().x()) < 0.001 && fabs(
tp->vy() - (*mcPho).vertex().y()) < 0.001 &&
3658 fabs(
tp->vz() - (*mcPho).vertex().z()) < 0.001) {
3659 theConvTP_.push_back(
tp);
3662 if (theConvTP_.size() == 2)
3663 visibleConversionsWithTwoSimTracks =
true;
3664 goodSimConversion =
false;
3666 if (visibleConversion && visibleConversionsWithTwoSimTracks)
3667 goodSimConversion =
true;
3668 if (goodSimConversion) {
3670 h_VisSimConv_[0]->Fill(mcEta_);
3671 h_VisSimConv_[1]->Fill(mcPhi_);
3672 h_VisSimConv_[2]->Fill(mcConvR_);
3673 h_VisSimConv_[3]->Fill(mcConvZ_);
3674 h_VisSimConv_[4]->Fill((*mcPho).fourMomentum().et());
3677 if (!isRunCentrally_) {
3679 iTrk != theConvTP_.end();
3681 h_simTkPt_->Fill((*iTrk)->pt());
3682 h_simTkEta_->Fill((*iTrk)->eta());
3689 float minDelta = 10000.;
3690 std::vector<reco::PhotonRef> thePhotons;
3695 for (
unsigned int iPho = 0; iPho < photonHandle->size(); iPho++) {
3697 thePhotons.push_back(aPho);
3698 float phiPho = aPho->phi();
3699 float etaPho = aPho->eta();
3720 if (!isRunCentrally_) {
3721 h_SimPhoMotherEt_[1]->Fill((*mcPho).motherMomentum().et());
3722 h_SimPhoMotherEta_[1]->Fill((*mcPho).motherMomentum().pseudoRapidity());
3724 h_MatchedSimPho_[0]->Fill(mcEta_);
3725 h_MatchedSimPho_[1]->Fill(mcPhi_);
3726 h_MatchedSimPho_[2]->Fill((*mcPho).fourMomentum().et());
3732 bool phoIsInBarrel =
false;
3733 bool phoIsInEndcap =
false;
3734 bool phoIsInEndcapP =
false;
3735 bool phoIsInEndcapM =
false;
3739 if (fabs(matchingPho->superCluster()->position().eta()) < 1.479) {
3740 phoIsInBarrel =
true;
3742 phoIsInEndcap =
true;
3743 if (matchingPho->superCluster()->position().eta() > 0)
3744 phoIsInEndcapP =
true;
3745 if (matchingPho->superCluster()->position().eta() < 0)
3746 phoIsInEndcapM =
true;
3750 if (phoIsInBarrel) {
3752 e.getByToken(barrelEcalHits_, ecalRecHitHandle);
3753 if (!ecalRecHitHandle.
isValid()) {
3755 labelsForToken(barrelEcalHits_,
l);
3756 edm::LogError(
"PhotonProducer") <<
"Error! Can't get the product " <<
l.module;
3760 }
else if (phoIsInEndcap) {
3762 e.getByToken(endcapEcalHits_, ecalRecHitHandle);
3763 if (!ecalRecHitHandle.
isValid()) {
3765 labelsForToken(barrelEcalHits_,
l);
3766 edm::LogError(
"PhotonProducer") <<
"Error! Can't get the product " <<
l.module;
3773 float photonE = matchingPho->energy();
3774 float sigmaEoE = matchingPho->getCorrectedEnergyError(matchingPho->getCandidateP4type()) / matchingPho->energy();
3776 float photonEt = matchingPho->pt();
3779 float r9 = matchingPho->r9();
3781 float r1 = matchingPho->r1x5();
3782 float r2 = matchingPho->r2x5();
3783 float sigmaIetaIeta = matchingPho->sigmaIetaIeta();
3785 float hOverE = matchingPho->hadronicOverEm();
3786 float newhOverE = matchingPho->hadTowOverEm();
3787 float ecalIso = matchingPho->ecalRecHitSumEtConeDR04();
3788 float hcalIso = matchingPho->hcalTowerSumEtConeDR04();
3789 float newhcalIso = matchingPho->hcalTowerSumEtBcConeDR04();
3790 float trkIso = matchingPho->trkSumPtSolidConeDR04();
3791 float nIsoTrk = matchingPho->nTrkSolidConeDR04();
3793 float chargedHadIso = matchingPho->chargedHadronIso();
3794 float neutralHadIso = matchingPho->neutralHadronIso();
3795 float photonIso = matchingPho->photonIso();
3796 float etOutsideMustache = matchingPho->etOutsideMustache();
3797 int nClusterOutsideMustache = matchingPho->nClusterOutsideMustache();
3798 float pfMVA = matchingPho->pfMVA();
3800 std::vector<std::pair<DetId, float> >::const_iterator rhIt;
3801 bool atLeastOneDeadChannel =
false;
3803 bcIt != matchingPho->superCluster()->clustersEnd();
3805 for (rhIt = (*bcIt)->hitsAndFractions().begin(); rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
3808 if (rhIt->first == (*it).id()) {
3809 if ((*it).recoFlag() == 9) {
3810 atLeastOneDeadChannel =
true;
3818 if (atLeastOneDeadChannel) {
3819 h_MatchedSimPhoBadCh_[0]->Fill(mcEta_);
3820 h_MatchedSimPhoBadCh_[1]->Fill(mcPhi_);
3821 h_MatchedSimPhoBadCh_[2]->Fill((*mcPho).fourMomentum().et());
3825 h_phoPixSeedSize_[0]->Fill(matchingPho->electronPixelSeeds().size());
3827 h_phoPixSeedSize_[1]->Fill(matchingPho->electronPixelSeeds().size());
3829 h_scEta_[
type]->Fill(matchingPho->superCluster()->eta());
3830 h_scPhi_[
type]->Fill(matchingPho->superCluster()->phi());
3831 if (!isRunCentrally_) {
3832 h_scEtaWidth_[
type]->Fill(matchingPho->superCluster()->etaWidth());
3833 h_scPhiWidth_[
type]->Fill(matchingPho->superCluster()->phiWidth());
3835 h_scE_[
type][0]->Fill(matchingPho->superCluster()->energy());
3836 h_scEt_[
type][0]->Fill(matchingPho->superCluster()->energy() / cosh(matchingPho->superCluster()->eta()));
3838 h_psE_->Fill(matchingPho->superCluster()->preshowerEnergy());
3840 h_r9_[
type][0]->Fill(
r9);
3842 h_r1_[
type][0]->Fill(
r1);
3844 h_r2_[
type][0]->Fill(
r2);
3846 h_sigmaIetaIeta_[
type][0]->Fill(sigmaIetaIeta);
3849 p_r9VsEta_[0]->Fill(mcEta_,
r9);
3851 if (!isRunCentrally_) {
3852 h2_r9VsEt_[0]->Fill((*mcPho).fourMomentum().et(),
r9);
3853 h2_r1VsEta_[0]->Fill(mcEta_,
r1);
3854 h2_r1VsEt_[0]->Fill((*mcPho).fourMomentum().et(),
r1);
3855 h2_r2VsEta_[0]->Fill(mcEta_,
r2);
3856 h2_r2VsEt_[0]->Fill((*mcPho).fourMomentum().et(),
r2);
3857 h2_sigmaIetaIetaVsEta_[0]->Fill(mcEta_, sigmaIetaIeta);
3858 h2_sigmaIetaIetaVsEt_[0]->Fill((*mcPho).fourMomentum().et(), sigmaIetaIeta);
3859 h2_hOverEVsEta_[0]->Fill(mcEta_,
hOverE);
3860 h2_hOverEVsEt_[0]->Fill((*mcPho).fourMomentum().et(),
hOverE);
3862 p_hOverEVsEta_[0]->Fill(mcEta_,
hOverE);
3863 p_hOverEVsEt_[0]->Fill((*mcPho).fourMomentum().et(),
hOverE);
3865 h_newhOverE_[
type][0]->Fill(newhOverE);
3866 p_newhOverEVsEta_[0]->Fill(mcEta_, newhOverE);
3867 p_newhOverEVsEt_[0]->Fill((*mcPho).fourMomentum().et(), newhOverE);
3870 h_ecalRecHitSumEtConeDR04_[
type][0]->Fill(ecalIso);
3871 if (!isRunCentrally_) {
3872 h2_ecalRecHitSumEtConeDR04VsEta_[0]->Fill(mcEta_, ecalIso);
3873 h2_ecalRecHitSumEtConeDR04VsEt_[0]->Fill((*mcPho).fourMomentum().et(), ecalIso);
3874 h2_hcalTowerSumEtConeDR04VsEta_[0]->Fill(mcEta_, hcalIso);
3875 h2_hcalTowerSumEtConeDR04VsEt_[0]->Fill((*mcPho).fourMomentum().et(), hcalIso);
3877 p_ecalRecHitSumEtConeDR04VsEta_[0]->Fill(mcEta_, ecalIso);
3878 if (!isRunCentrally_)
3879 p_ecalRecHitSumEtConeDR04VsEt_[0]->Fill((*mcPho).fourMomentum().et(), ecalIso);
3881 h_hcalTowerSumEtConeDR04_[
type][0]->Fill(hcalIso);
3882 p_hcalTowerSumEtConeDR04VsEta_[0]->Fill(mcEta_, hcalIso);
3883 if (!isRunCentrally_)
3884 p_hcalTowerSumEtConeDR04VsEt_[0]->Fill((*mcPho).fourMomentum().et(), hcalIso);
3886 if (!isRunCentrally_)
3887 h_hcalTowerBcSumEtConeDR04_[
type][0]->Fill(newhcalIso);
3888 p_hcalTowerBcSumEtConeDR04VsEta_[0]->Fill(mcEta_, newhcalIso);
3889 if (!isRunCentrally_)
3890 p_hcalTowerBcSumEtConeDR04VsEt_[0]->Fill((*mcPho).fourMomentum().et(), newhcalIso);
3892 h_isoTrkSolidConeDR04_[
type][0]->Fill(trkIso);
3893 h_nTrkSolidConeDR04_[
type][0]->Fill(nIsoTrk);
3895 if (!isRunCentrally_) {
3896 h2_isoTrkSolidConeDR04VsEta_[0]->Fill(mcEta_, trkIso);
3897 h2_isoTrkSolidConeDR04VsEt_[0]->Fill((*mcPho).fourMomentum().et(), trkIso);
3898 h2_nTrkSolidConeDR04VsEta_[0]->Fill(mcEta_, nIsoTrk);
3899 h2_nTrkSolidConeDR04VsEt_[0]->Fill((*mcPho).fourMomentum().et(), nIsoTrk);
3902 h_chHadIso_[0]->Fill(chargedHadIso);
3903 h_nHadIso_[0]->Fill(neutralHadIso);
3905 h_nCluOutsideMustache_[0]->Fill(
float(nClusterOutsideMustache));
3906 h_etOutsideMustache_[0]->Fill(etOutsideMustache);
3907 h_pfMva_[0]->Fill(pfMVA);
3909 h_phoEta_[
type]->Fill(matchingPho->eta());
3910 h_phoPhi_[
type]->Fill(matchingPho->phi());
3911 h_phoDEta_[0]->Fill(matchingPho->eta() - (*mcPho).fourMomentum().eta());
3912 h_phoDPhi_[0]->Fill(matchingPho->phi() - mcPhi_);
3913 h_phoE_[
type][0]->Fill(photonE);
3914 h_phoEt_[
type][0]->Fill(photonEt);
3915 h_nConv_[0][0]->Fill(
float(matchingPho->conversions().size()));
3916 h_nConv_[1][0]->Fill(
float(matchingPho->conversionsOneLeg().size()));
3919 h_phoERes_[0][0]->Fill(photonE / (*mcPho).fourMomentum().e());
3920 h_phoSigmaEoE_[0][0]->Fill(sigmaEoE);
3921 h_phoEResRegr1_[0][0]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
3922 h_phoEResRegr2_[0][0]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
3924 p_eResVsEta_[0]->Fill(mcEta_, photonE / (*mcPho).fourMomentum().e());
3925 p_sigmaEoEVsEta_[0]->Fill(mcEta_, sigmaEoE);
3926 p_eResVsEt_[0][0]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
3928 if (!isRunCentrally_)
3929 h2_eResVsEta_[0]->Fill(mcEta_, photonE / (*mcPho).fourMomentum().e());
3930 if (!isRunCentrally_)
3931 h2_eResVsEt_[0][0]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
3932 if (!isRunCentrally_)
3933 h2_eResVsR9_[0]->Fill(
r9, photonE / (*mcPho).fourMomentum().e());
3934 if (!isRunCentrally_)
3935 h2_sceResVsR9_[0]->Fill(
r9, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
3936 if (!isRunCentrally_)
3937 p_eResVsR9_[0]->Fill(
r9, photonE / (*mcPho).fourMomentum().e());
3938 if (!isRunCentrally_)
3939 p_sceResVsR9_[0]->Fill(
r9, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
3941 if ((*mcPho).isAConversion() == 0) {
3942 if (!isRunCentrally_) {
3943 h2_eResVsEta_[1]->Fill(mcEta_, photonE / (*mcPho).fourMomentum().e());
3944 h2_r9VsEt_[1]->Fill((*mcPho).fourMomentum().et(),
r9);
3946 h2_r1VsEta_[1]->Fill(mcEta_,
r1);
3947 h2_r1VsEt_[1]->Fill((*mcPho).fourMomentum().et(),
r1);
3949 h2_r2VsEta_[1]->Fill(mcEta_,
r2);
3950 h2_r2VsEt_[1]->Fill((*mcPho).fourMomentum().et(),
r2);
3952 h2_sigmaIetaIetaVsEta_[1]->Fill(mcEta_, sigmaIetaIeta);
3953 h2_sigmaIetaIetaVsEt_[1]->Fill((*mcPho).fourMomentum().et(), sigmaIetaIeta);
3955 h2_hOverEVsEta_[1]->Fill(mcEta_,
hOverE);
3956 h2_hOverEVsEt_[1]->Fill((*mcPho).fourMomentum().et(),
hOverE);
3959 if (!isRunCentrally_) {
3960 h2_ecalRecHitSumEtConeDR04VsEta_[1]->Fill(mcEta_, ecalIso);
3961 h2_hcalTowerSumEtConeDR04VsEta_[1]->Fill(mcEta_, hcalIso);
3962 h2_isoTrkSolidConeDR04VsEta_[1]->Fill(mcEta_, trkIso);
3963 h2_isoTrkSolidConeDR04VsEt_[1]->Fill((*mcPho).fourMomentum().et(), trkIso);
3964 h2_nTrkSolidConeDR04VsEta_[1]->Fill(mcEta_, nIsoTrk);
3965 h2_nTrkSolidConeDR04VsEt_[1]->Fill((*mcPho).fourMomentum().et(), nIsoTrk);
3967 p_ecalRecHitSumEtConeDR04VsEta_[1]->Fill(mcEta_, ecalIso);
3968 if (!isRunCentrally_)
3969 p_hcalTowerSumEtConeDR04VsEta_[1]->Fill(mcEta_, hcalIso);
3972 if (photonE / (*mcPho).fourMomentum().e() < 0.3 && photonE / (*mcPho).fourMomentum().e() > 0.1) {
3975 if ((
r9 > 0.94 && phoIsInBarrel) || (
r9 > 0.95 && phoIsInEndcap)) {
3976 h_phoERes_[1][0]->Fill(photonE / (*mcPho).fourMomentum().e());
3977 h_phoSigmaEoE_[1][0]->Fill(sigmaEoE);
3978 h_phoEResRegr1_[1][0]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
3979 h_phoEResRegr2_[1][0]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
3980 if (!isRunCentrally_)
3981 h2_eResVsEt_[0][1]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
3982 p_eResVsEt_[0][1]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
3983 p_eResVsEta_[1]->Fill(mcEta_, photonE / (*mcPho).fourMomentum().e());
3984 p_r9VsEta_[1]->Fill(mcEta_,
r9);
3985 p_sigmaEoEVsEta_[1]->Fill(mcEta_, sigmaEoE);
3987 }
else if ((
r9 <= 0.94 && phoIsInBarrel) || (
r9 <= 0.95 && phoIsInEndcap)) {
3988 h_phoERes_[2][0]->Fill(photonE / (*mcPho).fourMomentum().e());
3989 h_phoSigmaEoE_[2][0]->Fill(sigmaEoE);
3990 h_phoEResRegr1_[2][0]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
3991 h_phoEResRegr2_[2][0]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
3992 p_eResVsEt_[0][2]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
3993 p_eResVsEta_[2]->Fill(mcEta_, photonE / (*mcPho).fourMomentum().e());
3994 p_r9VsEta_[2]->Fill(mcEta_,
r9);
3995 p_sigmaEoEVsEta_[2]->Fill(mcEta_, sigmaEoE);
3997 if (!isRunCentrally_) {
3998 h2_eResVsEt_[0][2]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
3999 h_EtR9Less093_[0][0]->Fill(photonEt);
4003 if (phoIsInBarrel) {
4004 h_scE_[
type][1]->Fill(matchingPho->superCluster()->energy());
4005 h_scEt_[
type][1]->Fill(matchingPho->superCluster()->energy() / cosh(matchingPho->superCluster()->eta()));
4006 h_r9_[
type][1]->Fill(
r9);
4007 h_r1_[
type][1]->Fill(
r1);
4008 h_r2_[
type][1]->Fill(
r2);
4009 h_sigmaIetaIeta_[
type][1]->Fill(sigmaIetaIeta);
4011 h_newhOverE_[
type][1]->Fill(newhOverE);
4012 h_ecalRecHitSumEtConeDR04_[
type][1]->Fill(ecalIso);
4013 p_ecalRecHitSumEtConeDR04VsEt_[1]->Fill((*mcPho).fourMomentum().et(), ecalIso);
4014 h_hcalTowerSumEtConeDR04_[
type][1]->Fill(hcalIso);
4015 p_hcalTowerSumEtConeDR04VsEt_[1]->Fill((*mcPho).fourMomentum().et(), hcalIso);
4016 h_hcalTowerBcSumEtConeDR04_[
type][1]->Fill(newhcalIso);
4017 p_hcalTowerBcSumEtConeDR04VsEt_[1]->Fill((*mcPho).fourMomentum().et(), newhcalIso);
4018 h_isoTrkSolidConeDR04_[
type][1]->Fill(trkIso);
4019 h_nTrkSolidConeDR04_[
type][1]->Fill(nIsoTrk);
4020 h_chHadIso_[1]->Fill(chargedHadIso);
4021 h_nHadIso_[1]->Fill(neutralHadIso);
4023 h_nCluOutsideMustache_[1]->Fill(
float(nClusterOutsideMustache));
4024 h_etOutsideMustache_[1]->Fill(etOutsideMustache);
4025 h_pfMva_[1]->Fill(pfMVA);
4026 h_phoE_[
type][1]->Fill(photonE);
4027 h_phoEt_[
type][1]->Fill(photonEt);
4028 h_nConv_[
type][1]->Fill(
float(matchingPho->conversions().size()));
4029 h_nConv_[1][1]->Fill(
float(matchingPho->conversionsOneLeg().size()));
4030 h_phoERes_[0][1]->Fill(photonE / (*mcPho).fourMomentum().e());
4031 h_phoSigmaEoE_[0][1]->Fill(sigmaEoE);
4032 h_phoEResRegr1_[0][1]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
4033 h_phoEResRegr2_[0][1]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
4034 p_eResVsR9_[1]->Fill(
r9, photonE / (*mcPho).fourMomentum().e());
4035 p_sceResVsR9_[1]->Fill(
r9, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4036 if (!isRunCentrally_) {
4037 h2_eResVsR9_[1]->Fill(
r9, photonE / (*mcPho).fourMomentum().e());
4038 h2_sceResVsR9_[1]->Fill(
r9, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4039 h2_ecalRecHitSumEtConeDR04VsEt_[1]->Fill((*mcPho).fourMomentum().et(), ecalIso);
4040 h2_hcalTowerSumEtConeDR04VsEt_[1]->Fill((*mcPho).fourMomentum().et(), hcalIso);
4041 h2_eResVsEt_[1][0]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4043 p_eResVsEt_[1][0]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4044 p_eResVsNVtx_[1][0]->Fill(
float(vtxH->size()), photonE / (*mcPho).fourMomentum().e());
4045 p_sigmaEoEVsEt_[1][0]->Fill((*mcPho).fourMomentum().et(), sigmaEoE);
4046 p_sigmaEoEVsNVtx_[1][0]->Fill(
float(vtxH->size()), sigmaEoE);
4049 h_phoERes_[1][1]->Fill(photonE / (*mcPho).fourMomentum().e());
4050 h_phoSigmaEoE_[1][1]->Fill(sigmaEoE);
4051 h_phoEResRegr1_[1][1]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
4052 h_phoEResRegr2_[1][1]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
4053 if (!isRunCentrally_)
4054 h2_eResVsEt_[1][1]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4055 p_eResVsEt_[1][1]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4056 p_eResVsNVtx_[1][1]->Fill(
float(vtxH->size()), photonE / (*mcPho).fourMomentum().e());
4057 p_sigmaEoEVsEt_[1][1]->Fill((*mcPho).fourMomentum().et(), sigmaEoE);
4058 p_sigmaEoEVsNVtx_[1][1]->Fill(
float(vtxH->size()), sigmaEoE);
4061 h_phoERes_[2][1]->Fill(photonE / (*mcPho).fourMomentum().e());
4062 h_phoSigmaEoE_[2][1]->Fill(sigmaEoE);
4063 h_phoEResRegr1_[2][1]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
4064 h_phoEResRegr2_[2][1]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
4065 p_eResVsEt_[1][2]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4066 p_eResVsNVtx_[1][2]->Fill(
float(vtxH->size()), photonE / (*mcPho).fourMomentum().e());
4067 p_sigmaEoEVsEt_[1][2]->Fill((*mcPho).fourMomentum().et(), sigmaEoE);
4068 p_sigmaEoEVsNVtx_[1][2]->Fill(
float(vtxH->size()), sigmaEoE);
4069 if (!isRunCentrally_) {
4070 h2_eResVsEt_[1][2]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4071 h_EtR9Less093_[0][1]->Fill(photonEt);
4075 if (phoIsInEndcap) {
4076 h_scE_[
type][2]->Fill(matchingPho->superCluster()->energy());
4077 h_scEt_[
type][2]->Fill(matchingPho->superCluster()->energy() / cosh(matchingPho->superCluster()->eta()));
4078 h_r9_[
type][2]->Fill(
r9);
4079 h_r1_[
type][2]->Fill(
r1);
4080 h_r2_[
type][2]->Fill(
r2);
4081 h_sigmaIetaIeta_[
type][2]->Fill(sigmaIetaIeta);
4083 h_newhOverE_[
type][2]->Fill(newhOverE);
4084 h_ecalRecHitSumEtConeDR04_[
type][2]->Fill(ecalIso);
4085 p_ecalRecHitSumEtConeDR04VsEt_[2]->Fill((*mcPho).fourMomentum().et(), ecalIso);
4086 h_hcalTowerSumEtConeDR04_[
type][2]->Fill(hcalIso);
4087 p_hcalTowerSumEtConeDR04VsEt_[2]->Fill((*mcPho).fourMomentum().et(), hcalIso);
4088 h_hcalTowerBcSumEtConeDR04_[
type][2]->Fill(newhcalIso);
4089 p_hcalTowerBcSumEtConeDR04VsEt_[2]->Fill((*mcPho).fourMomentum().et(), newhcalIso);
4090 h_isoTrkSolidConeDR04_[
type][2]->Fill(trkIso);
4091 h_nTrkSolidConeDR04_[
type][2]->Fill(nIsoTrk);
4092 h_chHadIso_[2]->Fill(chargedHadIso);
4093 h_nHadIso_[2]->Fill(neutralHadIso);
4095 h_nCluOutsideMustache_[2]->Fill(
float(nClusterOutsideMustache));
4096 h_etOutsideMustache_[2]->Fill(etOutsideMustache);
4097 h_pfMva_[2]->Fill(pfMVA);
4098 h_phoE_[
type][2]->Fill(photonE);
4099 h_phoEt_[
type][2]->Fill(photonEt);
4100 h_nConv_[
type][2]->Fill(
float(matchingPho->conversions().size()));
4101 h_nConv_[1][2]->Fill(
float(matchingPho->conversionsOneLeg().size()));
4102 h_phoERes_[0][2]->Fill(photonE / (*mcPho).fourMomentum().e());
4103 h_phoSigmaEoE_[0][2]->Fill(sigmaEoE);
4104 h_phoEResRegr1_[0][2]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
4105 h_phoEResRegr2_[0][2]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
4106 p_eResVsR9_[2]->Fill(
r9, photonE / (*mcPho).fourMomentum().e());
4107 p_sceResVsR9_[2]->Fill(
r9, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4108 if (!isRunCentrally_) {
4109 h2_eResVsR9_[2]->Fill(
r9, photonE / (*mcPho).fourMomentum().e());
4110 h2_sceResVsR9_[2]->Fill(
r9, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4111 h2_ecalRecHitSumEtConeDR04VsEt_[2]->Fill((*mcPho).fourMomentum().et(), ecalIso);
4112 h2_hcalTowerSumEtConeDR04VsEt_[2]->Fill((*mcPho).fourMomentum().et(), hcalIso);
4113 h2_eResVsEt_[2][0]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4116 p_eResVsEt_[2][0]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4117 p_eResVsNVtx_[2][0]->Fill(
float(vtxH->size()), photonE / (*mcPho).fourMomentum().e());
4118 p_sigmaEoEVsEt_[2][0]->Fill((*mcPho).fourMomentum().et(), sigmaEoE);
4119 p_sigmaEoEVsNVtx_[2][0]->Fill(
float(vtxH->size()), sigmaEoE);
4122 h_phoERes_[1][2]->Fill(photonE / (*mcPho).fourMomentum().e());
4123 h_phoSigmaEoE_[1][2]->Fill(sigmaEoE);
4124 h_phoEResRegr1_[1][2]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
4125 h_phoEResRegr2_[1][2]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
4126 if (!isRunCentrally_)
4127 h2_eResVsEt_[2][1]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4128 p_eResVsEt_[2][1]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4129 p_eResVsNVtx_[2][1]->Fill(
float(vtxH->size()), photonE / (*mcPho).fourMomentum().e());
4130 p_sigmaEoEVsEt_[2][1]->Fill((*mcPho).fourMomentum().et(), sigmaEoE);
4131 p_sigmaEoEVsNVtx_[2][1]->Fill(
float(vtxH->size()), sigmaEoE);
4134 h_phoERes_[2][2]->Fill(photonE / (*mcPho).fourMomentum().e());
4135 h_phoSigmaEoE_[2][2]->Fill(sigmaEoE);
4136 h_phoEResRegr1_[2][2]->Fill(photonERegr1 / (*mcPho).fourMomentum().e());
4137 h_phoEResRegr2_[2][2]->Fill(photonERegr2 / (*mcPho).fourMomentum().e());
4138 p_eResVsEt_[2][2]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4139 p_eResVsNVtx_[2][2]->Fill(
float(vtxH->size()), photonE / (*mcPho).fourMomentum().e());
4140 p_sigmaEoEVsEt_[2][2]->Fill((*mcPho).fourMomentum().et(), sigmaEoE);
4141 p_sigmaEoEVsNVtx_[2][2]->Fill(
float(vtxH->size()), sigmaEoE);
4143 if (!isRunCentrally_) {
4144 h2_eResVsEt_[2][2]->Fill((*mcPho).fourMomentum().et(), photonE / (*mcPho).fourMomentum().e());
4145 h_EtR9Less093_[0][2]->Fill(photonEt);
4151 if (fName_ ==
"pfPhotonValidator") {
4152 float SumPtIsoValCh = 0.;
4153 float SumPtIsoValNh = 0.;
4154 float SumPtIsoValPh = 0.;
4156 float SumPtIsoValCleanCh = 0.;
4157 float SumPtIsoValCleanNh = 0.;
4158 float SumPtIsoValCleanPh = 0.;
4160 for (
unsigned int lCand = 0; lCand < pfCandidateHandle->size(); lCand++) {
4162 float dR =
deltaR(matchingPho->eta(), matchingPho->phi(), pfCandRef->eta(), pfCandRef->phi());
4172 SumPtIsoValCh += pfCandRef->pt();
4173 h_dRPhoPFcand_ChHad_unCleaned_[0]->Fill(
dR);
4175 h_dRPhoPFcand_ChHad_unCleaned_[1]->Fill(
dR);
4177 h_dRPhoPFcand_ChHad_unCleaned_[2]->Fill(
dR);
4180 SumPtIsoValNh += pfCandRef->pt();
4181 h_dRPhoPFcand_NeuHad_unCleaned_[0]->Fill(
dR);
4183 h_dRPhoPFcand_NeuHad_unCleaned_[1]->Fill(
dR);
4185 h_dRPhoPFcand_NeuHad_unCleaned_[2]->Fill(
dR);
4188 SumPtIsoValPh += pfCandRef->pt();
4189 h_dRPhoPFcand_Pho_unCleaned_[0]->Fill(
dR);
4191 h_dRPhoPFcand_Pho_unCleaned_[1]->Fill(
dR);
4193 h_dRPhoPFcand_Pho_unCleaned_[2]->Fill(
dR);
4197 for (std::vector<reco::PFCandidateRef>::const_iterator
i = phoToParticleBasedIsoMap[matchingPho].begin();
4198 i != phoToParticleBasedIsoMap[matchingPho].
end();
4200 if ((*
i) == pfCandRef) {
4208 SumPtIsoValCleanCh += pfCandRef->pt();
4209 h_dRPhoPFcand_ChHad_Cleaned_[0]->Fill(
dR);
4211 h_dRPhoPFcand_ChHad_Cleaned_[1]->Fill(
dR);
4213 h_dRPhoPFcand_ChHad_Cleaned_[2]->Fill(
dR);
4216 SumPtIsoValCleanNh += pfCandRef->pt();
4217 h_dRPhoPFcand_NeuHad_Cleaned_[0]->Fill(
dR);
4219 h_dRPhoPFcand_NeuHad_Cleaned_[1]->Fill(
dR);
4221 h_dRPhoPFcand_NeuHad_Cleaned_[2]->Fill(
dR);
4224 SumPtIsoValCleanPh += pfCandRef->pt();
4225 h_dRPhoPFcand_Pho_Cleaned_[0]->Fill(
dR);
4227 h_dRPhoPFcand_Pho_Cleaned_[1]->Fill(
dR);
4229 h_dRPhoPFcand_Pho_Cleaned_[2]->Fill(
dR);
4235 h_SumPtOverPhoPt_ChHad_Cleaned_[0]->Fill(SumPtIsoValCleanCh / matchingPho->pt());
4236 h_SumPtOverPhoPt_NeuHad_Cleaned_[0]->Fill(SumPtIsoValCleanNh / matchingPho->pt());
4237 h_SumPtOverPhoPt_Pho_Cleaned_[0]->Fill(SumPtIsoValCleanPh / matchingPho->pt());
4238 h_SumPtOverPhoPt_ChHad_unCleaned_[0]->Fill(SumPtIsoValCh / matchingPho->pt());
4239 h_SumPtOverPhoPt_NeuHad_unCleaned_[0]->Fill(SumPtIsoValNh / matchingPho->pt());
4240 h_SumPtOverPhoPt_Pho_unCleaned_[0]->Fill(SumPtIsoValPh / matchingPho->pt());
4241 if (phoIsInBarrel) {
4242 h_SumPtOverPhoPt_ChHad_Cleaned_[1]->Fill(SumPtIsoValCleanCh / matchingPho->pt());
4243 h_SumPtOverPhoPt_NeuHad_Cleaned_[1]->Fill(SumPtIsoValCleanNh / matchingPho->pt());
4244 h_SumPtOverPhoPt_Pho_Cleaned_[1]->Fill(SumPtIsoValCleanPh / matchingPho->pt());
4245 h_SumPtOverPhoPt_ChHad_unCleaned_[1]->Fill(SumPtIsoValCh / matchingPho->pt());
4246 h_SumPtOverPhoPt_NeuHad_unCleaned_[1]->Fill(SumPtIsoValNh / matchingPho->pt());
4247 h_SumPtOverPhoPt_Pho_unCleaned_[1]->Fill(SumPtIsoValPh / matchingPho->pt());
4249 h_SumPtOverPhoPt_ChHad_Cleaned_[2]->Fill(SumPtIsoValCleanCh / matchingPho->pt());
4250 h_SumPtOverPhoPt_NeuHad_Cleaned_[2]->Fill(SumPtIsoValCleanNh / matchingPho->pt());
4251 h_SumPtOverPhoPt_Pho_Cleaned_[2]->Fill(SumPtIsoValCleanPh / matchingPho->pt());
4252 h_SumPtOverPhoPt_ChHad_unCleaned_[2]->Fill(SumPtIsoValCh / matchingPho->pt());
4253 h_SumPtOverPhoPt_NeuHad_unCleaned_[2]->Fill(SumPtIsoValNh / matchingPho->pt());
4254 h_SumPtOverPhoPt_Pho_unCleaned_[2]->Fill(SumPtIsoValPh / matchingPho->pt());
4259 if (!(visibleConversion && visibleConversionsWithTwoSimTracks))
4262 if (!isRunCentrally_) {
4263 h_r9_[1][0]->Fill(
r9);
4265 h_r9_[1][1]->Fill(
r9);
4267 h_r9_[1][2]->Fill(
r9);
4269 h_simConvVtxRvsZ_[0]->Fill(fabs(mcConvZ_), mcConvR_);
4270 if (fabs(mcEta_) <= 1.) {
4271 h_simConvVtxRvsZ_[1]->Fill(fabs(mcConvZ_), mcConvR_);
4272 h_simConvVtxYvsX_->Fill(mcConvX_, mcConvY_);
4274 h_simConvVtxRvsZ_[2]->Fill(fabs(mcConvZ_), mcConvR_);
4280 bool atLeastOneRecoTwoTrackConversion =
false;
4281 for (
unsigned int iConv = 0; iConv <
conversions.size(); iConv++) {
4283 double like = aConv->MVAout();
4284 if (like < likelihoodCut_)
4287 if (!isRunCentrally_)
4288 h2_EoverEtrueVsEta_[1]->Fill(mcEta_, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4289 p_EoverEtrueVsEta_[1]->Fill(mcEta_, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4292 const std::vector<edm::RefToBase<reco::Track> >
tracks = aConv->tracks();
4295 atLeastOneRecoTwoTrackConversion =
true;
4297 h_mvaOut_[0]->Fill(like);
4299 if (
tracks.size() == 2) {
4300 if (
sqrt(aConv->tracksPin()[0].Perp2()) < convTrackMinPtCut_ ||
4301 sqrt(aConv->tracksPin()[1].Perp2()) < convTrackMinPtCut_)
4306 if ((fabs(mcEta_) > 1.1 && fabs(mcEta_) < 1.4) && fabs(aConv->pairCotThetaSeparation()) > dCotHardCutValue_)
4308 if (fabs(aConv->pairCotThetaSeparation()) > dCotCutValue_)
4314 std::map<const reco::Track*, TrackingParticleRef> myAss;
4315 std::map<const reco::Track*, TrackingParticleRef>::const_iterator itAss;
4316 std::map<reco::TrackRef, TrackingParticleRef>::const_iterator itAssMin;
4317 std::map<reco::TrackRef, TrackingParticleRef>::const_iterator itAssMax;
4321 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
4325 if (!isRunCentrally_)
4327 if (!isRunCentrally_)
4338 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV;
4341 if (
q.find(theConvTP_[0]) !=
q.end()) {
4342 trackV = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q[theConvTP_[0]];
4343 }
else if (
q.find(theConvTP_[1]) !=
q.end()) {
4344 trackV = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q[theConvTP_[1]];
4351 myAss.insert(std::make_pair(tr.
get(), theConvTP_[tpI]));
4358 float refP = -99999.;
4359 float refPt = -99999.;
4360 if (aConv->conversionVertex().isValid()) {
4361 refP =
sqrt(aConv->refittedPairMomentum().Mag2());
4362 refPt =
sqrt(aConv->refittedPairMomentum().perp2());
4364 float invM = aConv->pairInvariantMass();
4366 h_invMass_[
type][0]->Fill(invM);
4368 h_invMass_[
type][1]->Fill(invM);
4370 h_invMass_[
type][2]->Fill(invM);
4373 if (
tracks.size() == 2) {
4374 h_SimConvTwoTracks_[0]->Fill(mcEta_);
4375 h_SimConvTwoTracks_[1]->Fill(mcPhi_);
4376 h_SimConvTwoTracks_[2]->Fill(mcConvR_);
4377 h_SimConvTwoTracks_[3]->Fill(mcConvZ_);
4378 h_SimConvTwoTracks_[4]->Fill((*mcPho).fourMomentum().et());
4380 if (!aConv->caloCluster().empty())
4381 h_convEta_[1]->
Fill(aConv->caloCluster()[0]->eta());
4383 float trkProvenance = 3;
4384 if (
tracks[0]->
algoName() ==
"outInEcalSeededConv" &&
tracks[1]->algoName() ==
"outInEcalSeededConv")
4386 if (
tracks[0]->
algoName() ==
"inOutEcalSeededConv" &&
tracks[1]->algoName() ==
"inOutEcalSeededConv")
4389 (
tracks[1]->algoName() ==
"outInEcalSeededConv" &&
tracks[0]->algoName() ==
"inOutEcalSeededConv"))
4391 if (trkProvenance == 3) {
4393 h_trkProv_[0]->Fill(trkProvenance);
4396 h_convAlgo_->Fill(aConv->algo());
4400 if (!isRunCentrally_) {
4401 h_r9_[2][0]->Fill(
r9);
4403 h_r9_[2][1]->Fill(
r9);
4405 h_r9_[2][2]->Fill(
r9);
4408 if (!aConv->caloCluster().empty())
4409 h_convEta_[2]->
Fill(aConv->caloCluster()[0]->eta());
4412 h_SimConvTwoMTracks_[0]->Fill(mcEta_);
4413 h_SimConvTwoMTracks_[1]->Fill(mcPhi_);
4414 h_SimConvTwoMTracks_[2]->Fill(mcConvR_);
4415 h_SimConvTwoMTracks_[3]->Fill(mcConvZ_);
4416 h_SimConvTwoMTracks_[4]->Fill((*mcPho).fourMomentum().et());
4418 if (aConv->conversionVertex().isValid()) {
4422 h_SimConvTwoMTracksAndVtxPGT0_[0]->Fill(mcEta_);
4423 h_SimConvTwoMTracksAndVtxPGT0_[1]->Fill(mcPhi_);
4424 h_SimConvTwoMTracksAndVtxPGT0_[2]->Fill(mcConvR_);
4425 h_SimConvTwoMTracksAndVtxPGT0_[3]->Fill(mcConvZ_);
4426 h_SimConvTwoMTracksAndVtxPGT0_[4]->Fill((*mcPho).fourMomentum().et());
4428 if (chi2Prob > 0.0005) {
4429 h_SimConvTwoMTracksAndVtxPGT0005_[0]->Fill(mcEta_);
4430 h_SimConvTwoMTracksAndVtxPGT0005_[1]->Fill(mcPhi_);
4431 h_SimConvTwoMTracksAndVtxPGT0005_[2]->Fill(mcConvR_);
4432 h_SimConvTwoMTracksAndVtxPGT0005_[3]->Fill(mcConvZ_);
4433 h_SimConvTwoMTracksAndVtxPGT0005_[4]->Fill((*mcPho).fourMomentum().et());
4436 if (chi2Prob > 0.0005) {
4437 if (!aConv->caloCluster().empty()) {
4438 h_convEta_[0]->Fill(aConv->caloCluster()[0]->eta());
4439 h_convPhi_[0]->Fill(aConv->caloCluster()[0]->phi());
4440 h_convERes_[0][0]->Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e());
4442 if (!isRunCentrally_) {
4443 h_r9VsNofTracks_[0][0]->Fill(
r9, aConv->nTracks());
4444 h_EtR9Less093_[1][0]->Fill(photonEt);
4446 h_EtR9Less093_[1][1]->Fill(photonEt);
4448 h_EtR9Less093_[1][2]->Fill(photonEt);
4450 if (phoIsInBarrel) {
4451 if (!aConv->caloCluster().empty())
4452 h_convERes_[0][1]->
Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e());
4453 if (!isRunCentrally_)
4454 h_r9VsNofTracks_[0][1]->Fill(
r9, aConv->nTracks());
4455 h_mvaOut_[1]->Fill(like);
4457 if (phoIsInEndcap) {
4458 if (!aConv->caloCluster().empty())
4459 h_convERes_[0][2]->
Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e());
4460 if (!isRunCentrally_)
4461 h_r9VsNofTracks_[0][2]->Fill(
r9, aConv->nTracks());
4462 h_mvaOut_[2]->Fill(like);
4470 h_trkProv_[1]->Fill(trkProvenance);
4471 h_invMass_[
type][0]->Fill(invM);
4473 float eoverp = -99999.;
4475 if (aConv->conversionVertex().isValid()) {
4476 eoverp = photonE /
sqrt(aConv->refittedPairMomentum().Mag2());
4478 h_convPtRes_[
type][0]->Fill(refPt / (*mcPho).fourMomentum().et());
4479 h_EoverPTracks_[
type][0]->Fill(eoverp);
4480 h_PoverETracks_[
type][0]->Fill(1. / eoverp);
4481 if (!isRunCentrally_)
4482 h2_EoverEtrueVsEoverP_[0]->Fill(eoverp,
4483 matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4484 if (!isRunCentrally_)
4485 h2_PoverPtrueVsEoverP_[0]->Fill(eoverp, refP / (*mcPho).fourMomentum().e());
4486 if (!isRunCentrally_)
4487 h2_EoverPVsEta_[0]->Fill(mcEta_, eoverp);
4488 if (!isRunCentrally_)
4489 h2_EoverPVsR_[0]->Fill(mcConvR_, eoverp);
4490 p_EoverPVsEta_[0]->Fill(mcEta_, eoverp);
4491 p_EoverPVsR_[0]->Fill(mcConvR_, eoverp);
4492 p_eResVsR_->Fill(mcConvR_, photonE / (*mcPho).fourMomentum().e());
4493 if (!isRunCentrally_)
4494 h2_PoverPtrueVsEta_[0]->Fill(mcEta_, refP / (*mcPho).fourMomentum().e());
4495 p_PoverPtrueVsEta_[0]->Fill(mcEta_, refP / (*mcPho).fourMomentum().e());
4498 if (!isRunCentrally_)
4499 h2_EoverEtrueVsEta_[0]->Fill(mcEta_,
4500 matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4501 if (!isRunCentrally_)
4502 h2_EoverEtrueVsR_[0]->Fill(mcConvR_,
4503 matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4504 p_EoverEtrueVsEta_[0]->Fill(mcEta_, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4505 p_EoverEtrueVsR_[0]->Fill(mcConvR_, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4507 if (!isRunCentrally_)
4508 h2_etaVsRsim_[0]->Fill(mcEta_, mcConvR_);
4511 float dPhiTracksAtVtx = aConv->dPhiTracksAtVtx();
4512 h_DPhiTracksAtVtx_[
type][0]->Fill(dPhiTracksAtVtx);
4513 if (!isRunCentrally_)
4514 h2_DPhiTracksAtVtxVsEta_->Fill(mcEta_, dPhiTracksAtVtx);
4515 if (!isRunCentrally_)
4516 h2_DPhiTracksAtVtxVsR_->Fill(mcConvR_, dPhiTracksAtVtx);
4517 p_DPhiTracksAtVtxVsEta_->Fill(mcEta_, dPhiTracksAtVtx);
4518 p_DPhiTracksAtVtxVsR_->Fill(mcConvR_, dPhiTracksAtVtx);
4520 h_DCotTracks_[
type][0]->Fill(aConv->pairCotThetaSeparation());
4521 if (!isRunCentrally_)
4522 h2_DCotTracksVsEta_->Fill(mcEta_, aConv->pairCotThetaSeparation());
4523 if (!isRunCentrally_)
4524 h2_DCotTracksVsR_->Fill(mcConvR_, aConv->pairCotThetaSeparation());
4525 p_DCotTracksVsEta_->Fill(mcEta_, aConv->pairCotThetaSeparation());
4526 p_DCotTracksVsR_->Fill(mcConvR_, aConv->pairCotThetaSeparation());
4528 if (phoIsInBarrel) {
4529 h_invMass_[
type][1]->Fill(invM);
4530 if (aConv->conversionVertex().isValid()) {
4531 h_convPtRes_[
type][1]->Fill(refPt / (*mcPho).fourMomentum().et());
4532 h_EoverPTracks_[
type][1]->Fill(eoverp);
4534 h_EoverPTracks_[0][0]->Fill(eoverp);
4535 if (mcConvR_ > 15 && mcConvR_ < 58)
4536 h_EoverPTracks_[0][1]->Fill(eoverp);
4538 h_EoverPTracks_[0][2]->Fill(eoverp);
4539 h_PoverETracks_[
type][1]->Fill(1. / eoverp);
4540 if (!isRunCentrally_)
4541 h2_EoverEtrueVsEoverP_[1]->Fill(
4542 eoverp, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4543 if (!isRunCentrally_)
4544 h2_PoverPtrueVsEoverP_[1]->Fill(eoverp, refP / (*mcPho).fourMomentum().e());
4546 h_DPhiTracksAtVtx_[
type][1]->Fill(dPhiTracksAtVtx);
4547 h_DCotTracks_[
type][1]->Fill(aConv->pairCotThetaSeparation());
4550 if (phoIsInEndcap) {
4551 h_invMass_[
type][2]->Fill(invM);
4552 if (aConv->conversionVertex().isValid()) {
4553 h_convPtRes_[
type][2]->Fill(refPt / (*mcPho).fourMomentum().et());
4554 h_EoverPTracks_[
type][2]->Fill(eoverp);
4555 h_PoverETracks_[
type][2]->Fill(1. / eoverp);
4556 if (!isRunCentrally_)
4557 h2_EoverEtrueVsEoverP_[2]->Fill(
4558 eoverp, matchingPho->superCluster()->energy() / (*mcPho).fourMomentum().e());
4559 if (!isRunCentrally_)
4560 h2_PoverPtrueVsEoverP_[2]->Fill(eoverp, refP / (*mcPho).fourMomentum().e());
4562 h_DPhiTracksAtVtx_[
type][2]->Fill(dPhiTracksAtVtx);
4563 h_DCotTracks_[
type][2]->Fill(aConv->pairCotThetaSeparation());
4566 if (aConv->conversionVertex().isValid()) {
4567 h_convVtxdX_->Fill(aConv->conversionVertex().position().x() - mcConvX_);
4568 h_convVtxdY_->Fill(aConv->conversionVertex().position().y() - mcConvY_);
4569 h_convVtxdZ_->Fill(aConv->conversionVertex().position().z() - mcConvZ_);
4570 h_convVtxdR_->Fill(
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
4572 if (fabs(mcConvEta_) <= 1.2) {
4573 h_convVtxdX_barrel_->Fill(aConv->conversionVertex().position().x() - mcConvX_);
4574 h_convVtxdY_barrel_->Fill(aConv->conversionVertex().position().y() - mcConvY_);
4575 h_convVtxdZ_barrel_->Fill(aConv->conversionVertex().position().z() - mcConvZ_);
4576 h_convVtxdR_barrel_->Fill(
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
4578 h_convVtxdX_endcap_->Fill(aConv->conversionVertex().position().x() - mcConvX_);
4579 h_convVtxdY_endcap_->Fill(aConv->conversionVertex().position().y() - mcConvY_);
4580 h_convVtxdZ_endcap_->Fill(aConv->conversionVertex().position().z() - mcConvZ_);
4581 h_convVtxdR_endcap_->Fill(
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
4584 h_convVtxdPhi_->Fill(aConv->conversionVertex().position().phi() - mcConvPhi_);
4585 h_convVtxdEta_->Fill(aConv->conversionVertex().position().eta() - mcConvEta_);
4586 if (!isRunCentrally_)
4587 h2_convVtxdRVsR_->Fill(mcConvR_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
4588 if (!isRunCentrally_)
4589 h2_convVtxdRVsEta_->Fill(mcEta_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
4590 p_convVtxdRVsR_->Fill(mcConvR_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
4591 p_convVtxdRVsEta_->Fill(mcEta_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
4592 float signX = aConv->refittedPairMomentum().x() / fabs(aConv->refittedPairMomentum().x());
4593 float signY = aConv->refittedPairMomentum().y() / fabs(aConv->refittedPairMomentum().y());
4594 float signZ = aConv->refittedPairMomentum().z() / fabs(aConv->refittedPairMomentum().z());
4595 p_convVtxdXVsX_->Fill(mcConvX_, (aConv->conversionVertex().position().x() - mcConvX_) * signX);
4596 p_convVtxdYVsY_->Fill(mcConvY_, (aConv->conversionVertex().position().y() - mcConvY_) * signY);
4597 p_convVtxdZVsZ_->Fill(mcConvZ_, (aConv->conversionVertex().position().z() - mcConvZ_) * signZ);
4599 if (!isRunCentrally_)
4600 h2_convVtxRrecVsTrue_->Fill(mcConvR_,
sqrt(aConv->conversionVertex().position().perp2()));
4603 float thetaConv = aConv->refittedPairMomentum().Theta();
4604 float thetaSC = matchingPho->superCluster()->position().theta();
4606 sqrt(matchingPho->superCluster()->position().x() * matchingPho->superCluster()->position().x() +
4607 matchingPho->superCluster()->position().y() * matchingPho->superCluster()->position().y());
4608 float zSC = matchingPho->superCluster()->position().z();
4609 float zPV =
sqrt(rSC * rSC + zSC * zSC) *
sin(thetaConv - thetaSC) /
sin(thetaConv);
4611 h_zPVFromTracks_[0]->Fill(zPV);
4612 h_dzPVFromTracks_[0]->Fill(zPV - (*mcPho).primaryVertex().z());
4614 if (phoIsInBarrel) {
4615 h_zPVFromTracks_[1]->Fill(zPV);
4616 h_dzPVFromTracks_[1]->Fill(zPV - (*mcPho).primaryVertex().z());
4617 }
else if (phoIsInEndcap) {
4618 h_zPVFromTracks_[2]->Fill(zPV);
4619 h_dzPVFromTracks_[2]->Fill(zPV - (*mcPho).primaryVertex().z());
4620 }
else if (phoIsInEndcapP) {
4621 h_zPVFromTracks_[3]->Fill(zPV);
4622 h_dzPVFromTracks_[3]->Fill(zPV - (*mcPho).primaryVertex().z());
4623 }
else if (phoIsInEndcapM) {
4624 h_zPVFromTracks_[4]->Fill(zPV);
4625 h_dzPVFromTracks_[4]->Fill(zPV - (*mcPho).primaryVertex().z());
4628 p_dzPVVsR_->Fill(mcConvR_, zPV - (*mcPho).primaryVertex().z());
4629 p_dzPVVsEta_->Fill(mcConvEta_, zPV - (*mcPho).primaryVertex().z());
4630 if (!isRunCentrally_)
4631 h2_dzPVVsR_->Fill(mcConvR_, zPV - (*mcPho).primaryVertex().z());
4634 float dPhiTracksAtEcal = -99;
4635 float dEtaTracksAtEcal = -99;
4636 if (!aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[0].
isNonnull() &&
4637 aConv->bcMatchingWithTracks()[1].
isNonnull()) {
4638 nRecConvAssWithEcal_++;
4639 float recoPhi1 = aConv->ecalImpactPosition()[0].phi();
4640 float recoPhi2 = aConv->ecalImpactPosition()[1].phi();
4641 float recoEta1 = aConv->ecalImpactPosition()[0].eta();
4642 float recoEta2 = aConv->ecalImpactPosition()[1].eta();
4647 recoPhi1 = phiNormalization(recoPhi1);
4648 recoPhi2 = phiNormalization(recoPhi2);
4649 dPhiTracksAtEcal = recoPhi1 - recoPhi2;
4650 dPhiTracksAtEcal = phiNormalization(dPhiTracksAtEcal);
4651 dEtaTracksAtEcal = recoEta1 - recoEta2;
4653 h_DPhiTracksAtEcal_[
type][0]->Fill(fabs(dPhiTracksAtEcal));
4654 if (!isRunCentrally_)
4655 h2_DPhiTracksAtEcalVsR_->Fill(mcConvR_, fabs(dPhiTracksAtEcal));
4656 if (!isRunCentrally_)
4657 h2_DPhiTracksAtEcalVsEta_->Fill(mcEta_, fabs(dPhiTracksAtEcal));
4658 p_DPhiTracksAtEcalVsR_->Fill(mcConvR_, fabs(dPhiTracksAtEcal));
4659 p_DPhiTracksAtEcalVsEta_->Fill(mcEta_, fabs(dPhiTracksAtEcal));
4661 h_DEtaTracksAtEcal_[
type][0]->Fill(dEtaTracksAtEcal);
4663 if (phoIsInBarrel) {
4664 h_DPhiTracksAtEcal_[
type][1]->Fill(fabs(dPhiTracksAtEcal));
4665 h_DEtaTracksAtEcal_[
type][1]->Fill(dEtaTracksAtEcal);
4667 if (phoIsInEndcap) {
4668 h_DPhiTracksAtEcal_[
type][2]->Fill(fabs(dPhiTracksAtEcal));
4669 h_DEtaTracksAtEcal_[
type][2]->Fill(dEtaTracksAtEcal);
4673 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
4675 itAss = myAss.find(tfrb.
get());
4676 if (itAss == myAss.end())
4679 float trkProvenance = 3;
4680 if (
tracks[0]->
algoName() ==
"outInEcalSeededConv" &&
tracks[1]->algoName() ==
"outInEcalSeededConv")
4682 if (
tracks[0]->
algoName() ==
"inOutEcalSeededConv" &&
tracks[1]->algoName() ==
"inOutEcalSeededConv")
4686 (
tracks[1]->algoName() ==
"outInEcalSeededConv" &&
tracks[0]->algoName() ==
"inOutEcalSeededConv"))
4689 if (!isRunCentrally_)
4691 if (!isRunCentrally_)
4697 if (!isRunCentrally_)
4699 if (!isRunCentrally_)
4704 float simPt =
sqrt(((*itAss).second)->momentum().perp2());
4706 float refPt = -9999.;
4707 float px = 0,
py = 0;
4709 if (aConv->conversionVertex().isValid()) {
4710 reco::Track refTrack = aConv->conversionVertex().refittedTracks()[
i];
4715 float ptres = refPt - simPt;
4717 float pterror = aConv->conversionVertex().refittedTracks()[
i].ptError();
4718 if (!isRunCentrally_) {
4719 h2_PtRecVsPtSim_[0]->Fill(simPt, refPt);
4720 if (trkProvenance == 3)
4721 h2_PtRecVsPtSimMixProv_->Fill(simPt, refPt);
4724 h_TkPtPull_[0]->Fill(ptres /
pterror);
4725 if (!isRunCentrally_)
4726 h2_TkPtPull_[0]->Fill(mcEta_, ptres /
pterror);
4731 if (!aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[
i].
isNonnull())
4732 hBCEnergyOverTrackPout_[0]->
Fill(aConv->bcMatchingWithTracks()[
i]->energy() /
4733 sqrt(aConv->tracks()[
i]->outerMomentum().Mag2()));
4735 if (phoIsInBarrel) {
4737 h_TkPtPull_[1]->Fill(ptres /
pterror);
4738 if (!isRunCentrally_)
4739 h2_PtRecVsPtSim_[1]->Fill(simPt, refPt);
4741 if (!aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[
i].
isNonnull())
4742 hBCEnergyOverTrackPout_[1]->
Fill(aConv->bcMatchingWithTracks()[
i]->energy() /
4743 sqrt(aConv->tracks()[
i]->outerMomentum().Mag2()));
4745 if (phoIsInEndcap) {
4747 h_TkPtPull_[2]->Fill(ptres /
pterror);
4748 if (!isRunCentrally_)
4749 h2_PtRecVsPtSim_[2]->Fill(simPt, refPt);
4751 if (!aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[
i].
isNonnull())
4752 hBCEnergyOverTrackPout_[2]->
Fill(aConv->bcMatchingWithTracks()[
i]->energy() /
4753 sqrt(aConv->tracks()[
i]->outerMomentum().Mag2()));
4766 if (!atLeastOneRecoTwoTrackConversion) {
4767 for (
unsigned int iConv = 0; iConv < conversionsOneLeg.
size(); iConv++) {
4769 const std::vector<edm::RefToBase<reco::Track> >
tracks = aConv->tracks();
4772 h_convAlgo_->Fill(aConv->algo());
4775 std::map<const reco::Track*, TrackingParticleRef> myAss;
4776 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
4781 float eoverp = photonE /
tracks[0]->p();
4782 h_EoverP_SL_[0]->Fill(eoverp);
4783 if (phoIsInBarrel) {
4784 h_EoverP_SL_[1]->Fill(eoverp);
4786 h_EoverP_SL_[2]->Fill(eoverp);
4788 h_convSLVtxRvsZ_[0]->Fill(
tracks[0]->innerPosition().z(),
sqrt(
tracks[0]->innerPosition().Perp2()));
4789 if (fabs(mcEta_) <= 1.) {
4790 h_convSLVtxRvsZ_[1]->Fill(
tracks[0]->innerPosition().z(),
sqrt(
tracks[0]->innerPosition().Perp2()));
4792 h_convSLVtxRvsZ_[2]->Fill(
tracks[0]->innerPosition().z(),
sqrt(
tracks[0]->innerPosition().Perp2()));
4799 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV;
4802 if (
q.find(theConvTP_[0]) !=
q.end()) {
4803 trackV = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q[theConvTP_[0]];
4804 }
else if (
q.find(theConvTP_[1]) !=
q.end()) {
4805 trackV = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q[theConvTP_[1]];
4812 myAss.insert(std::make_pair(tr.
get(), theConvTP_[tpI]));
4817 h_SimConvOneMTracks_[0]->Fill(mcEta_);
4818 h_SimConvOneMTracks_[1]->Fill(mcPhi_);
4819 h_SimConvOneMTracks_[2]->Fill(mcConvR_);
4820 h_SimConvOneMTracks_[3]->Fill(mcConvZ_);
4821 h_SimConvOneMTracks_[4]->Fill((*mcPho).fourMomentum().et());
4830 if (!isRunCentrally_) {
4831 h_nSimPho_[0]->Fill(
float(nSimPho_[0]));
4832 h_nSimPho_[1]->Fill(
float(nSimPho_[1]));
4833 h_nSimConv_[0]->Fill(
float(nSimConv_[0]));
4834 h_nSimConv_[1]->Fill(
float(nSimConv_[1]));
4844 for (
unsigned int iConv = 0; iConv <
conversions.size(); iConv++) {
4846 double like = aConv->MVAout();
4847 if (like < likelihoodCut_)
4850 const std::vector<edm::RefToBase<reco::Track> >
tracks = aConv->tracks();
4860 bool phoIsInBarrel =
false;
4861 bool phoIsInEndcap =
false;
4862 if (fabs(aPho.
superCluster()->position().eta()) < 1.479) {
4863 phoIsInBarrel =
true;
4865 phoIsInEndcap =
true;
4869 if ((fabs(mcEta_) > 1.1 && fabs(mcEta_) < 1.4) && fabs(aConv->pairCotThetaSeparation()) > dCotHardCutValue_)
4871 if (fabs(aConv->pairCotThetaSeparation()) > dCotCutValue_)
4875 h_RecoConvTwoTracks_[0]->Fill(aPho.
eta());
4876 h_RecoConvTwoTracks_[1]->Fill(aPho.
phi());
4877 if (aConv->conversionVertex().isValid())
4878 h_RecoConvTwoTracks_[2]->
Fill(aConv->conversionVertex().position().perp2());
4879 h_RecoConvTwoTracks_[3]->Fill(aConv->conversionVertex().position().z());
4880 h_RecoConvTwoTracks_[4]->Fill(aPho.
et());
4883 for (std::vector<PhotonMCTruth>::const_iterator mcPho = mcPhotons.begin(); mcPho != mcPhotons.end(); mcPho++) {
4885 float mcPhi = (*mcPho).fourMomentum().phi();
4887 mcPhi_ = phiNormalization(mcPhi);
4888 mcEta_ = (*mcPho).fourMomentum().pseudoRapidity();
4889 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z());
4896 if (fabs(mcEta_) > END_HI)
4903 if ((*mcPho).isAConversion() != 1)
4905 if (!((fabs(mcEta_) <= BARL && mcConvR_ < 85) ||
4906 (fabs(mcEta_) > BARL && fabs(mcEta_) <= END_HI && fabs((*mcPho).vertex().z()) < 210)))
4912 if (fabs(
tp->vx() - (*mcPho).vertex().x()) < 0.0001 && fabs(
tp->vy() - (*mcPho).vertex().y()) < 0.0001 &&
4913 fabs(
tp->vz() - (*mcPho).vertex().z()) < 0.0001) {
4914 theConvTP_.push_back(
tp);
4918 if (theConvTP_.size() < 2)
4923 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV1, trackV2;
4925 auto itP1 =
p1.find(tk1);
4926 auto itP2 =
p2.find(tk2);
4927 bool good = (itP1 !=
p1.end()) and (not itP1->val.empty()) and (itP2 !=
p2.end()) and (not itP2->val.empty());
4929 itP1 =
p1.find(tk2);
4930 itP2 =
p2.find(tk1);
4931 good = (itP1 !=
p1.end()) and (not itP1->val.empty()) and (itP2 !=
p2.end()) and (not itP2->val.empty());
4934 std::vector<std::pair<TrackingParticleRef, double> >
const& tp1 = itP1->val;
4935 std::vector<std::pair<TrackingParticleRef, double> >
const& tp2 = itP2->val;
4940 if (
abs(tpr1->pdgId()) == 11 &&
abs(tpr2->pdgId()) == 11) {
4941 if ((tpr1->parentVertex()->sourceTracks_end() - tpr1->parentVertex()->sourceTracks_begin() == 1) &&
4942 (tpr2->parentVertex()->sourceTracks_end() - tpr2->parentVertex()->sourceTracks_begin() == 1)) {
4943 if (tpr1->parentVertex().
key() == tpr2->parentVertex().
key() &&
4944 ((*tpr1->parentVertex()->sourceTracks_begin())->
pdgId() == 22)) {
4955 h_RecoConvTwoMTracks_[0]->Fill(aPho.
eta());
4956 h_RecoConvTwoMTracks_[1]->Fill(aPho.
phi());
4957 if (aConv->conversionVertex().isValid())
4958 h_RecoConvTwoMTracks_[2]->
Fill(aConv->conversionVertex().position().perp2());
4959 h_RecoConvTwoMTracks_[3]->Fill(aConv->conversionVertex().position().z());
4960 h_RecoConvTwoMTracks_[4]->Fill(aPho.
et());
4964 if (aConv->conversionVertex().isValid()) {
4965 float chi2Prob =
ChiSquaredProbability(aConv->conversionVertex().chi2(), aConv->conversionVertex().ndof());
4966 double convR =
sqrt(aConv->conversionVertex().position().perp2());
4967 double scalar = aConv->conversionVertex().position().x() * aConv->pairMomentum().x() +
4968 aConv->conversionVertex().position().y() * aConv->pairMomentum().y();
4971 convR = -
sqrt(aConv->conversionVertex().position().perp2());
4972 h_convVtxRvsZ_[0]->Fill(fabs(aConv->conversionVertex().position().z()),
4973 sqrt(aConv->conversionVertex().position().perp2()));
4975 if (!aConv->caloCluster().empty()) {
4976 if (!isRunCentrally_)
4977 h2_etaVsRreco_[0]->Fill(aConv->caloCluster()[0]->eta(),
4978 sqrt(aConv->conversionVertex().position().perp2()));
4979 if (fabs(aConv->caloCluster()[0]->eta()) <= 1.) {
4980 h_convVtxYvsX_->Fill(aConv->conversionVertex().position().y(), aConv->conversionVertex().position().x());
4981 h_convVtxRvsZ_[1]->Fill(fabs(aConv->conversionVertex().position().z()), convR);
4983 if (!isRunCentrally_) {
4984 h_convVtxYvsX_zoom_[0]->Fill(aConv->conversionVertex().position().y(),
4985 aConv->conversionVertex().position().x());
4986 h_convVtxYvsX_zoom_[1]->Fill(aConv->conversionVertex().position().y(),
4987 aConv->conversionVertex().position().x());
4988 h_convVtxRvsZ_zoom_[0]->Fill(fabs(aConv->conversionVertex().position().z()), convR);
4989 h_convVtxRvsZ_zoom_[1]->Fill(fabs(aConv->conversionVertex().position().z()), convR);
4992 if (fabs(aConv->caloCluster()[0]->eta()) > 1.)
4993 h_convVtxRvsZ_[2]->Fill(fabs(aConv->conversionVertex().position().z()), convR);
4996 h_vtxChi2Prob_[0]->Fill(chi2Prob);
4997 h_vtxChi2_[0]->Fill(aConv->conversionVertex().normalizedChi2());
4998 if (phoIsInBarrel) {
4999 h_vtxChi2Prob_[1]->Fill(chi2Prob);
5000 h_vtxChi2_[1]->Fill(aConv->conversionVertex().normalizedChi2());
5002 if (phoIsInEndcap) {
5003 h_vtxChi2Prob_[2]->Fill(chi2Prob);
5004 h_vtxChi2_[2]->Fill(aConv->conversionVertex().normalizedChi2());
5014 for (reco::GenJetCollection::const_iterator genJetIter =
genJetCollection.begin();
5017 if (genJetIter->pt() < minPhoEtCut_)
5019 if (fabs(genJetIter->eta()) > 2.5)
5022 float mcJetPhi = genJetIter->phi();
5023 mcJetPhi_ = phiNormalization(mcJetPhi);
5024 mcJetEta_ = genJetIter->eta();
5025 float mcJetPt = genJetIter->pt();
5027 h_SimJet_[0]->Fill(mcJetEta_);
5028 h_SimJet_[1]->Fill(mcJetPhi_);
5029 h_SimJet_[2]->Fill(mcJetPt);
5031 std::vector<reco::Photon> thePhotons;
5038 float phiPho = aPho.
phi();
5039 float etaPho = aPho.
eta();
5040 float deltaPhi = phiPho - mcJetPhi_;
5041 float deltaEta = etaPho - mcJetEta_;
5050 matchingPho = *iPho;
5059 h_MatchedSimJet_[0]->Fill(mcJetEta_);
5060 h_MatchedSimJet_[1]->Fill(mcJetPhi_);
5061 h_MatchedSimJet_[2]->Fill(mcJetPt);
5063 bool phoIsInBarrel =
false;
5064 bool phoIsInEndcap =
false;
5065 if (fabs(matchingPho.
superCluster()->position().eta()) < 1.479) {
5066 phoIsInBarrel =
true;
5068 phoIsInEndcap =
true;
5071 if (phoIsInBarrel) {
5073 e.getByToken(barrelEcalHits_, ecalRecHitHandle);
5074 if (!ecalRecHitHandle.
isValid()) {
5076 labelsForToken(barrelEcalHits_,
l);
5077 edm::LogError(
"PhotonProducer") <<
"Error! Can't get the product " <<
l.module;
5081 }
else if (phoIsInEndcap) {
5083 e.getByToken(endcapEcalHits_, ecalRecHitHandle);
5084 if (!ecalRecHitHandle.
isValid()) {
5086 labelsForToken(barrelEcalHits_,
l);
5087 edm::LogError(
"PhotonProducer") <<
"Error! Can't get the product " <<
l.module;
5093 float photonE = matchingPho.
energy();
5094 float photonEt = matchingPho.
et();
5095 float r9 = matchingPho.
r9();
5096 float r1 = matchingPho.
r1x5();
5097 float r2 = matchingPho.
r2x5();
5104 std::vector<std::pair<DetId, float> >::const_iterator rhIt;
5106 bool atLeastOneDeadChannel =
false;
5110 for (rhIt = (*bcIt)->hitsAndFractions().begin(); rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
5113 if (rhIt->first == (*it).id()) {
5114 if ((*it).recoFlag() == 9) {
5115 atLeastOneDeadChannel =
true;
5123 if (atLeastOneDeadChannel) {
5124 h_MatchedSimJetBadCh_[0]->Fill(mcJetEta_);
5125 h_MatchedSimJetBadCh_[1]->Fill(mcJetPhi_);
5126 h_MatchedSimJetBadCh_[2]->Fill(mcJetPt);
5131 h_scBkgE_[0]->Fill(matchingPho.
superCluster()->energy());
5134 h_phoBkgEta_->Fill(matchingPho.
eta());
5135 h_phoBkgPhi_->Fill(matchingPho.
phi());
5136 h_phoBkgE_[0]->Fill(photonE);
5137 h_phoBkgEt_[0]->Fill(photonEt);
5138 h_phoBkgDEta_->Fill(matchingPho.
eta() - mcJetEta_);
5139 h_phoBkgDPhi_->Fill(matchingPho.
phi() - mcJetPhi_);
5141 h_r9Bkg_[0]->Fill(
r9);
5142 h_r1Bkg_[0]->Fill(
r1);
5143 h_r2Bkg_[0]->Fill(
r2);
5144 h_sigmaIetaIetaBkg_[0]->Fill(sigmaIetaIeta);
5145 h_hOverEBkg_[0]->Fill(
hOverE);
5146 h_ecalRecHitSumEtConeDR04Bkg_[0]->Fill(ecalIso);
5147 h_hcalTowerSumEtConeDR04Bkg_[0]->Fill(hcalIso);
5148 h_isoTrkSolidConeDR04Bkg_[0]->Fill(trkIso);
5149 h_nTrkSolidConeDR04Bkg_[0]->Fill(nIsoTrk);
5151 if (!isRunCentrally_) {
5152 h2_r9VsEtaBkg_->Fill(mcJetEta_,
r9);
5153 h2_r9VsEtBkg_->Fill(mcJetPt,
r9);
5154 h2_r1VsEtaBkg_->Fill(mcJetEta_,
r1);
5155 h2_r1VsEtBkg_->Fill(mcJetPt,
r1);
5156 h2_r2VsEtaBkg_->Fill(mcJetEta_,
r2);
5157 h2_r2VsEtBkg_->Fill(mcJetPt,
r2);
5158 h2_sigmaIetaIetaVsEtaBkg_->Fill(mcJetEta_, sigmaIetaIeta);
5159 h2_sigmaIetaIetaVsEtBkg_[0]->Fill(mcJetPt, sigmaIetaIeta);
5160 h2_hOverEVsEtaBkg_->Fill(mcJetEta_,
hOverE);
5161 h2_hOverEVsEtBkg_->Fill(mcJetPt,
hOverE);
5163 p_r1VsEtaBkg_->Fill(mcJetEta_,
r1);
5164 p_r1VsEtBkg_->Fill(mcJetPt,
r1);
5165 p_r2VsEtaBkg_->Fill(mcJetEta_,
r2);
5166 p_r2VsEtBkg_->Fill(mcJetPt,
r2);
5167 p_sigmaIetaIetaVsEtaBkg_->Fill(mcJetEta_, sigmaIetaIeta);
5168 p_sigmaIetaIetaVsEtBkg_[0]->Fill(mcJetPt, sigmaIetaIeta);
5169 p_hOverEVsEtaBkg_->Fill(mcJetEta_,
hOverE);
5170 p_hOverEVsEtBkg_->Fill(mcJetPt,
hOverE);
5173 if (!isRunCentrally_) {
5174 h2_ecalRecHitSumEtConeDR04VsEtaBkg_->Fill(mcJetEta_, ecalIso);
5175 h2_ecalRecHitSumEtConeDR04VsEtBkg_[0]->Fill(mcJetPt, ecalIso);
5176 h2_hcalTowerSumEtConeDR04VsEtaBkg_->Fill(mcJetEta_, hcalIso);
5177 h2_hcalTowerSumEtConeDR04VsEtBkg_[0]->Fill(mcJetPt, hcalIso);
5178 p_ecalRecHitSumEtConeDR04VsEtaBkg_->Fill(mcJetEta_, ecalIso);
5179 p_ecalRecHitSumEtConeDR04VsEtBkg_[0]->Fill(mcJetPt, ecalIso);
5180 p_hcalTowerSumEtConeDR04VsEtaBkg_->Fill(mcJetEta_, hcalIso);
5181 p_hcalTowerSumEtConeDR04VsEtBkg_[0]->Fill(mcJetPt, hcalIso);
5182 p_isoTrkSolidConeDR04VsEtaBkg_->Fill(mcJetEta_, trkIso);
5183 p_isoTrkSolidConeDR04VsEtBkg_[0]->Fill(mcJetPt, trkIso);
5184 p_nTrkSolidConeDR04VsEtaBkg_->Fill(mcJetEta_, nIsoTrk);
5185 p_nTrkSolidConeDR04VsEtBkg_[0]->Fill(mcJetPt, nIsoTrk);
5186 h2_isoTrkSolidConeDR04VsEtaBkg_->Fill(mcJetEta_, trkIso);
5187 h2_isoTrkSolidConeDR04VsEtBkg_[0]->Fill(mcJetPt, trkIso);
5188 h2_nTrkSolidConeDR04VsEtaBkg_->Fill(mcJetEta_, nIsoTrk);
5189 h2_nTrkSolidConeDR04VsEtBkg_[0]->Fill(mcJetPt, nIsoTrk);
5192 if (phoIsInBarrel) {
5193 h_r9Bkg_[1]->Fill(
r9);
5194 h_r1Bkg_[1]->Fill(
r1);
5195 h_r2Bkg_[1]->Fill(
r2);
5197 h_sigmaIetaIetaBkg_[1]->Fill(sigmaIetaIeta);
5198 h_hOverEBkg_[1]->Fill(
hOverE);
5199 h_ecalRecHitSumEtConeDR04Bkg_[1]->Fill(ecalIso);
5200 h_hcalTowerSumEtConeDR04Bkg_[1]->Fill(hcalIso);
5201 h_isoTrkSolidConeDR04Bkg_[1]->Fill(trkIso);
5202 h_nTrkSolidConeDR04Bkg_[1]->Fill(nIsoTrk);
5204 if (!isRunCentrally_) {
5205 h2_sigmaIetaIetaVsEtBkg_[1]->Fill(mcJetPt, sigmaIetaIeta);
5206 h2_isoTrkSolidConeDR04VsEtBkg_[1]->Fill(mcJetPt, trkIso);
5207 h2_nTrkSolidConeDR04VsEtBkg_[1]->Fill(mcJetPt, nIsoTrk);
5208 h2_ecalRecHitSumEtConeDR04VsEtBkg_[1]->Fill(mcJetPt, ecalIso);
5209 h2_hcalTowerSumEtConeDR04VsEtBkg_[1]->Fill(mcJetPt, hcalIso);
5210 p_sigmaIetaIetaVsEtBkg_[1]->Fill(mcJetPt, sigmaIetaIeta);
5211 p_ecalRecHitSumEtConeDR04VsEtBkg_[1]->Fill(mcJetPt, ecalIso);
5212 p_hcalTowerSumEtConeDR04VsEtBkg_[1]->Fill(mcJetPt, hcalIso);
5213 p_isoTrkSolidConeDR04VsEtBkg_[1]->Fill(mcJetPt, trkIso);
5214 p_nTrkSolidConeDR04VsEtBkg_[1]->Fill(mcJetPt, nIsoTrk);
5216 }
else if (phoIsInEndcap) {
5217 h_r9Bkg_[2]->Fill(
r9);
5218 h_r1Bkg_[2]->Fill(
r1);
5219 h_r2Bkg_[2]->Fill(
r2);
5221 h_sigmaIetaIetaBkg_[2]->Fill(sigmaIetaIeta);
5222 h_hOverEBkg_[2]->Fill(
hOverE);
5223 h_ecalRecHitSumEtConeDR04Bkg_[2]->Fill(ecalIso);
5224 h_hcalTowerSumEtConeDR04Bkg_[2]->Fill(hcalIso);
5225 h_isoTrkSolidConeDR04Bkg_[2]->Fill(trkIso);
5226 h_nTrkSolidConeDR04Bkg_[2]->Fill(nIsoTrk);
5228 if (!isRunCentrally_) {
5229 h2_sigmaIetaIetaVsEtBkg_[2]->Fill(mcJetPt, sigmaIetaIeta);
5230 h2_isoTrkSolidConeDR04VsEtBkg_[2]->Fill(mcJetPt, trkIso);
5231 h2_nTrkSolidConeDR04VsEtBkg_[2]->Fill(mcJetPt, nIsoTrk);
5232 h2_ecalRecHitSumEtConeDR04VsEtBkg_[2]->Fill(mcJetPt, ecalIso);
5233 h2_hcalTowerSumEtConeDR04VsEtBkg_[2]->Fill(mcJetPt, hcalIso);
5234 p_sigmaIetaIetaVsEtBkg_[2]->Fill(mcJetPt, sigmaIetaIeta);
5235 p_ecalRecHitSumEtConeDR04VsEtBkg_[2]->Fill(mcJetPt, ecalIso);
5236 p_hcalTowerSumEtConeDR04VsEtBkg_[2]->Fill(mcJetPt, hcalIso);
5237 p_isoTrkSolidConeDR04VsEtBkg_[2]->Fill(mcJetPt, trkIso);
5238 p_nTrkSolidConeDR04VsEtBkg_[2]->Fill(mcJetPt, nIsoTrk);
5245 for (
unsigned int iConv = 0; iConv <
conversions.size(); iConv++) {
5248 const std::vector<edm::RefToBase<reco::Track> >
tracks = aConv->tracks();
5249 double like = aConv->MVAout();
5250 if (like < likelihoodCut_)
5254 if (!aConv->caloCluster().empty()) {
5255 h_convEtaBkg_->Fill(aConv->caloCluster()[0]->eta());
5256 h_convPhiBkg_->Fill(aConv->caloCluster()[0]->phi());
5258 h_mvaOutBkg_[0]->Fill(like);
5259 float eoverp = aConv->EoverP();
5260 h_EoverPTracksBkg_[0]->Fill(eoverp);
5261 h_PoverETracksBkg_[0]->Fill(1. / eoverp);
5262 h_DCotTracksBkg_[0]->Fill(aConv->pairCotThetaSeparation());
5263 float dPhiTracksAtVtx = aConv->dPhiTracksAtVtx();
5264 h_DPhiTracksAtVtxBkg_[0]->Fill(dPhiTracksAtVtx);
5266 if (phoIsInBarrel) {
5267 h_mvaOutBkg_[1]->Fill(like);
5268 h_EoverPTracksBkg_[1]->Fill(eoverp);
5269 h_PoverETracksBkg_[1]->Fill(1. / eoverp);
5270 h_DCotTracksBkg_[1]->Fill(aConv->pairCotThetaSeparation());
5271 h_DPhiTracksAtVtxBkg_[1]->Fill(dPhiTracksAtVtx);
5272 }
else if (phoIsInEndcap) {
5273 h_mvaOutBkg_[2]->Fill(like);
5274 h_EoverPTracksBkg_[2]->Fill(eoverp);
5275 h_PoverETracksBkg_[2]->Fill(1. / eoverp);
5276 h_DCotTracksBkg_[2]->Fill(aConv->pairCotThetaSeparation());
5277 h_DPhiTracksAtVtxBkg_[2]->Fill(dPhiTracksAtVtx);
5280 if (aConv->conversionVertex().isValid()) {
5281 double convR =
sqrt(aConv->conversionVertex().position().perp2());
5282 double scalar = aConv->conversionVertex().position().x() * aConv->pairMomentum().x() +
5283 aConv->conversionVertex().position().y() * aConv->pairMomentum().y();
5285 convR = -
sqrt(aConv->conversionVertex().position().perp2());
5287 if (!isRunCentrally_) {
5288 h_convVtxRvsZBkg_[0]->Fill(fabs(aConv->conversionVertex().position().z()),
5289 sqrt(aConv->conversionVertex().position().perp2()));
5290 if (!aConv->caloCluster().empty() && fabs(aConv->caloCluster()[0]->eta()) <= 1.) {
5291 h_convVtxYvsXBkg_->Fill(aConv->conversionVertex().position().y(),
5292 aConv->conversionVertex().position().x());
5293 h_convVtxRvsZBkg_[1]->Fill(fabs(aConv->conversionVertex().position().z()), convR);
5306 if (!(mcIter->pdgId() == 22))
5308 if (mcIter->mother() !=
nullptr and !(mcIter->mother()->pdgId() == 25))
5310 if (fabs(mcIter->eta()) > 2.5)
5313 float mcPhi = mcIter->phi();
5314 float mcEta = mcIter->eta();
5316 float mcEnergy = mcIter->energy();
5318 double dR = 9999999.;
5319 float minDr = 10000.;
5323 for (
unsigned int ipho = 0; ipho < photonHandle->size(); ipho++) {
5326 double dphi = pho->phi() - mcPhi;
5328 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
5330 double deta = pho->superCluster()->position().eta() - mcEta;
5333 if (
dR < 0.1 &&
dR < minDr) {
5346 bool phoIsInBarrel =
false;
5347 bool phoIsInEndcap =
false;
5349 float phoEta = matchingPho->superCluster()->position().eta();
5350 if (fabs(phoEta) < 1.479) {
5351 phoIsInBarrel =
true;
5353 phoIsInEndcap =
true;
5356 float photonE = matchingPho->energy();
5357 float sigmaEoE = matchingPho->getCorrectedEnergyError(matchingPho->getCandidateP4type()) / matchingPho->energy();
5358 float photonEt = matchingPho->energy() / cosh(matchingPho->eta());
5361 float r9 = matchingPho->r9();
5362 float full5x5_r9 = matchingPho->full5x5_r9();
5363 float r1 = matchingPho->r1x5();
5364 float r2 = matchingPho->r2x5();
5365 float sigmaIetaIeta = matchingPho->sigmaIetaIeta();
5366 float full5x5_sieie = matchingPho->full5x5_sigmaIetaIeta();
5367 float hOverE = matchingPho->hadronicOverEm();
5368 float newhOverE = matchingPho->hadTowOverEm();
5369 float ecalIso = matchingPho->ecalRecHitSumEtConeDR04();
5370 float hcalIso = matchingPho->hcalTowerSumEtConeDR04();
5371 float newhcalIso = matchingPho->hcalTowerSumEtBcConeDR04();
5372 float trkIso = matchingPho->trkSumPtSolidConeDR04();
5373 float nIsoTrk = matchingPho->nTrkSolidConeDR04();
5375 float chargedHadIso = matchingPho->chargedHadronIso();
5376 float neutralHadIso = matchingPho->neutralHadronIso();
5377 float photonIso = matchingPho->photonIso();
5382 if ((photonEt > 14 && newhOverE < 0.15) || (photonEt > 10 && photonEt < 14 && chargedHadIso < 10)) {
5383 h_scEta_miniAOD_[0]->Fill(matchingPho->superCluster()->eta());
5384 h_scPhi_miniAOD_[0]->Fill(matchingPho->superCluster()->phi());
5386 h_phoE_miniAOD_[0][0]->Fill(photonE);
5387 h_phoEt_miniAOD_[0][0]->Fill(photonEt);
5389 h_phoERes_miniAOD_[0][0]->Fill(photonE / mcEnergy);
5390 h_phoSigmaEoE_miniAOD_[0][0]->Fill(sigmaEoE);
5392 h_r9_miniAOD_[0][0]->Fill(
r9);
5393 h_full5x5_r9_miniAOD_[0][0]->Fill(full5x5_r9);
5394 h_r1_miniAOD_[0][0]->Fill(
r1);
5395 h_r2_miniAOD_[0][0]->Fill(
r2);
5397 h_sigmaIetaIeta_miniAOD_[0][0]->Fill(sigmaIetaIeta);
5398 h_full5x5_sigmaIetaIeta_miniAOD_[0][0]->Fill(full5x5_sieie);
5399 h_hOverE_miniAOD_[0][0]->Fill(
hOverE);
5400 h_newhOverE_miniAOD_[0][0]->Fill(newhOverE);
5402 h_ecalRecHitSumEtConeDR04_miniAOD_[0][0]->Fill(ecalIso);
5403 h_hcalTowerSumEtConeDR04_miniAOD_[0][0]->Fill(hcalIso);
5404 h_hcalTowerBcSumEtConeDR04_miniAOD_[0][0]->Fill(newhcalIso);
5405 h_isoTrkSolidConeDR04_miniAOD_[0][0]->Fill(trkIso);
5406 h_nTrkSolidConeDR04_miniAOD_[0][0]->Fill(nIsoTrk);
5409 h_chHadIso_miniAOD_[0]->Fill(chargedHadIso);
5410 h_nHadIso_miniAOD_[0]->Fill(neutralHadIso);
5414 if (phoIsInBarrel) {
5415 h_phoE_miniAOD_[0][1]->Fill(photonE);
5416 h_phoEt_miniAOD_[0][1]->Fill(photonEt);
5418 h_phoERes_miniAOD_[0][1]->Fill(photonE / mcEnergy);
5419 h_phoSigmaEoE_miniAOD_[0][1]->Fill(sigmaEoE);
5421 h_r9_miniAOD_[0][1]->Fill(
r9);
5422 h_full5x5_r9_miniAOD_[0][1]->Fill(full5x5_r9);
5423 h_r1_miniAOD_[0][1]->Fill(
r1);
5424 h_r2_miniAOD_[0][1]->Fill(
r2);
5425 h_sigmaIetaIeta_miniAOD_[0][1]->Fill(sigmaIetaIeta);
5426 h_full5x5_sigmaIetaIeta_miniAOD_[0][1]->Fill(full5x5_sieie);
5427 h_hOverE_miniAOD_[0][1]->Fill(
hOverE);
5428 h_newhOverE_miniAOD_[0][1]->Fill(newhOverE);
5429 h_ecalRecHitSumEtConeDR04_miniAOD_[0][1]->Fill(ecalIso);
5430 h_hcalTowerSumEtConeDR04_miniAOD_[0][1]->Fill(hcalIso);
5431 h_hcalTowerBcSumEtConeDR04_miniAOD_[0][1]->Fill(newhcalIso);
5432 h_isoTrkSolidConeDR04_miniAOD_[0][1]->Fill(trkIso);
5433 h_nTrkSolidConeDR04_miniAOD_[0][1]->Fill(nIsoTrk);
5434 h_chHadIso_miniAOD_[1]->Fill(chargedHadIso);
5435 h_nHadIso_miniAOD_[1]->Fill(neutralHadIso);
5438 if (phoIsInEndcap) {
5439 h_phoE_miniAOD_[0][2]->Fill(photonE);
5440 h_phoEt_miniAOD_[0][2]->Fill(photonEt);
5442 h_phoERes_miniAOD_[0][2]->Fill(photonE / mcEnergy);
5443 h_phoSigmaEoE_miniAOD_[0][2]->Fill(sigmaEoE);
5444 h_r9_miniAOD_[0][2]->Fill(
r9);
5445 h_full5x5_r9_miniAOD_[0][2]->Fill(full5x5_r9);
5446 h_r1_miniAOD_[0][2]->Fill(
r1);
5447 h_r2_miniAOD_[0][2]->Fill(
r2);
5448 h_sigmaIetaIeta_miniAOD_[0][2]->Fill(sigmaIetaIeta);
5449 h_full5x5_sigmaIetaIeta_miniAOD_[0][2]->Fill(full5x5_sieie);
5450 h_hOverE_miniAOD_[0][2]->Fill(
hOverE);
5451 h_newhOverE_miniAOD_[0][2]->Fill(newhOverE);
5452 h_ecalRecHitSumEtConeDR04_miniAOD_[0][2]->Fill(ecalIso);
5453 h_hcalTowerSumEtConeDR04_miniAOD_[0][2]->Fill(hcalIso);
5454 h_hcalTowerBcSumEtConeDR04_miniAOD_[0][2]->Fill(newhcalIso);
5455 h_isoTrkSolidConeDR04_miniAOD_[0][2]->Fill(trkIso);
5456 h_nTrkSolidConeDR04_miniAOD_[0][2]->Fill(nIsoTrk);
5457 h_chHadIso_miniAOD_[2]->Fill(chargedHadIso);
5458 h_nHadIso_miniAOD_[2]->Fill(neutralHadIso);
5465 h_nPho_->Fill(
float(nPho));
5470 const float PI = 3.1415927;
5485 const float PI = 3.1415927;
5488 const float R_ECAL = 136.5;
5495 float ZEcal =
R_ECAL * sinh(EtaParticle) + Zvertex;
5505 if (EtaParticle < 0.0)
5507 float Zlen = Zend - Zvertex;
5508 float RR = Zlen / sinh(EtaParticle);
5509 Theta = atan(RR / Zend);