35 #include "CLHEP/Units/GlobalPhysicalConstants.h"
101 verbosity_ =
pset.getUntrackedParameter<
int>(
"Verbosity");
104 photonCollectionProducer_ =
pset.getParameter<
std::string>(
"phoProducer");
105 photonCollection_ =
pset.getParameter<
std::string>(
"photonCollection");
106 photonCollectionPr_Token_ =
107 consumes<reco::PhotonCollection>(
edm::InputTag(photonCollectionProducer_, photonCollection_));
109 conversionCollectionProducer_ =
pset.getParameter<
std::string>(
"convProducer");
110 conversionCollection_ =
pset.getParameter<
std::string>(
"conversionCollection");
111 conversionCollectionPr_Token_ =
112 consumes<reco::ConversionCollection>(
edm::InputTag(conversionCollectionProducer_, conversionCollection_));
116 minPhoEtCut_ =
pset.getParameter<
double>(
"minPhoEtCut");
117 generalTracksOnly_ =
pset.getParameter<
bool>(
"generalTracksOnly");
118 arbitratedMerged_ =
pset.getParameter<
bool>(
"arbitratedMerged");
119 arbitratedEcalSeeded_ =
pset.getParameter<
bool>(
"arbitratedEcalSeeded");
120 ecalalgotracks_ =
pset.getParameter<
bool>(
"ecalalgotracks");
121 highPurity_ =
pset.getParameter<
bool>(
"highPurity");
122 minProb_ =
pset.getParameter<
double>(
"minProb");
123 maxHitsBeforeVtx_ =
pset.getParameter<
uint>(
"maxHitsBeforeVtx");
124 minLxy_ =
pset.getParameter<
double>(
"minLxy");
125 isRunCentrally_ =
pset.getParameter<
bool>(
"isRunCentrally");
127 offline_pvToken_ = consumes<reco::VertexCollection>(
131 g4_simTk_Token_ = consumes<edm::SimTrackContainer>(
pset.getParameter<
edm::InputTag>(
"simTracks"));
132 g4_simVtx_Token_ = consumes<edm::SimVertexContainer>(
pset.getParameter<
edm::InputTag>(
"simTracks"));
134 tpSelForEff_Token_ = consumes<TrackingParticleRefVector>(
edm::InputTag(
"tpSelecForEfficiency"));
135 tpSelForFake_Token_ = consumes<TrackingParticleRefVector>(
edm::InputTag(
"tpSelecForFakeRate"));
140 trackAssociator_Token_ =
141 consumes<reco::TrackToTrackingParticleAssociator>(
edm::InputTag(
"trackAssociatorByHitsForConversionValidation"));
151 nRecConvAssWithEcal_ = 0;
158 double etMin = parameters_.getParameter<
double>(
"etMin");
159 double etMax = parameters_.getParameter<
double>(
"etMax");
160 int etBin = parameters_.getParameter<
int>(
"etBin");
162 double resMin = parameters_.getParameter<
double>(
"resMin");
163 double resMax = parameters_.getParameter<
double>(
"resMax");
164 int resBin = parameters_.getParameter<
int>(
"resBin");
166 double etaMin = parameters_.getParameter<
double>(
"etaMin");
167 double etaMax = parameters_.getParameter<
double>(
"etaMax");
168 int etaBin = parameters_.getParameter<
int>(
"etaBin");
169 int etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
171 double phiMin = parameters_.getParameter<
double>(
"phiMin");
172 double phiMax = parameters_.getParameter<
double>(
"phiMax");
173 int phiBin = parameters_.getParameter<
int>(
"phiBin");
175 double rMin = parameters_.getParameter<
double>(
"rMin");
176 double rMax = parameters_.getParameter<
double>(
"rMax");
177 int rBin = parameters_.getParameter<
int>(
"rBin");
179 double zMin = parameters_.getParameter<
double>(
"zMin");
180 double zMax = parameters_.getParameter<
double>(
"zMax");
181 int zBin = parameters_.getParameter<
int>(
"zBin");
183 double dPhiTracksMin = parameters_.getParameter<
double>(
"dPhiTracksMin");
184 double dPhiTracksMax = parameters_.getParameter<
double>(
"dPhiTracksMax");
185 int dPhiTracksBin = parameters_.getParameter<
int>(
"dPhiTracksBin");
187 double eoverpMin = parameters_.getParameter<
double>(
"eoverpMin");
188 double eoverpMax = parameters_.getParameter<
double>(
"eoverpMax");
189 int eoverpBin = parameters_.getParameter<
int>(
"eoverpBin");
195 double dCotTracksMin = parameters_.getParameter<
double>(
"dCotTracksMin");
196 double dCotTracksMax = parameters_.getParameter<
double>(
"dCotTracksMax");
197 int dCotTracksBin = parameters_.getParameter<
int>(
"dCotTracksBin");
199 double chi2Min = parameters_.getParameter<
double>(
"chi2Min");
200 double chi2Max = parameters_.getParameter<
double>(
"chi2Max");
202 double rMinForXray = parameters_.getParameter<
double>(
"rMinForXray");
203 double rMaxForXray = parameters_.getParameter<
double>(
"rMaxForXray");
204 int rBinForXray = parameters_.getParameter<
int>(
"rBinForXray");
205 double zMinForXray = parameters_.getParameter<
double>(
"zMinForXray");
206 double zMaxForXray = parameters_.getParameter<
double>(
"zMaxForXray");
207 int zBinForXray = parameters_.getParameter<
int>(
"zBinForXray");
208 int zBin2ForXray = parameters_.getParameter<
int>(
"zBin2ForXray");
230 h_nSimConv_[0] = iBooker.
book1D(histname,
"# of Sim conversions per event ", 20, -0.5, 19.5);
232 histname =
"h_AllSimConvEta";
234 histname =
"h_AllSimConvPhi";
236 histname =
"h_AllSimConvR";
237 h_AllSimConv_[2] = iBooker.
book1D(histname,
" All conversions: simulated R",
rBin,
rMin,
rMax);
238 histname =
"h_AllSimConvZ";
239 h_AllSimConv_[3] = iBooker.
book1D(histname,
" All conversions: simulated Z",
zBin,
zMin,
zMax);
240 histname =
"h_AllSimConvEt";
243 histname =
"nOfVisSimConversions";
244 h_nSimConv_[1] = iBooker.
book1D(histname,
"# of Sim conversions per event ", 20, -0.5, 19.5);
245 histname =
"h_VisSimConvEta";
247 histname =
"h_VisSimConvPhi";
249 histname =
"h_VisSimConvR";
250 h_VisSimConv_[2] = iBooker.
book1D(histname,
" All vis conversions: simulated R",
rBin,
rMin,
rMax);
251 histname =
"h_VisSimConvZ";
252 h_VisSimConv_[3] = iBooker.
book1D(histname,
" All vis conversions: simulated Z",
zBin,
zMin,
zMax);
253 histname =
"h_VisSimConvEt";
254 h_VisSimConv_[4] = iBooker.
book1D(histname,
" All vis conversions: simulated Et",
etBin,
etMin,
etMax);
257 histname =
"h_SimConvTwoMTracksEta";
258 h_SimConvTwoMTracks_[0] = iBooker.
book1D(
259 histname,
" All vis conversions with 2 reco-matching tracks: simulated #eta",
etaBin2,
etaMin,
etaMax);
260 histname =
"h_SimConvTwoMTracksPhi";
261 h_SimConvTwoMTracks_[1] = iBooker.
book1D(
262 histname,
" All vis conversions with 2 reco-matching tracks: simulated #phi",
phiBin,
phiMin,
phiMax);
263 histname =
"h_SimConvTwoMTracksR";
264 h_SimConvTwoMTracks_[2] =
265 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated R",
rBin,
rMin,
rMax);
266 histname =
"h_SimConvTwoMTracksZ";
267 h_SimConvTwoMTracks_[3] =
268 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Z",
zBin,
zMin,
zMax);
269 histname =
"h_SimConvTwoMTracksEt";
270 h_SimConvTwoMTracks_[4] =
271 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Et",
etBin,
etMin,
etMax);
273 histname =
"h_SimConvTwoTracksEta";
274 h_SimConvTwoTracks_[0] =
276 histname =
"h_SimConvTwoTracksPhi";
277 h_SimConvTwoTracks_[1] =
279 histname =
"h_SimConvTwoTracksR";
280 h_SimConvTwoTracks_[2] =
281 iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated R",
rBin,
rMin,
rMax);
282 histname =
"h_SimConvTwoTracksZ";
283 h_SimConvTwoTracks_[3] =
284 iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Z",
zBin,
zMin,
zMax);
285 histname =
"h_SimConvTwoTracksEt";
286 h_SimConvTwoTracks_[4] =
287 iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Et",
etBin,
etMin,
etMax);
289 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0";
290 h_SimConvTwoMTracksAndVtxPGT0_[0] = iBooker.
book1D(
291 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",
etaBin2,
etaMin,
etaMax);
292 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0";
293 h_SimConvTwoMTracksAndVtxPGT0_[1] = iBooker.
book1D(
294 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",
phiBin,
phiMin,
phiMax);
295 histname =
"h_SimConvTwoMTracksRAndVtxPGT0";
296 h_SimConvTwoMTracksAndVtxPGT0_[2] = iBooker.
book1D(
297 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",
rBin,
rMin,
rMax);
298 histname =
"h_SimConvTwoMTracksZAndVtxPGT0";
299 h_SimConvTwoMTracksAndVtxPGT0_[3] = iBooker.
book1D(
300 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",
zBin,
zMin,
zMax);
301 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0";
302 h_SimConvTwoMTracksAndVtxPGT0_[4] = iBooker.
book1D(
303 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",
etBin,
etMin,
etMax);
306 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0005";
307 h_SimConvTwoMTracksAndVtxPGT0005_[0] = iBooker.
book1D(
308 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",
etaBin2,
etaMin,
etaMax);
309 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0005";
310 h_SimConvTwoMTracksAndVtxPGT0005_[1] = iBooker.
book1D(
311 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",
phiBin,
phiMin,
phiMax);
312 histname =
"h_SimConvTwoMTracksRAndVtxPGT0005";
313 h_SimConvTwoMTracksAndVtxPGT0005_[2] = iBooker.
book1D(
314 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",
rBin,
rMin,
rMax);
315 histname =
"h_SimConvTwoMTracksZAndVtxPGT0005";
316 h_SimConvTwoMTracksAndVtxPGT0005_[3] = iBooker.
book1D(
317 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",
zBin,
zMin,
zMax);
318 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0005";
319 h_SimConvTwoMTracksAndVtxPGT0005_[4] = iBooker.
book1D(
320 histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",
etBin,
etMin,
etMax);
322 histname =
"h_SimRecConvTwoMTracksEta";
323 h_SimRecConvTwoMTracks_[0] = iBooker.
book1D(
324 histname,
" All vis conversions with 2 reco-matching tracks: simulated #eta",
etaBin2,
etaMin,
etaMax);
325 histname =
"h_SimRecConvTwoMTracksPhi";
326 h_SimRecConvTwoMTracks_[1] = iBooker.
book1D(
327 histname,
" All vis conversions with 2 reco-matching tracks: simulated #phi",
phiBin,
phiMin,
phiMax);
328 histname =
"h_SimRecConvTwoMTracksR";
329 h_SimRecConvTwoMTracks_[2] =
330 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated R",
rBin,
rMin,
rMax);
331 histname =
"h_SimRecConvTwoMTracksZ";
332 h_SimRecConvTwoMTracks_[3] =
333 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Z",
zBin,
zMin,
zMax);
334 histname =
"h_SimRecConvTwoMTracksEt";
335 h_SimRecConvTwoMTracks_[4] =
336 iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Et",
etBin,
etMin,
etMax);
340 h_simTkPt_ = iBooker.
book1D(
"simTkPt",
"Sim conversion tracks pt ",
etBin * 3, 0.,
etMax);
343 h_simConvVtxRvsZ_[0] = iBooker.
book2D(
"simConvVtxRvsZAll",
344 " Photon Sim conversion vtx position",
351 h_simConvVtxRvsZ_[1] = iBooker.
book2D(
"simConvVtxRvsZBarrel",
352 " Photon Sim conversion vtx position",
359 h_simConvVtxRvsZ_[2] = iBooker.
book2D(
"simConvVtxRvsZEndcap",
360 " Photon Sim conversion vtx position",
367 h_simConvVtxRvsZ_[3] = iBooker.
book2D(
"simConvVtxRvsZBarrel2",
368 " Photon Sim conversion vtx position when reco R<4cm",
375 h_simConvVtxYvsX_ = iBooker.
book2D(
376 "simConvVtxYvsXTrkBarrel",
" Photon Sim conversion vtx position, (x,y) eta<1 ", 100, -80., 80., 100, -80., 80.);
378 std::string convpath = dqmpath_ +
"ConversionInfo";
382 h_nConv_[0][0] = iBooker.
book1D(
383 histname +
"All",
"Number Of Conversions per isolated candidates per events: All Ecal ", 10, -0.5, 9.5);
384 h_nConv_[0][1] = iBooker.
book1D(
385 histname +
"Barrel",
"Number Of Conversions per isolated candidates per events: Ecal Barrel ", 10, -0.5, 9.5);
386 h_nConv_[0][2] = iBooker.
book1D(
387 histname +
"Endcap",
"Number Of Conversions per isolated candidates per events: Ecal Endcap ", 10, -0.5, 9.5);
388 h_nConv_[1][0] = iBooker.
book1D(histname +
"All_Ass",
389 "Number Of associated Conversions per isolated candidates per events: All Ecal ",
395 h_convEtaMatchSC_[0][0] =
401 h_convPt_[0][0] = iBooker.
book1D(
"convPt",
" conversions Transverse Energy: all eta ",
etBin,
etMin,
etMax);
405 h_convEtaMatchSC_[1][0] =
408 h_convR_[1][0] = iBooker.
book1D(
"convRAss",
" Matched converted photon R",
rBin,
rMin,
rMax);
409 h_convZ_[1][0] = iBooker.
book1D(
"convZAss",
" Matched converted photon Z",
zBin,
zMin,
zMax);
415 h_convEtaMatchSC_[2][0] =
418 h_convR_[2][0] = iBooker.
book1D(
"convRFake",
" Fake converted photon R",
rBin,
rMin,
rMax);
419 h_convZ_[2][0] = iBooker.
book1D(
"convZFake",
" Fake converted photon Z",
zBin,
zMin,
zMax);
420 h_convPt_[2][0] = iBooker.
book1D(
"convPtFake",
"Fake conversions Transverse Energy: all eta ",
etBin,
etMin,
etMax);
422 h_convRplot_ = iBooker.
book1D(
"convRplot",
" converted photon R", 600, 0., 120.);
423 h_convZplot_ = iBooker.
book1D(
"convZplot",
" converted photon Z", 320, -160., 160.);
425 histname =
"convSCdPhi";
426 h_convSCdPhi_[0][0] = iBooker.
book1D(histname +
"All",
"dPhi between SC and conversion", 100, -0.1, 0.1);
427 h_convSCdPhi_[0][1] =
428 iBooker.
book1D(histname +
"Barrel",
" dPhi between SC and conversion: Barrel", 100, -0.1, 0.1);
429 h_convSCdPhi_[0][2] =
430 iBooker.
book1D(histname +
"Endcap",
" dPhi between SC and conversion: Endcap", 100, -0.1, 0.1);
431 h_convSCdPhi_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"dPhi between SC and conversion", 100, -0.1, 0.1);
432 h_convSCdPhi_[1][1] =
433 iBooker.
book1D(histname +
"Barrel_Ass",
" dPhi between SC and conversion: Barrel", 100, -0.1, 0.1);
434 h_convSCdPhi_[1][2] =
435 iBooker.
book1D(histname +
"Endcap_Ass",
" dPhi between SC and conversion: Endcap", 100, -0.1, 0.1);
436 h_convSCdPhi_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"dPhi between SC and conversion", 100, -0.1, 0.1);
437 h_convSCdPhi_[2][1] =
438 iBooker.
book1D(histname +
"Barrel_Fakes",
" dPhi between SC and conversion: Barrel", 100, -0.1, 0.1);
439 h_convSCdPhi_[2][2] =
440 iBooker.
book1D(histname +
"Endcap_Fakes",
" dPhi between SC and conversion: Endcap", 100, -0.1, 0.1);
441 histname =
"convSCdEta";
442 h_convSCdEta_[0][0] = iBooker.
book1D(histname +
"All",
" dEta between SC and conversion", 100, -0.1, 0.1);
443 h_convSCdEta_[0][1] =
444 iBooker.
book1D(histname +
"Barrel",
" dEta between SC and conversion: Barrel", 100, -0.1, 0.1);
445 h_convSCdEta_[0][2] =
446 iBooker.
book1D(histname +
"Endcap",
" dEta between SC and conversion: Endcap", 100, -0.1, 0.1);
447 h_convSCdEta_[1][0] = iBooker.
book1D(histname +
"All_Ass",
" dEta between SC and conversion", 100, -0.1, 0.1);
448 h_convSCdEta_[1][1] =
449 iBooker.
book1D(histname +
"Barrel_Ass",
" dEta between SC and conversion: Barrel", 100, -0.1, 0.1);
450 h_convSCdEta_[1][2] =
451 iBooker.
book1D(histname +
"Endcap_Ass",
" dEta between SC and conversion: Endcap", 100, -0.1, 0.1);
452 h_convSCdEta_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
" dEta between SC and conversion", 100, -0.1, 0.1);
453 h_convSCdEta_[2][1] =
454 iBooker.
book1D(histname +
"Barrel_Fakes",
" dEta between SC and conversion: Barrel", 100, -0.1, 0.1);
455 h_convSCdEta_[2][2] =
456 iBooker.
book1D(histname +
"Endcap_Fakes",
" dEta between SC and conversion: Endcap", 100, -0.1, 0.1);
458 histname =
"convPtRes";
463 histname =
"hInvMass";
464 h_invMass_[0][0] = iBooker.
book1D(
465 histname +
"All_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ", 100, 0., 1.5);
466 h_invMass_[0][1] = iBooker.
book1D(histname +
"Barrel_AllTracks",
467 " Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",
471 h_invMass_[0][2] = iBooker.
book1D(histname +
"Endcap_AllTracks",
472 " Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",
477 h_invMass_[1][0] = iBooker.
book1D(
478 histname +
"All_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ", 100, 0., 1.5);
479 h_invMass_[1][1] = iBooker.
book1D(histname +
"Barrel_AssTracks",
480 " Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",
484 h_invMass_[1][2] = iBooker.
book1D(histname +
"Endcap_AssTracks",
485 " Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",
490 h_invMass_[2][0] = iBooker.
book1D(
491 histname +
"All_FakeTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ", 100, 0., 1.5);
492 h_invMass_[2][1] = iBooker.
book1D(histname +
"Barrel_FakeTracks",
493 " Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",
497 h_invMass_[2][2] = iBooker.
book1D(histname +
"Endcap_FaleTracks",
498 " Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",
503 histname =
"hDPhiTracksAtVtx";
504 h_DPhiTracksAtVtx_[0][0] = iBooker.
book1D(histname +
"All",
505 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",
509 h_DPhiTracksAtVtx_[0][1] =
510 iBooker.
book1D(histname +
"Barrel",
511 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",
515 h_DPhiTracksAtVtx_[0][2] =
516 iBooker.
book1D(histname +
"Endcap",
517 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",
521 h_DPhiTracksAtVtx_[1][0] = iBooker.
book1D(histname +
"All_Ass",
522 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",
526 h_DPhiTracksAtVtx_[1][1] =
527 iBooker.
book1D(histname +
"Barrel_Ass",
528 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",
532 h_DPhiTracksAtVtx_[1][2] =
533 iBooker.
book1D(histname +
"Endcap_Ass",
534 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",
538 h_DPhiTracksAtVtx_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
539 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",
543 h_DPhiTracksAtVtx_[2][1] =
544 iBooker.
book1D(histname +
"Barrel_Fakes",
545 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",
549 h_DPhiTracksAtVtx_[2][2] =
550 iBooker.
book1D(histname +
"Endcap_Fakes",
551 " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",
556 histname =
"hDPhiTracksAtVtxVsEta";
557 h2_DPhiTracksAtVtxVsEta_ = iBooker.
book2D(histname +
"All",
558 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta",
565 histname =
"pDPhiTracksAtVtxVsEta";
566 p_DPhiTracksAtVtxVsEta_ =
568 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta ",
577 histname =
"hDPhiTracksAtVtxVsR";
578 h2_DPhiTracksAtVtxVsR_ = iBooker.
book2D(histname +
"All",
579 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R",
586 histname =
"pDPhiTracksAtVtxVsR";
587 p_DPhiTracksAtVtxVsR_ = iBooker.
bookProfile(histname +
"All",
588 " Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R ",
597 histname =
"hDCotTracks";
598 h_DCotTracks_[0][0] = iBooker.
book1D(histname +
"All",
599 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",
603 h_DCotTracks_[0][1] = iBooker.
book1D(histname +
"Barrel",
604 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",
608 h_DCotTracks_[0][2] = iBooker.
book1D(histname +
"Endcap",
609 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",
613 h_DCotTracks_[1][0] = iBooker.
book1D(histname +
"All_Ass",
614 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",
618 h_DCotTracks_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
619 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",
623 h_DCotTracks_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
624 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",
628 h_DCotTracks_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
629 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",
633 h_DCotTracks_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
634 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",
638 h_DCotTracks_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
639 " Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",
644 histname =
"hDCotTracksVsEta";
645 h2_DCotTracksVsEta_ = iBooker.
book2D(histname +
"All",
646 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta",
653 histname =
"pDCotTracksVsEta";
654 p_DCotTracksVsEta_ = iBooker.
bookProfile(histname +
"All",
655 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta ",
664 histname =
"hDCotTracksVsR";
665 h2_DCotTracksVsR_ = iBooker.
book2D(histname +
"All",
666 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R",
673 histname =
"pDCotTracksVsR";
676 " Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R ",
685 histname =
"hDistMinAppTracks";
686 h_distMinAppTracks_[0][0] = iBooker.
book1D(
687 histname +
"All",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ", 120, -0.5, 1.0);
688 h_distMinAppTracks_[0][1] = iBooker.
book1D(
689 histname +
"Barrel",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ", 120, -0.5, 1.0);
690 h_distMinAppTracks_[0][2] = iBooker.
book1D(
691 histname +
"Endcap",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ", 120, -0.5, 1.0);
692 h_distMinAppTracks_[1][0] = iBooker.
book1D(
693 histname +
"All_Ass",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ", 120, -0.5, 1.0);
694 h_distMinAppTracks_[1][1] =
695 iBooker.
book1D(histname +
"Barrel_Ass",
696 " Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",
700 h_distMinAppTracks_[1][2] =
701 iBooker.
book1D(histname +
"Endcap_Ass",
702 " Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",
706 h_distMinAppTracks_[2][0] = iBooker.
book1D(
707 histname +
"All_Fakes",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ", 120, -0.5, 1.0);
708 h_distMinAppTracks_[2][1] =
709 iBooker.
book1D(histname +
"Barrel_Fakes",
710 " Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",
714 h_distMinAppTracks_[2][2] =
715 iBooker.
book1D(histname +
"Endcap_Fakes",
716 " Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",
721 h_convVtxRvsZ_[0] = iBooker.
book2D(
"convVtxRvsZAll",
722 " Photon Reco conversion vtx position",
729 h_convVtxRvsZ_[1] = iBooker.
book2D(
"convVtxRvsZBarrel",
730 " Photon Reco conversion vtx position",
737 h_convVtxRvsZ_[2] = iBooker.
book2D(
"convVtxRvsZEndcap",
738 " Photon Reco conversion vtx position",
745 h_convVtxYvsX_ = iBooker.
book2D(
746 "convVtxYvsXTrkBarrel",
" Photon Reco conversion vtx position, (x,y) eta<1 ", 1000, -60., 60., 1000, -60., 60.);
748 h_convVtxRvsZ_zoom_[0] = iBooker.
book2D(
"convVtxRvsZBarrelZoom1",
749 " Photon Reco conversion vtx position",
756 h_convVtxRvsZ_zoom_[1] = iBooker.
book2D(
"convVtxRvsZBarrelZoom2",
757 " Photon Reco conversion vtx position",
764 h_convVtxYvsX_zoom_[0] = iBooker.
book2D(
"convVtxYvsXTrkBarrelZoom1",
765 " Photon Reco conversion vtx position, (x,y) eta<1 ",
772 h_convVtxYvsX_zoom_[1] = iBooker.
book2D(
"convVtxYvsXTrkBarrelZoom2",
773 " Photon Reco conversion vtx position, (x,y) eta<1 ",
781 h_convVtxdR_ = iBooker.
book1D(
"convVtxdR",
" Photon Reco conversion vtx dR", 100, -10., 10.);
782 h_convVtxdX_ = iBooker.
book1D(
"convVtxdX",
" Photon Reco conversion vtx dX", 100, -10., 10.);
783 h_convVtxdY_ = iBooker.
book1D(
"convVtxdY",
" Photon Reco conversion vtx dY", 100, -10., 10.);
784 h_convVtxdZ_ = iBooker.
book1D(
"convVtxdZ",
" Photon Reco conversion vtx dZ", 100, -20., 20.);
786 h_convVtxdPhi_ = iBooker.
book1D(
"convVtxdPhi",
" Photon Reco conversion vtx dPhi", 100, -0.01, 0.01);
787 h_convVtxdEta_ = iBooker.
book1D(
"convVtxdEta",
" Photon Reco conversion vtx dEta", 100, -0.5, 0.5);
789 h_convVtxdR_barrel_ =
790 iBooker.
book1D(
"convVtxdR_barrel",
" Photon Reco conversion vtx dR, |eta|<=1.2", 100, -10., 10.);
791 h_convVtxdX_barrel_ =
792 iBooker.
book1D(
"convVtxdX_barrel",
" Photon Reco conversion vtx dX, |eta|<=1.2", 100, -10., 10.);
793 h_convVtxdY_barrel_ =
794 iBooker.
book1D(
"convVtxdY_barrel",
" Photon Reco conversion vtx dY, |eta|<=1.2 ", 100, -10., 10.);
795 h_convVtxdZ_barrel_ =
796 iBooker.
book1D(
"convVtxdZ_barrel",
" Photon Reco conversion vtx dZ, |eta|<=1.2,", 100, -20., 20.);
798 h_convVtxdR_endcap_ =
799 iBooker.
book1D(
"convVtxdR_endcap",
" Photon Reco conversion vtx dR, |eta|>1.2 ", 100, -10., 10.);
800 h_convVtxdX_endcap_ =
801 iBooker.
book1D(
"convVtxdX_endcap",
" Photon Reco conversion vtx dX, |eta|>1.2", 100, -10., 10.);
802 h_convVtxdY_endcap_ =
803 iBooker.
book1D(
"convVtxdY_endcap",
" Photon Reco conversion vtx dY, |eta|>1.2", 100, -10., 10.);
804 h_convVtxdZ_endcap_ =
805 iBooker.
book1D(
"convVtxdZ_endcap",
" Photon Reco conversion vtx dZ, |eta|>1.2", 100, -20., 20.);
807 h2_convVtxdRVsR_ = iBooker.
book2D(
"h2ConvVtxdRVsR",
" Conversion vtx dR vsR",
rBin,
rMin,
rMax, 100, -20., 20.);
815 p_convVtxdXVsX_ = iBooker.
bookProfile(
"pConvVtxdXVsX",
"Conversion vtx dX vs X", 120, -60, 60, 100, -20., 20.,
"");
816 p_convVtxdYVsY_ = iBooker.
bookProfile(
"pConvVtxdYVsY",
"Conversion vtx dY vs Y", 120, -60, 60, 100, -20., 20.,
"");
823 "p2ConvVtxdRVsRZ",
"Conversion vtx dR vs RZ",
zBin,
zMin,
zMax,
rBin,
rMin,
rMax, 100, 0., 20.,
"s");
825 "p2ConvVtxdZVsRZ",
"Conversion vtx dZ vs RZ",
zBin,
zMin,
zMax,
rBin,
rMin,
rMax, 100, 0., 20.,
"s");
827 histname =
"EoverPtracks";
828 h_EoverPTracks_[0][0] =
830 h_EoverPTracks_[0][1] =
832 h_EoverPTracks_[0][2] =
834 h_EoverPTracks_[1][0] =
836 h_EoverPTracks_[1][1] = iBooker.
book1D(
838 h_EoverPTracks_[1][2] = iBooker.
book1D(
840 h_EoverPTracks_[2][0] =
842 h_EoverPTracks_[2][1] = iBooker.
book1D(
844 h_EoverPTracks_[2][2] = iBooker.
book1D(
847 h2_convVtxRrecVsTrue_ = iBooker.
book2D(
850 histname =
"vtxChi2Prob";
851 h_vtxChi2Prob_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 100, 0., 1.);
852 h_vtxChi2Prob_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 100, 0., 1.);
853 h_vtxChi2Prob_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 100, 0., 1.);
854 h_vtxChi2Prob_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 100, 0., 1.);
855 h_vtxChi2Prob_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 100, 0., 1.);
856 h_vtxChi2Prob_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 100, 0., 1.);
857 h_vtxChi2Prob_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 100, 0., 1.);
858 h_vtxChi2Prob_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 100, 0., 1.);
859 h_vtxChi2Prob_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 100, 0., 1.);
861 h_zPVFromTracks_[1] = iBooker.
book1D(
"zPVFromTracks",
" Photons: PV z from conversion tracks", 100, -25., 25.);
862 h_dzPVFromTracks_[1] =
863 iBooker.
book1D(
"dzPVFromTracks",
" Photons: PV Z_rec - Z_true from conversion tracks", 100, -5., 5.);
864 h2_dzPVVsR_ = iBooker.
book2D(
"h2dzPVVsR",
"Photon Reco conversions: dz(PV) vs R",
rBin,
rMin,
rMax, 100, -3., 3.);
869 h_lxybs_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 200, -100., 100.);
870 h_lxybs_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 200, -100., 100.);
871 h_lxybs_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 200, -100., 100.);
872 h_lxybs_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 200, -100., 100.);
873 h_lxybs_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 200, -100., 100.);
874 h_lxybs_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 200, -100., 100.);
875 h_lxybs_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 200, -100., 100.);
876 h_lxybs_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 200, -100., 100.);
877 h_lxybs_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 200, -100., 100.);
879 histname =
"maxNHitsBeforeVtx";
880 h_maxNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
881 h_maxNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
882 h_maxNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
883 h_maxNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
884 h_maxNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
885 h_maxNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
886 h_maxNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
887 h_maxNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
888 h_maxNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
890 histname =
"leadNHitsBeforeVtx";
891 h_leadNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
892 h_leadNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
893 h_leadNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
894 h_leadNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
895 h_leadNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
896 h_leadNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
897 h_leadNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
898 h_leadNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
899 h_leadNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
901 histname =
"trailNHitsBeforeVtx";
902 h_trailNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
903 h_trailNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
904 h_trailNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
905 h_trailNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
906 h_trailNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
907 h_trailNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
908 h_trailNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
909 h_trailNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
910 h_trailNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
912 histname =
"sumNHitsBeforeVtx";
913 h_sumNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
914 h_sumNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
915 h_sumNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
916 h_sumNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
917 h_sumNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
918 h_sumNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
919 h_sumNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
920 h_sumNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
921 h_sumNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
923 histname =
"maxDlClosestHitToVtx";
924 h_maxDlClosestHitToVtx_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 100, -10., 10.);
925 h_maxDlClosestHitToVtx_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 100, -10., 10.);
926 h_maxDlClosestHitToVtx_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 100, -10., 10.);
927 h_maxDlClosestHitToVtx_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 100, -10., 10.);
928 h_maxDlClosestHitToVtx_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 100, -10., 10.);
929 h_maxDlClosestHitToVtx_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 100, -10., 10.);
930 h_maxDlClosestHitToVtx_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 100, -10., 10.);
931 h_maxDlClosestHitToVtx_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 100, -10., 10.);
932 h_maxDlClosestHitToVtx_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 100, -10., 10.);
934 histname =
"maxDlClosestHitToVtxSig";
935 h_maxDlClosestHitToVtxSig_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 100, -8., 8.);
936 h_maxDlClosestHitToVtxSig_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 100, -8., 8.);
937 h_maxDlClosestHitToVtxSig_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 100, -8., 8.);
938 h_maxDlClosestHitToVtxSig_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 100, -8., 8.);
939 h_maxDlClosestHitToVtxSig_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 100, -8., 8.);
940 h_maxDlClosestHitToVtxSig_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 100, -8., 8.);
941 h_maxDlClosestHitToVtxSig_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 100, -8., 8.);
942 h_maxDlClosestHitToVtxSig_[2][1] =
943 iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 100, -8., 8.);
944 h_maxDlClosestHitToVtxSig_[2][2] =
945 iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 100, -8., 8.);
947 histname =
"deltaExpectedHitsInner";
948 h_deltaExpectedHitsInner_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 31, -15.5, 15.5);
949 h_deltaExpectedHitsInner_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 31, -15.5, 15.5);
950 h_deltaExpectedHitsInner_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 31, -15.5, 15.5);
951 h_deltaExpectedHitsInner_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 31, -15.5, 15.5);
952 h_deltaExpectedHitsInner_[1][1] =
953 iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 31, -15.5, 15.5);
954 h_deltaExpectedHitsInner_[1][2] =
955 iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 31, -15.5, 15.5);
956 h_deltaExpectedHitsInner_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 31, -15.5, 15.5);
957 h_deltaExpectedHitsInner_[2][1] =
958 iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 31, -15.5, 15.5);
959 h_deltaExpectedHitsInner_[2][2] =
960 iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 31, -15.5, 15.5);
962 histname =
"leadExpectedHitsInner";
963 h_leadExpectedHitsInner_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
964 h_leadExpectedHitsInner_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
965 h_leadExpectedHitsInner_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
966 h_leadExpectedHitsInner_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
967 h_leadExpectedHitsInner_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
968 h_leadExpectedHitsInner_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
969 h_leadExpectedHitsInner_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
970 h_leadExpectedHitsInner_[2][1] =
971 iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
972 h_leadExpectedHitsInner_[2][2] =
973 iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
975 histname =
"nSharedHits";
976 h_nSharedHits_[0][0] = iBooker.
book1D(histname +
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
977 h_nSharedHits_[0][1] = iBooker.
book1D(histname +
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
978 h_nSharedHits_[0][2] = iBooker.
book1D(histname +
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
979 h_nSharedHits_[1][0] = iBooker.
book1D(histname +
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
980 h_nSharedHits_[1][1] = iBooker.
book1D(histname +
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
981 h_nSharedHits_[1][2] = iBooker.
book1D(histname +
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
982 h_nSharedHits_[2][0] = iBooker.
book1D(histname +
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
983 h_nSharedHits_[2][1] = iBooker.
book1D(histname +
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
984 h_nSharedHits_[2][2] = iBooker.
book1D(histname +
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
988 nHits_[0] = iBooker.
book2D(histname +
"AllTracks",
989 "Photons:Tracks from conversions: # of hits all tracks",
996 nHits_[1] = iBooker.
book2D(histname +
"AllTracks_Ass",
997 "Photons:Tracks from conversions: # of hits all tracks ass",
1004 nHits_[2] = iBooker.
book2D(histname +
"AllTracks_Fakes",
1005 "Photons:Tracks from conversions: # of hits all tracks fakes",
1013 histname =
"nHitsVsEta";
1014 nHitsVsEta_[0] = iBooker.
book2D(histname +
"AllTracks",
1015 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
1022 nHitsVsEta_[1] = iBooker.
book2D(histname +
"AllTracks_Ass",
1023 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
1030 nHitsVsEta_[2] = iBooker.
book2D(histname +
"AllTracks_Fakes",
1031 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
1038 histname =
"h_nHitsVsEta";
1039 p_nHitsVsEta_[0] = iBooker.
bookProfile(histname +
"AllTracks",
1040 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
1048 p_nHitsVsEta_[1] = iBooker.
bookProfile(histname +
"AllTracks_Ass",
1049 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
1057 p_nHitsVsEta_[2] = iBooker.
bookProfile(histname +
"AllTracks_Fakes",
1058 "Photons:Tracks from conversions: # of hits vs #eta all tracks",
1067 histname =
"nHitsVsR";
1068 nHitsVsR_[0] = iBooker.
book2D(histname +
"AllTracks",
1069 "Photons:Tracks from conversions: # of hits vs radius all tracks",
1076 nHitsVsR_[1] = iBooker.
book2D(histname +
"AllTracks_Ass",
1077 "Photons:Tracks from conversions: # of hits vs radius all tracks",
1084 nHitsVsR_[2] = iBooker.
book2D(histname +
"AllTracks_Fakes",
1085 "Photons:Tracks from conversions: # of hits vs radius all tracks",
1093 histname =
"h_nHitsVsR";
1094 p_nHitsVsR_[0] = iBooker.
bookProfile(histname +
"AllTracks",
1095 "Photons:Tracks from conversions: # of hits vs radius all tracks",
1103 p_nHitsVsR_[1] = iBooker.
bookProfile(histname +
"AllTracks_Ass",
1104 "Photons:Tracks from conversions: # of hits vs radius all tracks",
1112 p_nHitsVsR_[2] = iBooker.
bookProfile(histname +
"AllTracks_Fakes",
1113 "Photons:Tracks from conversions: # of hits vs radius all tracks",
1122 histname =
"tkChi2";
1123 h_tkChi2_[0] = iBooker.
book1D(
1124 histname +
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100,
chi2Min,
chi2Max);
1125 h_tkChi2_[1] = iBooker.
book1D(
1126 histname +
"AllTracks_Ass",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100,
chi2Min,
chi2Max);
1127 h_tkChi2_[2] = iBooker.
book1D(
1128 histname +
"AllTracks_Fakes",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100,
chi2Min,
chi2Max);
1130 histname =
"tkChi2Large";
1131 h_tkChi2Large_[0] = iBooker.
book1D(
1132 histname +
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
1133 h_tkChi2Large_[1] = iBooker.
book1D(
1134 histname +
"AllTracks_Ass",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
1135 h_tkChi2Large_[2] = iBooker.
book1D(
1136 histname +
"AllTracks_Fakes",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
1138 histname =
"h2Chi2VsEta";
1139 h2_Chi2VsEta_[0] = iBooker.
book2D(
1141 h2_Chi2VsEta_[1] = iBooker.
book2D(
1143 h2_Chi2VsEta_[2] = iBooker.
book2D(
1145 histname =
"pChi2VsEta";
1150 p_Chi2VsEta_[2] = iBooker.
bookProfile(histname +
"All_Fakes",
1151 " Reco Track #chi^{2} vs #eta : All ",
1160 histname =
"h2Chi2VsR";
1163 h2_Chi2VsR_[1] = iBooker.
book2D(
1165 h2_Chi2VsR_[2] = iBooker.
book2D(
1167 histname =
"pChi2VsR";
1176 h_TkD0_[0] = iBooker.
book1D(histname +
"All",
" Reco Track D0*q: All ", 200, -0.1, 60);
1177 h_TkD0_[1] = iBooker.
book1D(histname +
"All_Ass",
" Reco Track D0*q: Barrel ", 200, -0.1, 60);
1178 h_TkD0_[2] = iBooker.
book1D(histname +
"All_Fakes",
" Reco Track D0*q: Endcap ", 200, -0.1, 60);
1180 histname =
"hTkPtPull";
1181 h_TkPtPull_[0] = iBooker.
book1D(histname +
"All",
" Reco Track Pt pull: All ", 100, -20., 10.);
1182 histname =
"hTkPtPull";
1183 h_TkPtPull_[1] = iBooker.
book1D(histname +
"Barrel",
" Reco Track Pt pull: Barrel ", 100, -20., 10.);
1184 histname =
"hTkPtPull";
1185 h_TkPtPull_[2] = iBooker.
book1D(histname +
"Endcap",
" Reco Track Pt pull: Endcap ", 100, -20., 10.);
1187 histname =
"h2TkPtPullEta";
1190 histname =
"pTkPtPullEta";
1192 histname +
"All",
" Reco Track Pt pull: All ",
etaBin2,
etaMin,
etaMax, 100, -20., 10.,
" ");
1194 histname =
"PtRecVsPtSim";
1195 h2_PtRecVsPtSim_[0] =
1197 h2_PtRecVsPtSim_[1] =
1199 h2_PtRecVsPtSim_[2] =
1202 histname =
"photonPtRecVsPtSim";
1203 h2_photonPtRecVsPtSim_ =
1206 histname =
"nHitsBeforeVtx";
1207 h_nHitsBeforeVtx_[0] = iBooker.
book1D(histname +
"All",
"Pt Rec vs Pt sim: All ", 16, -0.5, 15.5);
1208 h_nHitsBeforeVtx_[1] = iBooker.
book1D(histname +
"Barrel",
"Pt Rec vs Pt sim: Barrel ", 16, -0.5, 15.5);
1209 h_nHitsBeforeVtx_[2] = iBooker.
book1D(histname +
"Endcap",
"Pt Rec vs Pt sim: Endcap ", 16, -0.5, 15.5);
1211 histname =
"dlClosestHitToVtx";
1212 h_dlClosestHitToVtx_[0] = iBooker.
book1D(histname +
"All",
"Pt Rec vs Pt sim: All ", 100, -10., 10.);
1213 h_dlClosestHitToVtx_[1] = iBooker.
book1D(histname +
"Barrel",
"Pt Rec vs Pt sim: Barrel ", 100, -10., 10.);
1214 h_dlClosestHitToVtx_[2] = iBooker.
book1D(histname +
"Endcap",
"Pt Rec vs Pt sim: Endcap ", 100, -10., 10.);
1216 histname =
"dlClosestHitToVtxSig";
1217 h_dlClosestHitToVtxSig_[0] = iBooker.
book1D(histname +
"All",
"Pt Rec vs Pt sim: All ", 100, -8., 8.);
1218 h_dlClosestHitToVtxSig_[1] = iBooker.
book1D(histname +
"Barrel",
"Pt Rec vs Pt sim: Barrel ", 100, -8., 8.);
1219 h_dlClosestHitToVtxSig_[2] = iBooker.
book1D(histname +
"Endcap",
"Pt Rec vs Pt sim: Endcap ", 100, -8., 8.);
1221 h_match_ = iBooker.
book1D(
"h_match",
" ", 3, -0.5, 2.5);
1228 edm::LogInfo(
"ConvertedPhotonProducer") <<
" get magnetic field"
1236 delete thePhotonMCTruthFinder_;
1240 thePhotonMCTruthFinder_->clear();
1241 using namespace edm;
1245 const float BARL = 1.4442;
1247 const float END_HI = 2.5;
1252 e.getByToken(trackAssociator_Token_, theTrackAssociator);
1255 LogInfo(
"TkConvValidator") <<
"TkConvValidator Analyzing event number: " <<
e.id() <<
" Global Counter " << nEvt_
1268 e.getByToken(conversionCollectionPr_Token_, convHandle);
1271 edm::LogError(
"ConversionsProducer") <<
"Error! Can't get the collection " << std::endl;
1277 e.getByToken(photonCollectionPr_Token_, photonHandle);
1279 if (!photonHandle.
isValid()) {
1280 edm::LogError(
"PhotonProducer") <<
"Error! Can't get the Photon collection " << std::endl;
1287 e.getByToken(offline_pvToken_, vertexHandle);
1288 if (!vertexHandle.
isValid()) {
1289 edm::LogError(
"TrackerOnlyConversionProducer") <<
"Error! Can't get the product primary Vertex Collection "
1295 bool valid_pvtx =
false;
1305 e.getByToken(beamspotToken_, bsHandle);
1307 edm::LogError(
"TrackerOnlyConversionProducer") <<
"Error! Can't get the product primary Vertex Collection "
1325 e.getByToken(g4_simTk_Token_, SimTk);
1326 e.getByToken(g4_simVtx_Token_, SimVtx);
1328 bool useTP = parameters_.getParameter<
bool>(
"useTP");
1333 e.getByToken(tpSelForEff_Token_, TPHandleForEff);
1334 e.getByToken(tpSelForFake_Token_, TPHandleForFakeRate);
1340 const std::vector<SimTrack>& theSimTracks = *SimTk;
1341 const std::vector<SimVertex>& theSimVertices = *SimVtx;
1345 std::vector<PhotonMCTruth> mcPhotons = thePhotonMCTruthFinder_->find(theSimTracks, theSimVertices);
1357 std::map<const reco::Track*, TrackingParticleRef> myAss;
1358 std::map<const reco::Track*, TrackingParticleRef>::const_iterator itAss;
1360 for (std::vector<PhotonMCTruth>::const_iterator mcPho = mcPhotons.begin(); mcPho != mcPhotons.end(); mcPho++) {
1361 mcConvPt_ = (*mcPho).fourMomentum().et();
1362 float mcPhi = (*mcPho).fourMomentum().phi();
1363 mcPhi_ = phiNormalization(mcPhi);
1364 mcEta_ = (*mcPho).fourMomentum().pseudoRapidity();
1365 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z());
1366 mcConvR_ = (*mcPho).vertex().perp();
1367 mcConvX_ = (*mcPho).vertex().x();
1368 mcConvY_ = (*mcPho).vertex().y();
1369 mcConvZ_ = (*mcPho).vertex().z();
1370 mcConvEta_ = (*mcPho).vertex().eta();
1371 mcConvPhi_ = (*mcPho).vertex().phi();
1373 if (fabs(mcEta_) > END_HI)
1386 bool goodSimConversion =
false;
1387 bool visibleConversion =
false;
1388 bool visibleConversionsWithTwoSimTracks =
false;
1389 if ((*mcPho).isAConversion() == 1) {
1391 h_AllSimConv_[0]->Fill(mcEta_);
1392 h_AllSimConv_[1]->Fill(mcPhi_);
1393 h_AllSimConv_[2]->Fill(mcConvR_);
1394 h_AllSimConv_[3]->Fill(mcConvZ_);
1395 h_AllSimConv_[4]->Fill((*mcPho).fourMomentum().et());
1398 h_SimConvEtaPix_[0]->Fill(mcEta_);
1400 if ((fabs(mcEta_) <= BARL && mcConvR_ < 85) ||
1401 (fabs(mcEta_) > BARL && fabs(mcEta_) <= END_HI && fabs((*mcPho).vertex().z()) < 210))
1402 visibleConversion =
true;
1408 if (fabs(
tp->vx() - (*mcPho).vertex().x()) < 0.0001 && fabs(
tp->vy() - (*mcPho).vertex().y()) < 0.0001 &&
1409 fabs(
tp->vz() - (*mcPho).vertex().z()) < 0.0001) {
1410 theConvTP_.push_back(
tp);
1415 if (theConvTP_.size() == 2)
1416 visibleConversionsWithTwoSimTracks =
true;
1417 goodSimConversion =
false;
1419 if (visibleConversion && visibleConversionsWithTwoSimTracks)
1420 goodSimConversion =
true;
1421 if (goodSimConversion) {
1423 h_VisSimConv_[0]->Fill(mcEta_);
1424 h_VisSimConv_[1]->Fill(mcPhi_);
1425 h_VisSimConv_[2]->Fill(mcConvR_);
1426 h_VisSimConv_[3]->Fill(mcConvZ_);
1427 h_VisSimConv_[4]->Fill((*mcPho).fourMomentum().et());
1432 h_simTkPt_->Fill((*iTrk)->pt());
1433 h_simTkEta_->Fill((*iTrk)->eta());
1438 if (!(visibleConversion && visibleConversionsWithTwoSimTracks))
1441 h_simConvVtxRvsZ_[0]->Fill(fabs(mcConvZ_), mcConvR_);
1442 if (fabs(mcEta_) <= 1.) {
1443 h_simConvVtxRvsZ_[1]->Fill(fabs(mcConvZ_), mcConvR_);
1444 h_simConvVtxYvsX_->Fill(mcConvX_, mcConvY_);
1446 h_simConvVtxRvsZ_[2]->Fill(fabs(mcConvZ_), mcConvR_);
1454 bool recomatch =
false;
1455 float chi2Prob = 0.;
1458 for (reco::ConversionCollection::const_iterator
conv = convHandle->begin();
conv != convHandle->end(); ++
conv) {
1471 const std::vector<edm::RefToBase<reco::Track> >&
tracks = aConv.
tracks();
1475 if (
tracks.size() != 2 || !(
vtx.isValid()))
1488 double lxy = (themom.x() * dbsx + themom.y() * dbsy) / themom.rho();
1512 bool isAssociated =
false;
1516 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV1, trackV2;
1518 int tp_1 = 0, tp_2 = 1;
1519 if (
q1.find(theConvTP_[0]) !=
q1.end()) {
1520 trackV1 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q1[theConvTP_[0]];
1521 }
else if (
q1.find(theConvTP_[1]) !=
q1.end()) {
1522 trackV1 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q1[theConvTP_[1]];
1525 if (
q2.find(theConvTP_[1]) !=
q2.end()) {
1526 trackV2 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q2[theConvTP_[1]];
1527 }
else if (
q2.find(theConvTP_[0]) !=
q2.end()) {
1528 trackV2 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >)
q2[theConvTP_[0]];
1531 if (!(!trackV1.empty() && !trackV2.empty()))
1540 myAss.insert(std::make_pair(tr1.
get(), theConvTP_[tp_1]));
1541 myAss.insert(std::make_pair(tr2.
get(), theConvTP_[tp_2]));
1548 isAssociated =
true;
1553 h_SimRecConvTwoMTracks_[0]->Fill(mcEta_);
1554 h_SimRecConvTwoMTracks_[1]->Fill(mcPhi_);
1555 h_SimRecConvTwoMTracks_[2]->Fill(mcConvR_);
1556 h_SimRecConvTwoMTracks_[3]->Fill(mcConvZ_);
1557 h_SimRecConvTwoMTracks_[4]->Fill((*mcPho).fourMomentum().et());
1564 h_SimConvTwoMTracks_[0]->Fill(mcEta_);
1565 h_SimConvTwoMTracks_[1]->Fill(mcPhi_);
1566 h_SimConvTwoMTracks_[2]->Fill(mcConvR_);
1567 h_SimConvTwoMTracks_[3]->Fill(mcConvZ_);
1568 h_SimConvTwoMTracks_[4]->Fill((*mcPho).fourMomentum().et());
1571 h_SimConvTwoMTracksAndVtxPGT0_[0]->Fill(mcEta_);
1572 h_SimConvTwoMTracksAndVtxPGT0_[1]->Fill(mcPhi_);
1573 h_SimConvTwoMTracksAndVtxPGT0_[2]->Fill(mcConvR_);
1574 h_SimConvTwoMTracksAndVtxPGT0_[3]->Fill(mcConvZ_);
1575 h_SimConvTwoMTracksAndVtxPGT0_[4]->Fill((*mcPho).fourMomentum().et());
1577 if (chi2Prob > 0.0005) {
1578 h_SimConvTwoMTracksAndVtxPGT0005_[0]->Fill(mcEta_);
1579 h_SimConvTwoMTracksAndVtxPGT0005_[1]->Fill(mcPhi_);
1580 h_SimConvTwoMTracksAndVtxPGT0005_[2]->Fill(mcConvR_);
1581 h_SimConvTwoMTracksAndVtxPGT0005_[3]->Fill(mcConvZ_);
1582 h_SimConvTwoMTracksAndVtxPGT0005_[4]->Fill((*mcPho).fourMomentum().et());
1590 for (reco::ConversionCollection::const_iterator
conv = convHandle->begin();
conv != convHandle->end(); ++
conv) {
1603 std::vector<edm::RefToBase<reco::Track> >
tracks = aConv.
tracks();
1607 if (
tracks.size() != 2 || !(
vtx.isValid()))
1621 double lxy = (themom.x() * dbsx + themom.y() * dbsy) / themom.rho();
1626 bool phoIsInBarrel =
false;
1627 bool phoIsInEndcap =
false;
1634 if (ecalalgotracks_ &&
1644 float dPhiTracksAtVtx;
1648 if (p1AtVtx.perp2() > p2AtVtx.perp2())
1649 dPhiTracksAtVtx = p1AtVtx.phi() - p2AtVtx.phi();
1651 dPhiTracksAtVtx = p2AtVtx.phi() - p1AtVtx.phi();
1655 if (fabs(refittedMom.eta()) < 1.479) {
1656 phoIsInBarrel =
true;
1658 phoIsInEndcap =
true;
1664 double Mindeltaeta = 999999;
1665 double Mindeltaphi = 999999;
1666 bool matchConvSC =
false;
1667 reco::PhotonCollection::const_iterator iMatchingSC;
1673 double deltaeta =
abs(aPho.
superCluster()->position().eta() - ConvEta);
1674 if (
abs(deltaeta) <
abs(Mindeltaeta) &&
abs(deltaphi) <
abs(Mindeltaphi)) {
1675 Mindeltaphi =
abs(deltaphi);
1676 Mindeltaeta =
abs(deltaeta);
1680 if (
abs(Mindeltaeta) < 0.1 &&
abs(Mindeltaphi) < 0.1) {
1688 uint maxNHitsBeforeVtx =
1690 uint sumNHitsBeforeVtx =
1695 float maxDlClosestHitToVtxSig =
1701 int ilead = 0, itrail = 1;
1702 if (tk2->
pt() > tk1->
pt()) {
1715 h_convEta_[
match][0]->Fill(refittedMom.eta());
1716 h_convEta2_[
match][0]->Fill(refittedMom.eta());
1718 h_convPhi_[
match][0]->Fill(refittedMom.phi());
1723 h_convPt_[
match][0]->Fill(
sqrt(refittedMom.perp2()));
1724 h_invMass_[
match][0]->Fill(invM);
1725 h_vtxChi2Prob_[
match][0]->Fill(chi2Prob);
1726 h_lxybs_[
match][0]->Fill(lxy);
1727 h_maxNHitsBeforeVtx_[
match][0]->Fill(maxNHitsBeforeVtx);
1728 h_leadNHitsBeforeVtx_[
match][0]->Fill(leadNHitsBeforeVtx);
1729 h_trailNHitsBeforeVtx_[
match][0]->Fill(trailNHitsBeforeVtx);
1730 h_sumNHitsBeforeVtx_[
match][0]->Fill(sumNHitsBeforeVtx);
1731 h_deltaExpectedHitsInner_[
match][0]->Fill(deltaExpectedHitsInner);
1732 h_leadExpectedHitsInner_[
match][0]->Fill(leadExpectedHitsInner);
1733 h_maxDlClosestHitToVtx_[
match][0]->Fill(maxDlClosestHitToVtx);
1734 h_maxDlClosestHitToVtxSig_[
match][0]->Fill(maxDlClosestHitToVtxSig);
1738 h_convEtaMatchSC_[
match][0]->Fill(refittedMom.eta());
1739 h_EoverPTracks_[
match][0]->Fill(iMatchingSC->superCluster()->energy() /
sqrt(refittedMom.mag2()));
1740 h_convSCdPhi_[
match][0]->Fill(iMatchingSC->superCluster()->position().phi() - refittedMom.phi());
1742 h_convSCdEta_[
match][0]->Fill(iMatchingSC->superCluster()->position().eta() - ConvEta);
1746 h_DPhiTracksAtVtx_[
match][0]->Fill(dPhiTracksAtVtx);
1747 h2_DPhiTracksAtVtxVsEta_->Fill(mcEta_, dPhiTracksAtVtx);
1748 h2_DPhiTracksAtVtxVsR_->Fill(mcConvR_, dPhiTracksAtVtx);
1749 p_DPhiTracksAtVtxVsEta_->Fill(mcEta_, dPhiTracksAtVtx);
1750 p_DPhiTracksAtVtxVsR_->Fill(mcConvR_, dPhiTracksAtVtx);
1758 if (phoIsInBarrel) {
1759 h_invMass_[
match][1]->Fill(invM);
1760 h_vtxChi2Prob_[
match][1]->Fill(chi2Prob);
1762 h_DPhiTracksAtVtx_[
match][1]->Fill(dPhiTracksAtVtx);
1764 h_lxybs_[
match][1]->Fill(lxy);
1765 h_maxNHitsBeforeVtx_[
match][1]->Fill(maxNHitsBeforeVtx);
1766 h_leadNHitsBeforeVtx_[
match][1]->Fill(leadNHitsBeforeVtx);
1767 h_trailNHitsBeforeVtx_[
match][1]->Fill(trailNHitsBeforeVtx);
1768 h_sumNHitsBeforeVtx_[
match][1]->Fill(sumNHitsBeforeVtx);
1769 h_deltaExpectedHitsInner_[
match][1]->Fill(deltaExpectedHitsInner);
1770 h_leadExpectedHitsInner_[
match][1]->Fill(leadExpectedHitsInner);
1771 h_maxDlClosestHitToVtx_[
match][1]->Fill(maxDlClosestHitToVtx);
1772 h_maxDlClosestHitToVtxSig_[
match][1]->Fill(maxDlClosestHitToVtxSig);
1784 h_EoverPTracks_[
match][1]->Fill(iMatchingSC->superCluster()->energy() /
sqrt(refittedMom.mag2()));
1785 h_convSCdPhi_[
match][1]->Fill(iMatchingSC->superCluster()->position().phi() - refittedMom.phi());
1787 h_convSCdEta_[
match][1]->Fill(iMatchingSC->superCluster()->position().eta() - ConvEta);
1791 if (phoIsInEndcap) {
1792 h_invMass_[
match][2]->Fill(invM);
1793 h_vtxChi2Prob_[
match][2]->Fill(chi2Prob);
1795 h_DPhiTracksAtVtx_[
match][2]->Fill(dPhiTracksAtVtx);
1797 h_lxybs_[
match][2]->Fill(lxy);
1798 h_maxNHitsBeforeVtx_[
match][2]->Fill(maxNHitsBeforeVtx);
1799 h_leadNHitsBeforeVtx_[
match][2]->Fill(leadNHitsBeforeVtx);
1800 h_trailNHitsBeforeVtx_[
match][2]->Fill(trailNHitsBeforeVtx);
1801 h_sumNHitsBeforeVtx_[
match][2]->Fill(sumNHitsBeforeVtx);
1802 h_deltaExpectedHitsInner_[
match][2]->Fill(deltaExpectedHitsInner);
1803 h_leadExpectedHitsInner_[
match][2]->Fill(leadExpectedHitsInner);
1804 h_maxDlClosestHitToVtx_[
match][2]->Fill(maxDlClosestHitToVtx);
1805 h_maxDlClosestHitToVtxSig_[
match][2]->Fill(maxDlClosestHitToVtxSig);
1808 h_EoverPTracks_[
match][2]->Fill(iMatchingSC->superCluster()->energy() /
sqrt(refittedMom.mag2()));
1809 h_convSCdPhi_[
match][2]->Fill(iMatchingSC->superCluster()->position().phi() - refittedMom.phi());
1811 h_convSCdEta_[
match][2]->Fill(iMatchingSC->superCluster()->position().eta() - ConvEta);
1822 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
1850 bool associated =
false;
1851 float mcConvPt_ = -99999999.0;
1854 for (std::vector<PhotonMCTruth>::const_iterator mcPho = mcPhotons.begin(); mcPho != mcPhotons.end(); mcPho++) {
1855 mcConvPt_ = (*mcPho).fourMomentum().et();
1856 float mcPhi = (*mcPho).fourMomentum().phi();
1857 simPV_Z = (*mcPho).primaryVertex().z();
1858 mcPhi_ = phiNormalization(mcPhi);
1859 mcEta_ = (*mcPho).fourMomentum().pseudoRapidity();
1860 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z());
1861 mcConvR_ = (*mcPho).vertex().perp();
1862 mcConvX_ = (*mcPho).vertex().x();
1863 mcConvY_ = (*mcPho).vertex().y();
1864 mcConvZ_ = (*mcPho).vertex().z();
1865 mcConvEta_ = (*mcPho).vertex().eta();
1866 mcConvPhi_ = (*mcPho).vertex().phi();
1867 if (fabs(mcEta_) > END_HI)
1878 if ((*mcPho).isAConversion() != 1)
1880 if (!((fabs(mcEta_) <= BARL && mcConvR_ < 85) ||
1881 (fabs(mcEta_) > BARL && fabs(mcEta_) <= END_HI && fabs((*mcPho).vertex().z()) < 210)))
1886 if (fabs(
tp->vx() - (*mcPho).vertex().x()) < 0.0001 && fabs(
tp->vy() - (*mcPho).vertex().y()) < 0.0001 &&
1887 fabs(
tp->vz() - (*mcPho).vertex().z()) < 0.0001) {
1888 theConvTP_.push_back(
tp);
1892 if (theConvTP_.size() < 2)
1899 auto itP1 =
p1.find(tk1);
1900 auto itP2 =
p2.find(tk2);
1901 bool good = (itP1 !=
p1.end()) and (not itP1->val.empty()) and (itP2 !=
p2.end()) and (not itP2->val.empty());
1903 itP1 =
p1.find(tk2);
1904 itP2 =
p2.find(tk1);
1905 good = (itP1 !=
p1.end()) and (not itP1->val.empty()) and (itP2 !=
p2.end()) and (not itP2->val.empty());
1909 std::vector<std::pair<TrackingParticleRef, double> >
const& tp1 = itP1->val;
1910 std::vector<std::pair<TrackingParticleRef, double> >
const& tp2 = itP2->val;
1913 if (
abs(tpr1->pdgId()) == 11 &&
abs(tpr2->pdgId()) == 11 && tpr1->pdgId() * tpr2->pdgId() < 0) {
1914 if ((tpr1->parentVertex()->sourceTracks_end() - tpr1->parentVertex()->sourceTracks_begin() == 1) &&
1915 (tpr2->parentVertex()->sourceTracks_end() - tpr2->parentVertex()->sourceTracks_begin() == 1)) {
1916 if (tpr1->parentVertex().
key() == tpr2->parentVertex().
key() &&
1917 ((*tpr1->parentVertex()->sourceTracks_begin())->
pdgId() == 22)) {
1918 mcConvR_ =
sqrt(tpr1->parentVertex()->position().Perp2());
1919 mcConvZ_ = tpr1->parentVertex()->position().z();
1920 mcConvX_ = tpr1->parentVertex()->position().x();
1921 mcConvY_ = tpr1->parentVertex()->position().y();
1922 mcConvEta_ = tpr1->parentVertex()->position().eta();
1923 mcConvPhi_ = tpr1->parentVertex()->position().phi();
1924 mcConvPt_ =
sqrt((*tpr1->parentVertex()->sourceTracks_begin())->momentum().Perp2());
1939 theConvTP_ = tpForFakeRate;
1943 for (std::vector<PhotonMCTruth>::const_iterator mcPho = mcPhotons.begin(); mcPho != mcPhotons.end(); mcPho++) {
1944 mcConvPt_ = (*mcPho).fourMomentum().et();
1945 float mcPhi = (*mcPho).fourMomentum().phi();
1946 simPV_Z = (*mcPho).primaryVertex().z();
1947 mcPhi_ = phiNormalization(mcPhi);
1948 mcEta_ = (*mcPho).fourMomentum().pseudoRapidity();
1949 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z());
1950 mcConvR_ = (*mcPho).vertex().perp();
1951 mcConvX_ = (*mcPho).vertex().x();
1952 mcConvY_ = (*mcPho).vertex().y();
1953 mcConvZ_ = (*mcPho).vertex().z();
1954 mcConvEta_ = (*mcPho).vertex().eta();
1955 mcConvPhi_ = (*mcPho).vertex().phi();
1956 if (fabs(mcEta_) > END_HI)
1967 if ((*mcPho).isAConversion() != 1)
1969 if (!((fabs(mcEta_) <= BARL && mcConvR_ < 85) ||
1970 (fabs(mcEta_) > BARL && fabs(mcEta_) <= END_HI && fabs((*mcPho).vertex().z()) < 210)))
1975 if (fabs(
tp->vx() - (*mcPho).vertex().x()) < 0.0001 && fabs(
tp->vy() - (*mcPho).vertex().y()) < 0.0001 &&
1976 fabs(
tp->vz() - (*mcPho).vertex().z()) < 0.0001) {
1977 theConvTP_.push_back(
tp);
1981 if (theConvTP_.size() < 2)
1988 if ((!p1incl.
empty() && !p2incl.
empty()) && (!
p1.empty() || !
p2.empty())) {
1990 std::vector<std::pair<TrackingParticleRef, double> > tp1 = p1incl[tk1];
1991 std::vector<std::pair<TrackingParticleRef, double> > tp2 = p2incl[tk2];
1992 if (!(!tp1.empty() && !tp2.empty())) {
1996 if (!tp1.empty() && !tp2.empty()) {
1999 if (
abs(tpr1->pdgId()) == 11 &&
abs(tpr2->pdgId()) == 11 && tpr1->pdgId() * tpr2->pdgId() < 0) {
2000 if (((tpr1->parentVertex()->sourceTracks_end() - tpr1->parentVertex()->sourceTracks_begin() >= 1) &&
2001 (*tpr1->parentVertex()->sourceTracks_begin())->
pdgId() == 22) &&
2002 ((tpr2->parentVertex()->sourceTracks_end() - tpr2->parentVertex()->sourceTracks_begin() >= 1) &&
2003 (*tpr2->parentVertex()->sourceTracks_begin())->
pdgId() == 22)) {
2036 h_match_->Fill(
float(
match));
2040 h_convEta_[
match][0]->Fill(refittedMom.eta());
2041 h_convEta_[
match][1]->Fill(refittedMom.eta());
2043 h_convEtaMatchSC_[
match][0]->Fill(refittedMom.eta());
2044 h_convPhi_[
match][0]->Fill(refittedMom.phi());
2047 h_convPt_[
match][0]->Fill(
sqrt(refittedMom.perp2()));
2048 h_invMass_[
match][0]->Fill(invM);
2049 h_vtxChi2Prob_[
match][0]->Fill(chi2Prob);
2050 h_DPhiTracksAtVtx_[
match][0]->Fill(dPhiTracksAtVtx);
2053 h_lxybs_[
match][0]->Fill(lxy);
2054 h_maxNHitsBeforeVtx_[
match][0]->Fill(maxNHitsBeforeVtx);
2055 h_leadNHitsBeforeVtx_[
match][0]->Fill(leadNHitsBeforeVtx);
2056 h_trailNHitsBeforeVtx_[
match][0]->Fill(trailNHitsBeforeVtx);
2057 h_sumNHitsBeforeVtx_[
match][0]->Fill(sumNHitsBeforeVtx);
2058 h_deltaExpectedHitsInner_[
match][0]->Fill(deltaExpectedHitsInner);
2059 h_leadExpectedHitsInner_[
match][0]->Fill(leadExpectedHitsInner);
2060 h_maxDlClosestHitToVtx_[
match][0]->Fill(maxDlClosestHitToVtx);
2061 h_maxDlClosestHitToVtxSig_[
match][0]->Fill(maxDlClosestHitToVtxSig);
2065 h_EoverPTracks_[
match][0]->Fill(iMatchingSC->superCluster()->energy() /
sqrt(refittedMom.mag2()));
2066 h_convSCdPhi_[
match][0]->Fill(iMatchingSC->superCluster()->position().phi() - refittedMom.phi());
2068 h_convSCdEta_[
match][0]->Fill(iMatchingSC->superCluster()->position().eta() - ConvEta);
2071 h2_photonPtRecVsPtSim_->Fill(mcConvPt_,
sqrt(refittedMom.perp2()));
2072 h_convPtRes_[0]->Fill(
sqrt(refittedMom.perp2()) / mcConvPt_);
2075 if (phoIsInBarrel) {
2076 h_invMass_[
match][1]->Fill(invM);
2077 h_vtxChi2Prob_[
match][1]->Fill(chi2Prob);
2078 h_DPhiTracksAtVtx_[
match][1]->Fill(dPhiTracksAtVtx);
2081 h_lxybs_[
match][1]->Fill(lxy);
2082 h_maxNHitsBeforeVtx_[
match][1]->Fill(maxNHitsBeforeVtx);
2083 h_leadNHitsBeforeVtx_[
match][1]->Fill(leadNHitsBeforeVtx);
2084 h_trailNHitsBeforeVtx_[
match][1]->Fill(trailNHitsBeforeVtx);
2085 h_sumNHitsBeforeVtx_[
match][1]->Fill(sumNHitsBeforeVtx);
2086 h_deltaExpectedHitsInner_[
match][1]->Fill(deltaExpectedHitsInner);
2087 h_leadExpectedHitsInner_[
match][1]->Fill(leadExpectedHitsInner);
2088 h_maxDlClosestHitToVtx_[
match][1]->Fill(maxDlClosestHitToVtx);
2089 h_maxDlClosestHitToVtxSig_[
match][1]->Fill(maxDlClosestHitToVtxSig);
2093 h_EoverPTracks_[
match][1]->Fill(iMatchingSC->superCluster()->energy() /
sqrt(refittedMom.mag2()));
2094 h_convSCdPhi_[
match][1]->Fill(iMatchingSC->superCluster()->position().phi() - refittedMom.phi());
2096 h_convSCdEta_[
match][1]->Fill(iMatchingSC->superCluster()->position().eta() - ConvEta);
2099 h_convPtRes_[1]->Fill(
sqrt(refittedMom.perp2()) / mcConvPt_);
2102 if (phoIsInEndcap) {
2103 h_invMass_[
match][2]->Fill(invM);
2104 h_vtxChi2Prob_[
match][2]->Fill(chi2Prob);
2105 h_DPhiTracksAtVtx_[
match][2]->Fill(dPhiTracksAtVtx);
2108 h_lxybs_[
match][2]->Fill(lxy);
2109 h_maxNHitsBeforeVtx_[
match][2]->Fill(maxNHitsBeforeVtx);
2110 h_leadNHitsBeforeVtx_[
match][2]->Fill(leadNHitsBeforeVtx);
2111 h_trailNHitsBeforeVtx_[
match][2]->Fill(trailNHitsBeforeVtx);
2112 h_sumNHitsBeforeVtx_[
match][2]->Fill(sumNHitsBeforeVtx);
2113 h_deltaExpectedHitsInner_[
match][2]->Fill(deltaExpectedHitsInner);
2114 h_leadExpectedHitsInner_[
match][2]->Fill(leadExpectedHitsInner);
2115 h_maxDlClosestHitToVtx_[
match][2]->Fill(maxDlClosestHitToVtx);
2116 h_maxDlClosestHitToVtxSig_[
match][2]->Fill(maxDlClosestHitToVtxSig);
2120 h_EoverPTracks_[
match][2]->Fill(iMatchingSC->superCluster()->energy() /
sqrt(refittedMom.mag2()));
2121 h_convSCdPhi_[
match][2]->Fill(iMatchingSC->superCluster()->position().phi() - refittedMom.phi());
2123 h_convSCdEta_[
match][2]->Fill(iMatchingSC->superCluster()->position().eta() - ConvEta);
2126 h_convPtRes_[2]->Fill(
sqrt(refittedMom.perp2()) / mcConvPt_);
2147 p2_convVtxdRVsRZ_->Fill(mcConvZ_, mcConvR_,
dR);
2148 p2_convVtxdZVsRZ_->Fill(mcConvZ_, mcConvR_, dZ);
2157 if (phoIsInBarrel) {
2163 if (phoIsInEndcap) {
2172 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
2175 itAss = myAss.find(tfrb.get());
2202 if (itAss == myAss.end())
2206 float simPt =
sqrt(((*itAss).second)->momentum().perp2());
2208 float ptres =
recPt - simPt;
2211 h2_PtRecVsPtSim_[0]->Fill(simPt,
recPt);
2212 h_TkPtPull_[0]->Fill(ptres /
pterror);
2213 h2_TkPtPull_[0]->Fill(mcEta_, ptres /
pterror);
2215 if (phoIsInBarrel) {
2216 h_TkPtPull_[1]->Fill(ptres /
pterror);
2217 h2_PtRecVsPtSim_[1]->Fill(simPt,
recPt);
2219 if (phoIsInEndcap) {
2220 h_TkPtPull_[2]->Fill(ptres /
pterror);
2221 h2_PtRecVsPtSim_[2]->Fill(simPt,
recPt);
2227 h_nConv_[0][0]->Fill(
float(nRecConv_));
2228 h_nConv_[1][0]->Fill(
float(nRecConvAss_));
2233 if (!isRunCentrally_) {
2237 edm::LogInfo(
"TkConvValidator") <<
"Analyzed " << nEvt_ <<
"\n";
2251 sqrt(
vtx.position().perp2()) + 0.001
f,
2252 -fabs(
vtx.position().z()),
2253 fabs(
vtx.position().z()));
2265 stateAtVtx = propag.
propagate(myTSOS, *theBarrel_);
2267 stateAtVtx = propag.
propagate(myTSOS, *theDisk_);
2280 const float PI = 3.1415927;
2296 const float PI = 3.1415927;
2299 const float R_ECAL = 136.5;
2306 float ZEcal =
R_ECAL * sinh(EtaParticle) + Zvertex;
2316 if (EtaParticle < 0.0)
2318 float Zlen = Zend - Zvertex;
2319 float RR = Zlen / sinh(EtaParticle);
2320 Theta = atan(RR / Zend);