CMS 3D CMS Logo

ConversionFinder.cc
Go to the documentation of this file.
6 #include "TMath.h"
7 
8 namespace egammaTools {
9 
11 
13  const reco::Track *candPartnerTk,
14  const double bFieldAtOrigin);
15 
16 const reco::Track* getElectronTrack(const reco::GsfElectron &, const float minFracSharedHits = 0.45);
17 
18 const reco::Track* getElectronTrack(const reco::GsfElectronCore &, const float minFracSharedHits = 0.45);
19 
20 bool isFromConversion(const ConversionInfo &convInfo,
21  double maxAbsDist, double maxAbsDcot)
22 {
23  return (std::abs(convInfo.dist) < maxAbsDist) && (std::abs(convInfo.dcot) < maxAbsDcot);
24 }
25 
26 //-----------------------------------------------------------------------------
28  const edm::Handle<reco::TrackCollection>& ctftracks_h,
29  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
30  const double bFieldAtOrigin,
31  const double minFracSharedHits) {
32 
33  std::vector<ConversionInfo> temp = getConversionInfos(*gsfElectron.core(),ctftracks_h,gsftracks_h,bFieldAtOrigin,minFracSharedHits) ;
34  return findBestConversionMatch(temp);
35 
36 }
37 //-----------------------------------------------------------------------------
39  const edm::Handle<reco::TrackCollection>& ctftracks_h,
40  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
41  const double bFieldAtOrigin,
42  const double minFracSharedHits) {
43 
44  std::vector<ConversionInfo> temp = getConversionInfos(gsfElectron,ctftracks_h,gsftracks_h,bFieldAtOrigin,minFracSharedHits) ;
45  return findBestConversionMatch(temp);
46 
47 }
48 
49 
50 //-----------------------------------------------------------------------------
51 std::vector<ConversionInfo> getConversionInfos(const reco::GsfElectronCore& gsfElectron,
52  const edm::Handle<reco::TrackCollection>& ctftracks_h,
53  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
54  const double bFieldAtOrigin,
55  const double minFracSharedHits) {
56 
57 
58 
59  using namespace reco;
60  using namespace std;
61  using namespace edm;
62 
63 
64  //get the track collections
65  const TrackCollection *ctftracks = ctftracks_h.product();
66  const GsfTrackCollection *gsftracks = gsftracks_h.product();
67 
68  //get the references to the gsf and ctf tracks that are made
69  //by the electron
70  const reco::TrackRef el_ctftrack = gsfElectron.ctfTrack();
71  const reco::GsfTrackRef& el_gsftrack = gsfElectron.gsfTrack();
72 
73  //protect against the wrong collection being passed to the function
74  if(el_ctftrack.isNonnull() && el_ctftrack.id() != ctftracks_h.id())
75  throw cms::Exception("ConversionFinderError") << "ProductID of ctf track collection does not match ProductID of electron's CTF track! \n";
76  if(el_gsftrack.isNonnull() && el_gsftrack.id() != gsftracks_h.id())
77  throw cms::Exception("ConversionFinderError") << "ProductID of gsf track collection does not match ProductID of electron's GSF track! \n";
78 
79  //make p4s for the electron's tracks for use later
80  LorentzVector el_ctftrack_p4;
81  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits)
82  el_ctftrack_p4 = LorentzVector(el_ctftrack->px(), el_ctftrack->py(), el_ctftrack->pz(), el_ctftrack->p());
83  LorentzVector el_gsftrack_p4(el_gsftrack->px(), el_gsftrack->py(), el_gsftrack->pz(), el_gsftrack->p());
84 
85  //the electron's CTF track must share at least 45% of the inner hits
86  //with the electron's GSF track
87  int ctfidx = -999.;
88  int gsfidx = -999.;
89  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits)
90  ctfidx = static_cast<int>(el_ctftrack.key());
91 
92  gsfidx = static_cast<int>(el_gsftrack.key());
93 
94 
95  //these vectors are for those candidate partner tracks that pass our cuts
96  vector<ConversionInfo> v_candidatePartners;
97  //track indices required to make references
98  int ctftk_i = 0;
99  int gsftk_i = 0;
100 
101 
102  //loop over the CTF tracks and try to find the partner track
103  for(TrackCollection::const_iterator ctftk = ctftracks->begin();
104  ctftk != ctftracks->end(); ctftk++, ctftk_i++) {
105 
106  if(ctftk_i == ctfidx)
107  continue;
108 
109  //candidate track's p4
110  LorentzVector ctftk_p4 = LorentzVector(ctftk->px(), ctftk->py(), ctftk->pz(), ctftk->p());
111 
112  //apply quality cuts to remove bad tracks
113  if(ctftk->ptError()/ctftk->pt() > 0.05)
114  continue;
115  if(ctftk->numberOfValidHits() < 5)
116  continue;
117 
118  if(el_ctftrack.isNonnull() &&
119  gsfElectron.ctfGsfOverlap() > minFracSharedHits &&
120  fabs(ctftk_p4.Pt() - el_ctftrack->pt())/el_ctftrack->pt() < 0.2)
121  continue;
122 
123  //use the electron's CTF track, if not null, to search for the partner track
124  //look only in a cone of 0.5 to save time, and require that the track is opp. sign
125  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits &&
126  deltaR(el_ctftrack_p4, ctftk_p4) < 0.5 &&
127  (el_ctftrack->charge() + ctftk->charge() == 0) ) {
128 
129  ConversionInfo convInfo = getConversionInfo((const reco::Track*)(el_ctftrack.get()), &(*ctftk), bFieldAtOrigin);
130 
131  //need to add the track reference information for completeness
132  //because the overloaded fnc above does not make a trackRef
133  int deltaMissingHits = ctftk->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
134  - el_ctftrack->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
135 
136 
137  v_candidatePartners.push_back({convInfo.dist,
138  convInfo.dcot,
139  convInfo.radiusOfConversion,
140  convInfo.pointOfConversion,
141  TrackRef(ctftracks_h, ctftk_i),
142  GsfTrackRef() ,
143  deltaMissingHits,
144  0});
145 
146  }//using the electron's CTF track
147 
148 
149  //now we check using the electron's gsf track
150  if(deltaR(el_gsftrack_p4, ctftk_p4) < 0.5 &&
151  (el_gsftrack->charge() + ctftk->charge() == 0) &&
152  el_gsftrack->ptError()/el_gsftrack->pt() < 0.25) {
153 
154  int deltaMissingHits = ctftk->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
155  - el_gsftrack->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
156 
157  ConversionInfo convInfo = getConversionInfo((const reco::Track*)(el_gsftrack.get()), &(*ctftk), bFieldAtOrigin);
158 
159  v_candidatePartners.push_back({convInfo.dist,
160  convInfo.dcot,
161  convInfo.radiusOfConversion,
162  convInfo.pointOfConversion,
163  TrackRef(ctftracks_h, ctftk_i),
164  GsfTrackRef(),
165  deltaMissingHits,
166  1});
167  }//using the electron's GSF track
168 
169  }//loop over the CTF track collection
170 
171 
172  //------------------------------------------------------ Loop over GSF collection ----------------------------------//
173  for(GsfTrackCollection::const_iterator gsftk = gsftracks->begin();
174  gsftk != gsftracks->end(); gsftk++, gsftk_i++) {
175 
176  //reject the electron's own gsfTrack
177  if(gsfidx == gsftk_i)
178  continue;
179 
180  LorentzVector gsftk_p4 = LorentzVector(gsftk->px(), gsftk->py(), gsftk->pz(), gsftk->p());
181 
182  //apply quality cuts to remove bad tracks
183  if(gsftk->ptError()/gsftk->pt() > 0.5)
184  continue;
185  if(gsftk->numberOfValidHits() < 5)
186  continue;
187 
188  if(fabs(gsftk->pt() - el_gsftrack->pt())/el_gsftrack->pt() < 0.25)
189  continue;
190 
191  //try using the electron's CTF track first if it exists
192  //look only in a cone of 0.5 around the electron's track
193  //require opposite sign
194  if(el_ctftrack.isNonnull() && gsfElectron.ctfGsfOverlap() > minFracSharedHits &&
195  deltaR(el_ctftrack_p4, gsftk_p4) < 0.5 &&
196  (el_ctftrack->charge() + gsftk->charge() == 0)) {
197 
198  int deltaMissingHits = gsftk->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
199  - el_ctftrack->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
200 
201  ConversionInfo convInfo = getConversionInfo((const reco::Track*)(el_ctftrack.get()), (const reco::Track*)(&(*gsftk)), bFieldAtOrigin);
202  //fill the Ref info
203  v_candidatePartners.push_back({convInfo.dist,
204  convInfo.dcot,
205  convInfo.radiusOfConversion,
206  convInfo.pointOfConversion,
207  TrackRef(),
208  GsfTrackRef(gsftracks_h, gsftk_i),
209  deltaMissingHits,
210  2});
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 
224  v_candidatePartners.push_back({convInfo.dist,
225  convInfo.dcot,
226  convInfo.radiusOfConversion,
227  convInfo.pointOfConversion,
228  TrackRef(),
229  GsfTrackRef(gsftracks_h, gsftk_i),
230  deltaMissingHits,
231  3});
232  }
233  }//loop over the gsf track collection
234 
235 
236  return v_candidatePartners;
237 
238 }
239 
240 
241 //-------------------------------------------------------------------------------------
243  const reco::Track *candPartnerTk,
244  const double bFieldAtOrigin) {
245 
246  using namespace reco;
247 
248  //now calculate the conversion related information
249  LorentzVector el_tk_p4(el_track->px(), el_track->py(), el_track->pz(), el_track->p());
250  double elCurvature = -0.3*bFieldAtOrigin*(el_track->charge()/el_tk_p4.pt())/100.;
251  double rEl = fabs(1./elCurvature);
252  double xEl = -1*(1./elCurvature - el_track->d0())*sin(el_tk_p4.phi());
253  double yEl = (1./elCurvature - el_track->d0())*cos(el_tk_p4.phi());
254 
255 
256  LorentzVector cand_p4 = LorentzVector(candPartnerTk->px(), candPartnerTk->py(),candPartnerTk->pz(), candPartnerTk->p());
257  double candCurvature = -0.3*bFieldAtOrigin*(candPartnerTk->charge()/cand_p4.pt())/100.;
258  double rCand = fabs(1./candCurvature);
259  double xCand = -1*(1./candCurvature - candPartnerTk->d0())*sin(cand_p4.phi());
260  double yCand = (1./candCurvature - candPartnerTk->d0())*cos(cand_p4.phi());
261 
262  double d = sqrt(pow(xEl-xCand, 2) + pow(yEl-yCand , 2));
263  double dist = d - (rEl + rCand);
264  double dcot = 1./tan(el_tk_p4.theta()) - 1./tan(cand_p4.theta());
265 
266  //get the point of conversion
267  double xa1 = xEl + (xCand-xEl) * rEl/d;
268  double xa2 = xCand + (xEl-xCand) * rCand/d;
269  double ya1 = yEl + (yCand-yEl) * rEl/d;
270  double ya2 = yCand + (yEl-yCand) * rCand/d;
271 
272  double x=.5*(xa1+xa2);
273  double y=.5*(ya1+ya2);
274  double rconv = sqrt(pow(x,2) + pow(y,2));
275  double z = el_track->dz() + rEl*el_track->pz()*TMath::ACos(1-pow(rconv,2)/(2.*pow(rEl,2)))/el_track->pt();
276 
277  math::XYZPoint convPoint(x, y, z);
278 
279  //now assign a sign to the radius of conversion
280  float tempsign = el_track->px()*x + el_track->py()*y;
281  tempsign = tempsign/fabs(tempsign);
282  rconv = tempsign*rconv;
283 
284  //return an instance of ConversionInfo, but with a NULL track refs
285  return ConversionInfo{dist, dcot, rconv, convPoint, TrackRef(), GsfTrackRef(), -9999, -9999};
286 
287 }
288 
289 //-------------------------------------------------------------------------------------
290 const reco::Track* getElectronTrack(const reco::GsfElectron& electron, const float minFracSharedHits) {
291 
292  if(electron.closestCtfTrackRef().isNonnull() &&
293  electron.shFracInnerHits() > minFracSharedHits)
294  return (const reco::Track*)electron.closestCtfTrackRef().get();
295 
296  return (const reco::Track*)(electron.gsfTrack().get());
297 }
298 
299 //------------------------------------------------------------------------------------
300 
301 //takes in a vector of candidate conversion partners
302 //and arbitrates between them returning the one with the
303 //smallest R=sqrt(dist*dist + dcot*dcot)
304 ConversionInfo arbitrateConversionPartnersbyR(const std::vector<ConversionInfo>& v_convCandidates) {
305 
306  if(v_convCandidates.size() == 1)
307  return v_convCandidates.at(0);
308 
309  double R = sqrt(pow(v_convCandidates.at(0).dist,2) + pow(v_convCandidates.at(0).dcot,2));
310 
311  int iArbitrated = 0;
312  int i = 0;
313 
314  for(auto const& temp : v_convCandidates) {
315  double temp_R = sqrt(pow(temp.dist,2) + pow(temp.dcot,2));
316  if(temp_R < R) {
317  R = temp_R;
318  iArbitrated = i;
319  }
320  ++i;
321  }
322 
323  return v_convCandidates.at(iArbitrated);
324 
325  }
326 
327 //------------------------------------------------------------------------------------
328 ConversionInfo 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> 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 }
569 
570 //-------------------------------------------------------------------------------------
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
double p() const
momentum vector magnitude
Definition: TrackBase.h:648
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:186
const double dist
virtual TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:205
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:630
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)
float ctfGsfOverlap() const
ProductID id() const
Definition: HandleBase.cc:15
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:15
key_type key() const
Accessor for product key.
Definition: Ref.h:263
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:660
math::XYZTLorentzVector LorentzVector
ProductID id() const
Accessor for product ID.
Definition: Ref.h:257
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const int flag
bool isFromConversion(const ConversionInfo &, double maxAbsDist=0.02, double maxAbsDcot=0.02)
T sqrt(T t)
Definition: SSEVec.h:18
double pt() const
track transverse momentum
Definition: TrackBase.h:654
const double radiusOfConversion
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
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:243
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:672
const double dcot
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:642
float shFracInnerHits() const
Definition: GsfElectron.h:204
T const * product() const
Definition: Handle.h:74
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:479
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:21
ConversionInfo arbitrateConversionPartnersbyR(const std::vector< ConversionInfo > &v_convCandidates)
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:990
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
const reco::Track * getElectronTrack(const reco::GsfElectron &, const float minFracSharedHits=0.45)
fixed size matrix
HLT enums.
const int deltaMissingHits
TrackRef ctfTrack() const
ConversionInfo findBestConversionMatch(const std::vector< ConversionInfo > &v_convCandidates)
const math::XYZPoint pointOfConversion
int charge() const
track electric charge
Definition: TrackBase.h:600
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:666
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)