CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AdaptiveVertexFitter.cc
Go to the documentation of this file.
8 
9 #include <algorithm>
10 
11 using namespace edm;
12 
13 // #define STORE_WEIGHTS
14 #ifdef STORE_WEIGHTS
15 #include <dataharvester/Writer.h>
16 #endif
17 
18 using namespace std;
19 
20 namespace {
21  struct CompareTwoTracks {
22  int operator() ( const reco::TransientTrack & a, const reco::TransientTrack & b ) {
23  return ( a.impactPointState().globalMomentum().perp() >
25  };
26  };
27  // typedef ReferenceCountingPointer<VertexTrack<5> > RefCountedVertexTrack;
28  typedef AdaptiveVertexFitter::RefCountedVertexTrack RefCountedVertexTrack;
29 
30 
31  AlgebraicSymMatrix33 initFitError() {
32  // that's how we model the lin pt error for the initial seed!
33  const float initialError = 10000;
35  ret(0,0)=initialError;
36  ret(1,1)=initialError;
37  ret(2,2)=initialError;
38  return ret;
39  }
40  GlobalError fitError()
41  {
42  static const GlobalError err( initFitError() );
43  return err;
44  }
45 
46  AlgebraicSymMatrix33 initLinePointError() {
47  // that's how we model the error of the linearization point.
48  // for track weighting!
50  ret(0,0)=.3; ret(1,1)=.3; ret(2,2)=3.;
51  // ret(0,0)=1e-7; ret(1,1)=1e-7; ret(2,2)=1e-7;
52  return ret;
53  }
54  GlobalError linPointError()
55  {
56  static const GlobalError err( initLinePointError() );
57  return err;
58  }
59 
60  struct DistanceToRefPoint {
61  DistanceToRefPoint ( const GlobalPoint & ref ) : theRef ( ref ) {}
62 
63  bool operator() ( const RefCountedVertexTrack & v1, const RefCountedVertexTrack & v2 )
64  {
65  return ( distance ( v1 ) < distance ( v2 ) );
66  }
67 
68  float distance ( const RefCountedVertexTrack & v1 )
69  {
70  return ( v1->linearizedTrack()->track().initialFreeState().position() - theRef ).mag2();
71  }
72 
73  private:
74  GlobalPoint theRef;
75  };
76 
77  #ifdef STORE_WEIGHTS
78  //NOTE: This is not thread safe
79  map < RefCountedLinearizedTrackState, int > ids;
80  int iter=0;
81 
82  int getId ( const RefCountedLinearizedTrackState & r )
83  {
84  static int ctr=1;
85  if ( ids.count(r) == 0 )
86  {
87  ids[r]=ctr++;
88  }
89  return ids[r];
90  }
91  #endif
92 }
93 
95  const AnnealingSchedule & ann,
96  const LinearizationPointFinder & linP,
97  const VertexUpdator<5> & updator,
99  const VertexSmoother<5> & smoother,
100  const AbstractLTSFactory<5> & ltsf ) :
101  theNr(0),
102  theLinP(linP.clone()), theUpdator( updator.clone()),
103  theSmoother ( smoother.clone() ), theAssProbComputer( ann.clone() ),
104  theComp ( crit.clone() ), theLinTrkFactory ( ltsf.clone() ),
105  gsfIntermediarySmoothing_(false)
106 {
107  setParameters();
108 }
109 
111 {
113 }
114 
116  (const AdaptiveVertexFitter & o ) :
117  theMaxShift ( o.theMaxShift ), theMaxLPShift ( o.theMaxLPShift ),
118  theMaxStep ( o.theMaxStep ), theWeightThreshold ( o.theWeightThreshold ),
119  theNr ( o.theNr ),
120  theLinP ( o.theLinP->clone() ), theUpdator ( o.theUpdator->clone() ),
121  theSmoother ( o.theSmoother->clone() ),
122  theAssProbComputer ( o.theAssProbComputer->clone() ),
123  theComp ( o.theComp->clone() ),
124  theLinTrkFactory ( o.theLinTrkFactory->clone() ),
125  gsfIntermediarySmoothing_(o.gsfIntermediarySmoothing_)
126 {}
127 
129 {
130  delete theLinP;
131  delete theUpdator;
132  delete theSmoother;
133  delete theAssProbComputer;
134  delete theComp;
135  delete theLinTrkFactory;
136 }
137 
138 void AdaptiveVertexFitter::setParameters( double maxshift, double maxlpshift,
139  unsigned maxstep, double weightthreshold )
140 {
141  theMaxShift = maxshift;
142  theMaxLPShift = maxlpshift;
143  theMaxStep = maxstep;
144  theWeightThreshold=weightthreshold;
145 }
146 
147 
149 {
150  setParameters ( s.getParameter<double>("maxshift"),
151  s.getParameter<double>("maxlpshift"),
152  s.getParameter<int>("maxstep"),
153  s.getParameter<double>("weightthreshold") );
154 }
155 
157 AdaptiveVertexFitter::vertex(const vector<reco::TransientTrack> & unstracks) const
158 {
159  if ( unstracks.size() < 2 )
160  {
161  LogError("RecoVertex|AdaptiveVertexFitter")
162  << "Supplied fewer than two tracks. Vertex is invalid.";
163  return CachingVertex<5>(); // return invalid vertex
164  };
165  vector < reco::TransientTrack > tracks = unstracks;
166  sort ( tracks.begin(), tracks.end(), CompareTwoTracks() );
167  // Linearization Point
168  GlobalPoint linP = theLinP->getLinearizationPoint(tracks);
169  // Initial vertex seed, with a very large error matrix
170  VertexState lseed (linP, linPointError() );
171  vector<RefCountedVertexTrack> vtContainer = linearizeTracks(tracks, lseed);
172 
173  VertexState seed (linP, fitError() );
174  return fit(vtContainer, seed, false);
175 }
176 
178 AdaptiveVertexFitter::vertex(const vector<RefCountedVertexTrack> & tracks) const
179 {
180  if ( tracks.size() < 2 )
181  {
182  LogError("RecoVertex|AdaptiveVertexFitter")
183  << "Supplied fewer than two tracks. Vertex is invalid.";
184  return CachingVertex<5>(); // return invalid vertex
185  };
186  // Initial vertex seed, with a very small weight matrix
187  GlobalPoint linP = tracks[0]->linearizedTrack()->linearizationPoint();
188  VertexState seed (linP, fitError() );
189  return fit(tracks, seed, false);
190 }
191 
193 AdaptiveVertexFitter::vertex(const vector<RefCountedVertexTrack> & tracks, const reco::BeamSpot & spot ) const
194 {
195  if ( tracks.size() < 1 )
196  {
197  LogError("RecoVertex|AdaptiveVertexFitter")
198  << "Supplied no tracks. Vertex is invalid.";
199  return CachingVertex<5>(); // return invalid vertex
200  };
201  VertexState beamSpotState(spot);
202  return fit(tracks, beamSpotState, true );
203 }
204 
205 
206 
211 AdaptiveVertexFitter::vertex(const vector<reco::TransientTrack> & tracks,
212  const GlobalPoint& linPoint) const
213 {
214  if ( tracks.size() < 2 )
215  {
216  LogError("RecoVertex|AdaptiveVertexFitter")
217  << "Supplied fewer than two tracks. Vertex is invalid.";
218  return CachingVertex<5>(); // return invalid vertex
219  };
220  // Initial vertex seed, with a very large error matrix
221  VertexState seed (linPoint, linPointError() );
222  vector<RefCountedVertexTrack> vtContainer = linearizeTracks(tracks, seed);
223  VertexState fitseed (linPoint, fitError() );
224  return fit(vtContainer, fitseed, false);
225 }
226 
227 
233 AdaptiveVertexFitter::vertex(const vector<reco::TransientTrack> & unstracks,
234  const reco::BeamSpot& beamSpot) const
235 {
236  if ( unstracks.size() < 1 )
237  {
238  LogError("RecoVertex|AdaptiveVertexFitter")
239  << "Supplied no tracks. Vertex is invalid.";
240  return CachingVertex<5>(); // return invalid vertex
241  };
242 
243  VertexState beamSpotState(beamSpot);
244  vector<RefCountedVertexTrack> vtContainer;
245 
246  vector < reco::TransientTrack > tracks = unstracks;
247  sort ( tracks.begin(), tracks.end(), CompareTwoTracks() );
248 
249  if (tracks.size() > 1) {
250  // Linearization Point search if there are more than 1 track
251  GlobalPoint linP = theLinP->getLinearizationPoint(tracks);
252  VertexState lpState(linP, linPointError() );
253  vtContainer = linearizeTracks(tracks, lpState);
254  } else {
255  // otherwise take the beamspot position.
256  vtContainer = linearizeTracks(tracks, beamSpotState);
257  }
258 
259  return fit(vtContainer, beamSpotState, true);
260 }
261 
262 
268 CachingVertex<5> AdaptiveVertexFitter::vertex(const vector<reco::TransientTrack> & tracks,
269  const GlobalPoint& priorPos,
270  const GlobalError& priorError) const
271 
272 {
273  if ( tracks.size() < 1 )
274  {
275  LogError("RecoVertex|AdaptiveVertexFitter")
276  << "Supplied no tracks. Vertex is invalid.";
277  return CachingVertex<5>(); // return invalid vertex
278  };
279  VertexState seed (priorPos, priorError);
280  vector<RefCountedVertexTrack> vtContainer = linearizeTracks(tracks, seed);
281  return fit( vtContainer, seed, true );
282 }
283 
284 
290  const vector<RefCountedVertexTrack> & tracks,
291  const GlobalPoint& priorPos,
292  const GlobalError& priorError) const
293 {
294  if ( tracks.size() < 1 )
295  {
296  LogError("RecoVertex|AdaptiveVertexFitter")
297  << "Supplied no tracks. Vertex is invalid.";
298  return CachingVertex<5>(); // return invalid vertex
299  };
300  VertexState seed (priorPos, priorError);
301  return fit(tracks, seed, true);
302 }
303 
304 
312 vector<AdaptiveVertexFitter::RefCountedVertexTrack>
313 AdaptiveVertexFitter::linearizeTracks(const vector<reco::TransientTrack> & tracks,
314  const VertexState & seed ) const
315 {
316  const GlobalPoint & linP ( seed.position() );
317  vector<RefCountedLinearizedTrackState> lTracks;
318  for(vector<reco::TransientTrack>::const_iterator i = tracks.begin();
319  i != tracks.end(); ++i )
320  {
321  try {
324  lTracks.push_back(lTrData);
325  } catch ( exception & e ) {
326  LogInfo("RecoVertex/AdaptiveVertexFitter")
327  << "Exception " << e.what() << " in ::linearizeTracks."
328  << "Your future vertex has just lost a track.";
329  };
330  }
331  return weightTracks(lTracks, seed );
332 }
333 
339 vector<AdaptiveVertexFitter::RefCountedVertexTrack>
341  const vector<RefCountedVertexTrack> & tracks,
342  const CachingVertex<5> & vertex ) const
343 {
344  VertexState seed = vertex.vertexState();
345  GlobalPoint linP = seed.position();
346  vector<RefCountedLinearizedTrackState> lTracks;
347  for(vector<RefCountedVertexTrack>::const_iterator i = tracks.begin();
348  i != tracks.end(); i++)
349  {
350  try {
352  = theLinTrkFactory->linearizedTrackState( linP, (**i).linearizedTrack()->track() );
353  /*
354  RefCountedLinearizedTrackState lTrData =
355  (**i).linearizedTrack()->stateWithNewLinearizationPoint(linP);
356  */
357  lTracks.push_back(lTrData);
358  } catch ( exception & e ) {
359  LogInfo("RecoVertex/AdaptiveVertexFitter")
360  << "Exception " << e.what() << " in ::relinearizeTracks. "
361  << "Will not relinearize this track.";
362  lTracks.push_back ( (**i).linearizedTrack() );
363  };
364  };
365  return reWeightTracks(lTracks, vertex );
366 }
367 
369 {
370  return new AdaptiveVertexFitter( * this );
371 }
372 
373 double AdaptiveVertexFitter::getWeight ( float chi2 ) const
374 {
375  double weight = theAssProbComputer->weight(chi2);
376 
377  if ( weight > 1.0 )
378  {
379  LogInfo("RecoVertex/AdaptiveVertexFitter") << "Weight " << weight << " > 1.0!";
380  weight=1.0;
381  };
382 
383  if ( weight < 1e-20 )
384  {
385  // LogInfo("RecoVertex/AdaptiveVertexFitter") << "Weight " << weight << " < 0.0!";
386  weight=1e-20;
387  };
388  return weight;
389 }
390 
391 vector<AdaptiveVertexFitter::RefCountedVertexTrack>
393  const vector<RefCountedLinearizedTrackState> & lTracks,
394  const CachingVertex<5> & vertex ) const
395 {
396  VertexState seed = vertex.vertexState();
397  // cout << "[AdaptiveVertexFitter] now reweight around " << seed.position() << endl;
398  theNr++;
399  // GlobalPoint pos = seed.position();
400 
401  vector<RefCountedVertexTrack> finalTracks;
402  VertexTrackFactory<5> vTrackFactory;
403  #ifdef STORE_WEIGHTS
404  iter++;
405  #endif
406  for(vector<RefCountedLinearizedTrackState>::const_iterator i
407  = lTracks.begin(); i != lTracks.end(); i++)
408  {
409  double weight=0.;
410  // cout << "[AdaptiveVertexFitter] estimate " << endl;
411  pair < bool, double > chi2Res ( false, 0. );
412  try {
413  chi2Res = theComp->estimate ( vertex, *i, std::distance(lTracks.begin(),i) );
414  } catch ( exception const & e ) {};
415  // cout << "[AdaptiveVertexFitter] /estimate " << endl;
416  if (!chi2Res.first) {
417  // cout << "[AdaptiveVertexFitter] aie... vertex candidate is at " << vertex.position() << endl;
418  LogInfo("AdaptiveVertexFitter" ) << "When reweighting, chi2<0. Will add this track with w=0.";
419  // edm::LogInfo("AdaptiveVertexFitter" ) << "pt=" << (**i).track().pt();
420  }else {
421  weight = getWeight ( chi2Res.second );
422  }
423 
424  RefCountedVertexTrack vTrData
425  = vTrackFactory.vertexTrack(*i, seed, weight );
426 
427  #ifdef STORE_WEIGHTS
428  map < string, dataharvester::MultiType > m;
429  m["chi2"]=chi2;
430  m["w"]=theAssProbComputer->weight(chi2);
432  m["n"]=iter;
433  m["pos"]="reweight";
434  m["id"]=getId ( *i );
435  dataharvester::Writer::file("w.txt").save ( m );
436  #endif
437 
438  finalTracks.push_back(vTrData);
439  }
440  sort ( finalTracks.begin(), finalTracks.end(),
441  DistanceToRefPoint ( vertex.position() ) );
442  // cout << "[AdaptiveVertexFitter] /now reweight" << endl;
443  return finalTracks;
444 }
445 
446 vector<AdaptiveVertexFitter::RefCountedVertexTrack>
448  const vector<RefCountedLinearizedTrackState> & lTracks,
449  const VertexState & seed ) const
450 {
451  theNr++;
452  CachingVertex<5> seedvtx ( seed, vector<RefCountedVertexTrack> (), 0. );
456 
457  vector<RefCountedVertexTrack> finalTracks;
458  VertexTrackFactory<5> vTrackFactory;
459  #ifdef STORE_WEIGHTS
460  iter++;
461  #endif
462  for(vector<RefCountedLinearizedTrackState>::const_iterator i
463  = lTracks.begin(); i != lTracks.end(); i++)
464  {
465 
466  double weight = 0.;
467  pair<bool, double> chi2Res = theComp->estimate ( seedvtx, *i, std::distance(lTracks.begin(),i) );
468  if (!chi2Res.first) {
469  // cout << "[AdaptiveVertexFitter] Aiee! " << endl;
470  LogInfo ("AdaptiveVertexFitter" ) << "When weighting a track, chi2 calculation failed;"
471  << " will add with w=0.";
472  } else {
473  weight = getWeight ( chi2Res.second );
474  }
475  RefCountedVertexTrack vTrData
476  = vTrackFactory.vertexTrack(*i, seed, weight );
477  #ifdef STORE_WEIGHTS
478  map < string, dataharvester::MultiType > m;
479  m["chi2"]=chi2;
480  m["w"]=theAssProbComputer->weight(chi2);
482  m["n"]=iter;
483  m["id"]=getId ( *i );
484  m["pos"]="weight";
485  dataharvester::Writer::file("w.txt").save ( m );
486  #endif
487  finalTracks.push_back(vTrData);
488  }
489  return finalTracks;
490 }
491 
497 vector<AdaptiveVertexFitter::RefCountedVertexTrack>
499  const vector<RefCountedVertexTrack> & tracks,
500  const CachingVertex<5> & seed) const
501 {
502  vector<RefCountedLinearizedTrackState> lTracks;
503  for(vector<RefCountedVertexTrack>::const_iterator i = tracks.begin();
504  i != tracks.end(); i++)
505  {
506  lTracks.push_back((**i).linearizedTrack());
507  }
508 
509  return reWeightTracks(lTracks, seed);
510 }
511 
512 
513 /*
514  * The method where the vertex fit is actually done!
515  */
516 
518 AdaptiveVertexFitter::fit( const vector<RefCountedVertexTrack> & tracks,
519  const VertexState & priorSeed,
520  bool withPrior) const
521 {
522  // cout << "[AdaptiveVertexFit] fit with " << tracks.size() << endl;
524 
525  vector<RefCountedVertexTrack> initialTracks;
526  GlobalPoint priorVertexPosition = priorSeed.position();
527  GlobalError priorVertexError = priorSeed.error();
528 
529  CachingVertex<5> returnVertex( priorVertexPosition,priorVertexError,
530  initialTracks,0);
531  if (withPrior)
532  {
533  returnVertex = CachingVertex<5>(priorVertexPosition,priorVertexError,
534  priorVertexPosition,priorVertexError,initialTracks,0);
535  }
536 
537  // vector<RefCountedVertexTrack> globalVTracks = tracks;
538  // sort the tracks, according to distance to seed!
539  vector<RefCountedVertexTrack> globalVTracks ( tracks.size() );
540 
541  partial_sort_copy ( tracks.begin(), tracks.end(),
542  globalVTracks.begin(), globalVTracks.end(), DistanceToRefPoint ( priorSeed.position() ) );
543 
544  // main loop through all the VTracks
545  int lpStep = 0; int step = 0;
546 
547  CachingVertex<5> initialVertex = returnVertex;
548 
549  GlobalPoint newPosition = priorVertexPosition;
550  GlobalPoint previousPosition = newPosition;
551 
552  int ns_trks=0; // number of significant tracks.
553  // If we have only two significant tracks, we return an invalid vertex
554 
555  // cout << "[AdaptiveVertexFit] start " << tracks.size() << endl;
556  /*
557  for ( vector< RefCountedVertexTrack >::const_iterator
558  i=globalVTracks.begin(); i!=globalVTracks.end() ; ++i )
559  {
560  cout << " " << (**i).linearizedTrack()->track().initialFreeState().momentum() << endl;
561  }*/
562  do {
563  ns_trks=0;
564  CachingVertex<5> fVertex = initialVertex;
565  // cout << "[AdaptiveVertexFit] step " << step << " at " << fVertex.position() << endl;
566  if ((previousPosition - newPosition).transverse() > theMaxLPShift)
567  {
568  // relinearize and reweight.
569  // (reLinearizeTracks also reweights tracks)
570  // cout << "[AdaptiveVertexFit] relinearize at " << returnVertex.position() << endl;
571  if (gsfIntermediarySmoothing_) returnVertex = theSmoother->smooth(returnVertex);
572  globalVTracks = reLinearizeTracks( globalVTracks, returnVertex );
573  lpStep++;
574  } else if (step) {
575  // reweight, if it is not the first step
576  // cout << "[AdaptiveVertexFit] reweight at " << returnVertex.position() << endl;
577  if (gsfIntermediarySmoothing_) returnVertex = theSmoother->smooth(returnVertex);
578  globalVTracks = reWeightTracks( globalVTracks, returnVertex );
579  }
580  // cout << "[AdaptiveVertexFit] relinarized, reweighted" << endl;
581  // update sequentially the vertex estimate
582  CachingVertex<5> nVertex;
583  for(vector<RefCountedVertexTrack>::const_iterator i
584  = globalVTracks.begin(); i != globalVTracks.end(); i++)
585  {
586  if ((**i).weight() > 0.) nVertex = theUpdator->add( fVertex, *i );
587  else nVertex = fVertex;
588  if (nVertex.isValid()) {
589  if ( (**i).weight() >= theWeightThreshold )
590  {
591  ns_trks++;
592  };
593 
594  if ( fabs ( nVertex.position().z() ) > 10000. ||
595  nVertex.position().perp()>120.)
596  {
597  // were more than 100 m off!!
598  LogInfo ("AdaptiveVertexFitter" ) << "Vertex candidate just took off to " << nVertex.position()
599  << "! Will discard this update!";
600 // //<< "track pt was " << (**i).linearizedTrack()->track().pt()
601 // << "track momentum was " << (**i).linearizedTrack()->track().initialFreeState().momentum()
602 // << "track position was " << (**i).linearizedTrack()->track().initialFreeState().position()
603 // << "track chi2 was " << (**i).linearizedTrack()->track().chi2()
604 // << "track ndof was " << (**i).linearizedTrack()->track().ndof()
605 // << "track w was " << (**i).weight()
606 // << "track schi2 was " << (**i).smoothedChi2();
607  } else {
608  fVertex = nVertex;
609  }
610  } else {
611  LogInfo("RecoVertex/AdaptiveVertexFitter")
612  << "The updator returned an invalid vertex when adding track "
613  << i-globalVTracks.begin()
614  << ".\n Your vertex might just have lost one good track.";
615  };
616  }
617  previousPosition = newPosition;
618  newPosition = fVertex.position();
619  returnVertex = fVertex;
621  step++;
622  if ( step >= theMaxStep ) break;
623 
624  } while (
625  // repeat as long as
626  // - vertex moved too much or
627  // - we're not yet annealed
628  ( ((previousPosition - newPosition).mag() > theMaxShift) ||
629  (!(theAssProbComputer->isAnnealed()) ) ) ) ;
630 
631  if ( theWeightThreshold > 0. && ns_trks < 2 && !withPrior )
632  {
633  LogDebug("AdaptiveVertexFitter")
634  << "fewer than two significant tracks (w>" << theWeightThreshold << ")."
635  << " Fitted vertex is invalid.";
636  return CachingVertex<5>(); // return invalid vertex
637  }
638 
639  #ifdef STORE_WEIGHTS
640  map < string, dataharvester::MultiType > m;
641  m["chi2"]=chi2;
642  m["w"]=theAssProbComputer->weight(chi2);
644  m["n"]=iter;
645  m["id"]=getId ( *i );
646  m["pos"]="final";
647  dataharvester::Writer::file("w.txt").save ( m );
648  #endif
649  // cout << "[AdaptiveVertexFit] /fit" << endl;
650  return theSmoother->smooth( returnVertex );
651 }
#define LogDebug(id)
virtual bool isAnnealed() const =0
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
T perp() const
Definition: PV3DBase.h:72
std::vector< RefCountedVertexTrack > reWeightTracks(const std::vector< RefCountedLinearizedTrackState > &, const CachingVertex< 5 > &seed) const
virtual RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const =0
RefCountedVertexTrack vertexTrack(const RefCountedLinearizedTrackState lt, const VertexState vs, float weight=1.0) const
LinearizationPointFinder * theLinP
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
VertexState const & vertexState() const
Definition: CachingVertex.h:85
static unsigned int getId(void)
VertexUpdator< 5 > * theUpdator
virtual AnnealingSchedule * clone() const =0
virtual VertexSmoother * clone() const =0
CachingVertex< 5 > fit(const std::vector< RefCountedVertexTrack > &tracks, const VertexState &priorSeed, bool withPrior) const
virtual VertexTrackCompatibilityEstimator< N > * clone() const =0
virtual const AbstractLTSFactory * clone() const =0
std::vector< RefCountedVertexTrack > reLinearizeTracks(const std::vector< RefCountedVertexTrack > &tracks, const CachingVertex< 5 > &vertex) const
AdaptiveVertexFitter * clone() const
virtual CachingVertex< N > add(const CachingVertex< N > &v, const typename CachingVertex< N >::RefCountedVertexTrack t) const =0
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
virtual BDpair estimate(const CachingVertex< N > &v, const RefCountedLinearizedTrackState track, unsigned int hint=UINT_MAX) const =0
T z() const
Definition: PV3DBase.h:64
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &) const
VertexSmoother< 5 > * theSmoother
AnnealingSchedule * theAssProbComputer
virtual double currentTemp() const =0
void setParameters(double maxshift=0.0001, double maxlpshift=0.1, unsigned maxstep=30, double weightthreshold=.001)
double getWeight(float chi2) const
AdaptiveVertexFitter(const AnnealingSchedule &ann=GeometricAnnealing(), const LinearizationPointFinder &linP=DefaultLinearizationPointFinder(), const VertexUpdator< 5 > &updator=KalmanVertexUpdator< 5 >(), const VertexTrackCompatibilityEstimator< 5 > &estor=KalmanVertexTrackCompatibilityEstimator< 5 >(), const VertexSmoother< 5 > &smoother=DummyVertexSmoother< 5 >(), const AbstractLTSFactory< 5 > &ltsf=LinearizedTrackStateFactory())
tuple tracks
Definition: testEve_cfg.py:39
virtual CachingVertex< N > smooth(const CachingVertex< N > &vertex) const =0
double b
Definition: hdecay.h:120
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
GlobalPoint position() const
virtual GlobalPoint getLinearizationPoint(const std::vector< reco::TransientTrack > &) const =0
GlobalVector globalMomentum() const
virtual LinearizationPointFinder * clone() const =0
double a
Definition: hdecay.h:121
virtual VertexUpdator * clone() const =0
T transverse() const
Another name for perp()
bool isValid() const
Definition: CachingVertex.h:96
virtual void anneal()=0
virtual void resetAnnealing()=0
std::vector< RefCountedVertexTrack > linearizeTracks(const std::vector< reco::TransientTrack > &, const VertexState &) const
TrajectoryStateOnSurface impactPointState() const
T w() const
volatile std::atomic< bool > shutdown_flag false
int weight
Definition: histoStyle.py:50
std::vector< RefCountedVertexTrack > weightTracks(const std::vector< RefCountedLinearizedTrackState > &, const VertexState &seed) const
virtual double weight(double chi2) const =0
const AbstractLTSFactory< 5 > * theLinTrkFactory
VertexTrackCompatibilityEstimator< 5 > * theComp