CMS 3D CMS Logo

ConversionFinder.cc
Go to the documentation of this file.
6 #include "TMath.h"
7 
9 
11  double maxAbsDist, double maxAbsDcot)
12 {
13  return (std::abs(convInfo.dist()) < maxAbsDist) && (std::abs(convInfo.dcot()) < maxAbsDcot);
14 }
15 
16 //-----------------------------------------------------------------------------
18 
19 //-----------------------------------------------------------------------------
21 
22 //-----------------------------------------------------------------------------
24  const edm::Handle<reco::TrackCollection>& ctftracks_h,
25  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
26  const double bFieldAtOrigin,
27  const double minFracSharedHits) {
28 
29  std::vector<ConversionInfo> temp = getConversionInfos(*gsfElectron.core(),ctftracks_h,gsftracks_h,bFieldAtOrigin,minFracSharedHits) ;
30  return findBestConversionMatch(temp);
31 
32 }
33 //-----------------------------------------------------------------------------
35  const edm::Handle<reco::TrackCollection>& ctftracks_h,
36  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
37  const double bFieldAtOrigin,
38  const double minFracSharedHits) {
39 
40  std::vector<ConversionInfo> temp = getConversionInfos(gsfElectron,ctftracks_h,gsftracks_h,bFieldAtOrigin,minFracSharedHits) ;
41  return findBestConversionMatch(temp);
42 
43 }
44 
45 
46 //-----------------------------------------------------------------------------
47 std::vector<ConversionInfo> ConversionFinder::getConversionInfos(const reco::GsfElectronCore& gsfElectron,
48  const edm::Handle<reco::TrackCollection>& ctftracks_h,
49  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
50  const double bFieldAtOrigin,
51  const double minFracSharedHits) {
52 
53 
54 
55  using namespace reco;
56  using namespace std;
57  using namespace edm;
58 
59 
60  //get the track collections
61  const TrackCollection *ctftracks = ctftracks_h.product();
62  const GsfTrackCollection *gsftracks = gsftracks_h.product();
63 
64  //get the references to the gsf and ctf tracks that are made
65  //by the electron
66  const reco::TrackRef el_ctftrack = gsfElectron.ctfTrack();
67  const reco::GsfTrackRef& el_gsftrack = gsfElectron.gsfTrack();
68 
69  //protect against the wrong collection being passed to the function
70  if(el_ctftrack.isNonnull() && el_ctftrack.id() != ctftracks_h.id())
71  throw cms::Exception("ConversionFinderError") << "ProductID of ctf track collection does not match ProductID of electron's CTF track! \n";
72  if(el_gsftrack.isNonnull() && el_gsftrack.id() != gsftracks_h.id())
73  throw cms::Exception("ConversionFinderError") << "ProductID of gsf track collection does not match ProductID of electron's GSF track! \n";
74 
75  //make p4s for the electron's tracks for use later
76  LorentzVector el_ctftrack_p4;
77  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits)
78  el_ctftrack_p4 = LorentzVector(el_ctftrack->px(), el_ctftrack->py(), el_ctftrack->pz(), el_ctftrack->p());
79  LorentzVector el_gsftrack_p4(el_gsftrack->px(), el_gsftrack->py(), el_gsftrack->pz(), el_gsftrack->p());
80 
81  //the electron's CTF track must share at least 45% of the inner hits
82  //with the electron's GSF track
83  int ctfidx = -999.;
84  int gsfidx = -999.;
85  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits)
86  ctfidx = static_cast<int>(el_ctftrack.key());
87 
88  gsfidx = static_cast<int>(el_gsftrack.key());
89 
90 
91  //these vectors are for those candidate partner tracks that pass our cuts
92  vector<ConversionInfo> v_candidatePartners;
93  //track indices required to make references
94  int ctftk_i = 0;
95  int gsftk_i = 0;
96 
97 
98  //loop over the CTF tracks and try to find the partner track
99  for(TrackCollection::const_iterator ctftk = ctftracks->begin();
100  ctftk != ctftracks->end(); ctftk++, ctftk_i++) {
101 
102  if((ctftk_i == ctfidx))
103  continue;
104 
105  //candidate track's p4
106  LorentzVector ctftk_p4 = LorentzVector(ctftk->px(), ctftk->py(), ctftk->pz(), ctftk->p());
107 
108  //apply quality cuts to remove bad tracks
109  if(ctftk->ptError()/ctftk->pt() > 0.05)
110  continue;
111  if(ctftk->numberOfValidHits() < 5)
112  continue;
113 
114  if(el_ctftrack.isNonnull() &&
115  gsfElectron.ctfGsfOverlap() > minFracSharedHits &&
116  fabs(ctftk_p4.Pt() - el_ctftrack->pt())/el_ctftrack->pt() < 0.2)
117  continue;
118 
119  //use the electron's CTF track, if not null, to search for the partner track
120  //look only in a cone of 0.5 to save time, and require that the track is opp. sign
121  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits &&
122  deltaR(el_ctftrack_p4, ctftk_p4) < 0.5 &&
123  (el_ctftrack->charge() + ctftk->charge() == 0) ) {
124 
125  ConversionInfo convInfo = getConversionInfo((const reco::Track*)(el_ctftrack.get()), &(*ctftk), bFieldAtOrigin);
126 
127  //need to add the track reference information for completeness
128  //because the overloaded fnc above does not make a trackRef
129  int deltaMissingHits = ctftk->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
130  - el_ctftrack->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
131 
132  convInfo = ConversionInfo(convInfo.dist(),
133  convInfo.dcot(),
134  convInfo.radiusOfConversion(),
135  convInfo.pointOfConversion(),
136  TrackRef(ctftracks_h, ctftk_i),
137  GsfTrackRef() ,
138  deltaMissingHits,
139  0);
140 
141  v_candidatePartners.push_back(convInfo);
142 
143  }//using the electron's CTF track
144 
145 
146  //now we check using the electron's gsf track
147  if(deltaR(el_gsftrack_p4, ctftk_p4) < 0.5 &&
148  (el_gsftrack->charge() + ctftk->charge() == 0) &&
149  el_gsftrack->ptError()/el_gsftrack->pt() < 0.25) {
150 
151  int deltaMissingHits = ctftk->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
152  - el_gsftrack->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
153 
154  ConversionInfo convInfo = getConversionInfo((const reco::Track*)(el_gsftrack.get()), &(*ctftk), bFieldAtOrigin);
155  convInfo = ConversionInfo(convInfo.dist(),
156  convInfo.dcot(),
157  convInfo.radiusOfConversion(),
158  convInfo.pointOfConversion(),
159  TrackRef(ctftracks_h, ctftk_i),
160  GsfTrackRef(),
161  deltaMissingHits,
162  1);
163 
164  v_candidatePartners.push_back(convInfo);
165  }//using the electron's GSF track
166 
167  }//loop over the CTF track collection
168 
169 
170  //------------------------------------------------------ Loop over GSF collection ----------------------------------//
171  for(GsfTrackCollection::const_iterator gsftk = gsftracks->begin();
172  gsftk != gsftracks->end(); gsftk++, gsftk_i++) {
173 
174  //reject the electron's own gsfTrack
175  if(gsfidx == gsftk_i)
176  continue;
177 
178  LorentzVector gsftk_p4 = LorentzVector(gsftk->px(), gsftk->py(), gsftk->pz(), gsftk->p());
179 
180  //apply quality cuts to remove bad tracks
181  if(gsftk->ptError()/gsftk->pt() > 0.5)
182  continue;
183  if(gsftk->numberOfValidHits() < 5)
184  continue;
185 
186  if(fabs(gsftk->pt() - el_gsftrack->pt())/el_gsftrack->pt() < 0.25)
187  continue;
188 
189  //try using the electron's CTF track first if it exists
190  //look only in a cone of 0.5 around the electron's track
191  //require opposite sign
192  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits &&
193  deltaR(el_ctftrack_p4, gsftk_p4) < 0.5 &&
194  (el_ctftrack->charge() + gsftk->charge() == 0)) {
195 
196  int deltaMissingHits = gsftk->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
197  - el_ctftrack->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
198 
199  ConversionInfo convInfo = getConversionInfo((const reco::Track*)(el_ctftrack.get()), (const reco::Track*)(&(*gsftk)), bFieldAtOrigin);
200  //fill the Ref info
201  convInfo = ConversionInfo(convInfo.dist(),
202  convInfo.dcot(),
203  convInfo.radiusOfConversion(),
204  convInfo.pointOfConversion(),
205  TrackRef(),
206  GsfTrackRef(gsftracks_h, gsftk_i),
207  deltaMissingHits,
208  2);
209  v_candidatePartners.push_back(convInfo);
210 
211  }
212 
213  //use the electron's gsf track
214  if(deltaR(el_gsftrack_p4, gsftk_p4) < 0.5 &&
215  (el_gsftrack->charge() + gsftk->charge() == 0) &&
216  (el_gsftrack->ptError()/el_gsftrack_p4.pt() < 0.5)) {
217  ConversionInfo convInfo = getConversionInfo((const reco::Track*)(el_gsftrack.get()), (const reco::Track*)(&(*gsftk)), bFieldAtOrigin);
218  //fill the Ref info
219 
220  int deltaMissingHits = gsftk->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
221  - el_gsftrack->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
222 
223  convInfo = ConversionInfo(convInfo.dist(),
224  convInfo.dcot(),
225  convInfo.radiusOfConversion(),
226  convInfo.pointOfConversion(),
227  TrackRef(),
228  GsfTrackRef(gsftracks_h, gsftk_i),
229  deltaMissingHits,
230  3);
231 
232  v_candidatePartners.push_back(convInfo);
233  }
234  }//loop over the gsf track collection
235 
236 
237  return v_candidatePartners;
238 
239 }
240 
241 
242 //-------------------------------------------------------------------------------------
244  const reco::Track *candPartnerTk,
245  const double bFieldAtOrigin) {
246 
247  using namespace reco;
248 
249  //now calculate the conversion related information
250  LorentzVector el_tk_p4(el_track->px(), el_track->py(), el_track->pz(), el_track->p());
251  double elCurvature = -0.3*bFieldAtOrigin*(el_track->charge()/el_tk_p4.pt())/100.;
252  double rEl = fabs(1./elCurvature);
253  double xEl = -1*(1./elCurvature - el_track->d0())*sin(el_tk_p4.phi());
254  double yEl = (1./elCurvature - el_track->d0())*cos(el_tk_p4.phi());
255 
256 
257  LorentzVector cand_p4 = LorentzVector(candPartnerTk->px(), candPartnerTk->py(),candPartnerTk->pz(), candPartnerTk->p());
258  double candCurvature = -0.3*bFieldAtOrigin*(candPartnerTk->charge()/cand_p4.pt())/100.;
259  double rCand = fabs(1./candCurvature);
260  double xCand = -1*(1./candCurvature - candPartnerTk->d0())*sin(cand_p4.phi());
261  double yCand = (1./candCurvature - candPartnerTk->d0())*cos(cand_p4.phi());
262 
263  double d = sqrt(pow(xEl-xCand, 2) + pow(yEl-yCand , 2));
264  double dist = d - (rEl + rCand);
265  double dcot = 1./tan(el_tk_p4.theta()) - 1./tan(cand_p4.theta());
266 
267  //get the point of conversion
268  double xa1 = xEl + (xCand-xEl) * rEl/d;
269  double xa2 = xCand + (xEl-xCand) * rCand/d;
270  double ya1 = yEl + (yCand-yEl) * rEl/d;
271  double ya2 = yCand + (yEl-yCand) * rCand/d;
272 
273  double x=.5*(xa1+xa2);
274  double y=.5*(ya1+ya2);
275  double rconv = sqrt(pow(x,2) + pow(y,2));
276  double z = el_track->dz() + rEl*el_track->pz()*TMath::ACos(1-pow(rconv,2)/(2.*pow(rEl,2)))/el_track->pt();
277 
278  math::XYZPoint convPoint(x, y, z);
279 
280  //now assign a sign to the radius of conversion
281  float tempsign = el_track->px()*x + el_track->py()*y;
282  tempsign = tempsign/fabs(tempsign);
283  rconv = tempsign*rconv;
284 
285  //return an instance of ConversionInfo, but with a NULL track refs
286  return ConversionInfo(dist, dcot, rconv, convPoint, TrackRef(), GsfTrackRef(), -9999, -9999);
287 
288 }
289 
290 //-------------------------------------------------------------------------------------
291 const reco::Track* ConversionFinder::getElectronTrack(const reco::GsfElectron& electron, const float minFracSharedHits) {
292 
293  if(electron.closestCtfTrackRef().isNonnull() &&
294  electron.shFracInnerHits() > minFracSharedHits)
295  return (const reco::Track*)electron.closestCtfTrackRef().get();
296 
297  return (const reco::Track*)(electron.gsfTrack().get());
298 }
299 
300 //------------------------------------------------------------------------------------
301 
302 //takes in a vector of candidate conversion partners
303 //and arbitrates between them returning the one with the
304 //smallest R=sqrt(dist*dist + dcot*dcot)
305 ConversionInfo ConversionFinder::arbitrateConversionPartnersbyR(const std::vector<ConversionInfo>& v_convCandidates) {
306 
307  if(v_convCandidates.size() == 1)
308  return v_convCandidates.at(0);
309 
310  ConversionInfo arbitratedConvInfo = v_convCandidates.at(0);
311  double R = sqrt(pow(arbitratedConvInfo.dist(),2) + pow(arbitratedConvInfo.dcot(),2));
312 
313  for(unsigned int i = 1; i < v_convCandidates.size(); i++) {
314  ConversionInfo temp = v_convCandidates.at(i);
315  double temp_R = sqrt(pow(temp.dist(),2) + pow(temp.dcot(),2));
316  if(temp_R < R) {
317  R = temp_R;
318  arbitratedConvInfo = temp;
319  }
320 
321  }
322 
323  return arbitratedConvInfo;
324 
325  }
326 
327 //------------------------------------------------------------------------------------
328 ConversionInfo ConversionFinder::findBestConversionMatch(const std::vector<ConversionInfo>& v_convCandidates)
329  {
330  using namespace std;
331 
332  if(v_convCandidates.empty())
333  return ConversionInfo(-9999.,-9999.,-9999.,
334  math::XYZPoint(-9999.,-9999.,-9999),
336  -9999, -9999);
337 
338 
339  if(v_convCandidates.size() == 1)
340  return v_convCandidates.at(0);
341 
342  vector<ConversionInfo> v_0;
343  vector<ConversionInfo> v_1;
344  vector<ConversionInfo> v_2;
345  vector<ConversionInfo> v_3;
346  //loop over the candidates
347  for(unsigned int i = 1; i < v_convCandidates.size(); i++) {
348  ConversionInfo temp = v_convCandidates.at(i);
349 
350  if(temp.flag() == 0) {
351  bool isConv = false;
352  if(fabs(temp.dist()) < 0.02 &&
353  fabs(temp.dcot()) < 0.02 &&
354  temp.deltaMissingHits() < 3 &&
355  temp.radiusOfConversion() > -2)
356  isConv = true;
357  if(sqrt(pow(temp.dist(),2) + pow(temp.dcot(),2)) < 0.05 &&
358  temp.deltaMissingHits() < 2 &&
359  temp.radiusOfConversion() > -2)
360  isConv = true;
361 
362  if(isConv)
363  v_0.push_back(temp);
364  }
365 
366  if(temp.flag() == 1) {
367 
368  if(sqrt(pow(temp.dist(),2) + pow(temp.dcot(),2)) < 0.05 &&
369  temp.deltaMissingHits() < 2 &&
370  temp.radiusOfConversion() > -2)
371  v_1.push_back(temp);
372  }
373  if(temp.flag() == 2) {
374 
375  if(sqrt(pow(temp.dist(),2) + pow(temp.dcot()*temp.dcot(),2)) < 0.05 &&
376  temp.deltaMissingHits() < 2 &&
377  temp.radiusOfConversion() > -2)
378  v_2.push_back(temp);
379 
380  }
381  if(temp.flag() == 3) {
382 
383  if(sqrt(temp.dist()*temp.dist() + temp.dcot()*temp.dcot()) < 0.05
384  && temp.deltaMissingHits() < 2
385  && temp.radiusOfConversion() > -2)
386  v_3.push_back(temp);
387 
388  }
389 
390  }//candidate conversion loop
391 
392  //now do some arbitration
393 
394  //give preference to conversion partners found in the CTF collection
395  //using the electron's CTF track
396  if(!v_0.empty())
397  return arbitrateConversionPartnersbyR(v_0);
398 
399  if(!v_1.empty())
400  return arbitrateConversionPartnersbyR(v_1);
401 
402  if(!v_2.empty())
403  return arbitrateConversionPartnersbyR(v_2);
404 
405  if(!v_3.empty())
406  return arbitrateConversionPartnersbyR(v_3);
407 
408 
409  //if we get here, we didn't find a candidate conversion partner that
410  //satisfied even the loose selections
411  //return the the closest partner by R
412  return arbitrateConversionPartnersbyR(v_convCandidates);
413 
414  }
415 
416 
417 
418 
419 //------------------------------------------------------------------------------------
420 
421 //------------------------------------------------------------------------------------
422 // Exists here for backwards compatibility only. Provides only the dist and dcot
423 std::pair<double, double> ConversionFinder::getConversionInfo(LorentzVector trk1_p4,
424  int trk1_q, float trk1_d0,
425  LorentzVector trk2_p4,
426  int trk2_q, float trk2_d0,
427  float bFieldAtOrigin) {
428 
429 
430  double tk1Curvature = -0.3*bFieldAtOrigin*(trk1_q/trk1_p4.pt())/100.;
431  double rTk1 = fabs(1./tk1Curvature);
432  double xTk1 = -1.*(1./tk1Curvature - trk1_d0)*sin(trk1_p4.phi());
433  double yTk1 = (1./tk1Curvature - trk1_d0)*cos(trk1_p4.phi());
434 
435 
436  double tk2Curvature = -0.3*bFieldAtOrigin*(trk2_q/trk2_p4.pt())/100.;
437  double rTk2 = fabs(1./tk2Curvature);
438  double xTk2 = -1.*(1./tk2Curvature - trk2_d0)*sin(trk2_p4.phi());
439  double yTk2 = (1./tk2Curvature - trk2_d0)*cos(trk2_p4.phi());
440 
441 
442  double dist = sqrt(pow(xTk1-xTk2, 2) + pow(yTk1-yTk2 , 2));
443  dist = dist - (rTk1 + rTk2);
444 
445  double dcot = 1./tan(trk1_p4.theta()) - 1./tan(trk2_p4.theta());
446 
447  return std::make_pair(dist, dcot);
448 
449  }
450 
451 
452 //-------------------------------------- Also for backwards compatibility reasons ---------------------------------------------------------------
454  const edm::Handle<reco::TrackCollection>& track_h,
455  const double bFieldAtOrigin,
456  const double minFracSharedHits) {
457 
458 
459  using namespace reco;
460  using namespace std;
461  using namespace edm;
462 
463 
464  const TrackCollection *ctftracks = track_h.product();
465  const reco::TrackRef el_ctftrack = gsfElectron.closestCtfTrackRef();
466  int ctfidx = -999.;
467  int flag = -9999.;
468  if(el_ctftrack.isNonnull() && gsfElectron.shFracInnerHits() > minFracSharedHits) {
469  ctfidx = static_cast<int>(el_ctftrack.key());
470  flag = 0;
471  } else
472  flag = 1;
473 
474 
475  /*
476  determine whether we're going to use the CTF track or the GSF track
477  using the electron's CTF track to find the dist, dcot has been shown
478  to reduce the inefficiency
479  */
480  const reco::Track* el_track = getElectronTrack(gsfElectron, minFracSharedHits);
481  LorentzVector el_tk_p4(el_track->px(), el_track->py(), el_track->pz(), el_track->p());
482 
483 
484  int tk_i = 0;
485  double mindcot = 9999.;
486  //make a null Track Ref
487  TrackRef candCtfTrackRef = TrackRef() ;
488 
489 
490  for(TrackCollection::const_iterator tk = ctftracks->begin();
491  tk != ctftracks->end(); tk++, tk_i++) {
492  //if the general Track is the same one as made by the electron, skip it
493  if((tk_i == ctfidx))
494  continue;
495 
496  LorentzVector tk_p4 = LorentzVector(tk->px(), tk->py(),tk->pz(), tk->p());
497 
498  //look only in a cone of 0.5
499  double dR = deltaR(el_tk_p4, tk_p4);
500  if(dR>0.5)
501  continue;
502 
503 
504  //require opp. sign -> Should we use the majority logic??
505  if(tk->charge() + el_track->charge() != 0)
506  continue;
507 
508  double dcot = fabs(1./tan(tk_p4.theta()) - 1./tan(el_tk_p4.theta()));
509  if(dcot < mindcot) {
510  mindcot = dcot;
511  candCtfTrackRef = reco::TrackRef(track_h, tk_i);
512  }
513  }//track loop
514 
515 
516  if(!candCtfTrackRef.isNonnull())
517  return ConversionInfo(-9999.,-9999.,-9999.,
518  math::XYZPoint(-9999.,-9999.,-9999),
520  -9999, -9999);
521 
522 
523 
524  //now calculate the conversion related information
525  double elCurvature = -0.3*bFieldAtOrigin*(el_track->charge()/el_tk_p4.pt())/100.;
526  double rEl = fabs(1./elCurvature);
527  double xEl = -1*(1./elCurvature - el_track->d0())*sin(el_tk_p4.phi());
528  double yEl = (1./elCurvature - el_track->d0())*cos(el_tk_p4.phi());
529 
530 
531  LorentzVector cand_p4 = LorentzVector(candCtfTrackRef->px(), candCtfTrackRef->py(),candCtfTrackRef->pz(), candCtfTrackRef->p());
532  double candCurvature = -0.3*bFieldAtOrigin*(candCtfTrackRef->charge()/cand_p4.pt())/100.;
533  double rCand = fabs(1./candCurvature);
534  double xCand = -1*(1./candCurvature - candCtfTrackRef->d0())*sin(cand_p4.phi());
535  double yCand = (1./candCurvature - candCtfTrackRef->d0())*cos(cand_p4.phi());
536 
537  double d = sqrt(pow(xEl-xCand, 2) + pow(yEl-yCand , 2));
538  double dist = d - (rEl + rCand);
539  double dcot = 1./tan(el_tk_p4.theta()) - 1./tan(cand_p4.theta());
540 
541  //get the point of conversion
542  double xa1 = xEl + (xCand-xEl) * rEl/d;
543  double xa2 = xCand + (xEl-xCand) * rCand/d;
544  double ya1 = yEl + (yCand-yEl) * rEl/d;
545  double ya2 = yCand + (yEl-yCand) * rCand/d;
546 
547  double x=.5*(xa1+xa2);
548  double y=.5*(ya1+ya2);
549  double rconv = sqrt(pow(x,2) + pow(y,2));
550  double z = el_track->dz() + rEl*el_track->pz()*TMath::ACos(1-pow(rconv,2)/(2.*pow(rEl,2)))/el_track->pt();
551 
552  math::XYZPoint convPoint(x, y, z);
553 
554  //now assign a sign to the radius of conversion
555  float tempsign = el_track->px()*x + el_track->py()*y;
556  tempsign = tempsign/fabs(tempsign);
557  rconv = tempsign*rconv;
558 
559  int deltaMissingHits = -9999;
560 
561  deltaMissingHits = candCtfTrackRef->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
563 
564  return ConversionInfo(dist, dcot, rconv, convPoint, candCtfTrackRef, GsfTrackRef(), deltaMissingHits, flag);
565 
566  }
567 
568 //-------------------------------------------------------------------------------------
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
double p() const
momentum vector magnitude
Definition: TrackBase.h:615
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:185
virtual TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:201
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
ConversionInfo findBestConversionMatch(const std::vector< ConversionInfo > &v_convCandidates)
double radiusOfConversion() const
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:597
float ctfGsfOverlap() const
ProductID id() const
Definition: HandleBase.cc:15
const reco::Track * getElectronTrack(const reco::GsfElectron &, const float minFracSharedHits=0.45)
ConversionInfo getConversionInfo(const reco::GsfElectronCore &, const edm::Handle< reco::TrackCollection > &ctftracks_h, const edm::Handle< reco::GsfTrackCollection > &gsftracks_h, const double bFieldAtOrigin, const double minFracSharedHits=0.45)
bool isFromConversion(const ConversionInfo &, double maxAbsDist=0.02, double maxAbsDcot=0.02)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const GsfTrackRef & gsfTrack() const
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
double dist() const
key_type key() const
Accessor for product key.
Definition: Ref.h:265
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:627
ProductID id() const
Accessor for product ID.
Definition: Ref.h:259
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T sqrt(T t)
Definition: SSEVec.h:18
double pt() const
track transverse momentum
Definition: TrackBase.h:621
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
Definition: GsfTrackFwd.h:9
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZTLorentzVector LorentzVector
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:245
math::XYZPoint pointOfConversion() const
ConversionInfo arbitrateConversionPartnersbyR(const std::vector< ConversionInfo > &v_convCandidates)
int deltaMissingHits() const
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:639
std::vector< ConversionInfo > getConversionInfos(const reco::GsfElectronCore &, const edm::Handle< reco::TrackCollection > &ctftracks_h, const edm::Handle< reco::GsfTrackCollection > &gsftracks_h, const double bFieldAtOrigin, const double minFracSharedHits=0.45)
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:609
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
float shFracInnerHits() const
Definition: GsfElectron.h:200
int flag() const
T const * product() const
Definition: Handle.h:81
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:446
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:903
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
fixed size matrix
HLT enums.
TrackRef ctfTrack() const
int charge() const
track electric charge
Definition: TrackBase.h:567
double dcot() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:633
math::XYZTLorentzVector LorentzVector