32 #include "CLHEP/Units/GlobalPhysicalConstants.h"
93 isRunCentrally_= pset.
getParameter<
bool>(
"isRunCentrally");
97 photonCollectionToken_ = consumes<reco::PhotonCollection>(
101 token_tp_ = consumes<TrackingParticleCollection>(
104 barrelEcalHits_ = consumes<EcalRecHitCollection>(
106 endcapEcalHits_ = consumes<EcalRecHitCollection>(
111 conversionOITrackPr_Token_ = consumes<edm::View<reco::Track> >(
113 conversionIOTrackPr_Token_ = consumes<edm::View<reco::Track> >(
121 minPhoEtCut_ = pset.
getParameter<
double>(
"minPhoEtCut");
122 convTrackMinPtCut_ = pset.
getParameter<
double>(
"convTrackMinPtCut");
123 likelihoodCut_ = pset.
getParameter<
double>(
"likelihoodCut");
125 trkIsolExtRadius_ = pset.
getParameter<
double>(
"trkIsolExtR");
126 trkIsolInnRadius_ = pset.
getParameter<
double>(
"trkIsolInnR");
129 ecalIsolRadius_ = pset.
getParameter<
double>(
"ecalIsolR");
131 hcalIsolExtRadius_ = pset.
getParameter<
double>(
"hcalIsolExtR");
132 hcalIsolInnRadius_ = pset.
getParameter<
double>(
"hcalIsolInnR");
133 hcalHitEtLow_ = pset.
getParameter<
double>(
"minHcalHitEtCut");
135 numOfTracksInCone_ = pset.
getParameter<
int>(
"maxNumOfTracksInCone");
136 trkPtSumCut_ = pset.
getParameter<
double>(
"trkPtSumCut");
137 ecalEtSumCut_ = pset.
getParameter<
double>(
"ecalEtSumCut");
138 hcalEtSumCut_ = pset.
getParameter<
double>(
"hcalEtSumCut");
140 dCotCutValue_ = pset.
getParameter<
double>(
"dCotCutValue");
141 dCotHardCutValue_ = pset.
getParameter<
double>(
"dCotHardCutValue");
143 offline_pvToken_ = consumes<reco::VertexCollection>(
146 g4_simTk_Token_ = consumes<edm::SimTrackContainer>(
edm::InputTag(
"g4SimHits"));
147 g4_simVtx_Token_ = consumes<edm::SimVertexContainer>(
edm::InputTag(
"g4SimHits"));
148 famos_simTk_Token_ = consumes<edm::SimTrackContainer>(
150 famos_simVtx_Token_ = consumes<edm::SimVertexContainer>(
152 hepMC_Token_ = consumes<edm::HepMCProduct>(
edm::InputTag(
"generator"));
153 genjets_Token_ = consumes<reco::GenJetCollection>(
171 nRecConvAssWithEcal_=0;
181 double resMin = parameters_.getParameter<
double>(
"resMin");
182 double resMax = parameters_.getParameter<
double>(
"resMax");
183 int resBin = parameters_.getParameter<
int>(
"resBin");
185 double eMin = parameters_.getParameter<
double>(
"eMin");
186 double eMax = parameters_.getParameter<
double>(
"eMax");
187 int eBin = parameters_.getParameter<
int>(
"eBin");
189 double etMin = parameters_.getParameter<
double>(
"etMin");
190 double etMax = parameters_.getParameter<
double>(
"etMax");
191 int etBin = parameters_.getParameter<
int>(
"etBin");
193 double etScale = parameters_.getParameter<
double>(
"etScale");
195 double etaMin = parameters_.getParameter<
double>(
"etaMin");
196 double etaMax = parameters_.getParameter<
double>(
"etaMax");
197 int etaBin = parameters_.getParameter<
int>(
"etaBin");
198 int etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
200 double dEtaMin = parameters_.getParameter<
double>(
"dEtaMin");
201 double dEtaMax = parameters_.getParameter<
double>(
"dEtaMax");
202 int dEtaBin = parameters_.getParameter<
int>(
"dEtaBin");
204 double phiMin = parameters_.getParameter<
double>(
"phiMin");
205 double phiMax = parameters_.getParameter<
double>(
"phiMax");
206 int phiBin = parameters_.getParameter<
int>(
"phiBin");
208 double dPhiMin = parameters_.getParameter<
double>(
"dPhiMin");
209 double dPhiMax = parameters_.getParameter<
double>(
"dPhiMax");
210 int dPhiBin = parameters_.getParameter<
int>(
"dPhiBin");
212 double rMin = parameters_.getParameter<
double>(
"rMin");
213 double rMax = parameters_.getParameter<
double>(
"rMax");
214 int rBin = parameters_.getParameter<
int>(
"rBin");
216 double zMin = parameters_.getParameter<
double>(
"zMin");
217 double zMax = parameters_.getParameter<
double>(
"zMax");
218 int zBin = parameters_.getParameter<
int>(
"zBin");
222 double r9Min = parameters_.getParameter<
double>(
"r9Min");
223 double r9Max = parameters_.getParameter<
double>(
"r9Max");
224 int r9Bin = parameters_.getParameter<
int>(
"r9Bin");
226 double dPhiTracksMin = parameters_.getParameter<
double>(
"dPhiTracksMin");
227 double dPhiTracksMax = parameters_.getParameter<
double>(
"dPhiTracksMax");
228 int dPhiTracksBin = parameters_.getParameter<
int>(
"dPhiTracksBin");
230 double dEtaTracksMin = parameters_.getParameter<
double>(
"dEtaTracksMin");
231 double dEtaTracksMax = parameters_.getParameter<
double>(
"dEtaTracksMax");
232 int dEtaTracksBin = parameters_.getParameter<
int>(
"dEtaTracksBin");
234 double dCotTracksMin = parameters_.getParameter<
double>(
"dCotTracksMin");
235 double dCotTracksMax = parameters_.getParameter<
double>(
"dCotTracksMax");
236 int dCotTracksBin = parameters_.getParameter<
int>(
"dCotTracksBin");
239 double povereMin = parameters_.getParameter<
double>(
"povereMin");
240 double povereMax = parameters_.getParameter<
double>(
"povereMax");
241 int povereBin = parameters_.getParameter<
int>(
"povereBin");
243 double eoverpMin = parameters_.getParameter<
double>(
"eoverpMin");
244 double eoverpMax = parameters_.getParameter<
double>(
"eoverpMax");
245 int eoverpBin = parameters_.getParameter<
int>(
"eoverpBin");
247 double chi2Min = parameters_.getParameter<
double>(
"chi2Min");
248 double chi2Max = parameters_.getParameter<
double>(
"chi2Max");
250 int ggMassBin = parameters_.getParameter<
int>(
"ggMassBin");
251 double ggMassMin = parameters_.getParameter<
double>(
"ggMassMin");
252 double ggMassMax = parameters_.getParameter<
double>(
"ggMassMax");
255 double rMinForXray = parameters_.getParameter<
double>(
"rMinForXray");
256 double rMaxForXray = parameters_.getParameter<
double>(
"rMaxForXray");
257 int rBinForXray = parameters_.getParameter<
int>(
"rBinForXray");
258 double zMinForXray = parameters_.getParameter<
double>(
"zMinForXray");
259 double zMaxForXray = parameters_.getParameter<
double>(
"zMaxForXray");
260 int zBinForXray = parameters_.getParameter<
int>(
"zBinForXray");
261 int zBin2ForXray = parameters_.getParameter<
int>(
"zBin2ForXray");
274 if ( ! isRunCentrally_ ) {
275 h_nSimPho_[0] =
dbe_->
book1D(histname,
"# of Sim photons per event ",20,-0.5,19.5);
276 histname =
"SimPhoMotherEt";
277 h_SimPhoMotherEt_[0] =
dbe_->
book1D(histname,
"Sim photon Mother tranverse energy spectrum",etBin,etMin,etMax);
278 h_SimPhoMotherEta_[0] =
dbe_->
book1D(
"SimPhoMotherEta",
" Sim Photon Mother Eta ",etaBin,etaMin, etaMax) ;
279 histname =
"SimPhoMotherEtMatched";
280 h_SimPhoMotherEt_[1] =
dbe_->
book1D(histname,
"Sim photon matched by a reco Photon: Mother tranverse energy spectrum",etBin,etMin,etMax);
281 h_SimPhoMotherEta_[1] =
dbe_->
book1D(
"SimPhoMotherEtaMatched",
" Sim Photon matched by a reco Photon: Mother Eta ",etaBin,etaMin, etaMax) ;
284 histname =
"h_SimPhoEta";
285 h_SimPho_[0] =
dbe_->
book1D(histname,
" All photons simulated #eta",etaBin,etaMin, etaMax);
286 histname =
"h_SimPhoPhi";
287 h_SimPho_[1] =
dbe_->
book1D(histname,
" All photons simulated #phi",phiBin,phiMin, phiMax);
288 histname =
"h_SimPhoEt";
289 h_SimPho_[2] =
dbe_->
book1D(histname,
" All photons simulated Et",etBin,etMin, etMax);
291 histname =
"nOfSimPhotonsMatched";
292 h_nSimPho_[1] =
dbe_->
book1D(histname,
"# of Sim photons matched by a reco Photon per event ",20,-0.5,19.5);
293 histname =
"h_MatchedSimPhoEta";
294 h_MatchedSimPho_[0] =
dbe_->
book1D(histname,
" Matching photons simulated #eta",etaBin,etaMin, etaMax);
295 histname =
"h_MatchedSimPhoPhi";
296 h_MatchedSimPho_[1] =
dbe_->
book1D(histname,
" Matching photons simulated #phi",phiBin,phiMin, phiMax);
297 histname =
"h_MatchedSimPhoEt";
298 h_MatchedSimPho_[2] =
dbe_->
book1D(histname,
" Matching photons simulated Et",etBin,etMin, etMax);
300 histname =
"h_MatchedSimPhoBadChEta";
301 h_MatchedSimPhoBadCh_[0] =
dbe_->
book1D(histname,
" Matching photons simulated #eta",etaBin,etaMin, etaMax);
302 histname =
"h_MatchedSimPhoBadChPhi";
303 h_MatchedSimPhoBadCh_[1] =
dbe_->
book1D(histname,
" Matching photons simulated #phi",phiBin,phiMin, phiMax);
304 histname =
"h_MatchedSimPhoBadChEt";
305 h_MatchedSimPhoBadCh_[2] =
dbe_->
book1D(histname,
" Matching photons simulated Et",etBin,etMin, etMax);
309 histname =
"nOfSimConversions";
310 if ( ! isRunCentrally_ ) {
311 h_nSimConv_[0] =
dbe_->
book1D(histname,
"# of Sim conversions per event ",20,-0.5,19.5);
312 histname =
"nOfVisSimConversions";
313 h_nSimConv_[1] =
dbe_->
book1D(histname,
"# of Sim conversions per event ",20,-0.5,19.5);
316 histname =
"h_AllSimConvEta";
317 h_AllSimConv_[0] =
dbe_->
book1D(histname,
" All conversions: simulated #eta",etaBin2,etaMin,etaMax);
318 histname =
"h_AllSimConvPhi";
319 h_AllSimConv_[1] =
dbe_->
book1D(histname,
" All conversions: simulated #phi",phiBin,phiMin,phiMax);
320 histname =
"h_AllSimConvR";
321 h_AllSimConv_[2] =
dbe_->
book1D(histname,
" All conversions: simulated R",rBin,rMin,rMax);
322 histname =
"h_AllSimConvZ";
323 h_AllSimConv_[3] =
dbe_->
book1D(histname,
" All conversions: simulated Z",zBin,zMin,zMax);
324 histname =
"h_AllSimConvEt";
325 h_AllSimConv_[4] =
dbe_->
book1D(histname,
" All conversions: simulated Et",etBin,etMin,etMax);
327 histname =
"h_VisSimConvEta";
328 h_VisSimConv_[0] =
dbe_->
book1D(histname,
" All vis conversions: simulated #eta",etaBin2,etaMin, etaMax);
329 histname =
"h_VisSimConvPhi";
330 h_VisSimConv_[1] =
dbe_->
book1D(histname,
" All vis conversions: simulated #phi",phiBin,phiMin, phiMax);
331 histname =
"h_VisSimConvR";
332 h_VisSimConv_[2] =
dbe_->
book1D(histname,
" All vis conversions: simulated R",rBin,rMin,rMax);
333 histname =
"h_VisSimConvZ";
334 h_VisSimConv_[3] =
dbe_->
book1D(histname,
" All vis conversions: simulated Z",zBin,zMin, zMax);
335 histname =
"h_VisSimConvEt";
336 h_VisSimConv_[4] =
dbe_->
book1D(histname,
" All vis conversions: simulated Et",etBin,etMin, etMax);
338 histname =
"h_SimConvOneTracksEta";
339 h_SimConvOneTracks_[0] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco tracks: simulated #eta",etaBin2,etaMin, etaMax);
340 histname =
"h_SimConvOneTracksPhi";
341 h_SimConvOneTracks_[1] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco tracks: simulated #phi",phiBin,phiMin, phiMax);
342 histname =
"h_SimConvOneTracksR";
343 h_SimConvOneTracks_[2] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco tracks: simulated R",rBin,rMin, rMax);
344 histname =
"h_SimConvOneTracksZ";
345 h_SimConvOneTracks_[3] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco tracks: simulated Z",zBin,zMin, zMax);
346 histname =
"h_SimConvOneTracksEt";
347 h_SimConvOneTracks_[4] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco tracks: simulated Et",etBin,etMin, etMax);
349 histname =
"h_SimConvTwoMTracksEta";
350 h_SimConvTwoMTracks_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #eta",etaBin2,etaMin, etaMax);
351 histname =
"h_SimConvTwoMTracksPhi";
352 h_SimConvTwoMTracks_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #phi",phiBin,phiMin, phiMax);
353 histname =
"h_SimConvTwoMTracksR";
354 h_SimConvTwoMTracks_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated R",rBin,rMin, rMax);
355 histname =
"h_SimConvTwoMTracksZ";
356 h_SimConvTwoMTracks_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Z",zBin,zMin, zMax);
357 histname =
"h_SimConvTwoMTracksEt";
358 h_SimConvTwoMTracks_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Et",etBin,etMin, etMax);
360 histname =
"h_SimConvTwoTracksEta";
361 h_SimConvTwoTracks_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated #eta",etaBin2,etaMin, etaMax);
362 histname =
"h_SimConvTwoTracksPhi";
363 h_SimConvTwoTracks_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated #phi",phiBin,phiMin, phiMax);
364 histname =
"h_SimConvTwoTracksR";
365 h_SimConvTwoTracks_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated R",rBin,rMin, rMax);
366 histname =
"h_SimConvTwoTracksZ";
367 h_SimConvTwoTracks_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Z",zBin,zMin, zMax);
368 histname =
"h_SimConvTwoTracksEt";
369 h_SimConvTwoTracks_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Et",etBin,etMin, etMax);
371 histname =
"h_SimConvOneMTracksEta";
372 h_SimConvOneMTracks_[0] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated #eta",etaBin2,etaMin, etaMax);
373 histname =
"h_SimConvOneMTracksPhi";
374 h_SimConvOneMTracks_[1] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated #phi",phiBin,phiMin, phiMax);
375 histname =
"h_SimConvOneMTracksR";
376 h_SimConvOneMTracks_[2] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated R",rBin,rMin, rMax);
377 histname =
"h_SimConvOneMTracksZ";
378 h_SimConvOneMTracks_[3] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated Z",zBin,zMin, zMax);
379 histname =
"h_SimConvOneMTracksEt";
380 h_SimConvOneMTracks_[4] =
dbe_->
book1D(histname,
" All vis conversions with 1 reco-matching tracks: simulated Et",etBin,etMin, etMax);
382 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0";
383 h_SimConvTwoMTracksAndVtxPGT0_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
384 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0";
385 h_SimConvTwoMTracksAndVtxPGT0_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
386 histname =
"h_SimConvTwoMTracksRAndVtxPGT0";
387 h_SimConvTwoMTracksAndVtxPGT0_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
388 histname =
"h_SimConvTwoMTracksZAndVtxPGT0";
389 h_SimConvTwoMTracksAndVtxPGT0_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
390 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0";
391 h_SimConvTwoMTracksAndVtxPGT0_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
393 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0005";
394 h_SimConvTwoMTracksAndVtxPGT0005_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
395 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0005";
396 h_SimConvTwoMTracksAndVtxPGT0005_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
397 histname =
"h_SimConvTwoMTracksRAndVtxPGT0005";
398 h_SimConvTwoMTracksAndVtxPGT0005_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
399 histname =
"h_SimConvTwoMTracksZAndVtxPGT0005";
400 h_SimConvTwoMTracksAndVtxPGT0005_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
401 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0005";
402 h_SimConvTwoMTracksAndVtxPGT0005_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
406 if ( ! isRunCentrally_ ) {
407 h_SimConvEtaPix_[0] =
dbe_->
book1D(
"simConvEtaPix",
" sim converted Photon Eta: Pix ",etaBin,etaMin, etaMax) ;
408 h_simTkPt_ =
dbe_->
book1D(
"simTkPt",
"Sim conversion tracks pt ",etBin*3,0.,etMax);
409 h_simTkEta_ =
dbe_->
book1D(
"simTkEta",
"Sim conversion tracks eta ",etaBin,etaMin,etaMax);
410 h_simConvVtxRvsZ_[0] =
dbe_->
book2D(
"simConvVtxRvsZAll",
" Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
411 h_simConvVtxRvsZ_[1] =
dbe_->
book2D(
"simConvVtxRvsZBarrel",
" Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
412 h_simConvVtxRvsZ_[2] =
dbe_->
book2D(
"simConvVtxRvsZEndcap",
" Photon Sim conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
413 h_simConvVtxYvsX_ =
dbe_->
book2D(
"simConvVtxYvsXTrkBarrel",
" Photon Sim conversion vtx position, (x,y) eta<1 ",100, -80., 80., 100, -80., 80.);
417 histname =
"h_SimJetEta";
418 h_SimJet_[0] =
dbe_->
book1D(histname,
" Jet bkg simulated #eta",etaBin,etaMin, etaMax);
419 histname =
"h_SimJetPhi";
420 h_SimJet_[1] =
dbe_->
book1D(histname,
" Jet bkg simulated #phi",phiBin,phiMin, phiMax);
421 histname =
"h_SimJetEt";
422 h_SimJet_[2] =
dbe_->
book1D(histname,
" Jet bkg simulated Et",etBin,etMin, etMax);
424 histname =
"h_MatchedSimJetEta";
425 h_MatchedSimJet_[0] =
dbe_->
book1D(histname,
" Matching jet simulated #eta",etaBin,etaMin, etaMax);
426 histname =
"h_MatchedSimJetPhi";
427 h_MatchedSimJet_[1] =
dbe_->
book1D(histname,
" Matching jet simulated #phi",phiBin,phiMin, phiMax);
428 histname =
"h_MatchedSimJetEt";
429 h_MatchedSimJet_[2] =
dbe_->
book1D(histname,
" Matching jet simulated Et",etBin,etMin, etMax);
431 histname =
"h_MatchedSimJetBadChEta";
432 h_MatchedSimJetBadCh_[0] =
dbe_->
book1D(histname,
" Matching jet simulated #eta",etaBin,etaMin, etaMax);
433 histname =
"h_MatchedSimJetBadChPhi";
434 h_MatchedSimJetBadCh_[1] =
dbe_->
book1D(histname,
" Matching jet simulated #phi",phiBin,phiMin, phiMax);
435 histname =
"h_MatchedSimJetBadChEt";
436 h_MatchedSimJetBadCh_[2] =
dbe_->
book1D(histname,
" Matching jet simulated Et",etBin,etMin, etMax);
441 histname =
"nOfPhotons";
442 h_nPho_ =
dbe_->
book1D(histname,
"# of Reco photons per event ",20,-0.5,19.5);
444 h_scBkgEta_ =
dbe_->
book1D(
"scBkgEta",
" SC Bkg Eta ",etaBin,etaMin, etaMax) ;
445 h_scBkgPhi_ =
dbe_->
book1D(
"scBkgPhi",
" SC Bkg Phi ",phiBin,phiMin,phiMax) ;
447 h_phoBkgEta_ =
dbe_->
book1D(
"phoBkgEta",
" Photon Bkg Eta ",etaBin,etaMin, etaMax) ;
448 h_phoBkgPhi_ =
dbe_->
book1D(
"phoBkgPhi",
" Photon Bkg Phi ",phiBin,phiMin,phiMax) ;
450 h_phoBkgDEta_ =
dbe_->
book1D(
"phoBkgDEta",
" Photon Eta(rec)-Eta(true) ",dEtaBin,dEtaMin, dEtaMax) ;
451 h_phoBkgDPhi_ =
dbe_->
book1D(
"phoBkgDPhi",
" Photon Phi(rec)-Phi(true) ",dPhiBin,dPhiMin,dPhiMax) ;
453 histname =
"phoBkgE";
454 h_phoBkgE_[0]=
dbe_->
book1D(histname+
"All",
" Photon Bkg Energy: All ecal ", eBin,eMin, eMax);
455 h_phoBkgE_[1]=
dbe_->
book1D(histname+
"Barrel",
" Photon Bkg Energy: barrel ",eBin,eMin, eMax);
456 h_phoBkgE_[2]=
dbe_->
book1D(histname+
"Endcap",
" Photon Bkg Energy: Endcap ",eBin,eMin, eMax);
458 histname =
"phoBkgEt";
459 h_phoBkgEt_[0] =
dbe_->
book1D(histname+
"All",
" Photon Bkg Transverse Energy: All ecal ", etBin,etMin, etMax);
460 h_phoBkgEt_[1] =
dbe_->
book1D(histname+
"Barrel",
" Photon Bkg Transverse Energy: Barrel ",etBin,etMin, etMax);
461 h_phoBkgEt_[2] =
dbe_->
book1D(histname+
"Endcap",
" Photon BkgTransverse Energy: Endcap ",etBin,etMin, etMax);
465 h_scBkgE_[0] =
dbe_->
book1D(histname+
"All",
" SC bkg Energy: All Ecal ",eBin,eMin, eMax);
466 h_scBkgE_[1] =
dbe_->
book1D(histname+
"Barrel",
" SC bkg Energy: Barrel ",eBin,eMin, eMax);
467 h_scBkgE_[2] =
dbe_->
book1D(histname+
"Endcap",
" SC bkg Energy: Endcap ",eBin,eMin, eMax);
468 histname =
"scBkgEt";
469 h_scBkgEt_[0] =
dbe_->
book1D(histname+
"All",
" SC bkg Et: All Ecal ",eBin,eMin, eMax);
470 h_scBkgEt_[1] =
dbe_->
book1D(histname+
"Barrel",
" SC bkg Et: Barrel ",eBin,eMin, eMax);
471 h_scBkgEt_[2] =
dbe_->
book1D(histname+
"Endcap",
" SC bkg Et: Endcap ",eBin,eMin, eMax);
474 h_r9Bkg_[0] =
dbe_->
book1D(histname+
"All",
" r9 bkg: All Ecal",r9Bin,r9Min, r9Max) ;
475 h_r9Bkg_[1] =
dbe_->
book1D(histname+
"Barrel",
" r9 bkg: Barrel ",r9Bin,r9Min, r9Max) ;
476 h_r9Bkg_[2] =
dbe_->
book1D(histname+
"Endcap",
" r9 bkg: Endcap ",r9Bin,r9Min, r9Max) ;
478 histname=
"R9VsEtaBkg";
479 if ( ! isRunCentrally_ ) h2_r9VsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg r9 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
481 histname=
"R9VsEtBkg";
482 if ( ! isRunCentrally_ ) h2_r9VsEtBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons r9 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
485 h_r1Bkg_[0] =
dbe_->
book1D(histname+
"All",
" Bkg photon e1x5/e5x5: All Ecal",r9Bin,r9Min, r9Max) ;
486 h_r1Bkg_[1] =
dbe_->
book1D(histname+
"Barrel",
" Bkg photon e1x5/e5x5: Barrel ",r9Bin,r9Min, r9Max) ;
487 h_r1Bkg_[2] =
dbe_->
book1D(histname+
"Endcap",
" Bkg photon e1x5/e5x5: Endcap ",r9Bin,r9Min, r9Max) ;
489 histname=
"R1VsEtaBkg";
490 if ( ! isRunCentrally_ ) h2_r1VsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons e1x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
491 histname=
"pR1VsEtaBkg";
492 if ( ! isRunCentrally_ ) p_r1VsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons e1x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
494 histname=
"R1VsEtBkg";
495 if ( ! isRunCentrally_ ) h2_r1VsEtBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons e1x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
496 histname=
"pR1VsEtBkg";
497 if ( ! isRunCentrally_ ) p_r1VsEtBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons e2x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
500 h_r2Bkg_[0] =
dbe_->
book1D(histname+
"All",
" Bkg photon e2x5/e5x5: All Ecal",r9Bin,r9Min, r9Max) ;
501 h_r2Bkg_[1] =
dbe_->
book1D(histname+
"Barrel",
" Bkg photon e2x5/e5x5: Barrel ",r9Bin,r9Min, r9Max) ;
502 h_r2Bkg_[2] =
dbe_->
book1D(histname+
"Endcap",
" Bkg photon e2x5/e5x5: Endcap ",r9Bin,r9Min, r9Max) ;
504 histname=
"R2VsEtaBkg";
505 if ( ! isRunCentrally_ ) h2_r2VsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons e2x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
506 histname=
"pR2VsEtaBkg";
507 if ( ! isRunCentrally_ ) p_r2VsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons e2x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
509 histname=
"R2VsEtBkg";
510 if ( ! isRunCentrally_ ) h2_r2VsEtBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons e2x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
511 histname=
"pR2VsEtBkg";
512 if ( ! isRunCentrally_ ) p_r2VsEtBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons e2x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
515 histname =
"sigmaIetaIetaBkg";
516 h_sigmaIetaIetaBkg_[0] =
dbe_->
book1D(histname+
"All",
"Bkg sigmaIetaIeta: All Ecal",100,0., 0.1) ;
517 h_sigmaIetaIetaBkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"Bkg sigmaIetaIeta: Barrel ", 100,0., 0.05) ;
518 h_sigmaIetaIetaBkg_[2] =
dbe_->
book1D(histname+
"Endcap",
"Bkg sigmaIetaIeta: Endcap ", 100,0., 0.1) ;
520 histname=
"sigmaIetaIetaVsEtaBkg";
521 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons sigmaIetaIeta vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
522 histname=
"pSigmaIetaIetaVsEtaBkg";
523 if ( ! isRunCentrally_ ) p_sigmaIetaIetaVsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons sigmaIetaIeta vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
525 histname=
"sigmaIetaIetaVsEtBkg";
526 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEtBkg_[0] =
dbe_->
book2D(histname+
"All",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
527 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEtBkg_[1] =
dbe_->
book2D(histname+
"Barrel",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
528 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEtBkg_[2] =
dbe_->
book2D(histname+
"Endcap",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
530 histname=
"pSigmaIetaIetaVsEtBkg";
531 if ( ! isRunCentrally_ ) p_sigmaIetaIetaVsEtBkg_[0] =
dbe_->
bookProfile(histname+
"All",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
532 if ( ! isRunCentrally_ ) p_sigmaIetaIetaVsEtBkg_[1] =
dbe_->
bookProfile(histname+
"Barrel",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
533 if ( ! isRunCentrally_ ) p_sigmaIetaIetaVsEtBkg_[2] =
dbe_->
bookProfile(histname+
"Endcap",
" Bkg photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
535 histname =
"hOverEBkg";
536 h_hOverEBkg_[0] =
dbe_->
book1D(histname+
"All",
"H/E bkg: All Ecal",100,0., 1.) ;
537 h_hOverEBkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"H/E bkg: Barrel ", 100,0., 1.) ;
538 h_hOverEBkg_[2] =
dbe_->
book1D(histname+
"Endcap",
"H/E bkg: Endcap ", 100,0., 1.) ;
540 histname=
"pHOverEVsEtaBkg";
541 if ( ! isRunCentrally_ ) p_hOverEVsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg H/E vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
542 histname=
"pHOverEVsEtBkg";
543 if ( ! isRunCentrally_ ) p_hOverEVsEtBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
544 if ( ! isRunCentrally_ ) {
545 histname=
"hOverEVsEtaBkg";
546 h2_hOverEVsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg H/E vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
548 histname=
"hOverEVsEtBkg";
549 h2_hOverEVsEtBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
552 histname =
"ecalRecHitSumEtConeDR04Bkg";
553 h_ecalRecHitSumEtConeDR04Bkg_[0] =
dbe_->
book1D(histname+
"All",
"bkg ecalRecHitSumEtDR04: All Ecal",etBin,etMin,50.);
554 h_ecalRecHitSumEtConeDR04Bkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"bkg ecalRecHitSumEtDR04: Barrel ", etBin,etMin,50.);
555 h_ecalRecHitSumEtConeDR04Bkg_[2] =
dbe_->
book1D(histname+
"Endcap",
"bkg ecalRecHitSumEtDR04: Endcap ", etBin,etMin,50.);
557 if ( ! isRunCentrally_ ) {
558 histname=
"ecalRecHitSumEtConeDR04VsEtaBkg";
559 h2_ecalRecHitSumEtConeDR04VsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" bkg ecalRecHitSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*etScale);
560 histname=
"ecalRecHitSumEtConeDR04VsEtBkg";
561 h2_ecalRecHitSumEtConeDR04VsEtBkg_[0] =
dbe_->
book2D(histname+
"All",
" Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
562 h2_ecalRecHitSumEtConeDR04VsEtBkg_[1] =
dbe_->
book2D(histname+
"Barrel",
" Bkg ecalRecHitSumEtDR04 vs Et: Barrel ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
563 h2_ecalRecHitSumEtConeDR04VsEtBkg_[2] =
dbe_->
book2D(histname+
"Endcap",
" Bkg ecalRecHitSumEtDR04 vs Et: Endcap ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
564 histname=
"hcalTowerSumEtConeDR04VsEtaBkg";
565 h2_hcalTowerSumEtConeDR04VsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" bkg hcalTowerSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*etScale);
566 histname=
"hcalTowerSumEtConeDR04VsEtBkg";
567 h2_hcalTowerSumEtConeDR04VsEtBkg_[0] =
dbe_->
book2D(histname+
"All",
" Bkg hcalTowerSumEtDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
568 h2_hcalTowerSumEtConeDR04VsEtBkg_[1] =
dbe_->
book2D(histname+
"Barrel",
" Bkg hcalTowerSumEtDR04 vs Et: Barrel ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
569 h2_hcalTowerSumEtConeDR04VsEtBkg_[2] =
dbe_->
book2D(histname+
"Endcap",
" Bkg hcalTowerSumEtDR04 vs Et: Endcap ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
572 histname=
"pEcalRecHitSumEtConeDR04VsEtaBkg";
573 if ( ! isRunCentrally_ ) p_ecalRecHitSumEtConeDR04VsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
"bkg photons ecalRecHitSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*etScale,
"");
575 histname=
"pEcalRecHitSumEtConeDR04VsEtBkg";
576 if ( ! isRunCentrally_ ) p_ecalRecHitSumEtConeDR04VsEtBkg_[0] =
dbe_->
bookProfile(histname+
"All",
"Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
577 if ( ! isRunCentrally_ ) p_ecalRecHitSumEtConeDR04VsEtBkg_[1] =
dbe_->
bookProfile(histname+
"Barrel",
"Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
578 if ( ! isRunCentrally_ ) p_ecalRecHitSumEtConeDR04VsEtBkg_[2] =
dbe_->
bookProfile(histname+
"Endcap",
"Bkg ecalRecHitSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
580 histname =
"hcalTowerSumEtConeDR04Bkg";
581 h_hcalTowerSumEtConeDR04Bkg_[0] =
dbe_->
book1D(histname+
"All",
"bkg hcalTowerSumEtDR04: All Ecal",etBin,etMin,20.);
582 h_hcalTowerSumEtConeDR04Bkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"bkg hcalTowerSumEtDR04: Barrel ", etBin,etMin,20.);
583 h_hcalTowerSumEtConeDR04Bkg_[2] =
dbe_->
book1D(histname+
"Endcap",
"bkg hcalTowerSumEtDR04: Endcap ", etBin,etMin,20.);
585 histname=
"pHcalTowerSumEtConeDR04VsEtaBkg";
586 if ( ! isRunCentrally_ ) p_hcalTowerSumEtConeDR04VsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
"bkg photons hcalTowerSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*etScale,
"");
588 histname=
"pHcalTowerSumEtConeDR04VsEtBkg";
589 if ( ! isRunCentrally_ ) p_hcalTowerSumEtConeDR04VsEtBkg_[0] =
dbe_->
bookProfile(histname+
"All",
"Bkg hcalTowerSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
590 if ( ! isRunCentrally_ ) p_hcalTowerSumEtConeDR04VsEtBkg_[1] =
dbe_->
bookProfile(histname+
"Barrel",
"Bkg hcalTowerSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
591 if ( ! isRunCentrally_ ) p_hcalTowerSumEtConeDR04VsEtBkg_[2] =
dbe_->
bookProfile(histname+
"Endcap",
"Bkg hcalTowerSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
593 histname =
"isoTrkSolidConeDR04Bkg";
594 h_isoTrkSolidConeDR04Bkg_[0] =
dbe_->
book1D(histname+
"All",
"isoTrkSolidConeDR04 Bkg: All Ecal",etBin,etMin,etMax*0.1);
595 h_isoTrkSolidConeDR04Bkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"isoTrkSolidConeDR04 Bkg: Barrel ", etBin,etMin,etMax*0.1);
596 h_isoTrkSolidConeDR04Bkg_[2] =
dbe_->
book1D(histname+
"Endcap",
"isoTrkSolidConeDR04 Bkg: Endcap ", etBin,etMin,etMax*0.1);
598 histname=
"isoTrkSolidConeDR04VsEtaBkg";
599 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons isoTrkSolidConeDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1);
600 histname=
"pIsoTrkSolidConeDR04VsEtaBkg";
601 if ( ! isRunCentrally_ ) p_isoTrkSolidConeDR04VsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons isoTrkSolidConeDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1);
603 histname=
"isoTrkSolidConeDR04VsEtBkg";
604 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEtBkg_[0] =
dbe_->
book2D(histname+
"All",
" Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
605 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEtBkg_[1] =
dbe_->
book2D(histname+
"Barrel",
" Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
606 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEtBkg_[2] =
dbe_->
book2D(histname+
"Endcap",
" Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
607 histname=
"pIsoTrkSolidConeDR04VsEtBkg";
608 if ( ! isRunCentrally_ ) p_isoTrkSolidConeDR04VsEtBkg_[0] =
dbe_->
bookProfile(histname+
"All",
" Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
609 if ( ! isRunCentrally_ ) p_isoTrkSolidConeDR04VsEtBkg_[1] =
dbe_->
bookProfile(histname+
"Barrel",
" Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
610 if ( ! isRunCentrally_ ) p_isoTrkSolidConeDR04VsEtBkg_[2] =
dbe_->
bookProfile(histname+
"Endcap",
" Bkg photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
612 histname =
"nTrkSolidConeDR04Bkg";
613 h_nTrkSolidConeDR04Bkg_[0] =
dbe_->
book1D(histname+
"All",
"Bkg nTrkSolidConeDR04: All Ecal",20,0., 20) ;
614 h_nTrkSolidConeDR04Bkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"Bkg nTrkSolidConeDR04: Barrel ", 20,0., 20) ;
615 h_nTrkSolidConeDR04Bkg_[2] =
dbe_->
book1D(histname+
"Endcap",
"Bkg nTrkSolidConeDR04: Endcap ", 20,0., 20) ;
617 histname=
"nTrkSolidConeDR04VsEtaBkg";
618 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEtaBkg_ =
dbe_->
book2D(histname+
"All",
" Bkg photons nTrkSolidConeDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, 20,0., 20) ;
619 histname=
"p_nTrkSolidConeDR04VsEtaBkg";
620 if ( ! isRunCentrally_ ) p_nTrkSolidConeDR04VsEtaBkg_ =
dbe_->
bookProfile(histname+
"All",
" Bkg photons nTrkSolidConeDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, 20,0., 20) ;
622 histname=
"nTrkSolidConeDR04VsEtBkg";
623 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEtBkg_[0] =
dbe_->
book2D(histname+
"All",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, 20,0., 20) ;
624 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEtBkg_[1] =
dbe_->
book2D(histname+
"Barrel",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, 20,0., 20) ;
625 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEtBkg_[2] =
dbe_->
book2D(histname+
"Endcap",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, 20,0., 20) ;
627 histname=
"pnTrkSolidConeDR04VsEtBkg";
628 if ( ! isRunCentrally_ ) p_nTrkSolidConeDR04VsEtBkg_[0] =
dbe_->
bookProfile(histname+
"All",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, 20,0., 20) ;
629 if ( ! isRunCentrally_ ) p_nTrkSolidConeDR04VsEtBkg_[1] =
dbe_->
bookProfile(histname+
"Barrel",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, 20,0., 20) ;
630 if ( ! isRunCentrally_ ) p_nTrkSolidConeDR04VsEtBkg_[2] =
dbe_->
bookProfile(histname+
"Endcap",
"Bkg photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, 20,0., 20) ;
632 h_convEtaBkg_ =
dbe_->
book1D(
"convEtaBkg",
" converted Photon Bkg Eta 2 tracks",etaBin,etaMin, etaMax) ;
633 h_convPhiBkg_ =
dbe_->
book1D(
"convPhiBkg",
" converted Photon Bkg Phi ",phiBin,phiMin,phiMax) ;
635 histname=
"mvaOutBkg";
636 h_mvaOutBkg_[0] =
dbe_->
book1D(histname+
"All",
" mvaOut conversions bkg : All Ecal",100, 0., 1.);
637 h_mvaOutBkg_[1] =
dbe_->
book1D(histname+
"Barrel",
" mvaOut conversions bkg: Barrel Ecal",100, 0., 1.);
638 h_mvaOutBkg_[2] =
dbe_->
book1D(histname+
"Endcap",
" mvaOut conversions bkg: Endcap Ecal",100, 0., 1.);
640 histname=
"PoverEtracksBkg";
641 h_PoverETracksBkg_[0] =
dbe_->
book1D(histname+
"All",
" bkg photons conversion p/E: all Ecal ",povereBin, povereMin, povereMax);
642 h_PoverETracksBkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"bkg photons conversion p/E: Barrel Ecal",povereBin, povereMin, povereMax);
643 h_PoverETracksBkg_[2] =
dbe_->
book1D(histname+
"Endcap",
" bkg photons conversion p/E: Endcap Ecal ",povereBin, povereMin, povereMax);
645 histname=
"EoverPtracksBkg";
646 h_EoverPTracksBkg_[0] =
dbe_->
book1D(histname+
"All",
" bkg photons conversion E/p: all Ecal ",eoverpBin, eoverpMin, eoverpMax);
647 h_EoverPTracksBkg_[1] =
dbe_->
book1D(histname+
"Barrel",
"bkg photons conversion E/p: Barrel Ecal",eoverpBin, eoverpMin, eoverpMax);
648 h_EoverPTracksBkg_[2] =
dbe_->
book1D(histname+
"Endcap",
" bkg photons conversion E/p: Endcap Ecal ",eoverpBin, eoverpMin, eoverpMax);
650 histname=
"hDCotTracksBkg";
651 h_DCotTracksBkg_[0]=
dbe_->
book1D(histname+
"All",
" bkg Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
652 h_DCotTracksBkg_[1]=
dbe_->
book1D(histname+
"Barrel",
" bkg Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
653 h_DCotTracksBkg_[2]=
dbe_->
book1D(histname+
"Endcap",
" bkg Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
655 histname=
"hDPhiTracksAtVtxBkg";
656 h_DPhiTracksAtVtxBkg_[0] =
dbe_->
book1D(histname+
"All",
" Bkg Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
657 h_DPhiTracksAtVtxBkg_[1] =
dbe_->
book1D(histname+
"Barrel",
" Bkg Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
658 h_DPhiTracksAtVtxBkg_[2] =
dbe_->
book1D(histname+
"Endcap",
" Bkg Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
660 if ( ! isRunCentrally_ ) {
661 h_convVtxRvsZBkg_[0] =
dbe_->
book2D(
"convVtxRvsZAllBkg",
" Bkg Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
662 h_convVtxRvsZBkg_[1] =
dbe_->
book2D(
"convVtxRvsZBarrelBkg",
" Bkg Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
663 h_convVtxYvsXBkg_ =
dbe_->
book2D(
"convVtxYvsXTrkBarrelBkg",
" Bkg Photon Reco conversion vtx position, (x,y) eta<1 ",100, -80., 80., 100, -80., 80.);
669 histname=
"nOfflineVtx";
670 h_nRecoVtx_ =
dbe_->
book1D(histname,
"# of Offline Vertices",80, -0.5, 79.5);
672 h_phoEta_[0] =
dbe_->
book1D(
"phoEta",
" Photon Eta ",etaBin,etaMin, etaMax) ;
673 h_phoPhi_[0] =
dbe_->
book1D(
"phoPhi",
" Photon Phi ",phiBin,phiMin,phiMax) ;
675 h_phoDEta_[0] =
dbe_->
book1D(
"phoDEta",
" Photon Eta(rec)-Eta(true) ",dEtaBin,dEtaMin, dEtaMax) ;
676 h_phoDPhi_[0] =
dbe_->
book1D(
"phoDPhi",
" Photon Phi(rec)-Phi(true) ",dPhiBin,dPhiMin,dPhiMax) ;
678 h_scEta_[0] =
dbe_->
book1D(
"scEta",
" SC Eta ",etaBin,etaMin, etaMax);
679 h_scPhi_[0] =
dbe_->
book1D(
"scPhi",
" SC Phi ",phiBin,phiMin,phiMax);
681 if ( ! isRunCentrally_ ) {
682 h_scEtaWidth_[0] =
dbe_->
book1D(
"scEtaWidth",
" SC Eta Width ",100,0., 0.1);
683 h_scPhiWidth_[0] =
dbe_->
book1D(
"scPhiWidth",
" SC Phi Width ",100,0., 1.);
687 h_scE_[0][0] =
dbe_->
book1D(histname+
"All",
" SC Energy: All Ecal ",eBin,eMin, eMax);
688 h_scE_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" SC Energy: Barrel ",eBin,eMin, eMax);
689 h_scE_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" SC Energy: Endcap ",eBin,eMin, eMax);
692 h_psE_ =
dbe_->
book1D(histname+
"Endcap",
" ES Energy ",eBin,eMin, 50.);
696 h_scEt_[0][0] =
dbe_->
book1D(histname+
"All",
" SC Et: All Ecal ",etBin,etMin, etMax) ;
697 h_scEt_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" SC Et: Barrel",etBin,etMin, etMax) ;
698 h_scEt_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" SC Et: Endcap",etBin,etMin, etMax) ;
701 h_r9_[0][0] =
dbe_->
book1D(histname+
"All",
" r9: All Ecal",r9Bin,r9Min, r9Max) ;
702 h_r9_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" r9: Barrel ",r9Bin,r9Min, r9Max) ;
703 h_r9_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" r9: Endcap ",r9Bin,r9Min, r9Max) ;
706 if ( ! isRunCentrally_ ) {
707 histname =
"r9ConvFromMC";
708 h_r9_[1][0] =
dbe_->
book1D(histname+
"All",
" r9: All Ecal",r9Bin,r9Min, r9Max) ;
709 h_r9_[1][1] =
dbe_->
book1D(histname+
"Barrel",
" r9: Barrel ",r9Bin,r9Min, r9Max) ;
710 h_r9_[1][2] =
dbe_->
book1D(histname+
"Endcap",
" r9: Endcap ",r9Bin,r9Min, r9Max) ;
712 histname =
"r9ConvFromReco";
713 h_r9_[2][0] =
dbe_->
book1D(histname+
"All",
" r9: All Ecal",r9Bin,r9Min, r9Max) ;
714 h_r9_[2][1] =
dbe_->
book1D(histname+
"Barrel",
" r9: Barrel ",r9Bin,r9Min, r9Max) ;
715 h_r9_[2][2] =
dbe_->
book1D(histname+
"Endcap",
" r9: Endcap ",r9Bin,r9Min, r9Max) ;
717 histname =
"EtR9Less093";
718 h_EtR9Less093_[0][0] =
dbe_->
book1D(histname+
"All",
" r9 < 0.94 or 0.95 : All Ecal",etBin,etMin, etMax);
719 h_EtR9Less093_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" r9 < 0.94 : Barrel ",etBin,etMin, etMax);
720 h_EtR9Less093_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" r9 < 0.95 : Endcap ",etBin,etMin, etMax);
721 histname =
"EtR9Less093Conv";
722 h_EtR9Less093_[1][0] =
dbe_->
book1D(histname+
"All",
" r9 < 0.94, 0.95 and good conv : All Ecal",etBin,etMin, etMax);
723 h_EtR9Less093_[1][1] =
dbe_->
book1D(histname+
"Barrel",
" r9 < 0.94 and good conv : Barrel ",etBin,etMin, etMax);
724 h_EtR9Less093_[1][2] =
dbe_->
book1D(histname+
"Endcap",
" r9 < 0.95 and good conv : Endcap ",etBin,etMin, etMax);
729 if ( ! isRunCentrally_ ) h2_r9VsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons r9 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
730 if ( ! isRunCentrally_ ) h2_r9VsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons r9 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
733 if ( ! isRunCentrally_ ) h2_r9VsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons r9 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
734 if ( ! isRunCentrally_ ) h2_r9VsEt_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons r9 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
737 h_r1_[0][0] =
dbe_->
book1D(histname+
"All",
" e1x5/e5x5: All Ecal",r9Bin,r9Min, r9Max) ;
738 h_r1_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" e1x5/e5x5: Barrel ",r9Bin,r9Min, r9Max) ;
739 h_r1_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" e1x5/e5x5: Endcap ",r9Bin,r9Min, r9Max) ;
742 if ( ! isRunCentrally_ ) h2_r1VsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons e1x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
743 if ( ! isRunCentrally_ ) h2_r1VsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons e1x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
746 if ( ! isRunCentrally_ ) h2_r1VsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons e1x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
747 if ( ! isRunCentrally_ ) h2_r1VsEt_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons e1x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
750 h_r2_[0][0] =
dbe_->
book1D(histname+
"All",
" e2x5/e5x5: All Ecal",r9Bin,r9Min, r9Max) ;
751 h_r2_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" e2x5/e5x5: Barrel ",r9Bin,r9Min, r9Max) ;
752 h_r2_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" e2x5/e5x5: Endcap ",r9Bin,r9Min, r9Max) ;
755 if ( ! isRunCentrally_ ) h2_r2VsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons e2x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
756 if ( ! isRunCentrally_ ) h2_r2VsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons e2x5/e5x5 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,1.1);
759 if ( ! isRunCentrally_ ) h2_r2VsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons e2x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
760 if ( ! isRunCentrally_ ) h2_r2VsEt_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons e2x5/e5x5 vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,1.1);
762 histname =
"sigmaIetaIeta";
763 h_sigmaIetaIeta_[0][0] =
dbe_->
book1D(histname+
"All",
"sigmaIetaIeta: All Ecal",100,0., 0.1) ;
764 h_sigmaIetaIeta_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"sigmaIetaIeta: Barrel ", 100,0., 0.05) ;
765 h_sigmaIetaIeta_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"sigmaIetaIeta: Endcap ", 100,0., 0.1) ;
767 histname=
"sigmaIetaIetaVsEta";
768 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons sigmaIetaIeta vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
769 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons sigmaIetaIeta vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,0.1);
771 histname=
"sigmaIetaIetaVsEt";
772 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
773 if ( ! isRunCentrally_ ) h2_sigmaIetaIetaVsEt_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons sigmaIetaIeta vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
776 h_hOverE_[0][0] =
dbe_->
book1D(histname+
"All",
"H/E: All Ecal",100,0., 0.1) ;
777 h_hOverE_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"H/E: Barrel ", 100,0., 0.1) ;
778 h_hOverE_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"H/E: Endcap ", 100,0., 0.1) ;
780 histname =
"newhOverE";
781 h_newhOverE_[0][0] =
dbe_->
book1D(histname+
"All",
"new H/E: All Ecal",100,0., 0.1) ;
782 h_newhOverE_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"new H/E: Barrel ", 100,0., 0.1) ;
783 h_newhOverE_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"new H/E: Endcap ", 100,0., 0.1) ;
786 if ( ! isRunCentrally_ ) {
787 histname=
"hOverEVsEta";
788 h2_hOverEVsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons H/E vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
789 h2_hOverEVsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons H/E vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,0.1);
791 histname=
"hOverEVsEt";
792 h2_hOverEVsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
793 h2_hOverEVsEt_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
796 histname=
"pHoverEVsEta";
797 p_hOverEVsEta_[0] =
dbe_->
bookProfile(histname+
"All",
" All photons H/E vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
798 p_hOverEVsEta_[1] =
dbe_->
bookProfile(histname+
"Unconv",
" All photons H/E vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,0.1);
800 histname=
"pHoverEVsEt";
801 p_hOverEVsEt_[0] =
dbe_->
bookProfile(histname+
"All",
" All photons H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
802 p_hOverEVsEt_[1] =
dbe_->
bookProfile(histname+
"Unconv",
" All photons H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
804 histname=
"pnewHoverEVsEta";
805 p_newhOverEVsEta_[0] =
dbe_->
bookProfile(histname+
"All",
" All photons new H/E vs #eta: all Ecal ", etaBin2,etaMin, etaMax,100, 0.,0.1);
806 p_newhOverEVsEta_[1] =
dbe_->
bookProfile(histname+
"Unconv",
" All photons new H/E vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0.,0.1);
808 histname=
"pnewHoverEVsEt";
809 p_newhOverEVsEt_[0] =
dbe_->
bookProfile(histname+
"All",
" All photons new H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
810 p_newhOverEVsEt_[1] =
dbe_->
bookProfile(histname+
"Unconv",
" All photons new H/E vs Et: all Ecal ",etBin,etMin, etMax,100, 0.,0.1);
812 histname =
"ecalRecHitSumEtConeDR04";
813 h_ecalRecHitSumEtConeDR04_[0][0] =
dbe_->
book1D(histname+
"All",
"ecalRecHitSumEtDR04: All Ecal",etBin,etMin,20.);
814 h_ecalRecHitSumEtConeDR04_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"ecalRecHitSumEtDR04: Barrel ", etBin,etMin,20.);
815 h_ecalRecHitSumEtConeDR04_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"ecalRecHitSumEtDR04: Endcap ", etBin,etMin,20.);
818 if ( ! isRunCentrally_ ) {
819 histname=
"ecalRecHitSumEtConeDR04VsEta";
820 h2_ecalRecHitSumEtConeDR04VsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*etScale);
821 h2_ecalRecHitSumEtConeDR04VsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,etBin,etMin,etMax*etScale);
823 histname=
"pEcalRecHitSumEtConeDR04VsEta";
824 p_ecalRecHitSumEtConeDR04VsEta_[0] =
dbe_->
bookProfile(histname+
"All",
"All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*etScale,
"");
825 p_ecalRecHitSumEtConeDR04VsEta_[1] =
dbe_->
bookProfile(histname+
"Unconv",
"All photons ecalRecHitSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*etScale,
"");
827 if ( ! isRunCentrally_ ) {
828 histname=
"ecalRecHitSumEtConeDR04VsEt";
829 h2_ecalRecHitSumEtConeDR04VsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons ecalRecHitSumEtDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
830 h2_ecalRecHitSumEtConeDR04VsEt_[1] =
dbe_->
book2D(histname+
"Barrel",
" All photons ecalRecHitSumEtDR04 vs Et: Barrel ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
831 h2_ecalRecHitSumEtConeDR04VsEt_[2] =
dbe_->
book2D(histname+
"Endcap",
" All photons ecalRecHitSumEtDR04 vs Et: Endcap ",etBin,etMin, etMax, etBin,etMin,etMax*etScale);
833 histname=
"pEcalRecHitSumEtConeDR04VsEt";
834 if ( ! isRunCentrally_ ) p_ecalRecHitSumEtConeDR04VsEt_[0] =
dbe_->
bookProfile(histname+
"All",
"All photons ecalRecHitSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
835 p_ecalRecHitSumEtConeDR04VsEt_[1] =
dbe_->
bookProfile(histname+
"Barrel",
"All photons ecalRecHitSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
836 p_ecalRecHitSumEtConeDR04VsEt_[2] =
dbe_->
bookProfile(histname+
"Endcap",
"All photons ecalRecHitSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
838 histname =
"hcalTowerSumEtConeDR04";
839 h_hcalTowerSumEtConeDR04_[0][0] =
dbe_->
book1D(histname+
"All",
"hcalTowerSumEtConeDR04: All Ecal",etBin,etMin,20.);
840 h_hcalTowerSumEtConeDR04_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"hcalTowerSumEtConeDR04: Barrel ", etBin,etMin,20.);
841 h_hcalTowerSumEtConeDR04_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"hcalTowerSumEtConeDR04: Endcap ", etBin,etMin,20.);
843 histname =
"hcalTowerBcSumEtConeDR04";
844 if ( ! isRunCentrally_ ) h_hcalTowerBcSumEtConeDR04_[0][0] =
dbe_->
book1D(histname+
"All",
"hcalTowerBcSumEtConeDR04: All Ecal",etBin,etMin,20.);
845 h_hcalTowerBcSumEtConeDR04_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"hcalTowerBcSumEtConeDR04: Barrel ", etBin,etMin,20.);
846 h_hcalTowerBcSumEtConeDR04_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"hcalTowerBcSumEtConeDR04: Endcap ", etBin,etMin,20.);
849 if ( ! isRunCentrally_ ) {
850 histname=
"hcalTowerSumEtConeDR04VsEta";
851 h2_hcalTowerSumEtConeDR04VsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons hcalTowerSumEtConeDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1);
852 h2_hcalTowerSumEtConeDR04VsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons hcalTowerSumEtConeDR04 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,etBin,etMin,etMax*0.1);
854 histname=
"pHcalTowerSumEtConeDR04VsEta";
855 p_hcalTowerSumEtConeDR04VsEta_[0] =
dbe_->
bookProfile(histname+
"All",
"All photons hcalTowerSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1,
"");
856 p_hcalTowerSumEtConeDR04VsEta_[1] =
dbe_->
bookProfile(histname+
"Unconv",
"All photons hcalTowerSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1,
"");
857 histname=
"pHcalTowerBcSumEtConeDR04VsEta";
858 p_hcalTowerBcSumEtConeDR04VsEta_[0] =
dbe_->
bookProfile(histname+
"All",
"All photons hcalTowerBcSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1,
"");
859 p_hcalTowerBcSumEtConeDR04VsEta_[1] =
dbe_->
bookProfile(histname+
"Unconv",
"All photons hcalTowerBcSumEtDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1,
"");
861 if ( ! isRunCentrally_ ) {
862 histname=
"hcalTowerSumEtConeDR04VsEt";
863 h2_hcalTowerSumEtConeDR04VsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons hcalTowerSumEtConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
864 h2_hcalTowerSumEtConeDR04VsEt_[1] =
dbe_->
book2D(histname+
"Barrel",
" All photons hcalTowerSumEtConeDR04 vs Et: Barrel ",etBin,etMin, etMax,etBin,etMin,etMax*0.1);
865 h2_hcalTowerSumEtConeDR04VsEt_[2] =
dbe_->
book2D(histname+
"Endcap",
" All photons hcalTowerSumEtConeDR04 vs Et: Endcap ",etBin,etMin, etMax,etBin,etMin,etMax*0.1);
867 histname=
"pHcalTowerSumEtConeDR04VsEt";
868 if ( ! isRunCentrally_ ) p_hcalTowerSumEtConeDR04VsEt_[0] =
dbe_->
bookProfile(histname+
"All",
"All photons hcalTowerSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
869 p_hcalTowerSumEtConeDR04VsEt_[1] =
dbe_->
bookProfile(histname+
"Barrel",
"All photons hcalTowerSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
870 p_hcalTowerSumEtConeDR04VsEt_[2] =
dbe_->
bookProfile(histname+
"Endcap",
"All photons hcalTowerSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
872 histname=
"pHcalTowerBcSumEtConeDR04VsEt";
873 if ( ! isRunCentrally_ ) p_hcalTowerBcSumEtConeDR04VsEt_[0] =
dbe_->
bookProfile(histname+
"All",
"All photons hcalTowerBcSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
874 p_hcalTowerBcSumEtConeDR04VsEt_[1] =
dbe_->
bookProfile(histname+
"Barrel",
"All photons hcalTowerBcSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
875 p_hcalTowerBcSumEtConeDR04VsEt_[2] =
dbe_->
bookProfile(histname+
"Endcap",
"All photons hcalTowerBcSumEtDR04 vs Et: all Ecal ", etBin,etMin, etMax, etBin,etMin,etMax*etScale,
"");
878 histname =
"isoTrkSolidConeDR04";
879 h_isoTrkSolidConeDR04_[0][0] =
dbe_->
book1D(histname+
"All",
"isoTrkSolidConeDR04: All Ecal",etBin,etMin,etMax*0.1);
880 h_isoTrkSolidConeDR04_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"isoTrkSolidConeDR04: Barrel ", etBin,etMin,etMax*0.1);
881 h_isoTrkSolidConeDR04_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"isoTrkSolidConeDR04: Endcap ", etBin,etMin,etMax*0.1);
884 histname=
"isoTrkSolidConeDR04VsEta";
885 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons isoTrkSolidConeDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, etBin,etMin,etMax*0.1);
886 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons isoTrkSolidConeDR04 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,etBin,etMin,etMax*0.1);
889 histname=
"isoTrkSolidConeDR04VsEt";
890 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
891 if ( ! isRunCentrally_ ) h2_isoTrkSolidConeDR04VsEt_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons isoTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, etBin,etMin,etMax*0.1);
893 histname =
"nTrkSolidConeDR04";
894 h_nTrkSolidConeDR04_[0][0] =
dbe_->
book1D(histname+
"All",
"nTrkSolidConeDR04: All Ecal",20,0., 20) ;
895 h_nTrkSolidConeDR04_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"nTrkSolidConeDR04: Barrel ", 20,0., 20) ;
896 h_nTrkSolidConeDR04_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"nTrkSolidConeDR04: Endcap ", 20,0., 20) ;
898 histname=
"nTrkSolidConeDR04VsEta";
899 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons nTrkSolidConeDR04 vs #eta: all Ecal ", etaBin2,etaMin, etaMax, 20,0., 20) ;
900 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons nTrkSolidConeDR04 vs #eta: all Ecal ",etaBin2,etaMin, etaMax,20,0., 20) ;
902 histname=
"nTrkSolidConeDR04VsEt";
903 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEt_[0] =
dbe_->
book2D(histname+
"All",
" All photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax, 20,0., 20) ;
904 if ( ! isRunCentrally_ ) h2_nTrkSolidConeDR04VsEt_[1] =
dbe_->
book2D(histname+
"Unconv",
" All photons nTrkSolidConeDR04 vs Et: all Ecal ",etBin,etMin, etMax,20,0., 20) ;
907 h_phoE_[0][0]=
dbe_->
book1D(histname+
"All",
" Photon Energy: All ecal ", eBin,eMin, eMax);
908 h_phoE_[0][1]=
dbe_->
book1D(histname+
"Barrel",
" Photon Energy: barrel ",eBin,eMin, eMax);
909 h_phoE_[0][2]=
dbe_->
book1D(histname+
"Endcap",
" Photon Energy: Endcap ",eBin,eMin, eMax);
912 h_phoEt_[0][0] =
dbe_->
book1D(histname+
"All",
" Photon Transverse Energy: All ecal ", etBin,etMin, etMax);
913 h_phoEt_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" Photon Transverse Energy: Barrel ",etBin,etMin, etMax);
914 h_phoEt_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" Photon Transverse Energy: Endcap ",etBin,etMin, etMax);
917 h_phoERes_[0][0] =
dbe_->
book1D(histname+
"All",
" Photon rec/true Energy: All ecal ", resBin,resMin, resMax);
918 h_phoERes_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" Photon rec/true Energy: Barrel ",resBin,resMin, resMax);
919 h_phoERes_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" Photon rec/true Energy: Endcap ",resBin,resMin, resMax);
921 h_phoERes_[1][0] =
dbe_->
book1D(histname+
"unconvAll",
" Photon rec/true Energy if r9>0.94, 0.95: All ecal ", resBin,resMin, resMax);
922 h_phoERes_[1][1] =
dbe_->
book1D(histname+
"unconvBarrel",
" Photon rec/true Energy if r9>0.94: Barrel ",resBin,resMin, resMax);
923 h_phoERes_[1][2] =
dbe_->
book1D(histname+
"unconvEndcap",
" Photon rec/true Energyif r9>0.95: Endcap ",resBin,resMin, resMax);
925 h_phoERes_[2][0] =
dbe_->
book1D(histname+
"convAll",
" Photon rec/true Energy if r9<0.0.94, 0.95: All ecal ", resBin,resMin, resMax);
926 h_phoERes_[2][1] =
dbe_->
book1D(histname+
"convBarrel",
" Photon rec/true Energyif r9<0.94: Barrel ",resBin,resMin, resMax);
927 h_phoERes_[2][2] =
dbe_->
book1D(histname+
"convEndcap",
" Photon rec/true Energyif r9<0.95: Endcap ",resBin,resMin, resMax);
930 histname=
"eResVsEta";
931 if ( ! isRunCentrally_ ) h2_eResVsEta_[0] =
dbe_->
book2D(histname+
"All",
" All photons E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
932 if ( ! isRunCentrally_ ) h2_eResVsEta_[1] =
dbe_->
book2D(histname+
"Unconv",
" Unconv photons E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
934 histname=
"pEResVsEta";
935 p_eResVsEta_[0] =
dbe_->
bookProfile(histname+
"All",
"All photons E/Etrue vs #eta: all Ecal ",etaBin2,etaMin,etaMax,resBin,resMin, resMax,
"");
936 p_eResVsEta_[1] =
dbe_->
bookProfile(histname+
"Unconv",
"Unconv photons E/Etrue vs #eta: all Ecal",etaBin2,etaMin,etaMax,resBin,resMin, resMax,
"");
937 p_eResVsEta_[2] =
dbe_->
bookProfile(histname+
"Conv",
"Conv photons E/Etrue vs #eta: all Ecal",etaBin2,etaMin,etaMax,resBin,resMin, resMax,
"");
939 if ( ! isRunCentrally_ ) {
941 h2_eResVsEt_[0][0] =
dbe_->
book2D(histname+
"All",
" All photons E/Etrue vs true Et: all Ecal ",etBin,etMin, etMax,100, 0.9, 1.1);
942 h2_eResVsEt_[0][1] =
dbe_->
book2D(histname+
"unconv",
" All photons E/Etrue vs true Et: all Ecal ",etBin,etMin, etMax,100, 0.9, 1.1);
943 h2_eResVsEt_[0][2] =
dbe_->
book2D(histname+
"conv",
" All photons E/Etrue vs true Et: all Ecal ",etBin,etMin, etMax,100, 0.9, 1.1);
944 h2_eResVsEt_[1][0] =
dbe_->
book2D(histname+
"Barrel",
" All photons E/Etrue vs true Et: Barrel ",etBin,etMin, etMax,100, 0.9, 1.1);
945 h2_eResVsEt_[1][1] =
dbe_->
book2D(histname+
"unconvBarrel",
" All photons E/Etrue vs true Et: Barrel ",etBin,etMin, etMax,100, 0.9, 1.1);
946 h2_eResVsEt_[1][2] =
dbe_->
book2D(histname+
"convBarrel",
" All photons E/Etrue vs true Et: Barrel ",etBin,etMin, etMax,100, 0.9, 1.1);
947 h2_eResVsEt_[2][0] =
dbe_->
book2D(histname+
"Endcap",
" All photons E/Etrue vs true Et: Endcap ",etBin,etMin, etMax,100, 0.9, 1.1);
948 h2_eResVsEt_[2][1] =
dbe_->
book2D(histname+
"unconvEndcap",
" All photons E/Etrue vs true Et: Endcap ",etBin,etMin, etMax,100, 0.9, 1.1);
949 h2_eResVsEt_[2][2] =
dbe_->
book2D(histname+
"convEndcap",
" All photons E/Etrue vs true Et: Endcap ",etBin,etMin, etMax,100, 0.9, 1.1);
952 histname=
"pEResVsEt";
953 p_eResVsEt_[0][0] =
dbe_->
bookProfile(histname+
"All",
"All photons E/Etrue vs Et: all Ecal ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
954 p_eResVsEt_[0][1] =
dbe_->
bookProfile(histname+
"unconv",
"All photons E/Etrue vs Et: all Ecal ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
955 p_eResVsEt_[0][2] =
dbe_->
bookProfile(histname+
"conv",
"All photons E/Etrue vs Et: all Ecal ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
956 p_eResVsEt_[1][0] =
dbe_->
bookProfile(histname+
"Barrel",
"All photons E/Etrue vs Et: Barrel ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
957 p_eResVsEt_[1][1] =
dbe_->
bookProfile(histname+
"unconvBarrel",
"All photons E/Etrue vs Et: Barrel ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
958 p_eResVsEt_[1][2] =
dbe_->
bookProfile(histname+
"convBarrel",
"All photons E/Etrue vs Et: Barrel ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
959 p_eResVsEt_[2][0] =
dbe_->
bookProfile(histname+
"Endcap",
"All photons E/Etrue vs Et: Endcap ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
960 p_eResVsEt_[2][1] =
dbe_->
bookProfile(histname+
"unconvEndcap",
"All photons E/Etrue vs Et: Endcap ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
961 p_eResVsEt_[2][2] =
dbe_->
bookProfile(histname+
"convEndcap",
"All photons E/Etrue vs Et: Endcap ",etBin,etMin,etMax,resBin,resMin, resMax,
"");
965 if ( ! isRunCentrally_ ) h2_eResVsR9_[0] =
dbe_->
book2D(histname+
"All",
" All photons E/Etrue vs R9: all Ecal ",r9Bin*2,r9Min, r9Max,100, 0., 2.5);
966 if ( ! isRunCentrally_ ) h2_eResVsR9_[1] =
dbe_->
book2D(histname+
"Barrel",
" All photons E/Etrue vs R9: Barrel ", r9Bin*2,r9Min, r9Max,100, 0.,2.5);
967 if ( ! isRunCentrally_ ) h2_eResVsR9_[2] =
dbe_->
book2D(histname+
"Endcap",
" All photons E/Etrue vs R9: Endcap ", r9Bin*2,r9Min, r9Max,100, 0., 2.5);
968 histname=
"pEResVsR9";
969 if ( ! isRunCentrally_ ) p_eResVsR9_[0] =
dbe_->
bookProfile(histname+
"All",
" All photons E/Etrue vs R9: all Ecal ",r9Bin*2,r9Min, r9Max,resBin,resMin, resMax,
"");
970 p_eResVsR9_[1] =
dbe_->
bookProfile(histname+
"Barrel",
" All photons E/Etrue vs R9: Barrel ", r9Bin*2,r9Min, r9Max,resBin,resMin, resMax,
"");
971 p_eResVsR9_[2] =
dbe_->
bookProfile(histname+
"Endcap",
" All photons E/Etrue vs R9: Endcap ", r9Bin*2,r9Min, r9Max,resBin,resMin, resMax,
"");
972 histname=
"sceResVsR9";
973 if ( ! isRunCentrally_ ) h2_sceResVsR9_[0] =
dbe_->
book2D(histname+
"All",
" All photons scE/Etrue vs R9: all Ecal ",r9Bin*2,r9Min, r9Max,100, 0., 2.5);
974 if ( ! isRunCentrally_ ) h2_sceResVsR9_[1] =
dbe_->
book2D(histname+
"Barrel",
" All photons scE/Etrue vs R9: Barrel ", r9Bin*2,r9Min, r9Max,100, 0.,2.5);
975 if ( ! isRunCentrally_ ) h2_sceResVsR9_[2] =
dbe_->
book2D(histname+
"Endcap",
" All photons scE/Etrue vs R9: Endcap ", r9Bin*2,r9Min, r9Max,100, 0., 2.5);
976 histname=
"scpEResVsR9";
977 if ( ! isRunCentrally_ ) p_sceResVsR9_[0] =
dbe_->
bookProfile(histname+
"All",
" All photons scE/Etrue vs R9: all Ecal ",r9Bin*2,r9Min, r9Max,resBin,resMin, resMax,
"");
978 p_sceResVsR9_[1] =
dbe_->
bookProfile(histname+
"Barrel",
" All photons scE/Etrue vs R9: Barrel ", r9Bin*2,r9Min, r9Max,resBin,resMin, resMax,
"");
979 p_sceResVsR9_[2] =
dbe_->
bookProfile(histname+
"Endcap",
" All photons scE/Etrue vs R9: Endcap ", r9Bin*2,r9Min, r9Max,resBin,resMin, resMax,
"");
982 histname =
"eResRegr1";
983 h_phoEResRegr1_[0][0] =
dbe_->
book1D(histname+
"All",
" Photon rec/true Energy from Regression1 : All ecal ", resBin,resMin, resMax);
984 h_phoEResRegr1_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" Photon rec/true Energy from Regression1: Barrel ",resBin,resMin, resMax);
985 h_phoEResRegr1_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" Photon rec/true Energy from Regression1: Endcap ",resBin,resMin, resMax);
987 h_phoEResRegr1_[1][0] =
dbe_->
book1D(histname+
"unconvAll",
" Photon rec/true Energy from Regression1 if r9>0.94, 0.95: All ecal ", resBin,resMin, resMax);
988 h_phoEResRegr1_[1][1] =
dbe_->
book1D(histname+
"unconvBarrel",
" Photon rec/true Energy from Regression1 if r9>0.94: Barrel ",resBin,resMin, resMax);
989 h_phoEResRegr1_[1][2] =
dbe_->
book1D(histname+
"unconvEndcap",
" Photon rec/true Energy from Regression1 if r9>0.95: Endcap ",resBin,resMin, resMax);
991 h_phoEResRegr1_[2][0] =
dbe_->
book1D(histname+
"convAll",
" Photon rec/true Energy from Regression1if r9<0.0.94, 0.95: All ecal ", resBin,resMin, resMax);
992 h_phoEResRegr1_[2][1] =
dbe_->
book1D(histname+
"convBarrel",
" Photon rec/true Energy from Regression1 if r9<0.94: Barrel ",resBin,resMin, resMax);
993 h_phoEResRegr1_[2][2] =
dbe_->
book1D(histname+
"convEndcap",
" Photon rec/true Energy from Regression1 if r9<0.95: Endcap ",resBin,resMin, resMax);
995 histname =
"eResRegr2";
996 h_phoEResRegr2_[0][0] =
dbe_->
book1D(histname+
"All",
" Photon rec/true Energy from Regression2 : All ecal ", resBin,resMin, resMax);
997 h_phoEResRegr2_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" Photon rec/true Energy from Regression2: Barrel ",resBin,resMin, resMax);
998 h_phoEResRegr2_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" Photon rec/true Energy from Regression2: Endcap ",resBin,resMin, resMax);
1000 h_phoEResRegr2_[1][0] =
dbe_->
book1D(histname+
"unconvAll",
" Photon rec/true Energy from Regression2 if r9>0.94, 0.95: All ecal ", resBin,resMin, resMax);
1001 h_phoEResRegr2_[1][1] =
dbe_->
book1D(histname+
"unconvBarrel",
" Photon rec/true Energy from Regression2 if r9>0.94: Barrel ",resBin,resMin, resMax);
1002 h_phoEResRegr2_[1][2] =
dbe_->
book1D(histname+
"unconvEndcap",
" Photon rec/true Energy from Regression2 if r9>0.95: Endcap ",resBin,resMin, resMax);
1004 h_phoEResRegr2_[2][0] =
dbe_->
book1D(histname+
"convAll",
" Photon rec/true Energy from Regression2 if r9<0.0.94, 0.95: All ecal ", resBin,resMin, resMax);
1005 h_phoEResRegr2_[2][1] =
dbe_->
book1D(histname+
"convBarrel",
" Photon rec/true Energy from Regression2 if r9<0.94: Barrel ",resBin,resMin, resMax);
1006 h_phoEResRegr2_[2][2] =
dbe_->
book1D(histname+
"convEndcap",
" Photon rec/true Energy from Regression2 if r9<0.95: Endcap ",resBin,resMin, resMax);
1009 histname =
"chargedHadIso";
1010 h_chHadIso_[0]=
dbe_->
book1D(histname+
"All",
"PF chargedHadIso: All Ecal",etBin,etMin,20.);
1011 h_chHadIso_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF chargedHadIso: Barrel",etBin,etMin,20.);
1012 h_chHadIso_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF chargedHadIso: Endcap",etBin,etMin,20.);
1013 histname =
"neutralHadIso";
1014 h_nHadIso_[0]=
dbe_->
book1D(histname+
"All",
"PF neutralHadIso: All Ecal",etBin,etMin,20.);
1015 h_nHadIso_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF neutralHadIso: Barrel",etBin,etMin,20.);
1016 h_nHadIso_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF neutralHadIso: Endcap",etBin,etMin,20.);
1017 histname =
"photonIso";
1018 h_phoIso_[0]=
dbe_->
book1D(histname+
"All",
"PF photonIso: All Ecal",etBin,etMin,20.);
1019 h_phoIso_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF photonIso: Barrel",etBin,etMin,20.);
1020 h_phoIso_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF photonIso: Endcap",etBin,etMin,20.);
1021 histname =
"nCluOutMustache";
1022 h_nCluOutsideMustache_[0]=
dbe_->
book1D(histname+
"All",
"PF number of clusters outside Mustache: All Ecal",50,0.,50.);
1023 h_nCluOutsideMustache_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF number of clusters outside Mustache: Barrel",50,0.,50.);
1024 h_nCluOutsideMustache_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF number of clusters outside Mustache: Endcap",50,0.,50.);
1025 histname =
"etOutMustache";
1026 h_etOutsideMustache_[0]=
dbe_->
book1D(histname+
"All",
"PF et outside Mustache: All Ecal",etBin,etMin,20.);
1027 h_etOutsideMustache_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF et outside Mustache: Barrel",etBin,etMin,20.);
1028 h_etOutsideMustache_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF et outside Mustache: Endcap",etBin,etMin,20.);
1030 h_pfMva_[0]=
dbe_->
book1D(histname+
"All",
"PF MVA output: All Ecal",50,-1.,2.);
1031 h_pfMva_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF MVA output: Barrel",50,-1.,2.);
1032 h_pfMva_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF MVA output: Endcap",50,-1,2.);
1034 histname =
"SumPtOverPhoPt_ChHad_Cleaned";
1035 h_SumPtOverPhoPt_ChHad_Cleaned_[0]=
dbe_->
book1D(histname+
"All",
"Pf Cand Sum Pt Over photon pt Charged Hadrons: All Ecal",etBin,etMin,2.);
1036 h_SumPtOverPhoPt_ChHad_Cleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Barrel",etBin,etMin,2.);
1037 h_SumPtOverPhoPt_ChHad_Cleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Endcap",etBin,etMin,2.);
1038 histname =
"SumPtOverPhoPt_NeuHad_Cleaned";
1039 h_SumPtOverPhoPt_NeuHad_Cleaned_[0]=
dbe_->
book1D(histname+
"All",
"Pf Cand Sum Pt Over photon pt Neutral Hadrons: All Ecal",etBin,etMin,2.);
1040 h_SumPtOverPhoPt_NeuHad_Cleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Barrel",etBin,etMin,2.);
1041 h_SumPtOverPhoPt_NeuHad_Cleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Endcap",etBin,etMin,2.);
1042 histname =
"SumPtOverPhoPt_Pho_Cleaned";
1043 h_SumPtOverPhoPt_Pho_Cleaned_[0]=
dbe_->
book1D(histname+
"All",
"Pf Cand Sum Pt Over photon pt Photons Hadrons: All Ecal",etBin,etMin,2.);
1044 h_SumPtOverPhoPt_Pho_Cleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF Cand Sum Pt Over photon pt Photons Hadrons: Barrel",etBin,etMin,2.);
1045 h_SumPtOverPhoPt_Pho_Cleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF Cand Sum Pt Over photon pt Photons Hadrons: Endcap",etBin,etMin,2.);
1047 histname =
"dRPhoPFcand_ChHad_Cleaned";
1048 h_dRPhoPFcand_ChHad_Cleaned_[0]=
dbe_->
book1D(histname+
"All",
"dR(pho,cand) Charged Hadrons : All Ecal",etBin,etMin,0.7);
1049 h_dRPhoPFcand_ChHad_Cleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"dR(pho,cand) Charged Hadrons : Barrel",etBin,etMin,0.7);
1050 h_dRPhoPFcand_ChHad_Cleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"dR(pho,cand) Charged Hadrons : Endcap",etBin,etMin,0.7);
1051 histname =
"dRPhoPFcand_NeuHad_Cleaned";
1052 h_dRPhoPFcand_NeuHad_Cleaned_[0]=
dbe_->
book1D(histname+
"All",
"dR(pho,cand) Neutral Hadrons : All Ecal",etBin,etMin,0.7);
1053 h_dRPhoPFcand_NeuHad_Cleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"dR(pho,cand) Neutral Hadrons : Barrel",etBin,etMin,0.7);
1054 h_dRPhoPFcand_NeuHad_Cleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"dR(pho,cand) Neutral Hadrons : Endcap",etBin,etMin,0.7);
1055 histname =
"dRPhoPFcand_Pho_Cleaned";
1056 h_dRPhoPFcand_Pho_Cleaned_[0]=
dbe_->
book1D(histname+
"All",
"dR(pho,cand) Photons : All Ecal",etBin,etMin,0.7);
1057 h_dRPhoPFcand_Pho_Cleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"dR(pho,cand) Photons : Barrel",etBin,etMin,0.7);
1058 h_dRPhoPFcand_Pho_Cleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"dR(pho,cand) Photons : Endcap",etBin,etMin,0.7);
1061 histname =
"SumPtOverPhoPt_ChHad_unCleaned";
1062 h_SumPtOverPhoPt_ChHad_unCleaned_[0]=
dbe_->
book1D(histname+
"All",
"Pf Cand Sum Pt Over photon pt Charged Hadrons : All Ecal",etBin,etMin,2.);
1063 h_SumPtOverPhoPt_ChHad_unCleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Barrel",etBin,etMin,2.);
1064 h_SumPtOverPhoPt_ChHad_unCleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Endcap",etBin,etMin,2.);
1065 histname =
"SumPtOverPhoPt_NeuHad_unCleaned";
1066 h_SumPtOverPhoPt_NeuHad_unCleaned_[0]=
dbe_->
book1D(histname+
"All",
"Pf Cand Sum Pt Over photon pt Neutral Hadrons : All Ecal",etBin,etMin,2.);
1067 h_SumPtOverPhoPt_NeuHad_unCleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Barrel",etBin,etMin,2.);
1068 h_SumPtOverPhoPt_NeuHad_unCleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Endcap",etBin,etMin,2.);
1069 histname =
"SumPtOverPhoPt_Pho_unCleaned";
1070 h_SumPtOverPhoPt_Pho_unCleaned_[0]=
dbe_->
book1D(histname+
"All",
"Pf Cand Sum Pt Over photon pt Photons: All Ecal",etBin,etMin,2.);
1071 h_SumPtOverPhoPt_Pho_unCleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"PF Cand Sum Pt Over photon pt Photons: Barrel",etBin,etMin,2.);
1072 h_SumPtOverPhoPt_Pho_unCleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"PF Cand Sum Pt Over photon pt Photons: Endcap",etBin,etMin,2.);
1073 histname =
"dRPhoPFcand_ChHad_unCleaned";
1074 h_dRPhoPFcand_ChHad_unCleaned_[0]=
dbe_->
book1D(histname+
"All",
"dR(pho,cand) Charged Hadrons : All Ecal",etBin,etMin,0.7);
1075 h_dRPhoPFcand_ChHad_unCleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"dR(pho,cand) Charged Hadrons : Barrel",etBin,etMin,0.7);
1076 h_dRPhoPFcand_ChHad_unCleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"dR(pho,cand) Charged Hadrons : Endcap",etBin,etMin,0.7);
1077 histname =
"dRPhoPFcand_NeuHad_unCleaned";
1078 h_dRPhoPFcand_NeuHad_unCleaned_[0]=
dbe_->
book1D(histname+
"All",
"dR(pho,cand) Neutral Hadrons : All Ecal",etBin,etMin,0.7);
1079 h_dRPhoPFcand_NeuHad_unCleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"dR(pho,cand) Neutral Hadrons : Barrel",etBin,etMin,0.7);
1080 h_dRPhoPFcand_NeuHad_unCleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"dR(pho,cand) Neutral Hadrons : Endcap",etBin,etMin,0.7);
1081 histname =
"dRPhoPFcand_Pho_unCleaned";
1082 h_dRPhoPFcand_Pho_unCleaned_[0]=
dbe_->
book1D(histname+
"All",
"dR(pho,cand) Photons: All Ecal",etBin,etMin,0.7);
1083 h_dRPhoPFcand_Pho_unCleaned_[1]=
dbe_->
book1D(histname+
"Barrel",
"dR(pho,cand) Photons: Barrel",etBin,etMin,0.7);
1084 h_dRPhoPFcand_Pho_unCleaned_[2]=
dbe_->
book1D(histname+
"Endcap",
"dR(pho,cand) Photons: Endcap",etBin,etMin,0.7);
1090 histname =
"gamgamMass";
1091 h_gamgamMass_[0][0] =
dbe_->
book1D(histname+
"All",
"2 photons invariant mass: All ecal ", ggMassBin, ggMassMin, ggMassMax);
1092 h_gamgamMass_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons invariant mass: Barrel ",ggMassBin, ggMassMin, ggMassMax);
1093 h_gamgamMass_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons invariant mass: Endcap ",ggMassBin, ggMassMin, ggMassMax);
1095 histname =
"gamgamMassNoConv";
1096 h_gamgamMass_[1][0] =
dbe_->
book1D(histname+
"All",
"2 photons with no conversion invariant mass: All ecal ",ggMassBin, ggMassMin, ggMassMax);
1097 h_gamgamMass_[1][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons with no conversion invariant mass: Barrel ",ggMassBin, ggMassMin, ggMassMax);
1098 h_gamgamMass_[1][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons with no conversion invariant mass: Endcap ",ggMassBin, ggMassMin, ggMassMax);
1100 histname =
"gamgamMassConv";
1101 h_gamgamMass_[2][0] =
dbe_->
book1D(histname+
"All",
"2 photons with conversion invariant mass: All ecal ", ggMassBin, ggMassMin, ggMassMax);
1102 h_gamgamMass_[2][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons with conversion invariant mass: Barrel ",ggMassBin, ggMassMin, ggMassMax);
1103 h_gamgamMass_[2][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons with conversion invariant mass: Endcap ",ggMassBin, ggMassMin, ggMassMax);
1105 histname =
"gamgamMassRegr1";
1106 h_gamgamMassRegr1_[0][0] =
dbe_->
book1D(histname+
"All",
"2 photons invariant mass Regr1 : All ecal ", ggMassBin, ggMassMin, ggMassMax);
1107 h_gamgamMassRegr1_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons invariant mass Regr1 : Barrel ",ggMassBin, ggMassMin, ggMassMax);
1108 h_gamgamMassRegr1_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons invariant mass Regr1 : Endcap ",ggMassBin, ggMassMin, ggMassMax);
1110 histname =
"gamgamMassRegr1NoConv";
1111 h_gamgamMassRegr1_[1][0] =
dbe_->
book1D(histname+
"All",
"2 photons with no conversion invariant mass Regr1: All ecal ",ggMassBin, ggMassMin, ggMassMax);
1112 h_gamgamMassRegr1_[1][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons with no conversion invariant mass Regr1: Barrel ",ggMassBin, ggMassMin, ggMassMax);
1113 h_gamgamMassRegr1_[1][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons with no conversion invariant mass Regr1: Endcap ",ggMassBin, ggMassMin, ggMassMax);
1115 histname =
"gamgamMassRegr1Conv";
1116 h_gamgamMassRegr1_[2][0] =
dbe_->
book1D(histname+
"All",
"2 photons with conversion invariant mass Regr1: All ecal ", ggMassBin, ggMassMin, ggMassMax);
1117 h_gamgamMassRegr1_[2][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons with conversion invariant mass Regr1: Barrel ",ggMassBin, ggMassMin, ggMassMax);
1118 h_gamgamMassRegr1_[2][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons with conversion invariant mass Regr1: Endcap ",ggMassBin, ggMassMin, ggMassMax);
1120 histname =
"gamgamMassRegr2";
1121 h_gamgamMassRegr2_[0][0] =
dbe_->
book1D(histname+
"All",
"2 photons invariant mass Regr2 : All ecal ", ggMassBin, ggMassMin, ggMassMax);
1122 h_gamgamMassRegr2_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons invariant mass Regr2 : Barrel ",ggMassBin, ggMassMin, ggMassMax);
1123 h_gamgamMassRegr2_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons invariant mass Regr2 : Endcap ",ggMassBin, ggMassMin, ggMassMax);
1125 histname =
"gamgamMassRegr2NoConv";
1126 h_gamgamMassRegr2_[1][0] =
dbe_->
book1D(histname+
"All",
"2 photons with no conversion invariant mass Regr2: All ecal ",ggMassBin, ggMassMin, ggMassMax);
1127 h_gamgamMassRegr2_[1][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons with no conversion invariant mass Regr2: Barrel ",ggMassBin, ggMassMin, ggMassMax);
1128 h_gamgamMassRegr2_[1][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons with no conversion invariant mass Regr2: Endcap ",ggMassBin, ggMassMin, ggMassMax);
1130 histname =
"gamgamMassRegr2Conv";
1131 h_gamgamMassRegr2_[2][0] =
dbe_->
book1D(histname+
"All",
"2 photons with conversion invariant mass Regr2: All ecal ", ggMassBin, ggMassMin, ggMassMax);
1132 h_gamgamMassRegr2_[2][1] =
dbe_->
book1D(histname+
"Barrel",
"2 photons with conversion invariant mass Regr2: Barrel ",ggMassBin, ggMassMin, ggMassMax);
1133 h_gamgamMassRegr2_[2][2] =
dbe_->
book1D(histname+
"Endcap",
"2 photons with conversion invariant mass Regr2: Endcap ",ggMassBin, ggMassMin, ggMassMax);
1142 h_nConv_[0][0] =
dbe_->
book1D(histname+
"All",
"Number Of Conversions per isolated candidates per events: All Ecal ",10,-0.5, 9.5);
1143 h_nConv_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"Number Of Conversions per isolated candidates per events: Ecal Barrel ",10,-0.5, 9.5);
1144 h_nConv_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"Number Of Conversions per isolated candidates per events: Ecal Endcap ",10,-0.5, 9.5);
1146 h_convEta_[0] =
dbe_->
book1D(
"convEta1",
" converted Photon Eta >1 track",etaBin,etaMin, etaMax) ;
1147 h_convEta_[1] =
dbe_->
book1D(
"convEta2",
" converted Photon Eta =2 tracks ",etaBin,etaMin, etaMax) ;
1148 h_convEta_[2] =
dbe_->
book1D(
"convEta2ass",
" converted Photon Eta =2 tracks, both ass ",etaBin,etaMin, etaMax) ;
1149 h_convPhi_[0] =
dbe_->
book1D(
"convPhi",
" converted Photon Phi ",phiBin,phiMin,phiMax) ;
1152 histname =
"convERes";
1153 h_convERes_[0][0] =
dbe_->
book1D(histname+
"All",
" Conversion rec/true Energy: All ecal ", resBin,resMin, resMax);
1154 h_convERes_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" Conversion rec/true Energy: Barrel ",resBin,resMin, resMax);
1155 h_convERes_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" Conversion rec/true Energy: Endcap ",resBin,resMin, resMax);
1157 histname=
"p_EResVsR";
1158 p_eResVsR_ =
dbe_->
bookProfile(histname+
"All",
" photons conversion E/Etrue vs R: all Ecal ",rBin,rMin,rMax, 100, 0.,1.5,
"");
1161 histname =
"convPtRes";
1162 h_convPtRes_[1][0] =
dbe_->
book1D(histname+
"All",
" Conversion Pt rec/true from tracks : All ecal ", resBin,0.,1.5);
1163 h_convPtRes_[1][1] =
dbe_->
book1D(histname+
"Barrel",
" Conversion Pt rec/true from tracks: Barrel ",resBin,0., 1.5);
1164 h_convPtRes_[1][2] =
dbe_->
book1D(histname+
"Endcap",
" Conversion Pt rec/true from tracks: Endcap ",resBin,0., 1.5);
1167 if ( ! isRunCentrally_ ) {
1168 histname=
"r9VsTracks";
1169 h_r9VsNofTracks_[0][0] =
dbe_->
book2D(histname+
"All",
" photons r9 vs nTracks from conversions: All Ecal",r9Bin,r9Min, r9Max, 3, -0.5, 2.5) ;
1170 h_r9VsNofTracks_[0][1] =
dbe_->
book2D(histname+
"Barrel",
" photons r9 vs nTracks from conversions: Barrel Ecal",r9Bin,r9Min, r9Max, 3, -0.5, 2.5) ;
1171 h_r9VsNofTracks_[0][2] =
dbe_->
book2D(histname+
"Endcap",
" photons r9 vs nTracks from conversions: Endcap Ecal",r9Bin,r9Min, r9Max, 3, -0.5, 2.5) ;
1175 h_mvaOut_[0] =
dbe_->
book1D(histname+
"All",
" mvaOut for all conversions : All Ecal",100, 0., 1.);
1176 h_mvaOut_[1] =
dbe_->
book1D(histname+
"Barrel",
" mvaOut for all conversions : Barrel Ecal",100, 0., 1.);
1177 h_mvaOut_[2] =
dbe_->
book1D(histname+
"Endcap",
" mvaOut for all conversions : Endcap Ecal",100, 0., 1.);
1181 histname=
"EoverPtracks";
1182 h_EoverPTracks_[0][0] =
dbe_->
book1D(histname+
"BarrelPix",
" photons conversion E/p: barrel pix",eoverpBin, eoverpMin,eoverpMax);
1183 h_EoverPTracks_[0][1] =
dbe_->
book1D(histname+
"BarrelTib",
" photons conversion E/p: barrel tib",eoverpBin, eoverpMin,eoverpMax);
1184 h_EoverPTracks_[0][2] =
dbe_->
book1D(histname+
"BarrelTob",
" photons conversion E/p: barrel tob ",eoverpBin, eoverpMin,eoverpMax);
1186 h_EoverPTracks_[1][0] =
dbe_->
book1D(histname+
"All",
" photons conversion E/p: all Ecal ",100, 0., 5.);
1187 h_EoverPTracks_[1][1] =
dbe_->
book1D(histname+
"Barrel",
" photons conversion E/p: Barrel Ecal",100, 0., 5.);
1188 h_EoverPTracks_[1][2] =
dbe_->
book1D(histname+
"Endcap",
" photons conversion E/p: Endcap Ecal ",100, 0., 5.);
1190 histname=
"PoverEtracks";
1191 h_PoverETracks_[1][0] =
dbe_->
book1D(histname+
"All",
" photons conversion p/E: all Ecal ",povereBin, povereMin, povereMax);
1192 h_PoverETracks_[1][1] =
dbe_->
book1D(histname+
"Barrel",
" photons conversion p/E: Barrel Ecal",povereBin, povereMin, povereMax);
1193 h_PoverETracks_[1][2] =
dbe_->
book1D(histname+
"Endcap",
" photons conversion p/E: Endcap Ecal ",povereBin, povereMin, povereMax);
1195 histname=
"pEoverEtrueVsEta";
1196 p_EoverEtrueVsEta_[0] =
dbe_->
bookProfile(histname+
"All",
" photons conversion with 2 (associated) reco tracks E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax, 100,0.,2.5,
"");
1198 histname=
"pEoverEtrueVsR";
1199 p_EoverEtrueVsR_[0] =
dbe_->
bookProfile(histname+
"All",
" photons conversion E/Etrue vs R: all Ecal ",rBin,rMin,rMax, 100, 0., 2.5,
"");
1201 histname=
"pEoverEtrueVsEta";
1202 p_EoverEtrueVsEta_[1] =
dbe_->
bookProfile(histname+
"All2",
" photons conversion 2 reco tracks E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5,
"");
1204 histname=
"pPoverPtrueVsEta";
1205 p_PoverPtrueVsEta_[0] =
dbe_->
bookProfile(histname+
"All",
" photons conversion P/Ptrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 5.,
"");
1207 histname=
"pEoverPVsEta";
1208 p_EoverPVsEta_[0] =
dbe_->
bookProfile(histname+
"All",
" photons conversion E/P vs #eta: all Ecal ",etaBin2,etaMin, etaMax, 100, 0., 5.,
"");
1211 if ( ! isRunCentrally_ ) {
1212 histname=
"EoverEtrueVsEoverP";
1213 h2_EoverEtrueVsEoverP_[0] =
dbe_->
book2D(histname+
"All",
" photons conversion E/Etrue vs E/P: all Ecal ",100, 0., 5., 100, 0.5, 1.5);
1214 h2_EoverEtrueVsEoverP_[1] =
dbe_->
book2D(histname+
"Barrel",
" photons conversion E/Etrue vs E/: Barrel Ecal",100, 0., 5.,100, 0.5, 1.5);
1215 h2_EoverEtrueVsEoverP_[2] =
dbe_->
book2D(histname+
"Endcap",
" photons conversion E/Etrue vs E/: Endcap Ecal ",100, 0., 5., 100, 0.5, 1.5);
1216 histname=
"PoverPtrueVsEoverP";
1217 h2_PoverPtrueVsEoverP_[0] =
dbe_->
book2D(histname+
"All",
" photons conversion P/Ptrue vs E/P: all Ecal ",100, 0., 5., 100, 0., 2.5);
1218 h2_PoverPtrueVsEoverP_[1] =
dbe_->
book2D(histname+
"Barrel",
" photons conversion P/Ptrue vs E/: Barrel Ecal",100, 0., 5.,100, 0., 2.5);
1219 h2_PoverPtrueVsEoverP_[2] =
dbe_->
book2D(histname+
"Endcap",
" photons conversion P/Ptrue vs E/: Endcap Ecal ",100, 0., 5., 100, 0., 2.5);
1221 histname=
"EoverEtrueVsEta";
1222 h2_EoverEtrueVsEta_[0] =
dbe_->
book2D(histname+
"All",
" photons conversion with 2 (associated) reco tracks E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
1225 histname=
"EoverEtrueVsEta";
1226 h2_EoverEtrueVsEta_[1] =
dbe_->
book2D(histname+
"All2",
" photons conversion 2 reco tracks E/Etrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 2.5);
1228 histname=
"EoverEtrueVsR";
1229 h2_EoverEtrueVsR_[0] =
dbe_->
book2D(histname+
"All",
" photons conversion E/Etrue vs R: all Ecal ",rBin,rMin, rMax,100, 0., 2.5);
1231 histname=
"PoverPtrueVsEta";
1232 h2_PoverPtrueVsEta_[0] =
dbe_->
book2D(histname+
"All",
" photons conversion P/Ptrue vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 5.);
1234 histname=
"EoverPVsEta";
1235 h2_EoverPVsEta_[0] =
dbe_->
book2D(histname+
"All",
" photons conversion E/P vs #eta: all Ecal ",etaBin2,etaMin, etaMax,100, 0., 5.);
1237 histname=
"EoverPVsR";
1238 h2_EoverPVsR_[0] =
dbe_->
book2D(histname+
"All",
" photons conversion E/P vs R: all Ecal ",rBin,rMin, rMax,100, 0., 5.);
1240 histname=
"etaVsRsim";
1241 h2_etaVsRsim_[0] =
dbe_->
book2D(histname+
"All",
" eta(sim) vs R (sim) for associated conversions: all Ecal ",etaBin, etaMin, etaMax,rBin,rMin, rMax);
1242 histname=
"etaVsRreco";
1243 h2_etaVsRreco_[0] =
dbe_->
book2D(histname+
"All",
" eta(reco) vs R (reco) for associated conversions: all Ecal ",etaBin, etaMin, etaMax,rBin,rMin, rMax);
1247 histname=
"pEoverPVsR";
1248 p_EoverPVsR_[0] =
dbe_->
bookProfile(histname+
"All",
" photons conversion E/P vs R: all Ecal ",rBin,rMin,rMax, 100, 0., 5.,
"");
1251 histname=
"hInvMass";
1252 h_invMass_[0][0]=
dbe_->
book1D(histname+
"All_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
1253 h_invMass_[0][1]=
dbe_->
book1D(histname+
"Barrel_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
1254 h_invMass_[0][2]=
dbe_->
book1D(histname+
"Endcap_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
1255 histname=
"hInvMass";
1256 h_invMass_[1][0]=
dbe_->
book1D(histname+
"All_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
1257 h_invMass_[1][1]=
dbe_->
book1D(histname+
"Barrel_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
1258 h_invMass_[1][2]=
dbe_->
book1D(histname+
"Endcap_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
1261 histname=
"hDPhiTracksAtVtx";
1262 h_DPhiTracksAtVtx_[1][0] =
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
1263 h_DPhiTracksAtVtx_[1][1] =
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
1264 h_DPhiTracksAtVtx_[1][2] =
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
1267 if ( ! isRunCentrally_ ) {
1268 histname=
"hDPhiTracksAtVtxVsEta";
1269 h2_DPhiTracksAtVtxVsEta_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta",etaBin2,etaMin, etaMax,100, -0.5, 0.5);
1271 histname=
"hDPhiTracksAtVtxVsR";
1272 h2_DPhiTracksAtVtxVsR_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R",rBin,rMin, rMax,100, -0.5, 0.5);
1274 histname=
"hDCotTracksVsEta";
1275 h2_DCotTracksVsEta_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta",etaBin2,etaMin, etaMax,100, -0.2, 0.2);
1277 histname=
"hDCotTracksVsR";
1278 h2_DCotTracksVsR_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R",rBin,rMin, rMax,100, -0.2, 0.2);
1280 histname=
"h2_DPhiTracksAtEcalVsR";
1281 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator" ) h2_DPhiTracksAtEcalVsR_=
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi at Ecal vs R : all Ecal ",rBin,rMin, rMax, dPhiTracksBin,0.,dPhiTracksMax);
1283 histname=
"h2_DPhiTracksAtEcalVsEta";
1284 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator" ) h2_DPhiTracksAtEcalVsEta_=
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi at Ecal vs #eta : all Ecal ",etaBin2,etaMin, etaMax, dPhiTracksBin,0.,dPhiTracksMax);
1289 histname=
"pDPhiTracksAtVtxVsEta";
1290 p_DPhiTracksAtVtxVsEta_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta ",etaBin2,etaMin, etaMax, 100, -0.5, 0.5,
"");
1292 histname=
"pDPhiTracksAtVtxVsR";
1293 p_DPhiTracksAtVtxVsR_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.5, 0.5,
"");
1296 histname=
"hDCotTracks";
1297 h_DCotTracks_[1][0]=
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
1298 h_DCotTracks_[1][1]=
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
1299 h_DCotTracks_[1][2]=
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
1302 histname=
"pDCotTracksVsEta";
1303 p_DCotTracksVsEta_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta ",etaBin2,etaMin, etaMax, 100, -0.2, 0.2,
"");
1305 histname=
"pDCotTracksVsR";
1306 p_DCotTracksVsR_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.2, 0.2,
"");
1309 histname=
"hDistMinAppTracks";
1310 h_distMinAppTracks_[1][0]=
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",dEtaTracksBin,-0.1,0.6);
1311 h_distMinAppTracks_[1][1]=
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",dEtaTracksBin,-0.1,0.6);
1312 h_distMinAppTracks_[1][2]=
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",dEtaTracksBin,-0.1,0.6);
1314 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator" ) {
1315 histname=
"hDPhiTracksAtEcal";
1316 h_DPhiTracksAtEcal_[1][0]=
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi at Ecal : all Ecal ",dPhiTracksBin,0.,dPhiTracksMax);
1317 h_DPhiTracksAtEcal_[1][1]=
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions: #delta#phi at Ecal : Barrel Ecal ",dPhiTracksBin,0.,dPhiTracksMax);
1318 h_DPhiTracksAtEcal_[1][2]=
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions: #delta#phi at Ecal : Endcap Ecal ",dPhiTracksBin,0.,dPhiTracksMax);
1320 histname=
"pDPhiTracksAtEcalVsR";
1321 p_DPhiTracksAtEcalVsR_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi at Ecal vs R ",rBin,rMin, rMax, dPhiTracksBin,0.,dPhiTracksMax,
"");
1323 histname=
"pDPhiTracksAtEcalVsEta";
1324 p_DPhiTracksAtEcalVsEta_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi at Ecal vs #eta ",etaBin2,etaMin, etaMax,dPhiTracksBin,0.,dPhiTracksMax,
"");
1327 histname=
"hDEtaTracksAtEcal";
1328 h_DEtaTracksAtEcal_[1][0]=
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions: #delta#eta at Ecal : all Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax);
1329 h_DEtaTracksAtEcal_[1][1]=
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions: #delta#eta at Ecal : Barrel Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax);
1330 h_DEtaTracksAtEcal_[1][2]=
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions: #delta#eta at Ecal : Endcap Ecal ",dEtaTracksBin,dEtaTracksMin,dEtaTracksMax);
1335 h_convVtxRvsZ_[0] =
dbe_->
book2D(
"convVtxRvsZAll",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
1336 h_convVtxRvsZ_[1] =
dbe_->
book2D(
"convVtxRvsZBarrel",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
1337 h_convVtxRvsZ_[2] =
dbe_->
book2D(
"convVtxRvsZEndcap",
" Photon Reco conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
1338 h_convVtxYvsX_ =
dbe_->
book2D(
"convVtxYvsXTrkBarrel",
" Photon Reco conversion vtx position, (x,y) eta<1 ",100, -80., 80., 100, -80., 80.);
1340 if ( ! isRunCentrally_ ) {
1341 h_convVtxRvsZ_zoom_[0] =
dbe_->
book2D(
"convVtxRvsZBarrelZoom1",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 40.);
1342 h_convVtxRvsZ_zoom_[1] =
dbe_->
book2D(
"convVtxRvsZBarrelZoom2",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 20.);
1343 h_convVtxYvsX_zoom_[0] =
dbe_->
book2D(
"convVtxYvsXTrkBarrelZoom1",
" Photon Reco conversion vtx position, (x,y) eta<1 ",100, -40., 40., 100, -40., 40.);
1344 h_convVtxYvsX_zoom_[1] =
dbe_->
book2D(
"convVtxYvsXTrkBarrelZoom2",
" Photon Reco conversion vtx position, (x,y) eta<1 ",100, -20., 20., 100, -20., 20.);
1347 h_convVtxdX_ =
dbe_->
book1D(
"convVtxdX",
" Photon Reco conversion vtx dX",100, -20.,20.);
1348 h_convVtxdY_ =
dbe_->
book1D(
"convVtxdY",
" Photon Reco conversion vtx dY",100, -20.,20.);
1349 h_convVtxdZ_ =
dbe_->
book1D(
"convVtxdZ",
" Photon Reco conversion vtx dZ",100, -20.,20.);
1350 h_convVtxdR_ =
dbe_->
book1D(
"convVtxdR",
" Photon Reco conversion vtx dR",100, -20.,20.);
1352 h_convVtxdX_barrel_ =
dbe_->
book1D(
"convVtxdX_barrel",
" Photon Reco conversion vtx dX, |eta|<=1.2",100, -20.,20.);
1353 h_convVtxdY_barrel_ =
dbe_->
book1D(
"convVtxdY_barrel",
" Photon Reco conversion vtx dY, |eta|<=1.2 ",100, -20.,20.);
1354 h_convVtxdZ_barrel_ =
dbe_->
book1D(
"convVtxdZ_barrel",
" Photon Reco conversion vtx dZ, |eta|<=1.2,",100, -20.,20.);
1355 h_convVtxdR_barrel_ =
dbe_->
book1D(
"convVtxdR_barrel",
" Photon Reco conversion vtx dR, |eta|<=1.2",100, -20.,20.);
1356 h_convVtxdX_endcap_ =
dbe_->
book1D(
"convVtxdX_endcap",
" Photon Reco conversion vtx dX, |eta|>1.2",100, -20.,20.);
1357 h_convVtxdY_endcap_ =
dbe_->
book1D(
"convVtxdY_endcap",
" Photon Reco conversion vtx dY, |eta|>1.2",100, -20.,20.);
1358 h_convVtxdZ_endcap_ =
dbe_->
book1D(
"convVtxdZ_endcap",
" Photon Reco conversion vtx dZ, |eta|>1.2",100, -20.,20.);
1359 h_convVtxdR_endcap_ =
dbe_->
book1D(
"convVtxdR_endcap",
" Photon Reco conversion vtx dR, |eta|>1.2 ",100, -20.,20.);
1362 h_convVtxdPhi_ =
dbe_->
book1D(
"convVtxdPhi",
" Photon Reco conversion vtx dPhi",100, -0.005,0.005);
1363 h_convVtxdEta_ =
dbe_->
book1D(
"convVtxdEta",
" Photon Reco conversion vtx dEta",100, -0.5,0.5);
1365 if ( ! isRunCentrally_ ) {
1366 h2_convVtxdRVsR_ =
dbe_->
book2D(
"h2ConvVtxdRVsR",
"Photon Reco conversion vtx dR vsR" ,rBin,rMin, rMax,100, -20.,20.);
1367 h2_convVtxdRVsEta_ =
dbe_->
book2D(
"h2ConvVtxdRVsEta",
"Photon Reco conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax,100, -20.,20.);
1370 p_convVtxdRVsR_ =
dbe_->
bookProfile(
"pConvVtxdRVsR",
"Photon Reco conversion vtx dR vsR" ,rBin,rMin, rMax ,100, -20.,20.,
"");
1371 p_convVtxdRVsEta_ =
dbe_->
bookProfile(
"pConvVtxdRVsEta",
"Photon Reco conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax, 100, -20.,20.,
"");
1372 p_convVtxdXVsX_ =
dbe_->
bookProfile(
"pConvVtxdXVsX",
"Conversion vtx dX vs X" ,120,-60, 60 ,100, -20.,20.,
"");
1373 p_convVtxdYVsY_ =
dbe_->
bookProfile(
"pConvVtxdYVsY",
"Conversion vtx dY vs Y" ,120,-60, 60 ,100, -20.,20.,
"");
1374 p_convVtxdZVsZ_ =
dbe_->
bookProfile(
"pConvVtxdZVsZ",
"Conversion vtx dZ vs Z" ,zBin,zMin,zMax ,100, -20.,20.,
"");
1377 if ( ! isRunCentrally_ ) {
1378 h2_convVtxRrecVsTrue_ =
dbe_->
book2D(
"h2ConvVtxRrecVsTrue",
"Photon Reco conversion vtx R rec vs true" ,rBin,rMin, rMax,rBin,rMin, rMax);
1382 h_vtxChi2_[0] =
dbe_->
book1D(histname+
"All",
"vertex #chi^{2} all", 100, chi2Min, chi2Max);
1383 h_vtxChi2_[1] =
dbe_->
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 100, chi2Min, chi2Max);
1384 h_vtxChi2_[2] =
dbe_->
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 100, chi2Min, chi2Max);
1385 histname=
"vtxChi2Prob";
1386 h_vtxChi2Prob_[0] =
dbe_->
book1D(histname+
"All",
"vertex #chi^{2} all", 100, 0., 1.);
1387 h_vtxChi2Prob_[1] =
dbe_->
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 100, 0., 1.);
1388 h_vtxChi2Prob_[2] =
dbe_->
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 100, 0., 1.);
1390 histname=
"zPVFromTracks";
1391 h_zPVFromTracks_[0] =
dbe_->
book1D(histname+
"All",
" Photons: PV z from conversion tracks", 100, -30., 30.);
1392 h_zPVFromTracks_[1] =
dbe_->
book1D(histname+
"Barrel",
" Photons: PV z from conversion tracks",100, -30., 30.);
1393 h_zPVFromTracks_[2] =
dbe_->
book1D(histname+
"Endcap",
" Photons: PV z from conversion tracks",100, -30., 30.);
1394 h_zPVFromTracks_[3] =
dbe_->
book1D(histname+
"EndcapP",
" Photons: PV z from conversion tracks",100, -30., 30.);
1395 h_zPVFromTracks_[4] =
dbe_->
book1D(histname+
"EndcapM",
" Photons: PV z from conversion tracks",100, -30., 30.);
1396 histname=
"dzPVFromTracks";
1397 h_dzPVFromTracks_[0] =
dbe_->
book1D(histname+
"All",
" Photons: PV Z_rec - Z_true from conversion tracks", 100, -10., 10.);
1398 h_dzPVFromTracks_[1] =
dbe_->
book1D(histname+
"Barrel",
" Photons: PV Z_rec - Z_true from conversion tracks",100, -10., 10.);
1399 h_dzPVFromTracks_[2] =
dbe_->
book1D(histname+
"Endcap",
" Photons: PV Z_rec - Z_true from conversion tracks",100, -10., 10.);
1400 h_dzPVFromTracks_[3] =
dbe_->
book1D(histname+
"EndcapP",
" Photons: PV Z_rec - Z_true from conversion tracks",100, -10., 10.);
1401 h_dzPVFromTracks_[4] =
dbe_->
book1D(histname+
"EndcapM",
" Photons: PV Z_rec - Z_true from conversion tracks",100, -10., 10.);
1402 p_dzPVVsR_ =
dbe_->
bookProfile(
"pdzPVVsR",
"Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax, 100, -3.,3.,
"");
1403 p_dzPVVsEta_ =
dbe_->
bookProfile(
"pdzPVVsEta",
"Photon Reco conversions: dz(PV) vs Eta" ,etaBin,etaMin, etaMax, 100, -3.,3.,
"");
1405 if ( ! isRunCentrally_ ) {
1406 h2_dzPVVsR_ =
dbe_->
book2D(
"h2dzPVVsR",
"Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax,100, -3.,3.);
1410 if ( ! isRunCentrally_ ) {
1411 histname=
"nHitsVsEta";
1412 nHitsVsEta_[0] =
dbe_->
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,25,0., 25.);
1414 histname=
"nHitsVsEta";
1415 nHitsVsEta_[1] =
dbe_->
book2D(histname+
"AssTracks",
"Photons:Tracks from conversions: # of hits vs #eta associated tracks",etaBin,etaMin, etaMax,25,0., 25.);
1417 histname=
"nHitsVsR";
1418 nHitsVsR_[0] =
dbe_->
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,25,0.,25);
1420 histname=
"nHitsVsR";
1421 nHitsVsR_[1] =
dbe_->
book2D(histname+
"AssTracks",
"Photons:Tracks from conversions: # of hits vs radius associated tracks" ,rBin,rMin, rMax,25,0.,25);
1423 histname=
"h2Chi2VsEta";
1424 h2_Chi2VsEta_[0]=
dbe_->
book2D(histname+
"All",
" Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
1427 histname=
"h2Chi2VsR";
1428 h2_Chi2VsR_[0]=
dbe_->
book2D(histname+
"All",
" Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
1431 histname=
"h_nHitsVsEta";
1432 p_nHitsVsEta_[0] =
dbe_->
bookProfile(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 25,-0.5, 24.5,
"");
1434 histname=
"h_nHitsVsEta";
1435 p_nHitsVsEta_[1] =
dbe_->
bookProfile(histname+
"AssTracks",
"Photons:Tracks from conversions: # of hits vs #eta associated tracks",etaBin,etaMin, etaMax, 25,-0.5, 24.5,
"");
1438 histname=
"h_nHitsVsR";
1439 p_nHitsVsR_[0] =
dbe_->
bookProfile(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 25,-0.5, 24.5,
"");
1441 h_tkChi2_[0] =
dbe_->
book1D(histname+
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
1442 histname=
"tkChi2Large";
1443 h_tkChi2Large_[0] =
dbe_->
book1D(histname+
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
1445 histname=
"h_nHitsVsR";
1446 p_nHitsVsR_[1] =
dbe_->
bookProfile(histname+
"AssTracks",
"Photons:Tracks from conversions: # of hits vs radius associated tracks",rBin,rMin, rMax, 25,-0.5, 24.5,
"");
1449 h_tkChi2_[1] =
dbe_->
book1D(histname+
"AssTracks",
"Photons:Tracks from conversions: #chi^{2} of associated tracks", 100, chi2Min, chi2Max);
1450 histname=
"tkChi2Large";
1451 h_tkChi2Large_[1] =
dbe_->
book1D(histname+
"AssTracks",
"Photons:Tracks from conversions: #chi^{2} of associated tracks", 1000, 0., 5000.0);
1453 histname=
"pChi2VsEta";
1454 p_Chi2VsEta_[0]=
dbe_->
bookProfile(histname+
"All",
" Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,
"");
1456 histname=
"pChi2VsR";
1457 p_Chi2VsR_[0]=
dbe_->
bookProfile(histname+
"All",
" Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,
"");
1461 h_TkD0_[0]=
dbe_->
book1D(histname+
"All",
" Reco Track D0*q: All ",100,-0.1,0.6);
1462 h_TkD0_[1]=
dbe_->
book1D(histname+
"Barrel",
" Reco Track D0*q: Barrel ",100,-0.1,0.6);
1463 h_TkD0_[2]=
dbe_->
book1D(histname+
"Endcap",
" Reco Track D0*q: Endcap ",100,-0.1,0.6);
1466 histname=
"hTkPtPull";
1467 h_TkPtPull_[0]=
dbe_->
book1D(histname+
"All",
" Reco Track Pt pull: All ",100, -10., 10.);
1468 histname=
"hTkPtPull";
1469 h_TkPtPull_[1]=
dbe_->
book1D(histname+
"Barrel",
" Reco Track Pt pull: Barrel ",100, -10., 10.);
1470 histname=
"hTkPtPull";
1471 h_TkPtPull_[2]=
dbe_->
book1D(histname+
"Endcap",
" Reco Track Pt pull: Endcap ",100, -10., 10.);
1473 histname=
"pTkPtPullEta";
1474 p_TkPtPull_[0]=
dbe_->
bookProfile(histname+
"All",
" Reco Track Pt pull: All ",etaBin2,etaMin, etaMax, 100, -10., 10.,
" ");
1476 if ( ! isRunCentrally_ ) {
1477 histname=
"h2TkPtPullEta";
1478 h2_TkPtPull_[0]=
dbe_->
book2D(histname+
"All",
" Reco Track Pt pull: All ",etaBin2,etaMin, etaMax,100, -10., 10.);
1480 histname=
"PtRecVsPtSim";
1481 h2_PtRecVsPtSim_[0]=
dbe_->
book2D(histname+
"All",
"Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
1482 h2_PtRecVsPtSim_[1]=
dbe_->
book2D(histname+
"Barrel",
"Pt Rec vs Pt sim: Barrel ", etBin,etMin,etMax,etBin,etMin, etMax);
1483 h2_PtRecVsPtSim_[2]=
dbe_->
book2D(histname+
"Endcap",
"Pt Rec vs Pt sim: Endcap ", etBin,etMin,etMax,etBin,etMin, etMax);
1484 histname=
"PtRecVsPtSimMixProv";
1485 h2_PtRecVsPtSimMixProv_ =
dbe_->
book2D(histname+
"All",
"Pt Rec vs Pt sim All for mix with general tracks ", etBin,etMin,etMax,etBin,etMin, etMax);
1488 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator" ) {
1489 histname=
"eBcOverTkPout";
1490 hBCEnergyOverTrackPout_[0] =
dbe_->
book1D(histname+
"All",
"Matrching BC E/P_out: all Ecal ",100, 0., 5.);
1491 hBCEnergyOverTrackPout_[1] =
dbe_->
book1D(histname+
"Barrel",
"Matrching BC E/P_out: Barrel ",100, 0., 5.);
1492 hBCEnergyOverTrackPout_[2] =
dbe_->
book1D(histname+
"Endcap",
"Matrching BC E/P_out: Endcap ",100, 0., 5.);
1496 h_OIinnermostHitR_ =
dbe_->
book1D(
"OIinnermostHitR",
" R innermost hit for OI tracks ",50, 0., 25);
1497 h_IOinnermostHitR_ =
dbe_->
book1D(
"IOinnermostHitR",
" R innermost hit for IO tracks ",50, 0., 25);
1500 h_trkProv_[0] =
dbe_->
book1D(
"allTrkProv",
" Track pair provenance ",4, 0., 4.);
1501 h_trkProv_[1] =
dbe_->
book1D(
"assTrkProv",
" Track pair provenance ",4, 0., 4.);
1504 histname =
"h_RecoConvTwoTracksEta";
1505 h_RecoConvTwoTracks_[0] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco tracks: simulated #eta",etaBin2,etaMin, etaMax);
1506 histname =
"h_RecoConvTwoTracksPhi";
1507 h_RecoConvTwoTracks_[1] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco tracks: simulated #phi",phiBin,phiMin, phiMax);
1508 histname =
"h_RecoConvTwoTracksR";
1509 h_RecoConvTwoTracks_[2] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco tracks: simulated R",rBin,rMin, rMax);
1510 histname =
"h_RecoConvTwoTracksZ";
1511 h_RecoConvTwoTracks_[3] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco tracks: simulated Z",zBin,zMin, zMax);
1512 histname =
"h_RecoConvTwoTracksEt";
1513 h_RecoConvTwoTracks_[4] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco tracks: simulated Et",etBin,etMin, etMax);
1515 histname =
"h_RecoConvTwoMTracksEta";
1516 h_RecoConvTwoMTracks_[0] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated #eta",etaBin2,etaMin, etaMax);
1517 histname =
"h_RecoConvTwoMTracksPhi";
1518 h_RecoConvTwoMTracks_[1] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated #phi",phiBin,phiMin, phiMax);
1519 histname =
"h_RecoConvTwoMTracksR";
1520 h_RecoConvTwoMTracks_[2] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated R",rBin,rMin, rMax);
1521 histname =
"h_RecoConvTwoMTracksZ";
1522 h_RecoConvTwoMTracks_[3] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated Z",zBin,zMin, zMax);
1523 histname =
"h_RecoConvTwoMTracksEt";
1524 h_RecoConvTwoMTracks_[4] =
dbe_->
book1D(histname,
" All reco conversions with 2 reco-ass tracks: simulated Et",etBin,etMin, etMax);
1535 edm::LogInfo(
"ConvertedPhotonProducer") <<
" get magnetic field" <<
"\n";
1549 delete thePhotonMCTruthFinder_;
1558 using namespace edm;
1562 const float BARL = 1.4442;
1564 const float END_HI = 2.5;
1570 LogInfo(
"PhotonValidator") <<
"PhotonValidator Analyzing event number: " << e.
id() <<
" Global Counter " << nEvt_ <<
"\n";
1579 h_nRecoVtx_ ->Fill (
float(vtxH->size()));
1588 e.
getByToken(photonCollectionToken_, photonHandle);
1590 if (!photonHandle.isValid()) {
1592 <<
"Error! Can't get the Photon collection "
1599 e.
getByToken(pfCandidates_,pfCandidateHandle);
1600 if (!pfCandidateHandle.isValid()) {
1601 edm::LogError(
"PhotonValidator") <<
"Error! Can't get the product pfCandidates "<< std::endl ;
1606 if ( fName_ ==
"pfPhotonValidator") {
1607 e.
getByLabel(
"particleBasedIsolation",valueMapPhoPFCandIso_,phoToParticleBasedIsoMapHandle);
1608 if ( ! phoToParticleBasedIsoMapHandle.isValid()) {
1609 edm::LogInfo(
"PhotonValidator") <<
"Error! Can't get the product: valueMap photons to particle based iso " << std::endl;
1612 phoToParticleBasedIsoMap = *(phoToParticleBasedIsoMapHandle.product());
1615 unsigned nObj=photonHandle->size();
1616 if ( fName_ ==
"pfPhotonValidator") {
1618 for(
unsigned int lCand=0; lCand < nObj; lCand++) {
1622 for( std::vector<reco::PFCandidateRef>::const_iterator
i = phoToParticleBasedIsoMap[photonRef].
begin();
i != phoToParticleBasedIsoMap[photonRef].end(); ++
i ) {
1638 e.
getByToken(conversionOITrackPr_Token_, outInTrkHandle);
1642 e.
getByToken(conversionIOTrackPr_Token_, inOutTrkHandle);
1651 h_OIinnermostHitR_ ->Fill (
sqrt( iTk->innerPosition().Perp2() ) );
1652 for (
trackingRecHit_iterator itHits=iTk->extra()->recHitsBegin(); itHits!=iTk->extra()->recHitsEnd(); ++itHits ) {
1653 if ( (*itHits)->isValid() ) {
1671 h_IOinnermostHitR_ ->Fill (
sqrt( iTk->innerPosition().Perp2() ) );
1673 for (
trackingRecHit_iterator itHits=iTk->extra()->recHitsBegin(); itHits!=iTk->extra()->recHitsEnd(); ++itHits ) {
1674 if ( (*itHits)->isValid() ) {
1688 std::vector<SimTrack> theSimTracks;
1689 std::vector<SimVertex> theSimVertices;
1704 theSimTracks.insert(theSimTracks.end(),SimTk->begin(),SimTk->end());
1705 theSimVertices.insert(theSimVertices.end(),SimVtx->begin(),SimVtx->end());
1706 std::vector<PhotonMCTruth> mcPhotons=thePhotonMCTruthFinder_->find (theSimTracks, theSimVertices);
1710 const HepMC::GenEvent *myGenEvent = hepMC->GetEvent();
1721 bool useTP= parameters_.getParameter<
bool>(
"useTP");
1732 std::vector<reco::PhotonCollection::const_iterator> StoRMatchedConvertedPhotons;
1742 OISimToReco = theTrackAssociator_->associateSimToReco(outInTrkHandle, ElectronTPHandle, &e, &esup);
1743 IOSimToReco = theTrackAssociator_->associateSimToReco(inOutTrkHandle, ElectronTPHandle, &e, &esup);
1745 OIRecoToSim = theTrackAssociator_->associateRecoToSim(outInTrkHandle, ElectronTPHandle, &e, &esup);
1746 IORecoToSim = theTrackAssociator_->associateRecoToSim(inOutTrkHandle, ElectronTPHandle, &e, &esup);
1750 vector<reco::SimToRecoCollection*> StoRCollPtrs;
1751 StoRCollPtrs.push_back(&OISimToReco);
1752 StoRCollPtrs.push_back(&IOSimToReco);
1753 vector<reco::RecoToSimCollection*> RtoSCollPtrs;
1754 RtoSCollPtrs.push_back(&OIRecoToSim);
1755 RtoSCollPtrs.push_back(&IORecoToSim);
1757 for (
int i=0;
i<2;
i++)
1759 for (
int i=0;
i<2;
i++)
1763 std::vector<reco::PhotonRef> myPhotons;
1765 for(
unsigned int iPho=0; iPho < photonHandle->size(); iPho++) {
1768 if ( fabs(phoRef->eta()) > 2.5 )
continue;
1769 myPhotons.push_back(phoRef);
1774 if ( myPhotons.size() >=2 ) {
1775 if ( myPhotons[0]->et() > 40 && myPhotons[1]->et() > 25 ) {
1780 float gamgamMass2 = p12.Dot(p12);
1781 float gamgamMass2_regr1 = p12_regr1.Dot(p12_regr1);
1782 float gamgamMass2_regr2 = p12_regr2.Dot(p12_regr2);
1785 if ( gamgamMass2 > 0 ) {
1787 h_gamgamMass_[0][0] ->
Fill(
sqrt( gamgamMass2 ));
1788 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() )
1789 h_gamgamMass_[0][1] ->
Fill(
sqrt( gamgamMass2 ));
1790 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1791 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1792 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1793 h_gamgamMass_[0][2] ->
Fill(
sqrt( gamgamMass2 ));
1795 if ( myPhotons[0]->r9() > 0.94 && myPhotons[1]->r9() > 0.94 ) {
1796 h_gamgamMass_[1][0] ->
Fill(
sqrt( gamgamMass2 ));
1797 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() )
1798 h_gamgamMass_[1][1] ->
Fill(
sqrt( gamgamMass2 ));
1799 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1800 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1801 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1802 h_gamgamMass_[1][2] ->
Fill(
sqrt( gamgamMass2 ));
1809 if ( chi2Prob1 > 0.0005 && chi2Prob2 > 0.0005 ) {
1810 h_gamgamMass_[2][0] ->
Fill(
sqrt( gamgamMass2 ));
1811 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1812 h_gamgamMass_[2][1] ->
Fill(
sqrt( gamgamMass2 ));
1814 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1815 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1816 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1817 h_gamgamMass_[2][2] ->
Fill(
sqrt( gamgamMass2 )); {
1822 if ( myPhotons[0]->
conversions()[0]->nTracks() ==2 ) {
1824 if ( chi2Prob1 > 0.0005 ) {
1825 h_gamgamMass_[2][0] ->
Fill(
sqrt( gamgamMass2 ));
1826 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1827 h_gamgamMass_[2][1] ->
Fill(
sqrt( gamgamMass2 ));
1829 if ( myPhotons[0]->isEE() || myPhotons[1]->isEE() ) {
1830 h_gamgamMass_[2][2] ->
Fill(
sqrt( gamgamMass2 ));
1835 if ( myPhotons[1]->
conversions()[0]->nTracks() ==2 ) {
1837 if ( chi2Prob1 > 0.0005 ) {
1838 h_gamgamMass_[2][0] ->
Fill(
sqrt( gamgamMass2 ));
1839 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1840 h_gamgamMass_[2][1] ->
Fill(
sqrt( gamgamMass2 ));
1842 if ( myPhotons[0]->isEE() || myPhotons[1]->isEE() ) {
1843 h_gamgamMass_[2][2] ->
Fill(
sqrt( gamgamMass2 ));
1851 if ( gamgamMass2_regr1 > 0 ) {
1853 h_gamgamMassRegr1_[0][0] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1854 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() )
1855 h_gamgamMassRegr1_[0][1] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1856 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1857 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1858 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1859 h_gamgamMassRegr1_[0][2] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1861 if ( myPhotons[0]->r9() > 0.94 && myPhotons[1]->r9() > 0.94 ) {
1862 h_gamgamMassRegr1_[1][0] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1863 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() )
1864 h_gamgamMassRegr1_[1][1] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1865 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1866 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1867 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1868 h_gamgamMassRegr1_[1][2] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1877 if ( chi2Prob1 > 0.0005 && chi2Prob2 > 0.0005 ) {
1878 h_gamgamMassRegr1_[2][0] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1879 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1880 h_gamgamMassRegr1_[2][1] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1882 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1883 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1884 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1885 h_gamgamMassRegr1_[2][2] ->
Fill(
sqrt( gamgamMass2_regr1 )); {
1890 if ( myPhotons[0]->
conversions()[0]->nTracks() ==2 ) {
1892 if ( chi2Prob1 > 0.0005 ) {
1893 h_gamgamMassRegr1_[2][0] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1894 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1895 h_gamgamMassRegr1_[2][1] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1897 if ( myPhotons[0]->isEE() || myPhotons[1]->isEE() ) {
1898 h_gamgamMassRegr1_[2][2] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1903 if ( myPhotons[1]->
conversions()[0]->nTracks() ==2 ) {
1905 if ( chi2Prob1 > 0.0005 ) {
1906 h_gamgamMassRegr1_[2][0] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1907 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1908 h_gamgamMassRegr1_[2][1] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1910 if ( myPhotons[0]->isEE() || myPhotons[1]->isEE() ) {
1911 h_gamgamMassRegr1_[2][2] ->
Fill(
sqrt( gamgamMass2_regr1 ));
1920 if ( gamgamMass2_regr2 > 0 ) {
1922 h_gamgamMassRegr2_[0][0] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1923 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() )
1924 h_gamgamMassRegr2_[0][1] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1925 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1926 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1927 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1928 h_gamgamMassRegr2_[0][2] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1930 if ( myPhotons[0]->r9() > 0.94 && myPhotons[1]->r9() > 0.94 ) {
1931 h_gamgamMassRegr2_[1][0] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1932 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() )
1933 h_gamgamMassRegr2_[1][1] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1934 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1935 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1936 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1937 h_gamgamMassRegr2_[1][2] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1946 if ( chi2Prob1 > 0.0005 && chi2Prob2 > 0.0005 ) {
1947 h_gamgamMassRegr2_[2][0] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1948 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1949 h_gamgamMassRegr2_[2][1] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1951 if ( ( myPhotons[0]->isEE() && myPhotons[1]->isEE() ) ||
1952 ( myPhotons[0]->isEE() && myPhotons[1]->isEB() ) ||
1953 ( myPhotons[0]->isEB() && myPhotons[1]->isEE() ) )
1954 h_gamgamMassRegr2_[2][2] ->
Fill(
sqrt( gamgamMass2_regr2 )); {
1959 if ( myPhotons[0]->
conversions()[0]->nTracks() ==2 ) {
1961 if ( chi2Prob1 > 0.0005 ) {
1962 h_gamgamMassRegr2_[2][0] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1963 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1964 h_gamgamMassRegr2_[2][1] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1966 if ( myPhotons[0]->isEE() || myPhotons[1]->isEE() ) {
1967 h_gamgamMassRegr2_[2][2] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1972 if ( myPhotons[1]->
conversions()[0]->nTracks() ==2 ) {
1974 if ( chi2Prob1 > 0.0005 ) {
1975 h_gamgamMassRegr2_[2][0] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1976 if ( myPhotons[0]->isEB() && myPhotons[1]->isEB() ) {
1977 h_gamgamMassRegr2_[2][1] ->
Fill(
sqrt( gamgamMass2_regr2 ));
1979 if ( myPhotons[0]->isEE() || myPhotons[1]->isEE() ) {
1980 h_gamgamMassRegr2_[2][2] ->
Fill(
sqrt( gamgamMass2_regr2 ));
2003 for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
2004 if ( (*mcPho).fourMomentum().et() < minPhoEtCut_ )
continue;
2006 for ( HepMC::GenEvent::particle_const_iterator mcIter=myGenEvent->particles_begin(); mcIter != myGenEvent->particles_end(); mcIter++ ) {
2007 if ( (*mcIter)->pdg_id() != 22 )
continue;
2008 bool isTheSame=
false;
2010 if ( (*mcIter)->production_vertex() ) {
2011 if ( (*mcIter)->production_vertex()->particles_begin(
HepMC::parents) !=
2013 mother = *((*mcIter)->production_vertex()->particles_begin(
HepMC::parents));
2019 float mcPhi= (*mcPho).fourMomentum().phi();
2020 mcPhi_= phiNormalization(mcPhi);
2021 mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
2022 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
2023 mcConvR_= (*mcPho).vertex().perp();
2024 mcConvX_= (*mcPho).vertex().x();
2025 mcConvY_= (*mcPho).vertex().y();
2026 mcConvZ_= (*mcPho).vertex().z();
2027 mcConvEta_= (*mcPho).vertex().eta();
2028 mcConvPhi_= (*mcPho).vertex().phi();
2030 if ( fabs(mcEta_) > END_HI )
continue;
2035 || (mother != 0 && mother->pdg_id() == 22)
2036 || (mother != 0 && mother->pdg_id() == 25)
2037 || (mother != 0 && mother->pdg_id() == 35) )
2041 double dPt = fabs((*mcIter)->momentum().perp() - (*mcPho).fourMomentum().et());
2042 float phiMother=(*mcIter)->momentum().phi();
2043 double dPhi = phiNormalization(phiMother) - mcPhi_ ;
2044 double dEta = fabs( (*mcIter)->momentum().eta() - (*mcPho).fourMomentum().pseudoRapidity() );
2049 if ( dEta <=0.0001 && dPhi <=0.0001 && dPt <=0.0001)
2053 if ( ! isTheSame )
continue;
2063 if ( ! isRunCentrally_ ) {
2064 h_SimPhoMotherEt_[0]->Fill( (*mcPho).motherMomentum().et() );
2065 h_SimPhoMotherEta_[0]->Fill( (*mcPho).motherMomentum().pseudoRapidity());
2068 h_SimPho_[0]->Fill ( mcEta_);
2069 h_SimPho_[1]->Fill ( mcPhi_);
2070 h_SimPho_[2]->Fill ( (*mcPho).fourMomentum().et() );
2077 bool goodSimConversion=
false;
2078 bool visibleConversion=
false;
2079 bool visibleConversionsWithTwoSimTracks=
false;
2080 if ( (*mcPho).isAConversion() == 1 ) {
2082 h_AllSimConv_[0]->Fill( mcEta_ ) ;
2083 h_AllSimConv_[1]->Fill( mcPhi_ );
2084 h_AllSimConv_[2]->Fill( mcConvR_ );
2085 h_AllSimConv_[3]->Fill( mcConvZ_ );
2086 h_AllSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
2088 if ( ! isRunCentrally_ ) {
2089 if ( mcConvR_ <15) h_SimConvEtaPix_[0]->Fill( mcEta_ ) ;
2092 if ( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
2093 ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) visibleConversion=
true;
2105 if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.001 &&
2106 fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.001 &&
2107 fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.001) {
2112 theConvTP_.push_back( tp );
2117 if ( theConvTP_.size() == 2 ) visibleConversionsWithTwoSimTracks=
true;
2118 goodSimConversion=
false;
2120 if ( visibleConversion && visibleConversionsWithTwoSimTracks ) goodSimConversion=
true;
2121 if ( goodSimConversion ) {
2123 h_VisSimConv_[0]->Fill( mcEta_ ) ;
2124 h_VisSimConv_[1]->Fill( mcPhi_ );
2125 h_VisSimConv_[2]->Fill( mcConvR_ );
2126 h_VisSimConv_[3]->Fill( mcConvZ_ );
2127 h_VisSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
2131 if ( ! isRunCentrally_ ) {
2133 h_simTkPt_ ->
Fill ( (*iTrk)->pt() );
2134 h_simTkEta_ ->
Fill ( (*iTrk)->eta() );
2144 float minDelta=10000.;
2145 std::vector<reco::PhotonRef> thePhotons;
2151 for(
unsigned int iPho=0; iPho < photonHandle->size(); iPho++) {
2153 thePhotons.push_back(aPho);
2154 float phiPho=aPho->phi();
2155 float etaPho=aPho->eta();
2158 if ( deltaPhi >
pi ) deltaPhi -= twopi;
2159 if ( deltaPhi < -
pi) deltaPhi += twopi;
2160 deltaPhi=
pow(deltaPhi,2);
2161 deltaEta=
pow(deltaEta,2);
2163 if ( delta<0.1 && delta < minDelta ) {
2170 if ( iMatch>-1 ) matched=
true;
2175 if ( ! isRunCentrally_ ) {
2176 h_SimPhoMotherEt_[1]->Fill( (*mcPho).motherMomentum().et() );
2177 h_SimPhoMotherEta_[1]->Fill( (*mcPho).motherMomentum().pseudoRapidity());
2179 h_MatchedSimPho_[0]->Fill( mcEta_ ) ;
2180 h_MatchedSimPho_[1]->Fill( mcPhi_ );
2181 h_MatchedSimPho_[2]->Fill( (*mcPho).fourMomentum().et());
2188 if ( ! matched)
continue;
2190 bool phoIsInBarrel=
false;
2191 bool phoIsInEndcap=
false;
2192 bool phoIsInEndcapP=
false;
2193 bool phoIsInEndcapM=
false;
2197 if ( fabs(matchingPho->superCluster()->position().eta() ) < 1.479 ) {
2201 if ( matchingPho->superCluster()->position().eta() > 0) phoIsInEndcapP=
true;
2202 if ( matchingPho->superCluster()->position().eta() < 0) phoIsInEndcapM=
true;
2208 if ( phoIsInBarrel ) {
2210 e.
getByToken(barrelEcalHits_, ecalRecHitHandle);
2211 if (!ecalRecHitHandle.
isValid()) {
2213 labelsForToken(barrelEcalHits_, l);
2215 <<
"Error! Can't get the product "
2220 }
else if ( phoIsInEndcap ) {
2223 e.
getByToken(endcapEcalHits_, ecalRecHitHandle);
2224 if (!ecalRecHitHandle.
isValid()) {
2226 labelsForToken(barrelEcalHits_, l);
2228 <<
"Error! Can't get the product "
2237 float photonE = matchingPho->energy();
2238 float photonEt= matchingPho->energy()/cosh( matchingPho->eta()) ;
2241 float r9 = matchingPho->r9();
2242 float r1 = matchingPho->r1x5();
2243 float r2 = matchingPho->r2x5();
2244 float sigmaIetaIeta = matchingPho->sigmaIetaIeta();
2245 float hOverE = matchingPho->hadronicOverEm();
2246 float newhOverE = matchingPho->hadTowOverEm();
2247 float ecalIso = matchingPho->ecalRecHitSumEtConeDR04();
2248 float hcalIso = matchingPho->hcalTowerSumEtConeDR04();
2249 float newhcalIso = matchingPho->hcalTowerSumEtBcConeDR04();
2250 float trkIso = matchingPho->trkSumPtSolidConeDR04();
2251 float nIsoTrk = matchingPho->nTrkSolidConeDR04();
2253 float chargedHadIso = matchingPho->chargedHadronIso();
2254 float neutralHadIso = matchingPho->neutralHadronIso();
2255 float photonIso = matchingPho->photonIso();
2256 float etOutsideMustache = matchingPho->etOutsideMustache();
2257 int nClusterOutsideMustache = matchingPho->nClusterOutsideMustache();
2258 float pfMVA = matchingPho->pfMVA();
2263 std::vector< std::pair<DetId, float> >::const_iterator rhIt;
2264 bool atLeastOneDeadChannel=
false;
2265 for(
reco::CaloCluster_iterator bcIt = matchingPho->superCluster()->clustersBegin();bcIt != matchingPho->superCluster()->clustersEnd(); ++bcIt) {
2266 for(rhIt = (*bcIt)->hitsAndFractions().begin();rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
2269 if (rhIt->first == (*it).id() ) {
2270 if ( (*it).recoFlag() == 9 ) {
2271 atLeastOneDeadChannel=
true;
2280 if ( atLeastOneDeadChannel ) {
2281 h_MatchedSimPhoBadCh_[0]->Fill( mcEta_ ) ;
2282 h_MatchedSimPhoBadCh_[1]->Fill( mcPhi_ );
2283 h_MatchedSimPhoBadCh_[2]->Fill( (*mcPho).fourMomentum().et());
2288 h_scEta_[
type]->Fill( matchingPho->superCluster()->eta() );
2289 h_scPhi_[
type]->Fill( matchingPho->superCluster()->phi() );
2290 if ( ! isRunCentrally_ ) {
2291 h_scEtaWidth_[
type]->Fill( matchingPho->superCluster()->etaWidth() );
2292 h_scPhiWidth_[
type]->Fill( matchingPho->superCluster()->phiWidth() );
2294 h_scE_[
type][0]->Fill( matchingPho->superCluster()->energy() );
2295 h_scEt_[
type][0]->Fill( matchingPho->superCluster()->energy()/cosh( matchingPho->superCluster()->eta()) );
2296 if ( phoIsInEndcap ) h_psE_->Fill( matchingPho->superCluster()->preshowerEnergy() ) ;
2298 h_r9_[
type][0]->Fill( r9 );
2300 h_r1_[
type][0]->Fill( r1 );
2302 h_r2_[
type][0]->Fill( r2 );
2304 h_sigmaIetaIeta_[
type][0]->Fill( sigmaIetaIeta );
2306 h_hOverE_[
type][0]->Fill( hOverE );
2307 if ( ! isRunCentrally_ ) {
2308 h2_r9VsEta_[0] ->
Fill (mcEta_, r9);
2309 h2_r9VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), r9);
2310 h2_r1VsEta_[0] ->
Fill (mcEta_, r1);
2311 h2_r1VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(),
r1);
2312 h2_r2VsEta_[0] ->
Fill (mcEta_, r2);
2313 h2_r2VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(),
r2);
2314 h2_sigmaIetaIetaVsEta_[0] ->
Fill (mcEta_, sigmaIetaIeta );
2315 h2_sigmaIetaIetaVsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), sigmaIetaIeta);
2316 h2_hOverEVsEta_[0] ->
Fill (mcEta_, hOverE );
2317 h2_hOverEVsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), hOverE);
2319 p_hOverEVsEta_[0] ->
Fill (mcEta_, hOverE );
2320 p_hOverEVsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), hOverE);
2322 h_newhOverE_[
type][0]->Fill( newhOverE );
2323 p_newhOverEVsEta_[0] ->
Fill (mcEta_, newhOverE );
2324 p_newhOverEVsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), newhOverE);
2327 h_ecalRecHitSumEtConeDR04_[
type][0]->Fill( ecalIso );
2329 if ( ! isRunCentrally_ ) {
2330 h2_ecalRecHitSumEtConeDR04VsEta_[0] ->
Fill (mcEta_, ecalIso );
2331 h2_ecalRecHitSumEtConeDR04VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), ecalIso);
2332 h2_hcalTowerSumEtConeDR04VsEta_[0] ->
Fill (mcEta_, hcalIso );
2333 h2_hcalTowerSumEtConeDR04VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), hcalIso);
2336 p_ecalRecHitSumEtConeDR04VsEta_[0] ->
Fill (mcEta_, ecalIso );
2337 if ( ! isRunCentrally_ ) p_ecalRecHitSumEtConeDR04VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), ecalIso);
2339 h_hcalTowerSumEtConeDR04_[
type][0]->Fill( hcalIso );
2340 p_hcalTowerSumEtConeDR04VsEta_[0] ->
Fill (mcEta_, hcalIso );
2341 if ( ! isRunCentrally_ ) p_hcalTowerSumEtConeDR04VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), hcalIso);
2343 if ( ! isRunCentrally_ ) h_hcalTowerBcSumEtConeDR04_[
type][0]->Fill( newhcalIso );
2344 p_hcalTowerBcSumEtConeDR04VsEta_[0] ->
Fill (mcEta_, newhcalIso );
2345 if ( ! isRunCentrally_ ) p_hcalTowerBcSumEtConeDR04VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), newhcalIso);
2347 h_isoTrkSolidConeDR04_[
type][0]->Fill( trkIso );
2348 h_nTrkSolidConeDR04_[
type][0]->Fill( nIsoTrk );
2350 if ( ! isRunCentrally_ ) {
2351 h2_isoTrkSolidConeDR04VsEta_[0] ->
Fill (mcEta_, trkIso );
2352 h2_isoTrkSolidConeDR04VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), trkIso);
2353 h2_nTrkSolidConeDR04VsEta_[0] ->
Fill (mcEta_, nIsoTrk );
2354 h2_nTrkSolidConeDR04VsEt_[0] ->
Fill ((*mcPho).fourMomentum().et(), nIsoTrk);
2357 h_chHadIso_[0]->
Fill (chargedHadIso);
2358 h_nHadIso_[0]->
Fill (neutralHadIso);
2359 h_phoIso_[0]->
Fill (photonIso);
2360 h_nCluOutsideMustache_[0]->Fill(
float(nClusterOutsideMustache));
2361 h_etOutsideMustache_[0]->Fill(etOutsideMustache);
2362 h_pfMva_[0]->Fill(pfMVA);
2364 h_phoEta_[
type]->Fill( matchingPho->eta() );
2365 h_phoPhi_[
type]->Fill( matchingPho->phi() );
2366 h_phoDEta_[0]->Fill ( matchingPho->eta() - (*mcPho).fourMomentum().eta() );
2367 h_phoDPhi_[0]->Fill ( matchingPho->phi() - mcPhi_ );
2368 h_phoE_[
type][0]->Fill( photonE );
2369 h_phoEt_[
type][0]->Fill( photonEt);
2371 h_phoERes_[0][0]->Fill( photonE / (*mcPho).fourMomentum().e() );
2372 h_phoEResRegr1_[0][0]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2373 h_phoEResRegr2_[0][0]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2375 p_eResVsEta_[0]->Fill (mcEta_, photonE/(*mcPho).fourMomentum().e() ) ;
2376 p_eResVsEt_[0][0]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2378 if ( ! isRunCentrally_ ) h2_eResVsEta_[0]->Fill (mcEta_, photonE/(*mcPho).fourMomentum().e() ) ;
2379 if ( ! isRunCentrally_ ) h2_eResVsEt_[0][0]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2380 if ( ! isRunCentrally_ ) h2_eResVsR9_[0]->Fill (r9, photonE/(*mcPho).fourMomentum().e() ) ;
2381 if ( ! isRunCentrally_ ) h2_sceResVsR9_[0]->Fill (r9, matchingPho->superCluster()->energy()/(*mcPho).fourMomentum().e() ) ;
2382 if ( ! isRunCentrally_ ) p_eResVsR9_[0]->Fill (r9, photonE/(*mcPho).fourMomentum().e() ) ;
2383 if ( ! isRunCentrally_ ) p_sceResVsR9_[0]->Fill (r9, matchingPho->superCluster()->energy()/(*mcPho).fourMomentum().e() ) ;
2386 if ( (*mcPho).isAConversion() == 0 ) {
2387 if ( ! isRunCentrally_ ) {
2388 h2_eResVsEta_[1]->Fill (mcEta_, photonE/ (*mcPho).fourMomentum().e() ) ;
2389 h2_r9VsEta_[1] ->
Fill (mcEta_, r9);
2390 h2_r9VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), r9);
2392 h2_r1VsEta_[1] ->
Fill (mcEta_, r1);
2393 h2_r1VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(),
r1);
2395 h2_r2VsEta_[1] ->
Fill (mcEta_, r2);
2396 h2_r2VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(),
r2);
2398 h2_sigmaIetaIetaVsEta_[1] ->
Fill (mcEta_, sigmaIetaIeta );
2399 h2_sigmaIetaIetaVsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), sigmaIetaIeta);
2401 h2_hOverEVsEta_[1] ->
Fill (mcEta_, hOverE );
2402 h2_hOverEVsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), hOverE);
2408 if ( ! isRunCentrally_ ) {
2409 h2_ecalRecHitSumEtConeDR04VsEta_[1] ->
Fill (mcEta_, ecalIso );
2410 h2_hcalTowerSumEtConeDR04VsEta_[1] ->
Fill (mcEta_, hcalIso );
2411 h2_isoTrkSolidConeDR04VsEta_[1] ->
Fill (mcEta_, trkIso );
2412 h2_isoTrkSolidConeDR04VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), trkIso);
2413 h2_nTrkSolidConeDR04VsEta_[1] ->
Fill (mcEta_, nIsoTrk );
2414 h2_nTrkSolidConeDR04VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), nIsoTrk);
2417 p_ecalRecHitSumEtConeDR04VsEta_[1] ->
Fill (mcEta_, ecalIso );
2418 if ( ! isRunCentrally_ ) p_hcalTowerSumEtConeDR04VsEta_[1] ->
Fill (mcEta_, hcalIso );
2426 if ( photonE/(*mcPho).fourMomentum().e() < 0.3 && photonE/(*mcPho).fourMomentum().e() > 0.1 ) {
2432 if ( (r9>0.94 && phoIsInBarrel) || (r9>0.95 && phoIsInEndcap) ) {
2433 h_phoERes_[1][0]->Fill( photonE / (*mcPho).fourMomentum().e() );
2434 h_phoEResRegr1_[1][0]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2435 h_phoEResRegr2_[1][0]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2436 if ( ! isRunCentrally_ ) h2_eResVsEt_[0][1]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2437 p_eResVsEt_[0][1]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2438 p_eResVsEta_[1]->Fill (mcEta_,photonE/ (*mcPho).fourMomentum().e() ) ;
2440 }
else if ( ( r9 <= 0.94&& phoIsInBarrel) || ( r9 <= 0.95&& phoIsInEndcap) ) {
2441 h_phoERes_[2][0]->Fill(photonE / (*mcPho).fourMomentum().e() );
2442 h_phoEResRegr1_[2][0]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2443 h_phoEResRegr2_[2][0]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2444 p_eResVsEt_[0][2]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2445 p_eResVsEta_[2]->Fill (mcEta_,photonE/ (*mcPho).fourMomentum().e() ) ;
2446 if ( ! isRunCentrally_ ) {
2447 h2_eResVsEt_[0][2]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2448 h_EtR9Less093_[0][0] ->Fill ( photonEt );
2455 if ( phoIsInBarrel ) {
2456 h_scE_[
type][1]->Fill( matchingPho->superCluster()->energy() );
2457 h_scEt_[
type][1]->Fill( matchingPho->superCluster()->energy()/cosh( matchingPho->superCluster()->eta()) );
2458 h_r9_[
type][1]->Fill( r9 );
2459 h_r1_[
type][1]->Fill( r1 );
2460 h_r2_[
type][1]->Fill( r2 );
2461 h_sigmaIetaIeta_[
type][1]->Fill( sigmaIetaIeta );
2462 h_hOverE_[
type][1]->Fill( hOverE );
2463 h_newhOverE_[
type][1]->Fill( newhOverE );
2464 h_ecalRecHitSumEtConeDR04_[
type][1]->Fill( ecalIso );
2465 p_ecalRecHitSumEtConeDR04VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), ecalIso);
2466 h_hcalTowerSumEtConeDR04_[
type][1]->Fill( hcalIso );
2467 p_hcalTowerSumEtConeDR04VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), hcalIso);
2468 h_hcalTowerBcSumEtConeDR04_[
type][1]->Fill( newhcalIso );
2469 p_hcalTowerBcSumEtConeDR04VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), newhcalIso);
2470 h_isoTrkSolidConeDR04_[
type][1]->Fill( trkIso );
2471 h_nTrkSolidConeDR04_[
type][1]->Fill( nIsoTrk );
2472 h_chHadIso_[1]->
Fill (chargedHadIso);
2473 h_nHadIso_[1]->
Fill (neutralHadIso);
2474 h_phoIso_[1]->
Fill (photonIso);
2475 h_nCluOutsideMustache_[1]->Fill(
float(nClusterOutsideMustache));
2476 h_etOutsideMustache_[1]->Fill(etOutsideMustache);
2477 h_pfMva_[1]->Fill(pfMVA);
2478 h_phoE_[
type][1]->Fill( photonE );
2479 h_phoEt_[
type][1]->Fill( photonEt );
2480 h_nConv_[
type][1]->Fill(
float( matchingPho->conversions().size()));
2481 h_phoERes_[0][1]->Fill( photonE / (*mcPho).fourMomentum().e() );
2482 h_phoEResRegr1_[0][1]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2483 h_phoEResRegr2_[0][1]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2484 p_eResVsR9_[1]->Fill (r9, photonE/(*mcPho).fourMomentum().e() ) ;
2485 p_sceResVsR9_[1]->Fill (r9, matchingPho->superCluster()->energy()/(*mcPho).fourMomentum().e() ) ;
2486 if ( ! isRunCentrally_ ) {
2487 h2_eResVsR9_[1]->Fill (r9, photonE/(*mcPho).fourMomentum().e() ) ;
2488 h2_sceResVsR9_[1]->Fill (r9, matchingPho->superCluster()->energy()/(*mcPho).fourMomentum().e() ) ;
2489 h2_ecalRecHitSumEtConeDR04VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), ecalIso);
2490 h2_hcalTowerSumEtConeDR04VsEt_[1] ->
Fill ((*mcPho).fourMomentum().et(), hcalIso);
2491 h2_eResVsEt_[1][0]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2493 p_eResVsEt_[1][0]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2497 h_phoERes_[1][1]->Fill( photonE / (*mcPho).fourMomentum().e() );
2498 h_phoEResRegr1_[1][1]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2499 h_phoEResRegr2_[1][1]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2500 if ( ! isRunCentrally_ ) h2_eResVsEt_[1][1]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2501 p_eResVsEt_[1][1]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2504 h_phoERes_[2][1]->Fill( photonE / (*mcPho).fourMomentum().e() );
2505 h_phoEResRegr1_[2][1]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2506 h_phoEResRegr2_[2][1]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2507 p_eResVsEt_[1][2]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2508 if ( ! isRunCentrally_ ) {
2509 h2_eResVsEt_[1][2]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2510 h_EtR9Less093_[0][1] ->Fill ( photonEt );
2515 if ( phoIsInEndcap ) {
2517 h_scE_[
type][2]->Fill( matchingPho->superCluster()->energy() );
2518 h_scEt_[
type][2]->Fill( matchingPho->superCluster()->energy()/cosh( matchingPho->superCluster()->eta()) );
2519 h_r9_[
type][2]->Fill( r9 );
2520 h_r1_[
type][2]->Fill( r1 );
2521 h_r2_[
type][2]->Fill( r2 );
2523 h_sigmaIetaIeta_[
type][2]->Fill( sigmaIetaIeta );
2524 h_hOverE_[
type][2]->Fill( hOverE );
2525 h_newhOverE_[
type][2]->Fill( newhOverE );
2526 h_ecalRecHitSumEtConeDR04_[
type][2]->Fill( ecalIso );
2527 p_ecalRecHitSumEtConeDR04VsEt_[2] ->
Fill ((*mcPho).fourMomentum().et(), ecalIso);
2528 h_hcalTowerSumEtConeDR04_[
type][2]->Fill( hcalIso );
2529 p_hcalTowerSumEtConeDR04VsEt_[2] ->
Fill ((*mcPho).fourMomentum().et(), hcalIso);
2531 h_hcalTowerBcSumEtConeDR04_[
type][2]->Fill( newhcalIso );
2532 p_hcalTowerBcSumEtConeDR04VsEt_[2] ->
Fill ((*mcPho).fourMomentum().et(), newhcalIso);
2533 h_isoTrkSolidConeDR04_[
type][2]->Fill( trkIso );
2534 h_nTrkSolidConeDR04_[
type][2]->Fill( nIsoTrk );
2536 h_chHadIso_[2]->
Fill (chargedHadIso);
2537 h_nHadIso_[2]->
Fill (neutralHadIso);
2538 h_phoIso_[2]->
Fill (photonIso);
2539 h_nCluOutsideMustache_[2]->Fill(
float(nClusterOutsideMustache));
2540 h_etOutsideMustache_[2]->Fill(etOutsideMustache);
2542 h_pfMva_[2]->Fill(pfMVA);
2543 h_phoE_[
type][2]->Fill( photonE );
2544 h_phoEt_[
type][2]->Fill( photonEt );
2545 h_nConv_[
type][2]->Fill(
float( matchingPho->conversions().size()));
2546 h_phoERes_[0][2]->Fill( photonE / (*mcPho).fourMomentum().e() );
2548 h_phoEResRegr1_[0][2]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2549 h_phoEResRegr2_[0][2]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2551 p_eResVsR9_[2]->Fill (r9, photonE/(*mcPho).fourMomentum().e() ) ;
2552 p_sceResVsR9_[2]->Fill (r9, matchingPho->superCluster()->energy()/(*mcPho).fourMomentum().e() ) ;
2553 if ( ! isRunCentrally_ ) {
2554 h2_eResVsR9_[2]->Fill (r9, photonE/(*mcPho).fourMomentum().e() ) ;
2555 h2_sceResVsR9_[2]->Fill (r9, matchingPho->superCluster()->energy()/(*mcPho).fourMomentum().e() ) ;
2556 h2_ecalRecHitSumEtConeDR04VsEt_[2] ->
Fill ((*mcPho).fourMomentum().et(), ecalIso);
2557 h2_hcalTowerSumEtConeDR04VsEt_[2] ->
Fill ((*mcPho).fourMomentum().et(), hcalIso);
2558 h2_eResVsEt_[2][0]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2562 p_eResVsEt_[2][0]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2566 h_phoERes_[1][2]->Fill( photonE / (*mcPho).fourMomentum().e() );
2567 h_phoEResRegr1_[1][2]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2568 h_phoEResRegr2_[1][2]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2569 if ( ! isRunCentrally_ ) h2_eResVsEt_[2][1]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2570 p_eResVsEt_[2][1]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2573 h_phoERes_[2][2]->Fill( photonE / (*mcPho).fourMomentum().e() );
2574 h_phoEResRegr1_[2][2]->Fill( photonERegr1 / (*mcPho).fourMomentum().e() );
2575 h_phoEResRegr2_[2][2]->Fill( photonERegr2 / (*mcPho).fourMomentum().e() );
2576 p_eResVsEt_[2][2]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2577 if ( ! isRunCentrally_ ) {
2578 h2_eResVsEt_[2][2]->Fill ((*mcPho).fourMomentum().et(), photonE/(*mcPho).fourMomentum().e() ) ;
2579 h_EtR9Less093_[0][2] ->Fill ( photonEt );
2586 if ( fName_ ==
"pfPhotonValidator") {
2588 float SumPtIsoValCh = 0.;
2589 float SumPtIsoValNh = 0.;
2590 float SumPtIsoValPh = 0.;
2592 float SumPtIsoValCleanCh = 0.;
2593 float SumPtIsoValCleanNh = 0.;
2594 float SumPtIsoValCleanPh = 0.;
2596 for(
unsigned int lCand=0; lCand < pfCandidateHandle->size(); lCand++) {
2598 float dR=
deltaR(matchingPho->eta(), matchingPho->phi(),pfCandRef->eta(), pfCandRef->phi());
2606 SumPtIsoValCh += pfCandRef->pt();
2608 h_dRPhoPFcand_ChHad_unCleaned_[1]->Fill(dR);
2610 h_dRPhoPFcand_ChHad_unCleaned_[2]->Fill(dR);
2613 SumPtIsoValNh += pfCandRef->pt();
2615 h_dRPhoPFcand_NeuHad_unCleaned_[1]->Fill(dR);
2617 h_dRPhoPFcand_NeuHad_unCleaned_[2]->Fill(dR);
2620 SumPtIsoValPh += pfCandRef->pt();
2622 h_dRPhoPFcand_Pho_unCleaned_[1]->Fill(dR);
2624 h_dRPhoPFcand_Pho_unCleaned_[2]->Fill(dR);
2628 for( std::vector<reco::PFCandidateRef>::const_iterator
i = phoToParticleBasedIsoMap[matchingPho].
begin();
i != phoToParticleBasedIsoMap[matchingPho].end(); ++
i ) {
2630 if ( (*
i) == pfCandRef ) {
2635 if ( skip )
continue;
2637 SumPtIsoValCleanCh += pfCandRef->pt();
2639 h_dRPhoPFcand_ChHad_Cleaned_[1]->Fill(dR);
2641 h_dRPhoPFcand_ChHad_Cleaned_[2]->Fill(dR);
2644 SumPtIsoValCleanNh += pfCandRef->pt();
2646 h_dRPhoPFcand_NeuHad_Cleaned_[1]->Fill(dR);
2648 h_dRPhoPFcand_NeuHad_Cleaned_[2]->Fill(dR);
2651 SumPtIsoValCleanPh += pfCandRef->pt();
2653 h_dRPhoPFcand_Pho_Cleaned_[1]->Fill(dR);
2655 h_dRPhoPFcand_Pho_Cleaned_[2]->Fill(dR);
2664 if( phoIsInBarrel) {
2665 h_SumPtOverPhoPt_ChHad_Cleaned_[1]->Fill(SumPtIsoValCleanCh/matchingPho->pt());
2666 h_SumPtOverPhoPt_NeuHad_Cleaned_[1]->Fill(SumPtIsoValCleanNh/matchingPho->pt());
2667 h_SumPtOverPhoPt_Pho_Cleaned_[1]->Fill(SumPtIsoValCleanPh/matchingPho->pt());
2668 h_SumPtOverPhoPt_ChHad_unCleaned_[1]->Fill(SumPtIsoValCh/matchingPho->pt());
2669 h_SumPtOverPhoPt_NeuHad_unCleaned_[1]->Fill(SumPtIsoValNh/matchingPho->pt());
2670 h_SumPtOverPhoPt_Pho_unCleaned_[1]->Fill(SumPtIsoValPh/matchingPho->pt());
2672 h_SumPtOverPhoPt_ChHad_Cleaned_[2]->Fill(SumPtIsoValCleanCh/matchingPho->pt());
2673 h_SumPtOverPhoPt_NeuHad_Cleaned_[2]->Fill(SumPtIsoValCleanNh/matchingPho->pt());
2674 h_SumPtOverPhoPt_Pho_Cleaned_[2]->Fill(SumPtIsoValCleanPh/matchingPho->pt());
2675 h_SumPtOverPhoPt_ChHad_unCleaned_[2]->Fill(SumPtIsoValCh/matchingPho->pt());
2676 h_SumPtOverPhoPt_NeuHad_unCleaned_[2]->Fill(SumPtIsoValNh/matchingPho->pt());
2677 h_SumPtOverPhoPt_Pho_unCleaned_[2]->Fill(SumPtIsoValPh/matchingPho->pt());
2684 if ( ! (visibleConversion && visibleConversionsWithTwoSimTracks ) )
continue;
2688 if ( ! isRunCentrally_ ) {
2689 h_r9_[1][0]->Fill( r9 );
2690 if ( phoIsInBarrel ) h_r9_[1][1]->Fill( r9 );
2691 if ( phoIsInEndcap ) h_r9_[1][2]->Fill( r9 );
2693 h_simConvVtxRvsZ_[0] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
2694 if ( fabs(mcEta_) <=1.) {
2695 h_simConvVtxRvsZ_[1] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
2696 h_simConvVtxYvsX_ ->Fill ( mcConvX_, mcConvY_ ) ;
2699 h_simConvVtxRvsZ_[2] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
2704 h_nConv_[
type][0]->Fill(
float( matchingPho->conversions().size()));
2709 for (
unsigned int iConv=0; iConv<conversions.
size(); iConv++) {
2711 double like = aConv->MVAout();
2712 if ( like < likelihoodCut_ )
continue;
2714 if ( ! isRunCentrally_ ) h2_EoverEtrueVsEta_[1]->Fill (mcEta_,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
2715 p_EoverEtrueVsEta_[1]->Fill (mcEta_,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
2719 const std::vector<edm::RefToBase<reco::Track> >
tracks = aConv->tracks();
2720 if (tracks.size() < 1 )
continue;
2723 h_mvaOut_[0]->
Fill(like);
2725 if ( tracks.size()==2 ) {
2726 if (
sqrt( aConv->tracksPin()[0].Perp2()) < convTrackMinPtCut_ ||
sqrt( aConv->tracksPin()[1].Perp2()) < convTrackMinPtCut_)
continue;
2728 if (
sqrt( aConv->tracksPin()[0].Perp2()) < convTrackMinPtCut_ )
continue;
2733 if ( (fabs(mcEta_) > 1.1 && fabs (mcEta_) < 1.4 ) &&
2734 fabs( aConv->pairCotThetaSeparation() ) > dCotHardCutValue_ )
continue;
2735 if ( fabs( aConv->pairCotThetaSeparation() ) > dCotCutValue_ )
continue;
2742 std::map<const reco::Track*,TrackingParticleRef> myAss;
2743 std::map<const reco::Track*,TrackingParticleRef>::const_iterator itAss;
2744 std::map<reco::TrackRef,TrackingParticleRef>::const_iterator itAssMin;
2745 std::map<reco::TrackRef,TrackingParticleRef>::const_iterator itAssMax;
2749 for (
unsigned int i=0;
i<tracks.size();
i++) {
2753 if ( ! isRunCentrally_ ) nHitsVsEta_[
type] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits())-0.0001 );
2754 if ( ! isRunCentrally_ ) nHitsVsR_[
type] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits())-0.0001 );
2755 p_nHitsVsEta_[
type] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) );
2756 p_nHitsVsR_[
type] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) );
2757 h_tkChi2_[
type] ->Fill (tracks[
i]->normalizedChi2() );
2766 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV;
2769 if (q.
find(theConvTP_[0])!=q.
end()){
2770 trackV = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q[theConvTP_[0]];
2771 }
else if (q.
find(theConvTP_[1])!=q.
end()){
2772 trackV = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q[theConvTP_[1]];
2776 if ( !trackV.size() )
continue;
2778 myAss.insert( std::make_pair (tr.
get(),theConvTP_[tpI] ) );
2812 float refP =-99999.;
2813 float refPt =-99999.;
2814 if ( aConv->conversionVertex().isValid() ) {
2815 refP=
sqrt(aConv->refittedPairMomentum().Mag2());
2816 refPt=
sqrt(aConv->refittedPairMomentum().perp2());
2818 float invM = aConv->pairInvariantMass();
2820 h_invMass_[
type][0] ->Fill( invM);
2821 if ( phoIsInBarrel ) h_invMass_[
type][1] ->Fill(invM);
2822 if ( phoIsInEndcap ) h_invMass_[
type][2] ->Fill(invM);
2827 if ( tracks.size() ==1 ) {
2828 h_SimConvOneTracks_[0]->Fill( mcEta_ ) ;
2829 h_SimConvOneTracks_[1]->Fill( mcPhi_ );
2830 h_SimConvOneTracks_[2]->Fill( mcConvR_ );
2831 h_SimConvOneTracks_[3]->Fill( mcConvZ_ );
2832 h_SimConvOneTracks_[4]->Fill( (*mcPho).fourMomentum().et());
2835 }
else if ( tracks.size() ==2 ) {
2837 h_SimConvTwoTracks_[0]->Fill( mcEta_ ) ;
2838 h_SimConvTwoTracks_[1]->Fill( mcPhi_ );
2839 h_SimConvTwoTracks_[2]->Fill( mcConvR_ );
2840 h_SimConvTwoTracks_[3]->Fill( mcConvZ_ );
2841 h_SimConvTwoTracks_[4]->Fill( (*mcPho).fourMomentum().et());
2844 if (aConv->caloCluster().size() !=0) h_convEta_[1]->
Fill( aConv->caloCluster()[0]->eta() );
2847 float trkProvenance=3;
2848 if ( tracks[0]->algoName() ==
"outInEcalSeededConv" && tracks[1]->algoName() ==
"outInEcalSeededConv" ) trkProvenance=0;
2849 if ( tracks[0]->algoName() ==
"inOutEcalSeededConv" && tracks[1]->algoName() ==
"inOutEcalSeededConv" ) trkProvenance=1;
2850 if ( ( tracks[0]->algoName() ==
"outInEcalSeededConv" && tracks[1]->algoName() ==
"inOutEcalSeededConv") ||
2851 ( tracks[1]->algoName() ==
"outInEcalSeededConv" && tracks[0]->algoName() ==
"inOutEcalSeededConv") ) trkProvenance=2;
2852 if ( trkProvenance==3 ) {
2855 h_trkProv_[0]->Fill( trkProvenance );
2864 if ( ! isRunCentrally_ ) {
2865 h_r9_[2][0]->Fill( r9 );
2866 if ( phoIsInBarrel ) h_r9_[2][1]->Fill( r9 );
2867 if ( phoIsInEndcap ) h_r9_[2][2]->Fill( r9 );
2870 if (aConv->caloCluster().size() !=0) h_convEta_[2]->
Fill( aConv->caloCluster()[0]->eta() );
2874 h_SimConvTwoMTracks_[0]->Fill( mcEta_ ) ;
2875 h_SimConvTwoMTracks_[1]->Fill( mcPhi_ );
2876 h_SimConvTwoMTracks_[2]->Fill( mcConvR_ );
2877 h_SimConvTwoMTracks_[3]->Fill( mcConvZ_ );
2878 h_SimConvTwoMTracks_[4]->Fill( (*mcPho).fourMomentum().et());
2880 if ( aConv->conversionVertex().isValid() ) {
2882 float chi2Prob =
ChiSquaredProbability( aConv->conversionVertex().chi2(), aConv->conversionVertex().ndof() );
2883 if ( chi2Prob > 0) {
2884 h_SimConvTwoMTracksAndVtxPGT0_[0]->Fill( mcEta_ ) ;
2885 h_SimConvTwoMTracksAndVtxPGT0_[1]->Fill( mcPhi_ );
2886 h_SimConvTwoMTracksAndVtxPGT0_[2]->Fill( mcConvR_ );
2887 h_SimConvTwoMTracksAndVtxPGT0_[3]->Fill( mcConvZ_ );
2888 h_SimConvTwoMTracksAndVtxPGT0_[4]->Fill( (*mcPho).fourMomentum().et());
2890 if ( chi2Prob > 0.0005) {
2891 h_SimConvTwoMTracksAndVtxPGT0005_[0]->Fill( mcEta_ ) ;
2892 h_SimConvTwoMTracksAndVtxPGT0005_[1]->Fill( mcPhi_ );
2893 h_SimConvTwoMTracksAndVtxPGT0005_[2]->Fill( mcConvR_ );
2894 h_SimConvTwoMTracksAndVtxPGT0005_[3]->Fill( mcConvZ_ );
2895 h_SimConvTwoMTracksAndVtxPGT0005_[4]->Fill( (*mcPho).fourMomentum().et());
2901 if ( chi2Prob > 0.0005 ) {
2902 if (aConv->caloCluster().size() !=0) {
2903 h_convEta_[0]->Fill( aConv->caloCluster()[0]->eta() );
2904 h_convPhi_[0]->Fill( aConv->caloCluster()[0]->phi() );
2905 h_convERes_[0][0]->Fill( aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() );
2907 if ( ! isRunCentrally_ ) {
2908 h_r9VsNofTracks_[0][0]->Fill( r9, aConv->nTracks() ) ;
2909 h_EtR9Less093_[1][0] ->Fill ( photonEt );
2910 if ( phoIsInBarrel ) h_EtR9Less093_[1][1] ->Fill ( photonEt );
2911 if ( phoIsInEndcap ) h_EtR9Less093_[1][2] ->Fill ( photonEt );
2914 if ( phoIsInBarrel ) {
2915 if (aConv->caloCluster().size() !=0) h_convERes_[0][1]->
Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() );
2916 if ( ! isRunCentrally_ ) h_r9VsNofTracks_[0][1]->Fill( r9, aConv->nTracks() ) ;
2917 h_mvaOut_[1]->
Fill(like);
2919 if ( phoIsInEndcap ) {
2920 if (aConv->caloCluster().size() !=0) h_convERes_[0][2]->
Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() );
2921 if ( ! isRunCentrally_ ) h_r9VsNofTracks_[0][2]->Fill( r9, aConv->nTracks() ) ;
2922 h_mvaOut_[2]->
Fill(like);
2938 h_trkProv_[1]->Fill( trkProvenance );
2939 h_invMass_[
type][0] ->Fill( invM);
2943 float eoverp= -99999.;
2945 if ( aConv->conversionVertex().isValid() ) {
2946 eoverp= aConv->EoverPrefittedTracks();
2947 h_convPtRes_[
type][0]->Fill( refPt / (*mcPho).fourMomentum().et() );
2948 h_EoverPTracks_[
type][0] ->Fill( eoverp ) ;
2949 h_PoverETracks_[
type][0] ->Fill( 1./eoverp ) ;
2950 if ( ! isRunCentrally_ ) h2_EoverEtrueVsEoverP_[0] ->Fill( eoverp,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
2951 if ( ! isRunCentrally_ ) h2_PoverPtrueVsEoverP_[0] ->Fill( eoverp, refP/ (*mcPho).fourMomentum().e() ) ;
2952 if ( ! isRunCentrally_ ) h2_EoverPVsEta_[0]->Fill (mcEta_, eoverp);
2953 if ( ! isRunCentrally_ ) h2_EoverPVsR_[0]->Fill (mcConvR_, eoverp);
2954 p_EoverPVsEta_[0]->Fill (mcEta_, eoverp);
2955 p_EoverPVsR_[0]->Fill (mcConvR_, eoverp);
2956 p_eResVsR_ ->Fill ( mcConvR_, photonE / (*mcPho).fourMomentum().e() );
2957 if ( ! isRunCentrally_ ) h2_PoverPtrueVsEta_[0]->Fill (mcEta_,refP/ (*mcPho).fourMomentum().e() ) ;
2958 p_PoverPtrueVsEta_[0]->Fill (mcEta_,refP/ (*mcPho).fourMomentum().e() ) ;
2964 if ( ! isRunCentrally_ ) h2_EoverEtrueVsEta_[0]->Fill (mcEta_,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
2965 if ( ! isRunCentrally_ ) h2_EoverEtrueVsR_[0]->Fill (mcConvR_,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
2966 p_EoverEtrueVsEta_[0]->Fill (mcEta_,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
2967 p_EoverEtrueVsR_[0]->Fill (mcConvR_,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
2970 if ( ! isRunCentrally_ ) h2_etaVsRsim_[0]->Fill (mcEta_,mcConvR_);
2989 float dPhiTracksAtVtx = aConv->dPhiTracksAtVtx();
2990 h_DPhiTracksAtVtx_[
type][0]->Fill( dPhiTracksAtVtx);
2991 if ( ! isRunCentrally_ ) h2_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
2992 if ( ! isRunCentrally_ ) h2_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
2993 p_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
2994 p_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
2996 h_DCotTracks_[
type][0] ->Fill ( aConv->pairCotThetaSeparation() );
2997 if ( ! isRunCentrally_ ) h2_DCotTracksVsEta_->Fill( mcEta_, aConv->pairCotThetaSeparation() );
2998 if ( ! isRunCentrally_ ) h2_DCotTracksVsR_->Fill( mcConvR_, aConv->pairCotThetaSeparation() );
2999 p_DCotTracksVsEta_->Fill( mcEta_, aConv->pairCotThetaSeparation() );
3000 p_DCotTracksVsR_->Fill( mcConvR_, aConv->pairCotThetaSeparation() );
3004 if ( phoIsInBarrel ) {
3005 h_invMass_[
type][1] ->Fill(invM);
3006 if ( aConv->conversionVertex().isValid() ) {
3007 h_convPtRes_[
type][1]->Fill( refPt / (*mcPho).fourMomentum().et() );
3008 h_EoverPTracks_[
type][1] ->Fill( eoverp ) ;
3009 if ( mcConvR_ < 15 ) h_EoverPTracks_[0][0] ->Fill( eoverp ) ;
3010 if ( mcConvR_ > 15 && mcConvR_< 58 ) h_EoverPTracks_[0][1] ->Fill( eoverp ) ;
3011 if ( mcConvR_ > 58 ) h_EoverPTracks_[0][2] ->Fill( eoverp ) ;
3012 h_PoverETracks_[
type][1] ->Fill( 1./eoverp ) ;
3013 if ( ! isRunCentrally_ ) h2_EoverEtrueVsEoverP_[1] ->Fill( eoverp,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
3014 if ( ! isRunCentrally_ ) h2_PoverPtrueVsEoverP_[1] ->Fill( eoverp, refP/ (*mcPho).fourMomentum().e() ) ;
3016 h_DPhiTracksAtVtx_[
type][1]->Fill( dPhiTracksAtVtx);
3017 h_DCotTracks_[
type][1] ->Fill ( aConv->pairCotThetaSeparation() );
3024 if ( phoIsInEndcap ) {
3025 h_invMass_[
type][2] ->Fill(invM);
3026 if ( aConv->conversionVertex().isValid() ) {
3027 h_convPtRes_[
type][2]->Fill( refPt / (*mcPho).fourMomentum().et() );
3028 h_EoverPTracks_[
type][2] ->Fill( eoverp ) ;
3029 h_PoverETracks_[
type][2] ->Fill( 1./eoverp ) ;
3030 if ( ! isRunCentrally_ ) h2_EoverEtrueVsEoverP_[2] ->Fill( eoverp,matchingPho->superCluster()->energy()/ (*mcPho).fourMomentum().e() ) ;
3031 if ( ! isRunCentrally_ ) h2_PoverPtrueVsEoverP_[2] ->Fill( eoverp, refP/ (*mcPho).fourMomentum().e() ) ;
3033 h_DPhiTracksAtVtx_[
type][2]->Fill( dPhiTracksAtVtx);
3034 h_DCotTracks_[
type][2] ->Fill ( aConv->pairCotThetaSeparation() );
3039 if ( aConv->conversionVertex().isValid() ) {
3041 h_convVtxdX_ ->Fill ( aConv->conversionVertex().position().x() - mcConvX_);
3042 h_convVtxdY_ ->Fill ( aConv->conversionVertex().position().y() - mcConvY_);
3043 h_convVtxdZ_ ->Fill ( aConv->conversionVertex().position().z() - mcConvZ_);
3044 h_convVtxdR_ ->Fill (
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
3046 if ( fabs( mcConvEta_ ) <= 1.2 ) {
3047 h_convVtxdX_barrel_ ->Fill ( aConv->conversionVertex().position().x() - mcConvX_);
3048 h_convVtxdY_barrel_ ->Fill ( aConv->conversionVertex().position().y() - mcConvY_);
3049 h_convVtxdZ_barrel_ ->Fill ( aConv->conversionVertex().position().z() - mcConvZ_);
3050 h_convVtxdR_barrel_ ->Fill (
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
3052 h_convVtxdX_endcap_ ->Fill ( aConv->conversionVertex().position().x() - mcConvX_);
3053 h_convVtxdY_endcap_ ->Fill ( aConv->conversionVertex().position().y() - mcConvY_);
3054 h_convVtxdZ_endcap_ ->Fill ( aConv->conversionVertex().position().z() - mcConvZ_);
3055 h_convVtxdR_endcap_ ->Fill (
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_);
3059 h_convVtxdPhi_ ->Fill ( aConv->conversionVertex().position().phi() - mcConvPhi_);
3060 h_convVtxdEta_ ->Fill ( aConv->conversionVertex().position().eta() - mcConvEta_);
3061 if ( ! isRunCentrally_ ) h2_convVtxdRVsR_ ->Fill (mcConvR_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_ );
3062 if ( ! isRunCentrally_ ) h2_convVtxdRVsEta_ ->Fill (mcEta_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_ );
3063 p_convVtxdRVsR_ ->Fill (mcConvR_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_ );
3064 p_convVtxdRVsEta_ ->Fill (mcEta_,
sqrt(aConv->conversionVertex().position().perp2()) - mcConvR_ );
3065 float signX= aConv->refittedPairMomentum().x()/fabs(aConv->refittedPairMomentum().x());
3066 float signY= aConv->refittedPairMomentum().y()/fabs(aConv->refittedPairMomentum().y());
3067 float signZ= aConv->refittedPairMomentum().z()/fabs(aConv->refittedPairMomentum().z());
3068 p_convVtxdXVsX_ ->Fill (mcConvX_, (aConv->conversionVertex().position().x() - mcConvX_)*signX );
3069 p_convVtxdYVsY_ ->Fill (mcConvY_, (aConv->conversionVertex().position().y() - mcConvY_)*signY );
3070 p_convVtxdZVsZ_ ->Fill (mcConvZ_, (aConv->conversionVertex().position().z() - mcConvZ_)*signZ );
3073 if ( ! isRunCentrally_ ) h2_convVtxRrecVsTrue_ ->
Fill (mcConvR_,
sqrt(aConv->conversionVertex().position().perp2()) );
3078 float thetaConv=aConv->refittedPairMomentum().Theta();
3079 float thetaSC=matchingPho->superCluster()->position().theta();
3080 float rSC=
sqrt(matchingPho->superCluster()->position().x()*matchingPho->superCluster()->position().x() +
3081 matchingPho->superCluster()->position().y()*matchingPho->superCluster()->position().y() );
3082 float zSC=matchingPho->superCluster()->position().z();
3083 float zPV =
sqrt(rSC*rSC+zSC*zSC)*
sin( thetaConv - thetaSC)/
sin(thetaConv);
3085 h_zPVFromTracks_[0]->Fill ( zPV );
3086 h_dzPVFromTracks_[0]->Fill ( zPV- (*mcPho).primaryVertex().z() );
3090 if ( phoIsInBarrel ) {
3091 h_zPVFromTracks_[1]->Fill ( zPV );
3092 h_dzPVFromTracks_[1]->Fill ( zPV - (*mcPho).primaryVertex().z() );
3093 }
else if ( phoIsInEndcap) {
3094 h_zPVFromTracks_[2]->Fill ( zPV );
3095 h_dzPVFromTracks_[2]->Fill ( zPV - (*mcPho).primaryVertex().z() );
3096 }
else if ( phoIsInEndcapP) {
3097 h_zPVFromTracks_[3]->Fill ( zPV );
3098 h_dzPVFromTracks_[3]->Fill ( zPV - (*mcPho).primaryVertex().z() );
3099 }
else if ( phoIsInEndcapM) {
3100 h_zPVFromTracks_[4]->Fill ( zPV );
3101 h_dzPVFromTracks_[4]->Fill ( zPV - (*mcPho).primaryVertex().z() );
3105 p_dzPVVsR_ ->Fill(mcConvR_, zPV - (*mcPho).primaryVertex().z() );
3106 p_dzPVVsEta_ ->Fill(mcConvEta_, zPV - (*mcPho).primaryVertex().z() );
3107 if ( ! isRunCentrally_ ) h2_dzPVVsR_ ->Fill(mcConvR_, zPV - (*mcPho).primaryVertex().z() );
3112 float dPhiTracksAtEcal=-99;
3113 float dEtaTracksAtEcal=-99;
3114 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator" ) {
3115 if (aConv->bcMatchingWithTracks()[0].
isNonnull() && aConv->bcMatchingWithTracks()[1].
isNonnull() ) {
3117 nRecConvAssWithEcal_++;
3118 float recoPhi1 = aConv->ecalImpactPosition()[0].phi();
3119 float recoPhi2 = aConv->ecalImpactPosition()[1].phi();
3120 float recoEta1 = aConv->ecalImpactPosition()[0].eta();
3121 float recoEta2 = aConv->ecalImpactPosition()[1].eta();
3122 float bcPhi1 = aConv->bcMatchingWithTracks()[0]->phi();
3123 float bcPhi2 = aConv->bcMatchingWithTracks()[1]->phi();
3126 recoPhi1 = phiNormalization(recoPhi1);
3127 recoPhi2 = phiNormalization(recoPhi2);
3128 bcPhi1 = phiNormalization(bcPhi1);
3129 bcPhi2 = phiNormalization(bcPhi2);
3130 dPhiTracksAtEcal = recoPhi1 -recoPhi2;
3131 dPhiTracksAtEcal = phiNormalization( dPhiTracksAtEcal );
3132 dEtaTracksAtEcal = recoEta1 -recoEta2;
3135 h_DPhiTracksAtEcal_[
type][0]->Fill( fabs(dPhiTracksAtEcal));
3136 if ( ! isRunCentrally_ ) h2_DPhiTracksAtEcalVsR_ ->Fill (mcConvR_, fabs(dPhiTracksAtEcal));
3137 if ( ! isRunCentrally_ ) h2_DPhiTracksAtEcalVsEta_ ->Fill (mcEta_, fabs(dPhiTracksAtEcal));
3138 p_DPhiTracksAtEcalVsR_ ->Fill (mcConvR_, fabs(dPhiTracksAtEcal));
3139 p_DPhiTracksAtEcalVsEta_ ->Fill (mcEta_, fabs(dPhiTracksAtEcal));
3141 h_DEtaTracksAtEcal_[
type][0]->Fill( dEtaTracksAtEcal);
3144 if ( phoIsInBarrel ) {
3145 h_DPhiTracksAtEcal_[
type][1]->Fill( fabs(dPhiTracksAtEcal));
3146 h_DEtaTracksAtEcal_[
type][1]->Fill( dEtaTracksAtEcal);
3149 if ( phoIsInEndcap ) {
3150 h_DPhiTracksAtEcal_[
type][2]->Fill( fabs(dPhiTracksAtEcal));
3151 h_DEtaTracksAtEcal_[
type][2]->Fill( dEtaTracksAtEcal);
3162 for (
unsigned int i=0;
i<tracks.size();
i++) {
3164 itAss= myAss.find( tfrb.
get() );
3165 if ( itAss == myAss.end() )
continue;
3167 float trkProvenance=3;
3168 if ( tracks[0]->algoName() ==
"outInEcalSeededConv" && tracks[1]->algoName() ==
"outInEcalSeededConv" ) trkProvenance=0;
3169 if ( tracks[0]->algoName() ==
"inOutEcalSeededConv" && tracks[1]->algoName() ==
"inOutEcalSeededConv" ) trkProvenance=1;
3170 if ( ( tracks[0]->algoName() ==
"outInEcalSeededConv" && tracks[1]->algoName() ==
"inOutEcalSeededConv") ||
3171 ( tracks[1]->algoName() ==
"outInEcalSeededConv" && tracks[0]->algoName() ==
"inOutEcalSeededConv") ) trkProvenance=2;
3175 if ( ! isRunCentrally_ ) nHitsVsEta_[
type] ->Fill (mcEta_,
float(tracks[i]->numberOfValidHits()) );
3176 if ( ! isRunCentrally_ ) nHitsVsR_[
type] ->Fill (mcConvR_,
float(tracks[i]->numberOfValidHits()) );
3177 p_nHitsVsEta_[
type] ->Fill (mcEta_,
float(tracks[i]->numberOfValidHits()) -0.0001);
3178 p_nHitsVsR_[
type] ->Fill (mcConvR_,
float(tracks[i]->numberOfValidHits()) -0.0001);
3179 h_tkChi2_[
type] ->Fill (tracks[i]->normalizedChi2() );
3180 h_tkChi2Large_[
type] ->Fill (tracks[i]->normalizedChi2() );
3181 if ( ! isRunCentrally_ ) h2_Chi2VsEta_[0] ->Fill( mcEta_, tracks[i]->normalizedChi2() );
3182 if ( ! isRunCentrally_ ) h2_Chi2VsR_[0] ->Fill( mcConvR_, tracks[i]->normalizedChi2() );
3183 p_Chi2VsEta_[0] ->Fill( mcEta_, tracks[i]->normalizedChi2() );
3184 p_Chi2VsR_[0] ->Fill( mcConvR_, tracks[i]->normalizedChi2() );
3187 float simPt =
sqrt( ((*itAss).second)->momentum().perp2() );
3192 if ( aConv->conversionVertex().isValid() ) {
3193 reco::Track refTrack= aConv->conversionVertex().refittedTracks()[
i];
3196 refPt=
sqrt (px*px + py*py );
3198 float ptres= refPt - simPt ;
3200 float pterror = aConv->conversionVertex().refittedTracks()[
i].ptError();
3201 if ( ! isRunCentrally_ ) {
3202 h2_PtRecVsPtSim_[0]->Fill ( simPt, refPt);
3203 if ( trkProvenance ==3 ) h2_PtRecVsPtSimMixProv_->Fill ( simPt, refPt);
3206 h_TkPtPull_[0] ->Fill(ptres/pterror);
3207 if ( ! isRunCentrally_ ) h2_TkPtPull_[0] ->Fill(mcEta_, ptres/pterror);
3209 h_TkD0_[0]->Fill ( tracks[i]->d0()* tracks[i]->
charge() );
3212 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator" )
3213 if ( aConv->bcMatchingWithTracks()[
i].
isNonnull() ) hBCEnergyOverTrackPout_[0]->
Fill ( aConv->bcMatchingWithTracks()[
i]->energy()/
sqrt(aConv->tracks()[
i]->outerMomentum().Mag2()) );
3215 if ( phoIsInBarrel ) {
3216 h_TkD0_[1]->Fill ( tracks[i]->d0()* tracks[i]->
charge() );
3217 h_TkPtPull_[1] ->Fill(ptres/pterror);
3218 if ( ! isRunCentrally_ ) h2_PtRecVsPtSim_[1]->Fill ( simPt, refPt);
3219 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator")
3220 if ( aConv->bcMatchingWithTracks()[
i].
isNonnull() ) hBCEnergyOverTrackPout_[1]->
Fill ( aConv->bcMatchingWithTracks()[
i]->energy()/
sqrt(aConv->tracks()[
i]->outerMomentum().Mag2()) );
3223 if ( phoIsInEndcap ) {
3224 h_TkD0_[2]->Fill ( tracks[i]->d0()* tracks[i]->
charge() );
3225 h_TkPtPull_[2] ->Fill(ptres/pterror);
3226 if ( ! isRunCentrally_ ) h2_PtRecVsPtSim_[2]->Fill ( simPt, refPt);
3227 if ( fName_ !=
"pfPhotonValidator" && fName_ !=
"oldpfPhotonValidator")
3228 if ( aConv->bcMatchingWithTracks()[
i].
isNonnull() ) hBCEnergyOverTrackPout_[2]->
Fill ( aConv->bcMatchingWithTracks()[
i]->energy()/
sqrt(aConv->tracks()[
i]->outerMomentum().Mag2()) );
3244 if ( ! isRunCentrally_ ) {
3245 h_nSimPho_[0]->Fill(
float(nSimPho_[0]));
3246 h_nSimPho_[1]->Fill(
float(nSimPho_[1]));
3247 h_nSimConv_[0]->Fill(
float(nSimConv_[0]));
3248 h_nSimConv_[1]->Fill(
float(nSimConv_[1]));
3253 for( reco::PhotonCollection::const_iterator iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
3257 for (
unsigned int iConv=0; iConv<conversions.
size(); iConv++) {
3259 double like = aConv->MVAout();
3260 if ( like < likelihoodCut_ )
continue;
3262 const std::vector<edm::RefToBase<reco::Track> >
tracks = aConv->tracks();
3263 if (tracks.size() < 2 )
continue;
3271 bool phoIsInBarrel=
false;
3272 bool phoIsInEndcap=
false;
3273 if ( fabs(aPho.
superCluster()->position().eta()) < 1.479 ) {
3281 if ( ( fabs(mcEta_) > 1.1 && fabs (mcEta_) < 1.4 ) &&
3282 fabs( aConv->pairCotThetaSeparation() ) > dCotHardCutValue_ )
continue;
3283 if ( fabs( aConv->pairCotThetaSeparation() ) > dCotCutValue_ )
continue;
3287 h_RecoConvTwoTracks_[0]->Fill( aPho.
eta() ) ;
3288 h_RecoConvTwoTracks_[1]->Fill( aPho.
phi() );
3289 if ( aConv->conversionVertex().isValid() ) h_RecoConvTwoTracks_[2]->
Fill( aConv->conversionVertex().position().perp2() );
3290 h_RecoConvTwoTracks_[3]->Fill( aConv->conversionVertex().position().z() );
3291 h_RecoConvTwoTracks_[4]->Fill( aPho.
et() ) ;
3296 for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
3298 float mcPhi= (*mcPho).fourMomentum().phi();
3300 mcPhi_= phiNormalization(mcPhi);
3301 mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
3302 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
3309 if ( fabs(mcEta_) > END_HI )
continue;
3315 if ( (*mcPho).isAConversion() != 1 )
continue;
3316 if (!( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
3317 ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) )
3324 if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
3325 fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
3326 fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
3327 theConvTP_.push_back( tp );
3332 if ( theConvTP_.size() < 2 )
continue;
3336 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV1, trackV2;
3338 std::vector<std::pair<TrackingParticleRef, double> > tp1 = p1[tk1];
3339 std::vector<std::pair<TrackingParticleRef, double> > tp2 = p2[tk2];
3341 if (tp1.size()&&tp2.size()) {
3345 if (
abs(tpr1->pdgId())==11&&
abs(tpr2->pdgId())==11) {
3346 if ( (tpr1->parentVertex()->sourceTracks_end()-tpr1->parentVertex()->sourceTracks_begin()==1) &&
3347 (tpr2->parentVertex()->sourceTracks_end()-tpr2->parentVertex()->sourceTracks_begin()==1)) {
3348 if (tpr1->parentVertex().
key()==tpr2->parentVertex().
key() && ((*tpr1->parentVertex()->sourceTracks_begin())->
pdgId()==22)) {
3398 h_RecoConvTwoMTracks_[0]->Fill( aPho.
eta() ) ;
3399 h_RecoConvTwoMTracks_[1]->Fill( aPho.
phi() );
3400 if ( aConv->conversionVertex().isValid() ) h_RecoConvTwoMTracks_[2]->
Fill( aConv->conversionVertex().position().perp2() );
3401 h_RecoConvTwoMTracks_[3]->Fill( aConv->conversionVertex().position().z() );
3402 h_RecoConvTwoMTracks_[4]->Fill( aPho.
et() ) ;
3408 if ( aConv->conversionVertex().isValid() ) {
3411 float chi2Prob =
ChiSquaredProbability( aConv->conversionVertex().chi2(), aConv->conversionVertex().ndof() );
3412 double convR=
sqrt(aConv->conversionVertex().position().perp2());
3413 double scalar = aConv->conversionVertex().position().x()*aConv->pairMomentum().x() +
3414 aConv->conversionVertex().position().y()*aConv->pairMomentum().y();
3418 if ( scalar < 0 ) convR= -
sqrt(aConv->conversionVertex().position().perp2());
3419 h_convVtxRvsZ_[0] ->Fill ( fabs (aConv->conversionVertex().position().z() ),
sqrt(aConv->conversionVertex().position().perp2()) ) ;
3421 if (aConv->caloCluster().size() !=0) {
3422 if ( ! isRunCentrally_ ) h2_etaVsRreco_[0]->Fill (aConv->caloCluster()[0]->eta(),
sqrt(aConv->conversionVertex().position().perp2()) );
3423 if ( fabs(aConv->caloCluster()[0]->eta() ) <= 1.) {
3425 h_convVtxYvsX_ ->Fill ( aConv->conversionVertex().position().y() , aConv->conversionVertex().position().x() ) ;
3426 h_convVtxRvsZ_[1] ->Fill ( fabs (aConv->conversionVertex().position().z() ), convR ) ;
3428 if ( ! isRunCentrally_ ) {
3429 h_convVtxYvsX_zoom_[0] ->Fill ( aConv->conversionVertex().position().y() , aConv->conversionVertex().position().x() ) ;
3430 h_convVtxYvsX_zoom_[1] ->Fill ( aConv->conversionVertex().position().y() , aConv->conversionVertex().position().x() ) ;
3431 h_convVtxRvsZ_zoom_[0] ->Fill ( fabs (aConv->conversionVertex().position().z() ), convR ) ;
3432 h_convVtxRvsZ_zoom_[1] ->Fill ( fabs (aConv->conversionVertex().position().z() ), convR ) ;
3436 if ( fabs(aConv->caloCluster()[0]->eta() ) > 1.) h_convVtxRvsZ_[2] ->Fill ( fabs (aConv->conversionVertex().position().z() ), convR ) ;
3441 h_vtxChi2Prob_[0]->Fill( chi2Prob );
3442 h_vtxChi2_[0]->Fill( aConv->conversionVertex().normalizedChi2() );
3443 if ( phoIsInBarrel ) {
3444 h_vtxChi2Prob_[1]->Fill( chi2Prob );
3445 h_vtxChi2_[1]->Fill( aConv->conversionVertex().normalizedChi2() );
3447 if ( phoIsInEndcap ) {
3448 h_vtxChi2Prob_[2]->Fill( chi2Prob );
3449 h_vtxChi2_[2]->Fill( aConv->conversionVertex().normalizedChi2() );
3464 for (reco::GenJetCollection::const_iterator genJetIter = genJetCollection.begin();
3465 genJetIter != genJetCollection.end(); ++genJetIter) {
3467 if ( genJetIter->pt() < minPhoEtCut_ )
continue;
3468 if ( fabs(genJetIter->eta()) > 2.5 )
continue;
3470 float mcJetPhi= genJetIter->phi();
3471 mcJetPhi_= phiNormalization(mcJetPhi);
3472 mcJetEta_= genJetIter->eta();
3473 float mcJetPt = genJetIter->pt() ;
3477 h_SimJet_[0]->Fill ( mcJetEta_);
3478 h_SimJet_[1]->Fill ( mcJetPhi_);
3479 h_SimJet_[2]->Fill ( mcJetPt );
3481 std::vector<reco::Photon> thePhotons;
3485 for( reco::PhotonCollection::const_iterator iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
3487 float phiPho=aPho.
phi();
3488 float etaPho=aPho.
eta();
3491 if ( deltaPhi >
pi ) deltaPhi -= twopi;
3492 if ( deltaPhi < -
pi) deltaPhi += twopi;
3493 deltaPhi=
pow(deltaPhi,2);
3494 deltaEta=
pow(deltaEta,2);
3497 matchingPho = * iPho;
3504 if (! matched )
continue;
3507 h_MatchedSimJet_[0]->Fill( mcJetEta_ ) ;
3508 h_MatchedSimJet_[1]->Fill( mcJetPhi_ );
3509 h_MatchedSimJet_[2]->Fill( mcJetPt );
3512 bool phoIsInBarrel=
false;
3513 bool phoIsInEndcap=
false;
3514 if ( fabs(matchingPho.
superCluster()->position().eta() ) < 1.479 ) {
3520 if ( phoIsInBarrel ) {
3522 e.
getByToken(barrelEcalHits_, ecalRecHitHandle);
3523 if (!ecalRecHitHandle.
isValid()) {
3525 labelsForToken(barrelEcalHits_, l);
3527 <<
"Error! Can't get the product "
3532 }
else if ( phoIsInEndcap ) {
3535 e.
getByToken(endcapEcalHits_, ecalRecHitHandle);
3536 if (!ecalRecHitHandle.
isValid()) {
3538 labelsForToken(barrelEcalHits_, l);
3540 <<
"Error! Can't get the product "
3550 float photonE = matchingPho.
energy();
3551 float photonEt= matchingPho.
et();
3552 float r9 = matchingPho.
r9();
3553 float r1 = matchingPho.
r1x5();
3554 float r2 = matchingPho.
r2x5();
3561 std::vector< std::pair<DetId, float> >::const_iterator rhIt;
3563 bool atLeastOneDeadChannel=
false;
3565 for(rhIt = (*bcIt)->hitsAndFractions().begin();rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
3568 if (rhIt->first == (*it).id() ) {
3569 if ( (*it).recoFlag() == 9 ) {
3570 atLeastOneDeadChannel=
true;
3578 if ( atLeastOneDeadChannel ) {
3579 h_MatchedSimJetBadCh_[0]->Fill( mcJetEta_ ) ;
3580 h_MatchedSimJetBadCh_[1]->Fill( mcJetPhi_ );
3581 h_MatchedSimJetBadCh_[2]->Fill( mcJetPt );
3585 h_scBkgEta_->Fill( matchingPho.
superCluster()->eta() );
3586 h_scBkgPhi_->Fill( matchingPho.
superCluster()->phi() );
3587 h_scBkgE_[0]->Fill( matchingPho.
superCluster()->energy() );
3590 h_phoBkgEta_->Fill( matchingPho.
eta() );
3591 h_phoBkgPhi_->Fill( matchingPho.
phi() );
3592 h_phoBkgE_[0]->Fill( photonE );
3593 h_phoBkgEt_[0]->Fill( photonEt);
3594 h_phoBkgDEta_->Fill ( matchingPho.
eta() - mcJetEta_ );
3595 h_phoBkgDPhi_->Fill ( matchingPho.
phi() - mcJetPhi_ );
3599 h_r9Bkg_[0]->Fill( r9 );
3600 h_r1Bkg_[0]->Fill( r1 );
3601 h_r2Bkg_[0]->Fill( r2 );
3602 h_sigmaIetaIetaBkg_[0]->Fill( sigmaIetaIeta );
3603 h_hOverEBkg_[0]->Fill( hOverE );
3604 h_ecalRecHitSumEtConeDR04Bkg_[0]->Fill( ecalIso );
3605 h_hcalTowerSumEtConeDR04Bkg_[0]->Fill( hcalIso );
3606 h_isoTrkSolidConeDR04Bkg_[0]->Fill( trkIso );
3607 h_nTrkSolidConeDR04Bkg_[0]->Fill( nIsoTrk );
3609 if ( ! isRunCentrally_ ) {
3611 h2_r9VsEtaBkg_ ->
Fill (mcJetEta_, r9);
3612 h2_r9VsEtBkg_ ->
Fill (mcJetPt, r9);
3613 h2_r1VsEtaBkg_ ->
Fill (mcJetEta_, r1);
3614 h2_r1VsEtBkg_ ->
Fill (mcJetPt, r1);
3615 h2_r2VsEtaBkg_ ->
Fill (mcJetEta_, r2);
3616 h2_r2VsEtBkg_ ->
Fill (mcJetPt, r2);
3617 h2_sigmaIetaIetaVsEtaBkg_ ->
Fill (mcJetEta_, sigmaIetaIeta );
3618 h2_sigmaIetaIetaVsEtBkg_[0] ->
Fill (mcJetPt, sigmaIetaIeta);
3619 h2_hOverEVsEtaBkg_ ->
Fill (mcJetEta_, hOverE );
3620 h2_hOverEVsEtBkg_ ->
Fill (mcJetPt, hOverE);
3622 p_r1VsEtaBkg_ ->
Fill (mcJetEta_, r1);
3623 p_r1VsEtBkg_ ->
Fill (mcJetPt, r1);
3624 p_r2VsEtaBkg_ ->
Fill (mcJetEta_, r2);
3625 p_r2VsEtBkg_ ->
Fill (mcJetPt, r2);
3626 p_sigmaIetaIetaVsEtaBkg_ ->
Fill (mcJetEta_, sigmaIetaIeta );
3627 p_sigmaIetaIetaVsEtBkg_[0] ->
Fill (mcJetPt, sigmaIetaIeta);
3628 p_hOverEVsEtaBkg_ ->
Fill (mcJetEta_, hOverE );
3629 p_hOverEVsEtBkg_ ->
Fill (mcJetPt, hOverE);
3634 if ( ! isRunCentrally_ ) {
3635 h2_ecalRecHitSumEtConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, ecalIso );
3636 h2_ecalRecHitSumEtConeDR04VsEtBkg_[0] ->
Fill ( mcJetPt, ecalIso);
3637 h2_hcalTowerSumEtConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, hcalIso );
3638 h2_hcalTowerSumEtConeDR04VsEtBkg_[0] ->
Fill ( mcJetPt, hcalIso);
3639 p_ecalRecHitSumEtConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, ecalIso );
3640 p_ecalRecHitSumEtConeDR04VsEtBkg_[0] ->
Fill ( mcJetPt, ecalIso);
3641 p_hcalTowerSumEtConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, hcalIso );
3642 p_hcalTowerSumEtConeDR04VsEtBkg_[0] ->
Fill ( mcJetPt, hcalIso);
3643 p_isoTrkSolidConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, trkIso );
3644 p_isoTrkSolidConeDR04VsEtBkg_[0] ->
Fill (mcJetPt, trkIso);
3645 p_nTrkSolidConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, nIsoTrk );
3646 p_nTrkSolidConeDR04VsEtBkg_[0] ->
Fill (mcJetPt, nIsoTrk);
3647 h2_isoTrkSolidConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, trkIso );
3648 h2_isoTrkSolidConeDR04VsEtBkg_[0] ->
Fill (mcJetPt, trkIso);
3649 h2_nTrkSolidConeDR04VsEtaBkg_ ->
Fill (mcJetEta_, nIsoTrk );
3650 h2_nTrkSolidConeDR04VsEtBkg_[0] ->
Fill (mcJetPt, nIsoTrk);
3655 if ( phoIsInBarrel ) {
3657 h_r9Bkg_[1]->Fill( r9 );
3658 h_r1Bkg_[1]->Fill( r1 );
3659 h_r2Bkg_[1]->Fill( r2 );
3662 h_sigmaIetaIetaBkg_[1]->Fill( sigmaIetaIeta );
3663 h_hOverEBkg_[1]->Fill( hOverE );
3664 h_ecalRecHitSumEtConeDR04Bkg_[1]->Fill( ecalIso );
3665 h_hcalTowerSumEtConeDR04Bkg_[1]->Fill( hcalIso );
3666 h_isoTrkSolidConeDR04Bkg_[1]->Fill( trkIso );
3667 h_nTrkSolidConeDR04Bkg_[1]->Fill( nIsoTrk );
3669 if ( ! isRunCentrally_ ) {
3670 h2_sigmaIetaIetaVsEtBkg_[1] ->
Fill (mcJetPt, sigmaIetaIeta);
3671 h2_isoTrkSolidConeDR04VsEtBkg_[1] ->
Fill (mcJetPt, trkIso);
3672 h2_nTrkSolidConeDR04VsEtBkg_[1] ->
Fill (mcJetPt, nIsoTrk);
3673 h2_ecalRecHitSumEtConeDR04VsEtBkg_[1] ->
Fill ( mcJetPt, ecalIso);
3674 h2_hcalTowerSumEtConeDR04VsEtBkg_[1] ->
Fill ( mcJetPt, hcalIso);
3675 p_sigmaIetaIetaVsEtBkg_[1] ->
Fill (mcJetPt, sigmaIetaIeta);
3676 p_ecalRecHitSumEtConeDR04VsEtBkg_[1] ->
Fill ( mcJetPt, ecalIso);
3677 p_hcalTowerSumEtConeDR04VsEtBkg_[1] ->
Fill ( mcJetPt, hcalIso);
3678 p_isoTrkSolidConeDR04VsEtBkg_[1] ->
Fill (mcJetPt, trkIso);
3679 p_nTrkSolidConeDR04VsEtBkg_[1] ->
Fill (mcJetPt, nIsoTrk);
3683 }
else if ( phoIsInEndcap ) {
3685 h_r9Bkg_[2]->Fill( r9 );
3686 h_r1Bkg_[2]->Fill( r1 );
3687 h_r2Bkg_[2]->Fill( r2 );
3689 h_sigmaIetaIetaBkg_[2]->Fill( sigmaIetaIeta );
3690 h_hOverEBkg_[2]->Fill( hOverE );
3691 h_ecalRecHitSumEtConeDR04Bkg_[2]->Fill( ecalIso );
3692 h_hcalTowerSumEtConeDR04Bkg_[2]->Fill( hcalIso );
3693 h_isoTrkSolidConeDR04Bkg_[2]->Fill( trkIso );
3694 h_nTrkSolidConeDR04Bkg_[2]->Fill( nIsoTrk );
3696 if ( ! isRunCentrally_ ) {
3697 h2_sigmaIetaIetaVsEtBkg_[2] ->
Fill (mcJetPt, sigmaIetaIeta);
3698 h2_isoTrkSolidConeDR04VsEtBkg_[2] ->
Fill (mcJetPt, trkIso);
3699 h2_nTrkSolidConeDR04VsEtBkg_[2] ->
Fill (mcJetPt, nIsoTrk);
3700 h2_ecalRecHitSumEtConeDR04VsEtBkg_[2] ->
Fill ( mcJetPt, ecalIso);
3701 h2_hcalTowerSumEtConeDR04VsEtBkg_[2] ->
Fill ( mcJetPt, hcalIso);
3702 p_sigmaIetaIetaVsEtBkg_[2] ->
Fill (mcJetPt, sigmaIetaIeta);
3703 p_ecalRecHitSumEtConeDR04VsEtBkg_[2] ->
Fill ( mcJetPt, ecalIso);
3704 p_hcalTowerSumEtConeDR04VsEtBkg_[2] ->
Fill ( mcJetPt, hcalIso);
3705 p_isoTrkSolidConeDR04VsEtBkg_[2] ->
Fill (mcJetPt, trkIso);
3706 p_nTrkSolidConeDR04VsEtBkg_[2] ->
Fill (mcJetPt, nIsoTrk);
3715 for (
unsigned int iConv=0; iConv<conversions.
size(); iConv++) {
3718 const std::vector<edm::RefToBase<reco::Track> >
tracks = aConv->tracks();
3719 double like = aConv->MVAout();
3720 if ( like < likelihoodCut_ )
continue;
3721 if ( tracks.size() < 2 )
continue;
3722 if (aConv->caloCluster().size() !=0) {
3723 h_convEtaBkg_->Fill( aConv->caloCluster()[0]->eta() );
3724 h_convPhiBkg_->Fill( aConv->caloCluster()[0]->phi() );
3726 h_mvaOutBkg_[0]->
Fill(like);
3727 float eoverp= aConv->EoverP();
3728 h_EoverPTracksBkg_[0] ->Fill( eoverp ) ;
3729 h_PoverETracksBkg_[0] ->Fill( 1./eoverp ) ;
3730 h_DCotTracksBkg_[0] ->Fill ( aConv->pairCotThetaSeparation() );
3731 float dPhiTracksAtVtx = aConv->dPhiTracksAtVtx();
3732 h_DPhiTracksAtVtxBkg_[0]->Fill( dPhiTracksAtVtx);
3734 if ( phoIsInBarrel ) {
3735 h_mvaOutBkg_[1]->
Fill(like);
3736 h_EoverPTracksBkg_[1] ->Fill( eoverp ) ;
3737 h_PoverETracksBkg_[1] ->Fill( 1./eoverp ) ;
3738 h_DCotTracksBkg_[1] ->Fill ( aConv->pairCotThetaSeparation() );
3739 h_DPhiTracksAtVtxBkg_[1]->Fill( dPhiTracksAtVtx);
3740 }
else if ( phoIsInEndcap ) {
3741 h_mvaOutBkg_[2]->
Fill(like);
3742 h_EoverPTracksBkg_[2] ->Fill( eoverp ) ;
3743 h_PoverETracksBkg_[2] ->Fill( 1./eoverp ) ;
3744 h_DCotTracksBkg_[2] ->Fill ( aConv->pairCotThetaSeparation() );
3745 h_DPhiTracksAtVtxBkg_[2]->Fill( dPhiTracksAtVtx);
3748 if ( aConv->conversionVertex().isValid() ) {
3750 double convR=
sqrt(aConv->conversionVertex().position().perp2());
3751 double scalar = aConv->conversionVertex().position().x()*aConv->pairMomentum().x() +
3752 aConv->conversionVertex().position().y()*aConv->pairMomentum().y();
3753 if ( scalar < 0 ) convR= -
sqrt(aConv->conversionVertex().position().perp2());
3755 if ( ! isRunCentrally_ ) {
3756 h_convVtxRvsZBkg_[0] ->Fill ( fabs (aConv->conversionVertex().position().z() ),
sqrt(aConv->conversionVertex().position().perp2()) ) ;
3757 if ( aConv->caloCluster().size() !=0 && fabs(aConv->caloCluster()[0]->eta() ) <= 1. ) {
3758 h_convVtxYvsXBkg_ ->Fill ( aConv->conversionVertex().position().y() , aConv->conversionVertex().position().x() ) ;
3759 h_convVtxRvsZBkg_[1] ->Fill ( fabs (aConv->conversionVertex().position().z() ), convR ) ;
3771 h_nPho_->Fill(
float(nPho));
3783 if ( ! isRunCentrally_ ) {
3787 edm::LogInfo(
"PhotonValidator") <<
"Analyzed " << nEvt_ <<
"\n";
3797 const float PI = 3.1415927;
3801 if(phi > PI) {phi = phi -
TWOPI;}
3802 if(phi < -PI) {phi = phi +
TWOPI;}
3813 const float PI = 3.1415927;
3816 const float R_ECAL = 136.5;
3823 float ZEcal = R_ECAL*sinh(EtaParticle)+Zvertex;
3825 if(ZEcal != 0.0) Theta = atan(R_ECAL/ZEcal);
3826 if(Theta<0.0) Theta = Theta+
PI ;
3829 if( fabs(ETA) > etaBarrelEndcap )
3832 if(EtaParticle<0.0 ) Zend = -Zend ;
3833 float Zlen = Zend - Zvertex ;
3834 float RR = Zlen/sinh(EtaParticle);
3835 Theta = atan(RR/Zend);
3836 if(Theta<0.0) Theta = Theta+
PI ;
3837 ETA = -
log(
tan(0.5*Theta));
virtual double energy() const GCC11_FINAL
energy
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual double et() const GCC11_FINAL
transverse energy
float hcalTowerSumEtConeDR04() const
Hcal isolation sum.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
virtual void analyze(const edm::Event &, const edm::EventSetup &)
ParticleType
particle types
const Vector & momentum() const
track momentum vector
virtual ~PhotonValidator()
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< TrackingParticle > TrackingParticleCollection
const_iterator end() const
last iterator over the map (read only)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
float trkSumPtSolidConeDR04() const
std::vector< GenJet > GenJetCollection
collection of GenJet objects
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< EcalRecHit >::const_iterator const_iterator
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
#define TWOPI
EgammaCoreTools.
float ecalRecHitSumEtConeDR04() const
virtual void beginRun(edm::Run const &r, edm::EventSetup const &theEventSetup)
void bookHistograms(fwlite::EventContainer &eventCont)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isNonnull() const
Checks for non-null.
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
double dPhi(double phi1, double phi2)
reco::ConversionRefVector conversions() const
vector of references to Conversion's
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
float phiNormalization(float &a)
float sigmaIetaIeta() const
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
float ChiSquaredProbability(double chiSquared, double nrDOF)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
const_iterator end() const
double deltaR(double eta1, double eta2, double phi1, double phi2)
key_type key() const
Accessor for product key.
T const * product() const
int nTrkSolidConeDR04() const
std::vector< Photon > PhotonCollection
collectin of Photon objects
static const float etaBarrelEndcap
T const * product() const
float etaTransformation(float a, float b)
static const float Z_Endcap
return(e1-e2)*(e1-e2)+dp *dp
void push_back(const RefToBase< T > &)
static const float R_ECAL
size_type size() const
Size of the RefVector.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void bookHistograms(void)
value_type const * get() const
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
void setCurrentFolder(const std::string &fullpath)
const_iterator begin() const
double scalar(const CLHEP::HepGenMatrix &m)
Return the matrix as a scalar. Raise an assertion if the matris is not .
virtual void endRun(edm::Run &r, edm::EventSetup const &es)
PhotonValidator(const edm::ParameterSet &)