36 #include "CLHEP/Units/GlobalPhysicalConstants.h" 113 photonCollectionPr_Token_ = consumes<reco::PhotonCollection> (
119 conversionCollectionPr_Token_ = consumes<reco::ConversionCollection> (
121 conversionCollection_));
125 minPhoEtCut_ = pset.
getParameter<
double>(
"minPhoEtCut");
126 generalTracksOnly_ = pset.
getParameter<
bool>(
"generalTracksOnly");
127 arbitratedMerged_ = pset.
getParameter<
bool>(
"arbitratedMerged");
128 arbitratedEcalSeeded_ = pset.
getParameter<
bool>(
"arbitratedEcalSeeded");
129 ecalalgotracks_ = pset.
getParameter<
bool>(
"ecalalgotracks");
132 maxHitsBeforeVtx_ = pset.
getParameter<uint>(
"maxHitsBeforeVtx");
134 isRunCentrally_= pset.
getParameter<
bool>(
"isRunCentrally");
136 offline_pvToken_ = consumes<reco::VertexCollection>(
139 beamspotToken_ = consumes<reco::BeamSpot>(
145 tpSelForEff_Token_ = consumes<TrackingParticleRefVector> (
147 tpSelForFake_Token_ = consumes<TrackingParticleRefVector> (
153 trackAssociator_Token_ = consumes<reco::TrackToTrackingParticleAssociator>(
edm::InputTag(
"trackAssociatorByHitsForConversionValidation"));
169 nRecConvAssWithEcal_=0;
177 double etMin = parameters_.getParameter<
double>(
"etMin");
178 double etMax = parameters_.getParameter<
double>(
"etMax");
179 int etBin = parameters_.getParameter<
int>(
"etBin");
182 double resMin = parameters_.getParameter<
double>(
"resMin");
183 double resMax = parameters_.getParameter<
double>(
"resMax");
184 int resBin = parameters_.getParameter<
int>(
"resBin");
186 double etaMin = parameters_.getParameter<
double>(
"etaMin");
187 double etaMax = parameters_.getParameter<
double>(
"etaMax");
188 int etaBin = parameters_.getParameter<
int>(
"etaBin");
189 int etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
192 double phiMin = parameters_.getParameter<
double>(
"phiMin");
193 double phiMax = parameters_.getParameter<
double>(
"phiMax");
194 int phiBin = parameters_.getParameter<
int>(
"phiBin");
197 double rMin = parameters_.getParameter<
double>(
"rMin");
198 double rMax = parameters_.getParameter<
double>(
"rMax");
199 int rBin = parameters_.getParameter<
int>(
"rBin");
201 double zMin = parameters_.getParameter<
double>(
"zMin");
202 double zMax = parameters_.getParameter<
double>(
"zMax");
203 int zBin = parameters_.getParameter<
int>(
"zBin");
205 double dPhiTracksMin = parameters_.getParameter<
double>(
"dPhiTracksMin");
206 double dPhiTracksMax = parameters_.getParameter<
double>(
"dPhiTracksMax");
207 int dPhiTracksBin = parameters_.getParameter<
int>(
"dPhiTracksBin");
209 double eoverpMin = parameters_.getParameter<
double>(
"eoverpMin");
210 double eoverpMax = parameters_.getParameter<
double>(
"eoverpMax");
211 int eoverpBin = parameters_.getParameter<
int>(
"eoverpBin");
218 double dCotTracksMin = parameters_.getParameter<
double>(
"dCotTracksMin");
219 double dCotTracksMax = parameters_.getParameter<
double>(
"dCotTracksMax");
220 int dCotTracksBin = parameters_.getParameter<
int>(
"dCotTracksBin");
223 double chi2Min = parameters_.getParameter<
double>(
"chi2Min");
224 double chi2Max = parameters_.getParameter<
double>(
"chi2Max");
227 double rMinForXray = parameters_.getParameter<
double>(
"rMinForXray");
228 double rMaxForXray = parameters_.getParameter<
double>(
"rMaxForXray");
229 int rBinForXray = parameters_.getParameter<
int>(
"rBinForXray");
230 double zMinForXray = parameters_.getParameter<
double>(
"zMinForXray");
231 double zMaxForXray = parameters_.getParameter<
double>(
"zMaxForXray");
232 int zBinForXray = parameters_.getParameter<
int>(
"zBinForXray");
233 int zBin2ForXray = parameters_.getParameter<
int>(
"zBin2ForXray");
257 h_nSimConv_[0] = iBooker.
book1D(histname,
"# of Sim conversions per event ",20,-0.5,19.5);
259 histname =
"h_AllSimConvEta";
260 h_AllSimConv_[0] = iBooker.
book1D(histname,
" All conversions: simulated #eta",etaBin2,etaMin,etaMax);
261 histname =
"h_AllSimConvPhi";
262 h_AllSimConv_[1] = iBooker.
book1D(histname,
" All conversions: simulated #phi",phiBin,phiMin,phiMax);
263 histname =
"h_AllSimConvR";
264 h_AllSimConv_[2] = iBooker.
book1D(histname,
" All conversions: simulated R",rBin,rMin,rMax);
265 histname =
"h_AllSimConvZ";
266 h_AllSimConv_[3] = iBooker.
book1D(histname,
" All conversions: simulated Z",zBin,zMin,zMax);
267 histname =
"h_AllSimConvEt";
268 h_AllSimConv_[4] = iBooker.
book1D(histname,
" All conversions: simulated Et",etBin,etMin,etMax);
270 histname =
"nOfVisSimConversions";
271 h_nSimConv_[1] = iBooker.
book1D(histname,
"# of Sim conversions per event ",20,-0.5,19.5);
272 histname =
"h_VisSimConvEta";
273 h_VisSimConv_[0] = iBooker.
book1D(histname,
" All vis conversions: simulated #eta",etaBin2,etaMin, etaMax);
274 histname =
"h_VisSimConvPhi";
275 h_VisSimConv_[1] = iBooker.
book1D(histname,
" All vis conversions: simulated #phi",phiBin,phiMin, phiMax);
276 histname =
"h_VisSimConvR";
277 h_VisSimConv_[2] = iBooker.
book1D(histname,
" All vis conversions: simulated R",rBin,rMin,rMax);
278 histname =
"h_VisSimConvZ";
279 h_VisSimConv_[3] = iBooker.
book1D(histname,
" All vis conversions: simulated Z",zBin,zMin, zMax);
280 histname =
"h_VisSimConvEt";
281 h_VisSimConv_[4] = iBooker.
book1D(histname,
" All vis conversions: simulated Et",etBin,etMin, etMax);
284 histname =
"h_SimConvTwoMTracksEta";
285 h_SimConvTwoMTracks_[0] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #eta",etaBin2,etaMin, etaMax);
286 histname =
"h_SimConvTwoMTracksPhi";
287 h_SimConvTwoMTracks_[1] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #phi",phiBin,phiMin, phiMax);
288 histname =
"h_SimConvTwoMTracksR";
289 h_SimConvTwoMTracks_[2] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated R",rBin,rMin, rMax);
290 histname =
"h_SimConvTwoMTracksZ";
291 h_SimConvTwoMTracks_[3] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Z",zBin,zMin, zMax);
292 histname =
"h_SimConvTwoMTracksEt";
293 h_SimConvTwoMTracks_[4] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Et",etBin,etMin, etMax);
295 histname =
"h_SimConvTwoTracksEta";
296 h_SimConvTwoTracks_[0] = iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated #eta",etaBin2,etaMin, etaMax);
297 histname =
"h_SimConvTwoTracksPhi";
298 h_SimConvTwoTracks_[1] = iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated #phi",phiBin,phiMin, phiMax);
299 histname =
"h_SimConvTwoTracksR";
300 h_SimConvTwoTracks_[2] = iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated R",rBin,rMin, rMax);
301 histname =
"h_SimConvTwoTracksZ";
302 h_SimConvTwoTracks_[3] = iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Z",zBin,zMin, zMax);
303 histname =
"h_SimConvTwoTracksEt";
304 h_SimConvTwoTracks_[4] = iBooker.
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Et",etBin,etMin, etMax);
306 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0";
307 h_SimConvTwoMTracksAndVtxPGT0_[0] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
308 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0";
309 h_SimConvTwoMTracksAndVtxPGT0_[1] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
310 histname =
"h_SimConvTwoMTracksRAndVtxPGT0";
311 h_SimConvTwoMTracksAndVtxPGT0_[2] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
312 histname =
"h_SimConvTwoMTracksZAndVtxPGT0";
313 h_SimConvTwoMTracksAndVtxPGT0_[3] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
314 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0";
315 h_SimConvTwoMTracksAndVtxPGT0_[4] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
318 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0005";
319 h_SimConvTwoMTracksAndVtxPGT0005_[0] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
320 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0005";
321 h_SimConvTwoMTracksAndVtxPGT0005_[1] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
322 histname =
"h_SimConvTwoMTracksRAndVtxPGT0005";
323 h_SimConvTwoMTracksAndVtxPGT0005_[2] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
324 histname =
"h_SimConvTwoMTracksZAndVtxPGT0005";
325 h_SimConvTwoMTracksAndVtxPGT0005_[3] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
326 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0005";
327 h_SimConvTwoMTracksAndVtxPGT0005_[4] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
329 histname =
"h_SimRecConvTwoMTracksEta";
330 h_SimRecConvTwoMTracks_[0] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #eta",etaBin2,etaMin, etaMax);
331 histname =
"h_SimRecConvTwoMTracksPhi";
332 h_SimRecConvTwoMTracks_[1] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #phi",phiBin,phiMin, phiMax);
333 histname =
"h_SimRecConvTwoMTracksR";
334 h_SimRecConvTwoMTracks_[2] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated R",rBin,rMin, rMax);
335 histname =
"h_SimRecConvTwoMTracksZ";
336 h_SimRecConvTwoMTracks_[3] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Z",zBin,zMin, zMax);
337 histname =
"h_SimRecConvTwoMTracksEt";
338 h_SimRecConvTwoMTracks_[4] = iBooker.
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Et",etBin,etMin, etMax);
342 h_SimConvEtaPix_[0] = iBooker.
book1D(
"simConvEtaPix",
" sim converted Photon Eta: Pix ",etaBin,etaMin, etaMax) ;
343 h_simTkPt_ = iBooker.
book1D(
"simTkPt",
"Sim conversion tracks pt ",etBin*3,0.,etMax);
344 h_simTkEta_ = iBooker.
book1D(
"simTkEta",
"Sim conversion tracks eta ",etaBin,etaMin,etaMax);
346 h_simConvVtxRvsZ_[0] = iBooker.
book2D(
"simConvVtxRvsZAll",
" Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
347 h_simConvVtxRvsZ_[1] = iBooker.
book2D(
"simConvVtxRvsZBarrel",
" Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
348 h_simConvVtxRvsZ_[2] = iBooker.
book2D(
"simConvVtxRvsZEndcap",
" Photon Sim conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
349 h_simConvVtxRvsZ_[3] = iBooker.
book2D(
"simConvVtxRvsZBarrel2",
" Photon Sim conversion vtx position when reco R<4cm",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
350 h_simConvVtxYvsX_ = iBooker.
book2D(
"simConvVtxYvsXTrkBarrel",
" Photon Sim conversion vtx position, (x,y) eta<1 ",100, -80., 80., 100, -80., 80.);
352 std::string convpath = dqmpath_ +
"ConversionInfo";
356 h_nConv_[0][0] = iBooker.
book1D(histname+
"All",
"Number Of Conversions per isolated candidates per events: All Ecal ",10,-0.5, 9.5);
357 h_nConv_[0][1] = iBooker.
book1D(histname+
"Barrel",
"Number Of Conversions per isolated candidates per events: Ecal Barrel ",10,-0.5, 9.5);
358 h_nConv_[0][2] = iBooker.
book1D(histname+
"Endcap",
"Number Of Conversions per isolated candidates per events: Ecal Endcap ",10,-0.5, 9.5);
359 h_nConv_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"Number Of associated Conversions per isolated candidates per events: All Ecal ",10,-0.5, 9.5);
361 h_convEta_[0][0] = iBooker.
book1D(
"convEta",
" converted Photon Eta ",etaBin,etaMin, etaMax) ;
362 h_convEtaMatchSC_[0][0] = iBooker.
book1D(
"convEtaMatchSC",
" converted Photon Eta when SC is matched ",etaBin,etaMin, etaMax) ;
363 h_convEta2_[0][0] = iBooker.
book1D(
"convEta2",
" converted Photon Eta ",etaBin2,etaMin, etaMax) ;
364 h_convPhi_[0][0] = iBooker.
book1D(
"convPhi",
" converted Photon Phi ",phiBin,phiMin,phiMax) ;
365 h_convR_[0][0] = iBooker.
book1D(
"convR",
" converted photon R",rBin,rMin, rMax);
366 h_convZ_[0][0] = iBooker.
book1D(
"convZ",
" converted photon Z",zBin,zMin, zMax);
367 h_convPt_[0][0] = iBooker.
book1D(
"convPt",
" conversions Transverse Energy: all eta ", etBin,etMin, etMax);
369 h_convEta_[1][0] = iBooker.
book1D(
"convEtaAss2",
" Matched converted Photon Eta ",etaBin2,etaMin, etaMax) ;
370 h_convEta_[1][1] = iBooker.
book1D(
"convEtaAss",
" Matched converted Photon Eta ",etaBin,etaMin, etaMax) ;
371 h_convEtaMatchSC_[1][0] = iBooker.
book1D(
"convEtaMatchSCAss",
" converted Photon Eta when SC is matched ",etaBin,etaMin, etaMax) ;
372 h_convPhi_[1][0] = iBooker.
book1D(
"convPhiAss",
" Matched converted Photon Phi ",phiBin,phiMin,phiMax) ;
373 h_convR_[1][0] = iBooker.
book1D(
"convRAss",
" Matched converted photon R",rBin,rMin, rMax);
374 h_convZ_[1][0] = iBooker.
book1D(
"convZAss",
" Matched converted photon Z",zBin,zMin, zMax);
375 h_convPt_[1][0] = iBooker.
book1D(
"convPtAss",
"Matched conversions Transverse Energy: all eta ", etBin,etMin, etMax);
377 h_convEta_[2][0] = iBooker.
book1D(
"convEtaFake2",
" Fake converted Photon Eta ",etaBin2,etaMin, etaMax) ;
378 h_convEta_[2][1] = iBooker.
book1D(
"convEtaFake",
" Fake converted Photon Eta ",etaBin,etaMin, etaMax) ;
379 h_convEtaMatchSC_[2][0] = iBooker.
book1D(
"convEtaMatchSCFake",
" converted Photon Eta when SC is matched ",etaBin,etaMin, etaMax) ;
380 h_convPhi_[2][0] = iBooker.
book1D(
"convPhiFake",
" Fake converted Photon Phi ",phiBin,phiMin,phiMax) ;
381 h_convR_[2][0] = iBooker.
book1D(
"convRFake",
" Fake converted photon R",rBin,rMin, rMax);
382 h_convZ_[2][0] = iBooker.
book1D(
"convZFake",
" Fake converted photon Z",zBin,zMin, zMax);
383 h_convPt_[2][0] = iBooker.
book1D(
"convPtFake",
"Fake conversions Transverse Energy: all eta ", etBin,etMin, etMax);
385 h_convRplot_ = iBooker.
book1D(
"convRplot",
" converted photon R",600, 0.,120.);
386 h_convZplot_ = iBooker.
book1D(
"convZplot",
" converted photon Z",320,-160.,160.);
388 histname =
"convSCdPhi";
389 h_convSCdPhi_[0][0] = iBooker.
book1D(histname+
"All",
"dPhi between SC and conversion",100, -0.1,0.1);
390 h_convSCdPhi_[0][1] = iBooker.
book1D(histname+
"Barrel",
" dPhi between SC and conversion: Barrel",100, -0.1,0.1);
391 h_convSCdPhi_[0][2] = iBooker.
book1D(histname+
"Endcap",
" dPhi between SC and conversion: Endcap",100, -0.1,0.1);
392 h_convSCdPhi_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"dPhi between SC and conversion",100, -0.1,0.1);
393 h_convSCdPhi_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
" dPhi between SC and conversion: Barrel",100, -0.1,0.1);
394 h_convSCdPhi_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
" dPhi between SC and conversion: Endcap",100, -0.1,0.1);
395 h_convSCdPhi_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"dPhi between SC and conversion",100, -0.1,0.1);
396 h_convSCdPhi_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
" dPhi between SC and conversion: Barrel",100, -0.1,0.1);
397 h_convSCdPhi_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
" dPhi between SC and conversion: Endcap",100, -0.1,0.1);
398 histname =
"convSCdEta";
399 h_convSCdEta_[0][0] = iBooker.
book1D(histname+
"All",
" dEta between SC and conversion",100, -0.1,0.1);
400 h_convSCdEta_[0][1] = iBooker.
book1D(histname+
"Barrel",
" dEta between SC and conversion: Barrel",100, -0.1,0.1);
401 h_convSCdEta_[0][2] = iBooker.
book1D(histname+
"Endcap",
" dEta between SC and conversion: Endcap",100, -0.1,0.1);
402 h_convSCdEta_[1][0] = iBooker.
book1D(histname+
"All_Ass",
" dEta between SC and conversion",100, -0.1,0.1);
403 h_convSCdEta_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
" dEta between SC and conversion: Barrel",100, -0.1,0.1);
404 h_convSCdEta_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
" dEta between SC and conversion: Endcap",100, -0.1,0.1);
405 h_convSCdEta_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
" dEta between SC and conversion",100, -0.1,0.1);
406 h_convSCdEta_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
" dEta between SC and conversion: Barrel",100, -0.1,0.1);
407 h_convSCdEta_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
" dEta between SC and conversion: Endcap",100, -0.1,0.1);
409 histname =
"convPtRes";
410 h_convPtRes_[0] = iBooker.
book1D(histname+
"All",
" Conversion Pt rec/true : All ecal ", resBin,resMin, resMax);
411 h_convPtRes_[1] = iBooker.
book1D(histname+
"Barrel",
" Conversion Pt rec/true : Barrel ",resBin,resMin, resMax);
412 h_convPtRes_[2] = iBooker.
book1D(histname+
"Endcap",
" Conversion Pt rec/true : Endcap ",resBin,resMin, resMax);
416 h_invMass_[0][0]= iBooker.
book1D(histname+
"All_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
417 h_invMass_[0][1]= iBooker.
book1D(histname+
"Barrel_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
418 h_invMass_[0][2]= iBooker.
book1D(histname+
"Endcap_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
420 h_invMass_[1][0]= iBooker.
book1D(histname+
"All_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
421 h_invMass_[1][1]= iBooker.
book1D(histname+
"Barrel_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
422 h_invMass_[1][2]= iBooker.
book1D(histname+
"Endcap_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
424 h_invMass_[2][0]= iBooker.
book1D(histname+
"All_FakeTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
425 h_invMass_[2][1]= iBooker.
book1D(histname+
"Barrel_FakeTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
426 h_invMass_[2][2]= iBooker.
book1D(histname+
"Endcap_FaleTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
430 histname=
"hDPhiTracksAtVtx";
431 h_DPhiTracksAtVtx_[0][0] =iBooker.
book1D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
432 h_DPhiTracksAtVtx_[0][1] =iBooker.
book1D(histname+
"Barrel",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
433 h_DPhiTracksAtVtx_[0][2] =iBooker.
book1D(histname+
"Endcap",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
434 h_DPhiTracksAtVtx_[1][0] =iBooker.
book1D(histname+
"All_Ass",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
435 h_DPhiTracksAtVtx_[1][1] =iBooker.
book1D(histname+
"Barrel_Ass",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
436 h_DPhiTracksAtVtx_[1][2] =iBooker.
book1D(histname+
"Endcap_Ass",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
437 h_DPhiTracksAtVtx_[2][0] =iBooker.
book1D(histname+
"All_Fakes",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
438 h_DPhiTracksAtVtx_[2][1] =iBooker.
book1D(histname+
"Barrel_Fakes",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
439 h_DPhiTracksAtVtx_[2][2] =iBooker.
book1D(histname+
"Endcap_Fakes",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
443 histname=
"hDPhiTracksAtVtxVsEta";
444 h2_DPhiTracksAtVtxVsEta_ = iBooker.
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta",etaBin2,etaMin, etaMax,100, -0.5, 0.5);
445 histname=
"pDPhiTracksAtVtxVsEta";
446 p_DPhiTracksAtVtxVsEta_ = iBooker.
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta ",etaBin2,etaMin, etaMax, 100, -0.5, 0.5,
"");
448 histname=
"hDPhiTracksAtVtxVsR";
449 h2_DPhiTracksAtVtxVsR_ = iBooker.
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R",rBin,rMin, rMax,100, -0.5, 0.5);
450 histname=
"pDPhiTracksAtVtxVsR";
451 p_DPhiTracksAtVtxVsR_ = iBooker.
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.5, 0.5,
"");
454 histname=
"hDCotTracks";
455 h_DCotTracks_[0][0]= iBooker.
book1D(histname+
"All",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
456 h_DCotTracks_[0][1]= iBooker.
book1D(histname+
"Barrel",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
457 h_DCotTracks_[0][2]= iBooker.
book1D(histname+
"Endcap",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
458 h_DCotTracks_[1][0]= iBooker.
book1D(histname+
"All_Ass",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
459 h_DCotTracks_[1][1]= iBooker.
book1D(histname+
"Barrel_Ass",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
460 h_DCotTracks_[1][2]= iBooker.
book1D(histname+
"Endcap_Ass",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
461 h_DCotTracks_[2][0]= iBooker.
book1D(histname+
"All_Fakes",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
462 h_DCotTracks_[2][1]= iBooker.
book1D(histname+
"Barrel_Fakes",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
463 h_DCotTracks_[2][2]= iBooker.
book1D(histname+
"Endcap_Fakes",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
466 histname=
"hDCotTracksVsEta";
467 h2_DCotTracksVsEta_ = iBooker.
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta",etaBin2,etaMin, etaMax,100, -0.2, 0.2);
468 histname=
"pDCotTracksVsEta";
469 p_DCotTracksVsEta_ = iBooker.
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta ",etaBin2,etaMin, etaMax, 100, -0.2, 0.2,
"");
471 histname=
"hDCotTracksVsR";
472 h2_DCotTracksVsR_ = iBooker.
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R",rBin,rMin, rMax,100, -0.2, 0.2);
473 histname=
"pDCotTracksVsR";
474 p_DCotTracksVsR_ = iBooker.
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.2, 0.2,
"");
477 histname=
"hDistMinAppTracks";
478 h_distMinAppTracks_[0][0]= iBooker.
book1D(histname+
"All",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
479 h_distMinAppTracks_[0][1]= iBooker.
book1D(histname+
"Barrel",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
480 h_distMinAppTracks_[0][2]= iBooker.
book1D(histname+
"Endcap",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
481 h_distMinAppTracks_[1][0]= iBooker.
book1D(histname+
"All_Ass",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
482 h_distMinAppTracks_[1][1]= iBooker.
book1D(histname+
"Barrel_Ass",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
483 h_distMinAppTracks_[1][2]= iBooker.
book1D(histname+
"Endcap_Ass",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
484 h_distMinAppTracks_[2][0]= iBooker.
book1D(histname+
"All_Fakes",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
485 h_distMinAppTracks_[2][1]= iBooker.
book1D(histname+
"Barrel_Fakes",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
486 h_distMinAppTracks_[2][2]= iBooker.
book1D(histname+
"Endcap_Fakes",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
489 h_convVtxRvsZ_[0] = iBooker.
book2D(
"convVtxRvsZAll",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
490 h_convVtxRvsZ_[1] = iBooker.
book2D(
"convVtxRvsZBarrel",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
491 h_convVtxRvsZ_[2] = iBooker.
book2D(
"convVtxRvsZEndcap",
" Photon Reco conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
492 h_convVtxYvsX_ = iBooker.
book2D(
"convVtxYvsXTrkBarrel",
" Photon Reco conversion vtx position, (x,y) eta<1 ", 1000, -60., 60., 1000, -60., 60.);
494 h_convVtxRvsZ_zoom_[0] = iBooker.
book2D(
"convVtxRvsZBarrelZoom1",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 40.);
495 h_convVtxRvsZ_zoom_[1] = iBooker.
book2D(
"convVtxRvsZBarrelZoom2",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 20.);
496 h_convVtxYvsX_zoom_[0] = iBooker.
book2D(
"convVtxYvsXTrkBarrelZoom1",
" Photon Reco conversion vtx position, (x,y) eta<1 ",100, -40., 40., 100, -40., 40.);
497 h_convVtxYvsX_zoom_[1] = iBooker.
book2D(
"convVtxYvsXTrkBarrelZoom2",
" Photon Reco conversion vtx position, (x,y) eta<1 ",100, -20., 20., 100, -20., 20.);
499 h_convVtxdR_ = iBooker.
book1D(
"convVtxdR",
" Photon Reco conversion vtx dR",100, -10.,10.);
500 h_convVtxdX_ = iBooker.
book1D(
"convVtxdX",
" Photon Reco conversion vtx dX",100, -10.,10.);
501 h_convVtxdY_ = iBooker.
book1D(
"convVtxdY",
" Photon Reco conversion vtx dY",100, -10.,10.);
502 h_convVtxdZ_ = iBooker.
book1D(
"convVtxdZ",
" Photon Reco conversion vtx dZ",100, -20.,20.);
504 h_convVtxdPhi_ = iBooker.
book1D(
"convVtxdPhi",
" Photon Reco conversion vtx dPhi",100, -0.01,0.01);
505 h_convVtxdEta_ = iBooker.
book1D(
"convVtxdEta",
" Photon Reco conversion vtx dEta",100, -0.5,0.5);
507 h_convVtxdR_barrel_ = iBooker.
book1D(
"convVtxdR_barrel",
" Photon Reco conversion vtx dR, |eta|<=1.2",100, -10.,10.);
508 h_convVtxdX_barrel_ = iBooker.
book1D(
"convVtxdX_barrel",
" Photon Reco conversion vtx dX, |eta|<=1.2",100, -10.,10.);
509 h_convVtxdY_barrel_ = iBooker.
book1D(
"convVtxdY_barrel",
" Photon Reco conversion vtx dY, |eta|<=1.2 ",100, -10.,10.);
510 h_convVtxdZ_barrel_ = iBooker.
book1D(
"convVtxdZ_barrel",
" Photon Reco conversion vtx dZ, |eta|<=1.2,",100, -20.,20.);
512 h_convVtxdR_endcap_ = iBooker.
book1D(
"convVtxdR_endcap",
" Photon Reco conversion vtx dR, |eta|>1.2 ",100, -10.,10.);
513 h_convVtxdX_endcap_ = iBooker.
book1D(
"convVtxdX_endcap",
" Photon Reco conversion vtx dX, |eta|>1.2",100, -10.,10.);
514 h_convVtxdY_endcap_ = iBooker.
book1D(
"convVtxdY_endcap",
" Photon Reco conversion vtx dY, |eta|>1.2",100, -10.,10.);
515 h_convVtxdZ_endcap_ = iBooker.
book1D(
"convVtxdZ_endcap",
" Photon Reco conversion vtx dZ, |eta|>1.2",100, -20.,20.);
519 h2_convVtxdRVsR_ = iBooker.
book2D(
"h2ConvVtxdRVsR",
" Conversion vtx dR vsR" ,rBin,rMin, rMax,100, -20.,20.);
520 h2_convVtxdRVsEta_ = iBooker.
book2D(
"h2ConvVtxdRVsEta",
"Conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax,100, -20.,20.);
522 p_convVtxdRVsR_ = iBooker.
bookProfile(
"pConvVtxdRVsR",
" Conversion vtx dR vsR" ,rBin,rMin, rMax ,100, -20.,20.,
"");
523 p_convVtxdRVsEta_ = iBooker.
bookProfile(
"pConvVtxdRVsEta",
"Conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax, 100, -20.,20.,
"");
524 p_convVtxdXVsX_ = iBooker.
bookProfile(
"pConvVtxdXVsX",
"Conversion vtx dX vs X" ,120,-60, 60 ,100, -20.,20.,
"");
525 p_convVtxdYVsY_ = iBooker.
bookProfile(
"pConvVtxdYVsY",
"Conversion vtx dY vs Y" ,120,-60, 60 ,100, -20.,20.,
"");
526 p_convVtxdZVsZ_ = iBooker.
bookProfile(
"pConvVtxdZVsZ",
"Conversion vtx dZ vs Z" ,zBin,zMin,zMax ,100, -20.,20.,
"");
528 p_convVtxdZVsR_ = iBooker.
bookProfile(
"pConvVtxdZVsR",
"Conversion vtx dZ vs R" ,rBin,rMin,rMax ,100, -20.,20.,
"");
529 p2_convVtxdRVsRZ_ = iBooker.
bookProfile2D(
"p2ConvVtxdRVsRZ",
"Conversion vtx dR vs RZ" ,zBin,zMin, zMax,rBin,rMin,rMax,100, 0.,20.,
"s");
530 p2_convVtxdZVsRZ_ = iBooker.
bookProfile2D(
"p2ConvVtxdZVsRZ",
"Conversion vtx dZ vs RZ" ,zBin,zMin, zMax,rBin,rMin,rMax,100, 0.,20.,
"s");
533 histname=
"EoverPtracks";
534 h_EoverPTracks_[0][0] = iBooker.
book1D(histname+
"All",
" photons conversion E/p: all Ecal ", eoverpBin, eoverpMin, eoverpMax );
535 h_EoverPTracks_[0][1] = iBooker.
book1D(histname+
"Barrel",
" photons conversion E/p: Barrel Ecal", eoverpBin, eoverpMin, eoverpMax);
536 h_EoverPTracks_[0][2] = iBooker.
book1D(histname+
"Endcap",
" photons conversion E/p: Endcap Ecal ", eoverpBin, eoverpMin, eoverpMax);
537 h_EoverPTracks_[1][0] = iBooker.
book1D(histname+
"All_Ass",
" photons conversion E/p: all Ecal ", eoverpBin, eoverpMin, eoverpMax);
538 h_EoverPTracks_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
" photons conversion E/p: Barrel Ecal", eoverpBin, eoverpMin, eoverpMax);
539 h_EoverPTracks_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
" photons conversion E/p: Endcap Ecal ", eoverpBin, eoverpMin, eoverpMax);
540 h_EoverPTracks_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
" photons conversion E/p: all Ecal ", eoverpBin, eoverpMin, eoverpMax);
541 h_EoverPTracks_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
" photons conversion E/p: Barrel Ecal", eoverpBin, eoverpMin, eoverpMax);
542 h_EoverPTracks_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
" photons conversion E/p: Endcap Ecal ", eoverpBin, eoverpMin, eoverpMax);
545 h2_convVtxRrecVsTrue_ = iBooker.
book2D(
"h2ConvVtxRrecVsTrue",
"Photon Reco conversion vtx R rec vs true" ,rBin,rMin, rMax,rBin,rMin, rMax);
547 histname=
"vtxChi2Prob";
548 h_vtxChi2Prob_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 100, 0., 1.);
549 h_vtxChi2Prob_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 100, 0., 1.);
550 h_vtxChi2Prob_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 100, 0., 1.);
551 h_vtxChi2Prob_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 100, 0., 1.);
552 h_vtxChi2Prob_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 100, 0., 1.);
553 h_vtxChi2Prob_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 100, 0., 1.);
554 h_vtxChi2Prob_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 100, 0., 1.);
555 h_vtxChi2Prob_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 100, 0., 1.);
556 h_vtxChi2Prob_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 100, 0., 1.);
559 h_zPVFromTracks_[1] = iBooker.
book1D(
"zPVFromTracks",
" Photons: PV z from conversion tracks",100, -25., 25.);
560 h_dzPVFromTracks_[1] = iBooker.
book1D(
"dzPVFromTracks",
" Photons: PV Z_rec - Z_true from conversion tracks",100, -5., 5.);
561 h2_dzPVVsR_ = iBooker.
book2D(
"h2dzPVVsR",
"Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax,100, -3.,3.);
562 p_dzPVVsR_ = iBooker.
bookProfile(
"pdzPVVsR",
"Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax, 100, -3.,3.,
"");
566 h_lxybs_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 200, -100., 100.);
567 h_lxybs_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 200, -100., 100.);
568 h_lxybs_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 200, -100., 100.);
569 h_lxybs_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 200, -100., 100.);
570 h_lxybs_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 200, -100., 100.);
571 h_lxybs_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 200, -100., 100.);
572 h_lxybs_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 200, -100., 100.);
573 h_lxybs_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 200, -100., 100.);
574 h_lxybs_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 200, -100., 100.);
576 histname=
"maxNHitsBeforeVtx";
577 h_maxNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
578 h_maxNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
579 h_maxNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
580 h_maxNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
581 h_maxNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
582 h_maxNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
583 h_maxNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
584 h_maxNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
585 h_maxNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
587 histname=
"leadNHitsBeforeVtx";
588 h_leadNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
589 h_leadNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
590 h_leadNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
591 h_leadNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
592 h_leadNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
593 h_leadNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
594 h_leadNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
595 h_leadNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
596 h_leadNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
598 histname=
"trailNHitsBeforeVtx";
599 h_trailNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
600 h_trailNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
601 h_trailNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
602 h_trailNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
603 h_trailNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
604 h_trailNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
605 h_trailNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
606 h_trailNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
607 h_trailNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
609 histname=
"sumNHitsBeforeVtx";
610 h_sumNHitsBeforeVtx_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
611 h_sumNHitsBeforeVtx_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
612 h_sumNHitsBeforeVtx_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
613 h_sumNHitsBeforeVtx_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
614 h_sumNHitsBeforeVtx_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
615 h_sumNHitsBeforeVtx_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
616 h_sumNHitsBeforeVtx_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
617 h_sumNHitsBeforeVtx_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
618 h_sumNHitsBeforeVtx_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
620 histname=
"maxDlClosestHitToVtx";
621 h_maxDlClosestHitToVtx_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 100, -10., 10.);
622 h_maxDlClosestHitToVtx_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 100, -10., 10.);
623 h_maxDlClosestHitToVtx_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 100, -10., 10.);
624 h_maxDlClosestHitToVtx_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 100, -10., 10.);
625 h_maxDlClosestHitToVtx_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 100, -10., 10.);
626 h_maxDlClosestHitToVtx_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 100, -10., 10.);
627 h_maxDlClosestHitToVtx_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 100, -10., 10.);
628 h_maxDlClosestHitToVtx_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 100, -10., 10.);
629 h_maxDlClosestHitToVtx_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 100, -10., 10.);
631 histname=
"maxDlClosestHitToVtxSig";
632 h_maxDlClosestHitToVtxSig_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 100, -8., 8.);
633 h_maxDlClosestHitToVtxSig_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 100, -8., 8.);
634 h_maxDlClosestHitToVtxSig_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 100, -8., 8.);
635 h_maxDlClosestHitToVtxSig_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 100, -8., 8.);
636 h_maxDlClosestHitToVtxSig_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 100, -8., 8.);
637 h_maxDlClosestHitToVtxSig_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 100, -8., 8.);
638 h_maxDlClosestHitToVtxSig_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 100, -8., 8.);
639 h_maxDlClosestHitToVtxSig_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 100, -8., 8.);
640 h_maxDlClosestHitToVtxSig_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 100, -8., 8.);
642 histname=
"deltaExpectedHitsInner";
643 h_deltaExpectedHitsInner_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 31, -15.5, 15.5);
644 h_deltaExpectedHitsInner_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 31, -15.5, 15.5);
645 h_deltaExpectedHitsInner_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 31, -15.5, 15.5);
646 h_deltaExpectedHitsInner_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 31, -15.5, 15.5);
647 h_deltaExpectedHitsInner_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 31, -15.5, 15.5);
648 h_deltaExpectedHitsInner_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 31, -15.5, 15.5);
649 h_deltaExpectedHitsInner_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 31, -15.5, 15.5);
650 h_deltaExpectedHitsInner_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 31, -15.5, 15.5);
651 h_deltaExpectedHitsInner_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 31, -15.5, 15.5);
653 histname=
"leadExpectedHitsInner";
654 h_leadExpectedHitsInner_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
655 h_leadExpectedHitsInner_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
656 h_leadExpectedHitsInner_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
657 h_leadExpectedHitsInner_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
658 h_leadExpectedHitsInner_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
659 h_leadExpectedHitsInner_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
660 h_leadExpectedHitsInner_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
661 h_leadExpectedHitsInner_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
662 h_leadExpectedHitsInner_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
664 histname=
"nSharedHits";
665 h_nSharedHits_[0][0] = iBooker.
book1D(histname+
"All",
"vertex #chi^{2} all", 16, -0.5, 15.5);
666 h_nSharedHits_[0][1] = iBooker.
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
667 h_nSharedHits_[0][2] = iBooker.
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
668 h_nSharedHits_[1][0] = iBooker.
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 16, -0.5, 15.5);
669 h_nSharedHits_[1][1] = iBooker.
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
670 h_nSharedHits_[1][2] = iBooker.
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
671 h_nSharedHits_[2][0] = iBooker.
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 16, -0.5, 15.5);
672 h_nSharedHits_[2][1] = iBooker.
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 16, -0.5, 15.5);
673 h_nSharedHits_[2][2] = iBooker.
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 16, -0.5, 15.5);
677 nHits_[0] = iBooker.
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits all tracks",etaBin,etaMin, etaMax,30,0., 30.);
678 nHits_[1] = iBooker.
book2D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits all tracks ass",etaBin,etaMin, etaMax,30,0., 30.);
679 nHits_[2] = iBooker.
book2D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits all tracks fakes",etaBin,etaMin, etaMax,30,0., 30.);
682 histname=
"nHitsVsEta";
683 nHitsVsEta_[0] = iBooker.
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
684 nHitsVsEta_[1] = iBooker.
book2D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
685 nHitsVsEta_[2] = iBooker.
book2D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
686 histname=
"h_nHitsVsEta";
687 p_nHitsVsEta_[0] = iBooker.
bookProfile(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,
"");
688 p_nHitsVsEta_[1] = iBooker.
bookProfile(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,
"");
689 p_nHitsVsEta_[2] = iBooker.
bookProfile(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,
"");
693 nHitsVsR_[0] = iBooker.
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
694 nHitsVsR_[1] = iBooker.
book2D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
695 nHitsVsR_[2] = iBooker.
book2D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
697 histname=
"h_nHitsVsR";
698 p_nHitsVsR_[0] = iBooker.
bookProfile(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,
"");
699 p_nHitsVsR_[1] = iBooker.
bookProfile(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,
"");
700 p_nHitsVsR_[2] = iBooker.
bookProfile(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,
"");
703 h_tkChi2_[0] = iBooker.
book1D(histname+
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
704 h_tkChi2_[1] = iBooker.
book1D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
705 h_tkChi2_[2] = iBooker.
book1D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
707 histname=
"tkChi2Large";
708 h_tkChi2Large_[0] = iBooker.
book1D(histname+
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
709 h_tkChi2Large_[1] = iBooker.
book1D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
710 h_tkChi2Large_[2] = iBooker.
book1D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
713 histname=
"h2Chi2VsEta";
714 h2_Chi2VsEta_[0]=iBooker.
book2D(histname+
"All",
" Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
715 h2_Chi2VsEta_[1]=iBooker.
book2D(histname+
"All_Ass",
" Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
716 h2_Chi2VsEta_[2]=iBooker.
book2D(histname+
"All_Fakes",
" Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
717 histname=
"pChi2VsEta";
718 p_Chi2VsEta_[0]=iBooker.
bookProfile(histname+
"All",
" Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,
"");
719 p_Chi2VsEta_[1]=iBooker.
bookProfile(histname+
"All_Ass",
" Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,
"");
720 p_Chi2VsEta_[2]=iBooker.
bookProfile(histname+
"All_Fakes",
" Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,
"");
722 histname=
"h2Chi2VsR";
723 h2_Chi2VsR_[0]=iBooker.
book2D(histname+
"All",
" Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
724 h2_Chi2VsR_[1]=iBooker.
book2D(histname+
"All_Ass",
" Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
725 h2_Chi2VsR_[2]=iBooker.
book2D(histname+
"All_Fakes",
" Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
727 p_Chi2VsR_[0]=iBooker.
bookProfile(histname+
"All",
" Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,
"");
728 p_Chi2VsR_[1]=iBooker.
bookProfile(histname+
"All_Ass",
" Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,
"");
729 p_Chi2VsR_[2]=iBooker.
bookProfile(histname+
"All_Fakes",
" Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,
"");
732 h_TkD0_[0]=iBooker.
book1D(histname+
"All",
" Reco Track D0*q: All ",200,-0.1,60);
733 h_TkD0_[1]=iBooker.
book1D(histname+
"All_Ass",
" Reco Track D0*q: Barrel ",200,-0.1,60);
734 h_TkD0_[2]=iBooker.
book1D(histname+
"All_Fakes",
" Reco Track D0*q: Endcap ",200,-0.1,60);
738 histname=
"hTkPtPull";
739 h_TkPtPull_[0]=iBooker.
book1D(histname+
"All",
" Reco Track Pt pull: All ",100, -20., 10.);
740 histname=
"hTkPtPull";
741 h_TkPtPull_[1]=iBooker.
book1D(histname+
"Barrel",
" Reco Track Pt pull: Barrel ",100, -20., 10.);
742 histname=
"hTkPtPull";
743 h_TkPtPull_[2]=iBooker.
book1D(histname+
"Endcap",
" Reco Track Pt pull: Endcap ",100, -20., 10.);
745 histname=
"h2TkPtPullEta";
746 h2_TkPtPull_[0]=iBooker.
book2D(histname+
"All",
" Reco Track Pt pull: All ",etaBin2,etaMin, etaMax,100, -20., 10.);
747 histname=
"pTkPtPullEta";
748 p_TkPtPull_[0]=iBooker.
bookProfile(histname+
"All",
" Reco Track Pt pull: All ",etaBin2,etaMin, etaMax, 100, -20., 10.,
" ");
751 histname=
"PtRecVsPtSim";
752 h2_PtRecVsPtSim_[0]=iBooker.
book2D(histname+
"All",
"Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
753 h2_PtRecVsPtSim_[1]=iBooker.
book2D(histname+
"Barrel",
"Pt Rec vs Pt sim: Barrel ", etBin,etMin,etMax,etBin,etMin, etMax);
754 h2_PtRecVsPtSim_[2]=iBooker.
book2D(histname+
"Endcap",
"Pt Rec vs Pt sim: Endcap ", etBin,etMin,etMax,etBin,etMin, etMax);
756 histname=
"photonPtRecVsPtSim";
757 h2_photonPtRecVsPtSim_=iBooker.
book2D(histname+
"All",
"Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
759 histname=
"nHitsBeforeVtx";
760 h_nHitsBeforeVtx_[0]=iBooker.
book1D(histname+
"All",
"Pt Rec vs Pt sim: All ", 16, -0.5, 15.5);
761 h_nHitsBeforeVtx_[1]=iBooker.
book1D(histname+
"Barrel",
"Pt Rec vs Pt sim: Barrel ", 16, -0.5, 15.5);
762 h_nHitsBeforeVtx_[2]=iBooker.
book1D(histname+
"Endcap",
"Pt Rec vs Pt sim: Endcap ", 16, -0.5, 15.5);
764 histname=
"dlClosestHitToVtx";
765 h_dlClosestHitToVtx_[0]=iBooker.
book1D(histname+
"All",
"Pt Rec vs Pt sim: All ", 100, -10., 10.);
766 h_dlClosestHitToVtx_[1]=iBooker.
book1D(histname+
"Barrel",
"Pt Rec vs Pt sim: Barrel ", 100, -10., 10.);
767 h_dlClosestHitToVtx_[2]=iBooker.
book1D(histname+
"Endcap",
"Pt Rec vs Pt sim: Endcap ", 100, -10., 10.);
769 histname=
"dlClosestHitToVtxSig";
770 h_dlClosestHitToVtxSig_[0]=iBooker.
book1D(histname+
"All",
"Pt Rec vs Pt sim: All ", 100, -8., 8.);
771 h_dlClosestHitToVtxSig_[1]=iBooker.
book1D(histname+
"Barrel",
"Pt Rec vs Pt sim: Barrel ", 100, -8., 8.);
772 h_dlClosestHitToVtxSig_[2]=iBooker.
book1D(histname+
"Endcap",
"Pt Rec vs Pt sim: Endcap ", 100, -8., 8.);
774 h_match_= iBooker.
book1D(
"h_match",
" ", 3, -0.5,2.5);
788 edm::LogInfo(
"ConvertedPhotonProducer") <<
" get magnetic field" <<
"\n";
797 delete thePhotonMCTruthFinder_;
804 thePhotonMCTruthFinder_->clear();
809 const float BARL = 1.4442;
811 const float END_HI = 2.5;
816 e.
getByToken(trackAssociator_Token_,theTrackAssociator);
820 LogInfo(
"TkConvValidator") <<
"TkConvValidator Analyzing event number: " << e.
id() <<
" Global Counter " << nEvt_ <<
"\n";
835 e.
getByToken(conversionCollectionPr_Token_, convHandle);
838 edm::LogError(
"ConversionsProducer") <<
"Error! Can't get the collection "<< std::endl;
844 e.
getByToken(photonCollectionPr_Token_, photonHandle);
847 edm::LogError(
"PhotonProducer") <<
"Error! Can't get the Photon collection "<< std::endl;
857 edm::LogError(
"TrackerOnlyConversionProducer") <<
"Error! Can't get the product primary Vertex Collection "<<
"\n";
859 vertexCollection = *(vertexHandle.
product());
862 bool valid_pvtx =
false;
863 if (!vertexCollection.empty()){
864 the_pvtx = *(vertexCollection.begin());
875 <<
"Error! Can't get the product primary Vertex Collection "<<
"\n";
897 bool useTP = parameters_.getParameter<
bool>(
"useTP");
902 e.
getByToken(tpSelForEff_Token_, TPHandleForEff);
903 e.
getByToken(tpSelForFake_Token_, TPHandleForFakeRate);
909 const std::vector<SimTrack> &theSimTracks= *SimTk;
910 const std::vector<SimVertex> &theSimVertices= *SimVtx;
914 std::vector<PhotonMCTruth> mcPhotons=thePhotonMCTruthFinder_->find (theSimTracks, theSimVertices);
929 std::map<const reco::Track*,TrackingParticleRef> myAss;
930 std::map<const reco::Track*,TrackingParticleRef>::const_iterator itAss;
932 for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
934 mcConvPt_= (*mcPho).fourMomentum().et();
935 float mcPhi= (*mcPho).fourMomentum().phi();
936 mcPhi_= phiNormalization(mcPhi);
937 mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
938 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
939 mcConvR_= (*mcPho).vertex().perp();
940 mcConvX_= (*mcPho).vertex().x();
941 mcConvY_= (*mcPho).vertex().y();
942 mcConvZ_= (*mcPho).vertex().z();
943 mcConvEta_= (*mcPho).vertex().eta();
944 mcConvPhi_= (*mcPho).vertex().phi();
946 if ( fabs(mcEta_) > END_HI )
continue;
954 bool goodSimConversion=
false;
955 bool visibleConversion=
false;
956 bool visibleConversionsWithTwoSimTracks=
false;
957 if ( (*mcPho).isAConversion() == 1 ) {
959 h_AllSimConv_[0]->Fill( mcEta_ ) ;
960 h_AllSimConv_[1]->Fill( mcPhi_ );
961 h_AllSimConv_[2]->Fill( mcConvR_ );
962 h_AllSimConv_[3]->Fill( mcConvZ_ );
963 h_AllSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
965 if ( mcConvR_ <15) h_SimConvEtaPix_[0]->Fill( mcEta_ ) ;
967 if ( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
968 ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) visibleConversion=
true;
974 if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
975 fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
976 fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
977 theConvTP_.push_back( tp );
982 if ( theConvTP_.size() == 2 ) visibleConversionsWithTwoSimTracks=
true;
983 goodSimConversion=
false;
985 if ( visibleConversion && visibleConversionsWithTwoSimTracks ) goodSimConversion=
true;
986 if ( goodSimConversion ) {
988 h_VisSimConv_[0]->Fill( mcEta_ ) ;
989 h_VisSimConv_[1]->Fill( mcPhi_ );
990 h_VisSimConv_[2]->Fill( mcConvR_ );
991 h_VisSimConv_[3]->Fill( mcConvZ_ );
992 h_VisSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
997 h_simTkPt_ ->
Fill ( (*iTrk)->pt() );
998 h_simTkEta_ ->
Fill ( (*iTrk)->eta() );
1004 if ( ! (visibleConversion && visibleConversionsWithTwoSimTracks ) )
continue;
1006 h_simConvVtxRvsZ_[0] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
1007 if ( fabs(mcEta_) <=1.) {
1008 h_simConvVtxRvsZ_[1] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
1009 h_simConvVtxYvsX_ ->Fill ( mcConvX_, mcConvY_ ) ;
1012 h_simConvVtxRvsZ_[2] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
1020 bool recomatch =
false;
1021 float chi2Prob = 0.;
1024 for (reco::ConversionCollection::const_iterator
conv = convHandle->begin();
conv!=convHandle->end();++
conv) {
1035 std::vector<edm::RefToBase<reco::Track> >
tracks = aConv.
tracks();
1040 if (tracks.size() !=2 || !(vtx.
isValid()))
continue;
1051 double lxy = (themom.x()*dbsx + themom.y()*dbsy)/themom.rho();
1053 if (lxy<minLxy_)
continue;
1071 bool isAssociated =
false;
1075 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV1, trackV2;
1077 int tp_1 = 0, tp_2 = 1;
1078 if (q1.
find(theConvTP_[0])!=q1.
end()){
1079 trackV1 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q1[theConvTP_[0]];
1080 }
else if (q1.
find(theConvTP_[1])!=q1.
end()){
1081 trackV1 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q1[theConvTP_[1]];
1084 if (q2.
find(theConvTP_[1])!=q2.
end()){
1085 trackV2 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q2[theConvTP_[1]];
1086 }
else if (q2.
find(theConvTP_[0])!=q2.
end()){
1087 trackV2 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q2[theConvTP_[0]];
1090 if (!(trackV1.size()&&trackV2.size()))
1092 if (tp_1 == tp_2)
continue;
1098 myAss.insert( std::make_pair (tr1.
get(),theConvTP_[tp_1] ) );
1099 myAss.insert( std::make_pair (tr2.
get(),theConvTP_[tp_2]) );
1107 isAssociated =
true;
1112 h_SimRecConvTwoMTracks_[0]->Fill( mcEta_ ) ;
1113 h_SimRecConvTwoMTracks_[1]->Fill( mcPhi_ );
1114 h_SimRecConvTwoMTracks_[2]->Fill( mcConvR_ );
1115 h_SimRecConvTwoMTracks_[3]->Fill( mcConvZ_ );
1116 h_SimRecConvTwoMTracks_[4]->Fill( (*mcPho).fourMomentum().et());
1123 h_SimConvTwoMTracks_[0]->Fill( mcEta_ ) ;
1124 h_SimConvTwoMTracks_[1]->Fill( mcPhi_ );
1125 h_SimConvTwoMTracks_[2]->Fill( mcConvR_ );
1126 h_SimConvTwoMTracks_[3]->Fill( mcConvZ_ );
1127 h_SimConvTwoMTracks_[4]->Fill( (*mcPho).fourMomentum().et());
1130 if ( chi2Prob > 0) {
1131 h_SimConvTwoMTracksAndVtxPGT0_[0]->Fill( mcEta_ ) ;
1132 h_SimConvTwoMTracksAndVtxPGT0_[1]->Fill( mcPhi_ );
1133 h_SimConvTwoMTracksAndVtxPGT0_[2]->Fill( mcConvR_ );
1134 h_SimConvTwoMTracksAndVtxPGT0_[3]->Fill( mcConvZ_ );
1135 h_SimConvTwoMTracksAndVtxPGT0_[4]->Fill( (*mcPho).fourMomentum().et());
1137 if ( chi2Prob > 0.0005) {
1138 h_SimConvTwoMTracksAndVtxPGT0005_[0]->Fill( mcEta_ ) ;
1139 h_SimConvTwoMTracksAndVtxPGT0005_[1]->Fill( mcPhi_ );
1140 h_SimConvTwoMTracksAndVtxPGT0005_[2]->Fill( mcConvR_ );
1141 h_SimConvTwoMTracksAndVtxPGT0005_[3]->Fill( mcConvZ_ );
1142 h_SimConvTwoMTracksAndVtxPGT0005_[4]->Fill( (*mcPho).fourMomentum().et());
1152 for (reco::ConversionCollection::const_iterator
conv = convHandle->begin();
conv!=convHandle->end();++
conv) {
1162 std::vector<edm::RefToBase<reco::Track> >
tracks = aConv.
tracks();
1166 if (tracks.size() !=2 || !(vtx.
isValid()))
continue;
1177 double lxy = (themom.x()*dbsx + themom.y()*dbsy)/themom.rho();
1179 if (lxy<minLxy_)
continue;
1181 bool phoIsInBarrel=
false;
1182 bool phoIsInEndcap=
false;
1201 if (
sqrt(p1AtVtx.perp2()) >
sqrt(p2AtVtx.perp2()) )
1202 dPhiTracksAtVtx = p1AtVtx.phi() - p2AtVtx.phi();
1204 dPhiTracksAtVtx = p2AtVtx.phi() - p1AtVtx.phi();
1210 if (fabs(refittedMom.eta())< 1.479 ) {
1219 double Mindeltaeta = 999999;
1220 double Mindeltaphi = 999999;
1221 bool matchConvSC=
false;
1222 reco::PhotonCollection::const_iterator iMatchingSC;
1223 for( reco::PhotonCollection::const_iterator iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
1227 double deltaeta =
abs( aPho.
superCluster()->position().eta() -ConvEta);
1228 if (
abs(deltaeta)<
abs(Mindeltaeta) &&
abs(deltaphi)<
abs(Mindeltaphi)) {
1229 Mindeltaphi=
abs(deltaphi);
1230 Mindeltaeta=
abs(deltaeta);
1231 iMatchingSC = iPho ;
1234 if (
abs(Mindeltaeta)<0.1 &&
abs(Mindeltaphi)<0.1) {
1248 int ilead = 0, itrail = 1;
1249 if (tk2->
pt() > tk1->
pt()) {
1263 h_convEta_[
match][0]->Fill( refittedMom.eta() );
1264 h_convEta2_[
match][0]->Fill( refittedMom.eta() );
1266 h_convPhi_[
match][0]->Fill( refittedMom.phi() );
1271 h_convPt_[
match][0]->Fill(
sqrt(refittedMom.perp2()) );
1272 h_invMass_[
match][0] ->Fill( invM);
1273 h_vtxChi2Prob_[
match][0] ->Fill (chi2Prob);
1274 h_lxybs_[
match][0] ->Fill (lxy);
1275 h_maxNHitsBeforeVtx_[
match][0] ->Fill (maxNHitsBeforeVtx);
1276 h_leadNHitsBeforeVtx_[
match][0] ->Fill (leadNHitsBeforeVtx);
1277 h_trailNHitsBeforeVtx_[
match][0] ->Fill (trailNHitsBeforeVtx);
1278 h_sumNHitsBeforeVtx_[
match][0] ->Fill (sumNHitsBeforeVtx);
1279 h_deltaExpectedHitsInner_[
match][0] ->Fill (deltaExpectedHitsInner);
1280 h_leadExpectedHitsInner_[
match][0] ->Fill (leadExpectedHitsInner);
1281 h_maxDlClosestHitToVtx_[
match][0] ->Fill (maxDlClosestHitToVtx);
1282 h_maxDlClosestHitToVtxSig_[
match][0] ->Fill (maxDlClosestHitToVtxSig);
1286 if ( matchConvSC ) {
1287 h_convEtaMatchSC_[
match][0]->Fill( refittedMom.eta() );
1288 h_EoverPTracks_[
match][0] ->Fill (iMatchingSC->superCluster()->energy()/
sqrt(refittedMom.mag2()));
1289 h_convSCdPhi_[
match][0]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1291 h_convSCdEta_[
match][0]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1295 h_DPhiTracksAtVtx_[
match][0]->Fill( dPhiTracksAtVtx);
1296 h2_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
1297 h2_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
1298 p_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
1299 p_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
1307 if ( phoIsInBarrel ) {
1308 h_invMass_[
match][1] ->Fill(invM);
1309 h_vtxChi2Prob_[
match][1] ->Fill (chi2Prob);
1311 h_DPhiTracksAtVtx_[
match][1]->Fill( dPhiTracksAtVtx);
1313 h_lxybs_[
match][1] ->Fill (lxy);
1314 h_maxNHitsBeforeVtx_[
match][1] ->Fill (maxNHitsBeforeVtx);
1315 h_leadNHitsBeforeVtx_[
match][1] ->Fill (leadNHitsBeforeVtx);
1316 h_trailNHitsBeforeVtx_[
match][1] ->Fill (trailNHitsBeforeVtx);
1317 h_sumNHitsBeforeVtx_[
match][1] ->Fill (sumNHitsBeforeVtx);
1318 h_deltaExpectedHitsInner_[
match][1] ->Fill (deltaExpectedHitsInner);
1319 h_leadExpectedHitsInner_[
match][1] ->Fill (leadExpectedHitsInner);
1320 h_maxDlClosestHitToVtx_[
match][1] ->Fill (maxDlClosestHitToVtx);
1321 h_maxDlClosestHitToVtxSig_[
match][1] ->Fill (maxDlClosestHitToVtxSig);
1332 if ( matchConvSC ) {
1333 h_EoverPTracks_[
match][1] ->
Fill(iMatchingSC->superCluster()->energy()/
sqrt(refittedMom.mag2()));
1334 h_convSCdPhi_[
match][1]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1336 h_convSCdEta_[
match][1]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1341 if ( phoIsInEndcap ) {
1342 h_invMass_[
match][2] ->Fill(invM);
1343 h_vtxChi2Prob_[
match][2] ->Fill (chi2Prob);
1345 h_DPhiTracksAtVtx_[
match][2]->Fill( dPhiTracksAtVtx);
1347 h_lxybs_[
match][2] ->Fill (lxy);
1348 h_maxNHitsBeforeVtx_[
match][2] ->Fill (maxNHitsBeforeVtx);
1349 h_leadNHitsBeforeVtx_[
match][2] ->Fill (leadNHitsBeforeVtx);
1350 h_trailNHitsBeforeVtx_[
match][2] ->Fill (trailNHitsBeforeVtx);
1351 h_sumNHitsBeforeVtx_[
match][2] ->Fill (sumNHitsBeforeVtx);
1352 h_deltaExpectedHitsInner_[
match][2] ->Fill (deltaExpectedHitsInner);
1353 h_leadExpectedHitsInner_[
match][2] ->Fill (leadExpectedHitsInner);
1354 h_maxDlClosestHitToVtx_[
match][2] ->Fill (maxDlClosestHitToVtx);
1355 h_maxDlClosestHitToVtxSig_[
match][2] ->Fill (maxDlClosestHitToVtxSig);
1357 if ( matchConvSC ) {
1358 h_EoverPTracks_[
match][2] ->Fill (iMatchingSC->superCluster()->energy()/
sqrt(refittedMom.mag2()));
1359 h_convSCdPhi_[
match][2]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1361 h_convSCdEta_[
match][2]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1373 for (
unsigned int i=0;
i<tracks.size();
i++) {
1376 d0 = - tracks[
i]->dxy(the_pvtx.
position());
1378 d0 = tracks[
i]->d0();
1385 nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) );
1386 nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) );
1387 p_nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1388 p_nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1389 h_tkChi2_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1390 h_tkChi2Large_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1391 h2_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1392 h2_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1393 p_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1394 p_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1398 bool associated =
false;
1399 float mcConvPt_= -99999999;
1402 for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
1403 mcConvPt_= (*mcPho).fourMomentum().et();
1404 float mcPhi= (*mcPho).fourMomentum().phi();
1405 simPV_Z = (*mcPho).primaryVertex().z();
1406 mcPhi_= phiNormalization(mcPhi);
1407 mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
1408 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
1409 mcConvR_= (*mcPho).vertex().perp();
1410 mcConvX_= (*mcPho).vertex().x();
1411 mcConvY_= (*mcPho).vertex().y();
1412 mcConvZ_= (*mcPho).vertex().z();
1413 mcConvEta_= (*mcPho).vertex().eta();
1414 mcConvPhi_= (*mcPho).vertex().phi();
1415 if ( fabs(mcEta_) > END_HI )
continue;
1421 if ( (*mcPho).isAConversion() != 1 )
continue;
1422 if (!( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
1423 ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) )
1429 if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
1430 fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
1431 fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
1432 theConvTP_.push_back( tp );
1436 if ( theConvTP_.size() < 2 )
continue;
1442 std::vector<std::pair<TrackingParticleRef, double> > tp1 = p1[tk1];
1443 std::vector<std::pair<TrackingParticleRef, double> > tp2 = p2[tk2];
1444 if (!(tp1.size()&&tp2.size())){
1448 if (tp1.size()&&tp2.size()) {
1451 if (
abs(tpr1->pdgId())==11&&
abs(tpr2->pdgId())==11&& tpr1->pdgId()*tpr2->pdgId()<0) {
1452 if ( (tpr1->parentVertex()->sourceTracks_end()-tpr1->parentVertex()->sourceTracks_begin()==1) &&
1453 (tpr2->parentVertex()->sourceTracks_end()-tpr2->parentVertex()->sourceTracks_begin()==1)) {
1454 if (tpr1->parentVertex().
key()==tpr2->parentVertex().
key() && ((*tpr1->parentVertex()->sourceTracks_begin())->
pdgId()==22)) {
1455 mcConvR_ =
sqrt(tpr1->parentVertex()->position().Perp2());
1456 mcConvZ_ = tpr1->parentVertex()->position().z();
1457 mcConvX_ = tpr1->parentVertex()->position().x();
1458 mcConvY_ = tpr1->parentVertex()->position().y();
1459 mcConvEta_ = tpr1->parentVertex()->position().eta();
1460 mcConvPhi_ = tpr1->parentVertex()->position().phi();
1461 mcConvPt_ =
sqrt((*tpr1->parentVertex()->sourceTracks_begin())->momentum().Perp2());
1481 theConvTP_ = tpForFakeRate;
1486 for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
1487 mcConvPt_= (*mcPho).fourMomentum().et();
1488 float mcPhi= (*mcPho).fourMomentum().phi();
1489 simPV_Z = (*mcPho).primaryVertex().z();
1490 mcPhi_= phiNormalization(mcPhi);
1491 mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
1492 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
1493 mcConvR_= (*mcPho).vertex().perp();
1494 mcConvX_= (*mcPho).vertex().x();
1495 mcConvY_= (*mcPho).vertex().y();
1496 mcConvZ_= (*mcPho).vertex().z();
1497 mcConvEta_= (*mcPho).vertex().eta();
1498 mcConvPhi_= (*mcPho).vertex().phi();
1499 if ( fabs(mcEta_) > END_HI )
continue;
1505 if ( (*mcPho).isAConversion() != 1 )
continue;
1506 if (!( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
1507 ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) )
1513 if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
1514 fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
1515 fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
1516 theConvTP_.push_back( tp );
1522 if ( theConvTP_.size() < 2 )
continue;
1534 std::vector<std::pair<TrackingParticleRef, double> > tp1 = p1incl[tk1];
1535 std::vector<std::pair<TrackingParticleRef, double> > tp2 = p2incl[tk2];
1536 if (!(tp1.size()&&tp2.size())){
1540 if (tp1.size()&&tp2.size()) {
1543 if (
abs(tpr1->pdgId())==11&&
abs(tpr2->pdgId())==11 && tpr1->pdgId()*tpr2->pdgId()<0) {
1544 if ( ((tpr1->parentVertex()->sourceTracks_end()-tpr1->parentVertex()->sourceTracks_begin()>=1) && (*tpr1->parentVertex()->sourceTracks_begin())->
pdgId()==22) &&
1545 ((tpr2->parentVertex()->sourceTracks_end()-tpr2->parentVertex()->sourceTracks_begin()>=1) && (*tpr2->parentVertex()->sourceTracks_begin())->
pdgId()==22) ) {
1576 if ( associated ) match=1;
1580 h_match_->Fill(
float(match));
1582 if ( match == 1) nRecConvAss_++;
1583 h_convEta_[
match][0]->Fill( refittedMom.eta() );
1584 h_convEta_[
match][1]->Fill( refittedMom.eta() );
1585 if (matchConvSC) h_convEtaMatchSC_[
match][0]->Fill( refittedMom.eta() );
1586 h_convPhi_[
match][0]->Fill( refittedMom.phi() );
1589 h_convPt_[
match][0]->Fill(
sqrt(refittedMom.perp2()) );
1590 h_invMass_[
match][0] ->Fill( invM);
1591 h_vtxChi2Prob_[
match][0] ->Fill (chi2Prob);
1592 h_DPhiTracksAtVtx_[
match][0]->Fill( dPhiTracksAtVtx);
1595 h_lxybs_[
match][0] ->Fill (lxy);
1596 h_maxNHitsBeforeVtx_[
match][0] ->Fill (maxNHitsBeforeVtx);
1597 h_leadNHitsBeforeVtx_[
match][0] ->Fill (leadNHitsBeforeVtx);
1598 h_trailNHitsBeforeVtx_[
match][0] ->Fill (trailNHitsBeforeVtx);
1599 h_sumNHitsBeforeVtx_[
match][0] ->Fill (sumNHitsBeforeVtx);
1600 h_deltaExpectedHitsInner_[
match][0] ->Fill (deltaExpectedHitsInner);
1601 h_leadExpectedHitsInner_[
match][0] ->Fill (leadExpectedHitsInner);
1602 h_maxDlClosestHitToVtx_[
match][0] ->Fill (maxDlClosestHitToVtx);
1603 h_maxDlClosestHitToVtxSig_[
match][0] ->Fill (maxDlClosestHitToVtxSig);
1605 if ( matchConvSC ) {
1607 h_EoverPTracks_[
match][0] ->Fill (iMatchingSC->superCluster()->energy()/
sqrt(refittedMom.mag2()));
1608 h_convSCdPhi_[
match][0]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1610 h_convSCdEta_[
match][0]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1614 h2_photonPtRecVsPtSim_->Fill ( mcConvPt_,
sqrt(refittedMom.perp2()) );
1615 h_convPtRes_[0]->Fill (
sqrt(refittedMom.perp2())/mcConvPt_);
1618 if ( phoIsInBarrel ) {
1619 h_invMass_[
match][1] ->Fill(invM);
1620 h_vtxChi2Prob_[
match][1] ->Fill (chi2Prob);
1621 h_DPhiTracksAtVtx_[
match][1]->Fill( dPhiTracksAtVtx);
1624 h_lxybs_[
match][1] ->Fill (lxy);
1625 h_maxNHitsBeforeVtx_[
match][1] ->Fill (maxNHitsBeforeVtx);
1626 h_leadNHitsBeforeVtx_[
match][1] ->Fill (leadNHitsBeforeVtx);
1627 h_trailNHitsBeforeVtx_[
match][1] ->Fill (trailNHitsBeforeVtx);
1628 h_sumNHitsBeforeVtx_[
match][1] ->Fill (sumNHitsBeforeVtx);
1629 h_deltaExpectedHitsInner_[
match][1] ->Fill (deltaExpectedHitsInner);
1630 h_leadExpectedHitsInner_[
match][1] ->Fill (leadExpectedHitsInner);
1631 h_maxDlClosestHitToVtx_[
match][1] ->Fill (maxDlClosestHitToVtx);
1632 h_maxDlClosestHitToVtxSig_[
match][1] ->Fill (maxDlClosestHitToVtxSig);
1634 if ( matchConvSC ) {
1636 h_EoverPTracks_[
match][1] ->Fill (iMatchingSC->superCluster()->energy()/
sqrt(refittedMom.mag2()));
1637 h_convSCdPhi_[
match][1]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1639 h_convSCdEta_[
match][1]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1642 if ( match==1) h_convPtRes_[1]->Fill (
sqrt(refittedMom.perp2())/mcConvPt_);
1646 if ( phoIsInEndcap ) {
1647 h_invMass_[
match][2] ->Fill(invM);
1648 h_vtxChi2Prob_[
match][2] ->Fill (chi2Prob);
1649 h_DPhiTracksAtVtx_[
match][2]->Fill( dPhiTracksAtVtx);
1652 h_lxybs_[
match][2] ->Fill (lxy);
1653 h_maxNHitsBeforeVtx_[
match][2] ->Fill (maxNHitsBeforeVtx);
1654 h_leadNHitsBeforeVtx_[
match][2] ->Fill (leadNHitsBeforeVtx);
1655 h_trailNHitsBeforeVtx_[
match][2] ->Fill (trailNHitsBeforeVtx);
1656 h_sumNHitsBeforeVtx_[
match][2] ->Fill (sumNHitsBeforeVtx);
1657 h_deltaExpectedHitsInner_[
match][2] ->Fill (deltaExpectedHitsInner);
1658 h_leadExpectedHitsInner_[
match][2] ->Fill (leadExpectedHitsInner);
1659 h_maxDlClosestHitToVtx_[
match][2] ->Fill (maxDlClosestHitToVtx);
1660 h_maxDlClosestHitToVtxSig_[
match][2] ->Fill (maxDlClosestHitToVtxSig);
1662 if ( matchConvSC ) {
1664 h_EoverPTracks_[
match][2] ->Fill (iMatchingSC->superCluster()->energy()/
sqrt(refittedMom.mag2()));
1665 h_convSCdPhi_[
match][2]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1667 h_convSCdEta_[
match][2]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1669 if ( match==1) h_convPtRes_[2]->Fill (
sqrt(refittedMom.perp2())/mcConvPt_);
1691 p2_convVtxdRVsRZ_ ->Fill (mcConvZ_,mcConvR_, dR );
1692 p2_convVtxdZVsRZ_ ->Fill (mcConvZ_,mcConvR_, dZ );
1705 if ( phoIsInBarrel ) {
1712 if ( phoIsInEndcap ) {
1724 for (
unsigned int i=0;
i<tracks.size();
i++) {
1727 itAss= myAss.find( tfrb.get() );
1729 nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) );
1730 nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) );
1731 p_nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1732 p_nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1733 h_tkChi2_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1734 h_tkChi2Large_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1735 h2_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1736 h2_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1737 p_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1738 p_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1741 d0 = - tracks[
i]->dxy(the_pvtx.
position());
1743 d0 = tracks[
i]->d0();
1751 if ( itAss == myAss.end() )
continue;
1754 float simPt =
sqrt( ((*itAss).second)->momentum().perp2() );
1756 float ptres= recPt - simPt ;
1759 h2_PtRecVsPtSim_[0]->Fill ( simPt, recPt);
1760 h_TkPtPull_[0] ->Fill(ptres/pterror);
1761 h2_TkPtPull_[0] ->Fill(mcEta_, ptres/pterror);
1763 if ( phoIsInBarrel ) {
1764 h_TkPtPull_[1] ->Fill(ptres/pterror);
1765 h2_PtRecVsPtSim_[1]->Fill ( simPt, recPt);
1767 if ( phoIsInEndcap ) {
1768 h_TkPtPull_[2] ->Fill(ptres/pterror);
1769 h2_PtRecVsPtSim_[2]->Fill ( simPt, recPt);
1778 h_nConv_[0][0]->Fill (
float(nRecConv_));
1779 h_nConv_[1][0]->Fill (
float(nRecConvAss_));
1793 if ( ! isRunCentrally_ ) {
1794 dbe_->save(outputFileName);
1797 edm::LogInfo(
"TkConvValidator") <<
"Analyzed " << nEvt_ <<
"\n";
1824 stateAtVtx = propag.
propagate(myTSOS, *theBarrel_);
1826 stateAtVtx = propag.
propagate(myTSOS, *theDisk_);
1842 const float PI = 3.1415927;
1846 if(phi > PI) {phi = phi -
TWOPI;}
1847 if(phi < -PI) {phi = phi +
TWOPI;}
1858 const float PI = 3.1415927;
1861 const float R_ECAL = 136.5;
1868 float ZEcal = R_ECAL*sinh(EtaParticle)+Zvertex;
1870 if(ZEcal != 0.0) Theta = atan(R_ECAL/ZEcal);
1871 if(Theta<0.0) Theta = Theta+
PI ;
1874 if( fabs(ETA) > etaBarrelEndcap )
1877 if(EtaParticle<0.0 ) Zend = -Zend ;
1878 float Zlen = Zend - Zvertex ;
1879 float RR = Zlen/sinh(EtaParticle);
1880 Theta = atan(RR/Zend);
1881 if(Theta<0.0) Theta = Theta+
PI ;
1882 ETA = -
log(
tan(0.5*Theta));
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
value_type const * get() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
const_iterator end() const
last iterator over the map (read only)
MonitorElement * bookProfile(Args &&...args)
static HepMC::IO_HEPEVT conv
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool quality(ConversionQuality q) const
double y() const
y coordinate
math::XYZVector recalculateMomentumAtFittedVertex(const MagneticField &mf, const TrackerGeometry &trackerGeom, const edm::RefToBase< reco::Track > &tk, const reco::Vertex &vtx)
bool isValid() const
Tells whether the vertex is valid.
const std::vector< Measurement1DFloat > & dlClosestHitToVtx() const
Vector of signed decay length with uncertainty from nearest hit on track to the conversion vtx positi...
const_iterator find(const key_type &k) const
find element with specified reference key
double zOfPrimaryVertexFromTracks(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const
double distOfMinimumApproach() const
double pairCotThetaSeparation() const
Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks. Original tracks are used.
std::vector< Vertex > VertexCollection
collection of Vertex objects
key_type key() const
Accessor for product key.
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
double pairInvariantMass() const
if nTracks=2 returns the pair invariant mass. Original tracks are used here
const Point & position() const
position
math::XYZVectorF refittedPairMomentum() const
Conversion tracks momentum from the tracks refitted with vertex constraint.
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
virtual ~TkConvValidator()
TrackAlgorithm algo() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void endRun(edm::Run const &r, edm::EventSetup const &es) override
float etaTransformation(float a, float b)
float phiNormalization(float &a)
MonitorElement * bookProfile2D(Args &&...args)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
double pt() const
track transverse momentum
TkConvValidator(const edm::ParameterSet &)
MonitorElement * book1D(Args &&...args)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
double chi2() const
chi-squares
#define TWOPI
EgammaCoreTools.
float ChiSquaredProbability(double chiSquared, double nrDOF)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
double deltaPhi(double phi1, double phi2)
double x() const
x coordinate
uint8_t nSharedHits() const
number of shared hits btw the two track
void setCurrentFolder(const std::string &fullpath)
size_type size() const
map size
T const * product() const
MonitorElement * book2D(Args &&...args)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
XYZVectorD XYZVector
spatial vector with cartesian internal representation
std::vector< Photon > PhotonCollection
collectin of Photon objects
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
static const float etaBarrelEndcap
static const float Z_Endcap
return(e1-e2)*(e1-e2)+dp *dp
GlobalVector globalMomentum() const
static float computeRadius(Bounds const &bounds)
void push_back(const RefToBase< T > &)
const std::vector< uint8_t > & nHitsBeforeVtx() const
Vector of the number of hits before the vertex along each track trajector.
double y0() const
y coordinate
static const float R_ECAL
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
T const * product() const
double dPhiTracksAtVtx() const
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references
int numberOfHits(HitCategory category) const
double x0() const
x coordinate
virtual void dqmBeginRun(edm::Run const &r, edm::EventSetup const &theEventSetup) override