CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MultiVertexFitter.cc
Go to the documentation of this file.
2 // #include "Vertex/VertexPrimitives/interface/TransientVertex.h"
3 #include <map>
4 #include <algorithm>
5 #include <iomanip>
6 // #include "Vertex/VertexRecoAnalysis/interface/RecTrackNamer.h"
7 // #include "Vertex/MultiVertexFit/interface/TransientVertexNamer.h"
14 
15 // #define MVFHarvestingDebug
16 #ifdef MVFHarvestingDebug
17 #include "Vertex/VertexSimpleVis/interface/PrimitivesHarvester.h"
18 #endif
19 
20 using namespace std;
21 using namespace reco;
22 
23 namespace
24 {
25  typedef MultiVertexFitter::TrackAndWeight TrackAndWeight;
26  typedef MultiVertexFitter::TrackAndSeedToWeightMap TrackAndSeedToWeightMap;
27  typedef MultiVertexFitter::SeedToWeightMap SeedToWeightMap;
28  typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack;
29 
30  int verbose()
31  {
32  static const int ret = 0; /*SimpleConfigurable<int>
33  (0, "MultiVertexFitter:Debug").value(); */
34  return ret;
35  }
36 
37  double minWeightFraction()
38  {
39  // minimum weight that a track has to have
40  // in order to be taken into account for the
41  // vertex fit.
42  // Given as a fraction of the total weight.
43  static const float ret = 1e-6; /* SimpleConfigurable<float>
44  (1e-6, "MultiVertexFitter:MinimumWeightFraction").value(); */
45  return ret;
46  }
47 
48  bool discardLightWeights()
49  {
50  static const bool ret = true; /* SimpleConfigurable<bool>
51  (true, "MultiVertexFitter:DiscardLightWeights").value();*/
52  return ret;
53  }
54 
55  /*
56  struct CompareRaveTracks
57  {
58  bool operator() ( const TransientTrack & r1,
59  const TransientTrack & r2 ) const
60  {
61  return r1 < r2;
62  };
63  }*/
64 
65  CachingVertex<5> createSeedFromLinPt ( const GlobalPoint & gp )
66  {
67  return CachingVertex<5> ( gp, GlobalError (),
68  vector<RefCountedVertexTrack> (), 0.0 );
69  }
70 
71  double validWeight ( double weight )
72  {
73  if ( weight > 1.0 )
74  {
75  cout << "[MultiVertexFitter] weight=" << weight << "??" << endl;
76  return 1.0;
77  };
78 
79  if ( weight < 0.0 )
80  {
81  cout << "[MultiVertexFitter] weight=" << weight << "??" << endl;
82  return 0.0;
83  };
84  return weight;
85  }
86 }
87 
89 {
90  theAssComp->resetAnnealing();
91  theTracks.clear();
92  thePrimaries.clear();
93  theVertexStates.clear();
94  theWeights.clear();
95  theCache.clear();
96 }
97 
98 // creates the seed, additionally it pushes all tracks
99 // onto theTracks
100 
101 void MultiVertexFitter::createSeed( const vector < TransientTrack > & tracks )
102 {
103  if ( tracks.size() > 1 )
104  {
105  CachingVertex<5> vtx = createSeedFromLinPt (
106  theSeeder->getLinearizationPoint ( tracks ) );
107  int snr= seedNr();
108  theVertexStates.push_back ( pair < int, CachingVertex<5> > ( snr, vtx ) );
109  for ( vector< TransientTrack >::const_iterator track=tracks.begin();
110  track!=tracks.end() ; ++track )
111  {
112  theWeights[*track][snr]=1.;
113  theTracks.push_back ( *track );
114  };
115  };
116 }
117 
118 void MultiVertexFitter::createPrimaries ( const std::vector < reco::TransientTrack > &tracks )
119 {
120  // cout << "[MultiVertexFitter] creating primaries: ";
121  for ( vector< reco::TransientTrack >::const_iterator i=tracks.begin();
122  i!=tracks.end() ; ++i )
123  {
124  thePrimaries.insert ( *i );
125  // cout << i->id() << " ";
126  }
127  // cout << endl;
128 }
129 
131 {
132  return theVertexStateNr++;
133 }
134 
136 {
137  theVertexStateNr=0;
138 }
139 
140 void MultiVertexFitter::createSeed( const vector < TrackAndWeight > & tracks )
141 {
142  // create initial seed for every bundle
143  vector < RefCountedVertexTrack> newTracks;
144 
145  for ( vector< TrackAndWeight >::const_iterator track=tracks.begin();
146  track!=tracks.end() ; ++track )
147  {
148  double weight = validWeight ( track->second );
149  const GlobalPoint & pos = track->first.impactPointState().globalPosition();
150  GlobalError err; // FIXME
151  VertexState realseed ( pos, err );
152 
154  theCache.linTrack ( pos, track->first );
155 
156  VertexTrackFactory<5> vTrackFactory;
157  RefCountedVertexTrack vTrData = vTrackFactory.vertexTrack(
158  lTrData, realseed, weight );
159  newTracks.push_back ( vTrData );
160  };
161 
162  if ( newTracks.size() > 1 )
163  {
164  CachingVertex<5> vtx = KalmanVertexFitter().vertex ( newTracks );
165  int snr = seedNr();
166  theVertexStates.push_back ( pair < int, CachingVertex<5> > ( snr, vtx ) );
167 
168  // We initialise the weights with the original
169  // user supplied weights.
170  for ( vector< TrackAndWeight >::const_iterator track=tracks.begin();
171  track!=tracks.end() ; ++track )
172  {
173  if ( thePrimaries.count ( track->first ) )
174  {
175  /*
176  cout << "[MultiVertexFitter] " << track->first.id() << " is a primary."
177  << " setting weight for state " << theVertexStates[0].first
178  << " to " << track->second
179  << endl;
180  */
181  theWeights[track->first][theVertexStates[0].first]=track->second;
182  continue;
183  };
184  float weight = track->second;
185  if ( weight > 1.0 )
186  {
187  cout << "[MultiVertexFitter] error weight " << weight << " > 1.0 given."
188  << endl;
189  cout << "[MultiVertexFitter] will revert to 1.0" << endl;
190  weight=1.0;
191  };
192  if ( weight < 0.0 )
193  {
194  cout << "[MultiVertexFitter] error weight " << weight << " < 0.0 given."
195  << endl;
196  cout << "[MultiVertexFitter] will revert to 0.0" << endl;
197  weight=0.0;
198  };
199  theWeights[track->first][snr]=weight;
200  theTracks.push_back ( track->first );
201  };
202  };
203 
204  // this thing will actually have to discard tracks
205  // that have been submitted - attached to a different vertex - already.
206  // sort ( theTracks.begin(), theTracks.end(), CompareRaveTracks() );
207  sort ( theTracks.begin(), theTracks.end() );
208  for ( vector< TransientTrack >::iterator i=theTracks.begin();
209  i<theTracks.end() ; ++i )
210  {
211  if ( i != theTracks.begin() )
212  {
213  if ( (*i) == ( *(i-1) ) )
214  {
215  theTracks.erase ( i );
216  };
217  };
218  };
219 }
220 
221 vector < CachingVertex<5> > MultiVertexFitter::vertices (
222  const vector < TransientVertex > & vtces,
223  const vector < TransientTrack > & primaries )
224 {
225  // FIXME if vtces.size < 1 return sth that includes the primaries
226  if ( vtces.size() < 1 )
227  {
228  return vector < CachingVertex<5> > ();
229  };
230  vector < vector < TrackAndWeight > > bundles;
231  for ( vector< TransientVertex >::const_iterator vtx=vtces.begin();
232  vtx!=vtces.end() ; ++vtx )
233  {
234  vector < TransientTrack > trks = vtx->originalTracks();
235  vector < TrackAndWeight > tnws;
236  for ( vector< TransientTrack >::const_iterator trk=trks.begin();
237  trk!=trks.end() ; ++trk )
238  {
239  float w = vtx->trackWeight ( *trk );
240  if ( w > 1e-5 )
241  {
242  TrackAndWeight tmp ( *trk, w );
243  tnws.push_back ( tmp );
244  };
245  };
246  bundles.push_back ( tnws );
247  };
248  return vertices ( bundles, primaries );
249 }
250 
251 vector < CachingVertex<5> > MultiVertexFitter::vertices (
252  const vector < CachingVertex<5> > & initials,
253  const vector < TransientTrack > & primaries )
254 {
255  clear();
256  createPrimaries ( primaries );
257  // FIXME if initials size < 1 return sth that includes the primaries
258  if ( initials.size() < 1 ) return initials;
259  for ( vector< CachingVertex<5> >::const_iterator vtx=initials.begin();
260  vtx!=initials.end() ; ++vtx )
261  {
262  int snr = seedNr();
263  theVertexStates.push_back ( pair < int, CachingVertex<5> >
264  ( snr, *vtx ) );
265  TransientVertex rvtx = *vtx;
266  const vector < TransientTrack > & trks = rvtx.originalTracks();
267  for ( vector< TransientTrack >::const_iterator trk=trks.begin();
268  trk!=trks.end() ; ++trk )
269  {
270  if ( !(thePrimaries.count (*trk )) )
271  {
272  // cout << "[MultiVertexFitter] free track " << trk->id() << endl;
273  theTracks.push_back ( *trk );
274  } else {
275  // cout << "[MultiVertexFitter " << trk->id() << " is not free." << endl;
276  }
277  cout << "[MultiVertexFitter] error! track weight currently set to one"
278  << " FIXME!!!" << endl;
279  theWeights[*trk][snr]=1.0;
280  };
281  };
282  #ifdef MVFHarvestingDebug
283  for ( vector< CachingVertex<5> >::const_iterator i=theVertexStates.begin();
284  i!=theVertexStates.end() ; ++i )
285  PrimitivesHarvester::file()->save(*i);
286  #endif
287  return fit();
288 }
289 
290 vector < CachingVertex<5> > MultiVertexFitter::vertices (
291  const vector < vector < TransientTrack > > & tracks,
292  const vector < TransientTrack > & primaries )
293 {
294  clear();
295  createPrimaries ( primaries );
296 
297  for ( vector< vector < TransientTrack > >::const_iterator cluster=
298  tracks.begin(); cluster!=tracks.end() ; ++cluster )
299  {
300  createSeed ( *cluster );
301  };
302  if ( verbose() )
303  {
304  printSeeds();
305  };
306  #ifdef MVFHarvestingDebug
307  for ( vector< CachingVertex<5> >::const_iterator i=theVertexStates.begin();
308  i!=theVertexStates.end() ; ++i )
309  PrimitivesHarvester::file()->save(*i);
310  #endif
311  return fit();
312 }
313 
314 vector < CachingVertex<5> > MultiVertexFitter::vertices (
315  const vector < vector < TrackAndWeight > > & tracks,
316  const vector < TransientTrack > & primaries )
317 {
318  clear();
319  createPrimaries ( primaries );
320 
321  for ( vector< vector < TrackAndWeight > >::const_iterator cluster=
322  tracks.begin(); cluster!=tracks.end() ; ++cluster )
323  {
324  createSeed ( *cluster );
325  };
326  if ( verbose() )
327  {
328  printSeeds();
329  };
330 
331  return fit();
332 }
333 
335  const LinearizationPointFinder & seeder,
336  float revive_below ) :
337  theVertexStateNr ( 0 ), theReviveBelow ( revive_below ),
338  theAssComp ( ann.clone() ), theSeeder ( seeder.clone() )
339 {}
340 
342  theVertexStateNr ( o.theVertexStateNr ), theReviveBelow ( o.theReviveBelow ),
343  theAssComp ( o.theAssComp->clone() ), theSeeder ( o.theSeeder->clone() )
344 {}
345 
347 {
348  delete theAssComp;
349  delete theSeeder;
350 }
351 
353 {
354  theWeights.clear();
355  if ( verbose() & 4 )
356  {
357  cout << "[MultiVertexFitter] Start weight update." << endl;
358  };
359 
361 
365  for ( set < TransientTrack >::const_iterator trk=thePrimaries.begin();
366  trk!=thePrimaries.end() ; ++trk )
367  {
368  int seednr = theVertexStates[0].first;
369  CachingVertex<5> seed = theVertexStates[0].second;
370  pair<bool, double> result = theComp.estimate ( seed, theCache.linTrack ( seed.position(), *trk ) );
371  double weight = 0.;
372  if (result.first) weight = theAssComp->phi ( result.second );
373  theWeights[*trk][seednr]= weight; // FIXME maybe "hard" 1.0 or "soft" weight?
374  }
375 
379  for ( vector< TransientTrack >::const_iterator trk=theTracks.begin();
380  trk!=theTracks.end() ; ++trk )
381  {
382  double tot_weight=theAssComp->phi ( theAssComp->cutoff() * theAssComp->cutoff() );
383 
384  for ( vector < pair < int, CachingVertex<5> > >::const_iterator
385  seed=theVertexStates.begin(); seed!=theVertexStates.end(); ++seed )
386  {
387 
388  pair<bool, double> result = theComp.estimate ( seed->second, theCache.linTrack ( seed->second.position(),
389  *trk ) );
390  double weight = 0.;
391  if (result.first) weight = theAssComp->phi ( result.second );
392  tot_weight+=weight;
393  theWeights[*trk][seed->first]=weight;
394  /* cout << "[MultiVertexFitter] w[" << TransientTrackNamer().name(*trk)
395  << "," << seed->position() << "] = " << weight << endl;*/
396  };
397 
398  // normalize to sum of all weights of one track equals 1.
399  // (if we include the "cutoff", as well)
400  if ( tot_weight > 0.0 )
401  {
402  for ( vector < pair < int, CachingVertex<5> > >::const_iterator
403  seed=theVertexStates.begin();
404  seed!=theVertexStates.end(); ++seed )
405  {
406  double normedweight=theWeights[*trk][seed->first]/tot_weight;
407  if ( normedweight > 1.0 )
408  {
409  cout << "[MultiVertexFitter] he? w[" // << TransientTrackNamer().name(*trk)
410  << "," << seed->second.position() << "] = " << normedweight
411  << " totw=" << tot_weight << endl;
412  normedweight=1.0;
413  };
414  if ( normedweight < 0.0 )
415  {
416  cout << "[MultiVertexFitter] he? weight=" << normedweight
417  << " totw=" << tot_weight << endl;
418  normedweight=0.0;
419  };
420  theWeights[*trk][seed->first]=normedweight;
421  };
422  } else {
423  // total weight equals zero? restart, with uniform distribution!
424  cout << "[MultiVertexFitter] track found with no assignment - ";
425  cout << "will assign uniformly." << endl;
426  float w = .5 / (float) theVertexStates.size();
427  for ( vector < pair < int, CachingVertex<5> > >::const_iterator seed=theVertexStates.begin();
428  seed!=theVertexStates.end(); ++seed )
429  {
430  theWeights[*trk][seed->first]=w;
431  };
432  };
433  };
434  if ( verbose() & 2 ) printWeights();
435 }
436 
438 {
439  double max_disp=0.;
440  // need to fit with the right weights.
441  // also trigger an updateWeights.
442  // if the seeds dont move much we return true
443 
444  vector < pair < int, CachingVertex<5> > > newSeeds;
445 
446  for ( vector< pair < int, CachingVertex<5> > >::const_iterator seed=theVertexStates.begin();
447  seed!=theVertexStates.end() ; ++seed )
448  {
449  // for each seed get the tracks with the right weights.
450  // TransientVertex rv = seed->second;
451  // const GlobalPoint & seedpos = seed->second.position();
452  int snr = seed->first;
453  VertexState realseed ( seed->second.position(), seed->second.error() );
454 
455  double totweight=0.;
456  for ( vector< TransientTrack >::const_iterator track=theTracks.begin();
457  track!=theTracks.end() ; ++track )
458  {
459  totweight+=theWeights[*track][snr];
460  };
461 
462 
463  int nr_good_trks=0; // how many tracks above weight limit
464  // we count those tracks, because that way
465  // we can discard lightweights if there are enough tracks
466  // and not discard the lightweights if that would give us
467  // fewer than two tracks ( we would loose a seed, then ).
468  if ( discardLightWeights() )
469  {
470  for ( vector< TransientTrack >::const_iterator track=theTracks.begin();
471  track!=theTracks.end() ; ++track )
472  {
473  if ( theWeights[*track][snr] > totweight * minWeightFraction() )
474  {
475  nr_good_trks++;
476  };
477  };
478  };
479 
480  vector<RefCountedVertexTrack> newTracks;
481  for ( vector< TransientTrack >::const_iterator track=theTracks.begin();
482  track!=theTracks.end() ; ++track )
483  {
484  double weight = validWeight ( theWeights[*track][snr] );
485  // Now we add a track, if
486  // a. we consider all tracks or
487  // b. we discard the lightweights but the track's weight is high enough or
488  // c. we discard the lightweights but there arent enough good tracks,
489  // so we add all lightweights again (too expensive to figure out
490  // which lightweights are the most important)
491  if ( !discardLightWeights() || weight > minWeightFraction() * totweight
492  || nr_good_trks < 2 )
493  {
494  // if the linearization point didnt move too much,
495  // we take the old LinTrackState.
496  // Otherwise we relinearize.
497 
499  theCache.linTrack ( seed->second.position(), *track );
500 
501  VertexTrackFactory<5> vTrackFactory;
502  RefCountedVertexTrack vTrData = vTrackFactory.vertexTrack(
503  lTrData, realseed, weight );
504  newTracks.push_back ( vTrData );
505  };
506  };
507 
508  for ( set< TransientTrack >::const_iterator track=thePrimaries.begin();
509  track!=thePrimaries.end() ; ++track )
510  {
511  double weight = validWeight ( theWeights[*track][snr] );
512 
514  theCache.linTrack ( seed->second.position(), *track );
515 
516  VertexTrackFactory<5> vTrackFactory;
517  RefCountedVertexTrack vTrData = vTrackFactory.vertexTrack(
518  lTrData, realseed, weight );
519  newTracks.push_back ( vTrData );
520 
521  };
522 
523  try {
524  if ( newTracks.size() < 2 )
525  {
526  throw VertexException("less than two tracks in vector" );
527  };
528 
529  if ( verbose() )
530  {
531  cout << "[MultiVertexFitter] now fitting with Kalman: ";
532  for ( vector< RefCountedVertexTrack >::const_iterator i=newTracks.begin();
533  i!=newTracks.end() ; ++i )
534  {
535  cout << (**i).weight() << " ";
536  };
537  cout << endl;
538  };
539 
540  if ( newTracks.size() > 1 )
541  {
542  KalmanVertexFitter fitter;
543  // warning! first track determines lin pt!
544  CachingVertex<5> newVertex = fitter.vertex ( newTracks );
545  int snr = seedNr();
546  double disp = ( newVertex.position() - seed->second.position() ).mag();
547  if ( disp > max_disp ) max_disp = disp;
548  newSeeds.push_back (
549  pair < int, CachingVertex<5> > ( snr, newVertex ) );
550  };
551  } catch ( exception & e )
552  {
553  cout << "[MultiVertexFitter] exception: " << e.what() << endl;
554  }
555  };
556 
557  // now discard all old seeds and weights, compute new ones.
558  theVertexStates.clear();
559  theWeights.clear();
560  theVertexStates=newSeeds;
561  #ifdef MVFHarvestingDebug
562  for ( vector< CachingVertex<5> >::const_iterator i=theVertexStates.begin();
563  i!=theVertexStates.end() ; ++i )
564  PrimitivesHarvester::file()->save(*i);
565  #endif
566  updateWeights();
567 
568  static const double disp_limit = 1e-4; /* SimpleConfigurable<double>
569  (0.0001, "MultiVertexFitter:DisplacementLimit" ).value(); */
570 
571  if ( verbose() & 2 )
572  {
573  printSeeds();
574  cout << "[MultiVertexFitter] max displacement in this iteration: "
575  << max_disp << endl;
576  };
577  if ( max_disp < disp_limit ) return false;
578  return true;
579 }
580 
581 // iterating over the fits
582 vector < CachingVertex<5> > MultiVertexFitter::fit()
583 {
584  if ( verbose() & 2 ) printWeights();
585  int ctr=1;
586  static const int ctr_max = 50; /* SimpleConfigurable<int>(100,
587  "MultiVertexFitter:MaxIterations").value(); */
588  while ( updateSeeds() || !(theAssComp->isAnnealed()) )
589  {
590  if ( ++ctr >= ctr_max ) break;
591  theAssComp->anneal();
592  // lostVertexClaimer(); // was a silly(?) idea to "revive" vertex candidates.
593  resetSeedNr();
594  };
595 
596  if ( verbose() )
597  {
598  cout << "[MultiVertexFitter] number of iterations: " << ctr << endl;
599  cout << "[MultiVertexFitter] remaining seeds: "
600  << theVertexStates.size() << endl;
601  printWeights();
602  };
603 
604  vector < CachingVertex<5> > ret;
605  for ( vector< pair < int, CachingVertex<5> > >::const_iterator
606  i=theVertexStates.begin(); i!=theVertexStates.end() ; ++i )
607  {
608  ret.push_back ( i->second );
609  };
610 
611  return ret;
612 }
613 
615 {
616  // cout << "Trk " << t.id();
617  for ( vector < pair < int, CachingVertex<5> > >::const_iterator seed=theVertexStates.begin();
618  seed!=theVertexStates.end(); ++seed )
619  {
620  cout << " -- Vertex[" << seed->first << "] with " << setw(12)
621  << setprecision(3) << theWeights[t][seed->first];
622  };
623  cout << endl;
624 }
625 
627 {
628  cout << endl << "Weight table: " << endl << "=================" << endl;
629  for ( set < TransientTrack >::const_iterator trk=thePrimaries.begin();
630  trk!=thePrimaries.end() ; ++trk )
631  {
632  printWeights ( *trk );
633  };
634  for ( vector< TransientTrack >::const_iterator trk=theTracks.begin();
635  trk!=theTracks.end() ; ++trk )
636  {
637  printWeights ( *trk );
638  };
639 }
640 
642 {
643  cout << endl << "Seed table: " << endl << "=====================" << endl;
644  /*
645  for ( vector < pair < int, CachingVertex<5> > >::const_iterator seed=theVertexStates.begin();
646  seed!=theVertexStates.end(); ++seed )
647  {
648  cout << " Vertex[" << TransientVertexNamer().name(seed->second) << "] at "
649  << seed->second.position() << endl;
650  };*/
651 }
652 
654 {
655  if ( !theReviveBelow < 0. ) return;
656  // this experimental method is used to get almost lost vertices
657  // back into the play by upweighting vertices with very low total weights
658 
659  bool has_revived = false;
660  // find out about total weight
661  for ( vector< pair < int, CachingVertex<5> > >::const_iterator i=theVertexStates.begin();
662  i!=theVertexStates.end() ; ++i )
663  {
664  double totweight=0.;
665  for ( vector< TransientTrack >::const_iterator trk=theTracks.begin();
666  trk!=theTracks.end() ; ++trk )
667  {
668  totweight+=theWeights[*trk][i->first];
669  };
670 
671  /*
672  cout << "[MultiVertexFitter] vertex seed " << TransientVertexNamer().name(*i)
673  << " total weight=" << totweight << endl;*/
674 
675  if ( totweight < theReviveBelow && totweight > 0.0 )
676  {
677  cout << "[MultiVertexFitter] now trying to revive vertex"
678  << " revive_below=" << theReviveBelow << endl;
679  has_revived=true;
680  for ( vector< TransientTrack >::const_iterator trk=theTracks.begin();
681  trk!=theTracks.end() ; ++trk )
682  {
683  theWeights[*trk][i->first]/=totweight;
684  };
685  };
686  };
687  if ( has_revived && verbose() ) printWeights();
688 }
virtual bool isAnnealed() const =0
std::vector< CachingVertex< 5 > > vertices(const std::vector< std::vector< reco::TransientTrack > > &, const std::vector< reco::TransientTrack > &primaries=std::vector< reco::TransientTrack >())
MultiVertexFitter(const AnnealingSchedule &sched=DefaultMVFAnnealing(), const LinearizationPointFinder &seeder=DefaultLinearizationPointFinder(), float revive_below=-1.)
int i
Definition: DBlmapReader.cc:9
std::pair< reco::TransientTrack, float > TrackAndWeight
std::map< reco::TransientTrack, SeedToWeightMap > TrackAndSeedToWeightMap
RefCountedVertexTrack vertexTrack(const RefCountedLinearizedTrackState lt, const VertexState vs, float weight=1.0) const
Common base class.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
void printWeights() const
void createPrimaries(const std::vector< reco::TransientTrack > &tracks)
LinearizationPointFinder * theSeeder
std::set< reco::TransientTrack > thePrimaries
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
virtual double phi(double chi2) const =0
std::vector< reco::TransientTrack > const & originalTracks() const
std::vector< reco::TransientTrack > theTracks
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
virtual BDpair estimate(const CachingVertex< N > &vrt, const RefCountedVertexTrack track, unsigned int hint=UINT_MAX) const
tuple result
Definition: query.py:137
LinTrackCache theCache
std::vector< std::pair< int, CachingVertex< 5 > > > theVertexStates
tuple tracks
Definition: testEve_cfg.py:39
void printSeeds() const
void createSeed(const std::vector< reco::TransientTrack > &tracks)
RefCountedLinearizedTrackState linTrack(const GlobalPoint &, const reco::TransientTrack &)
GlobalPoint position() const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
CachingVertex< 5 >::RefCountedVertexTrack RefCountedVertexTrack
std::vector< CachingVertex< 5 > > fit()
tuple clone
Definition: statics.py:58
virtual void anneal()=0
tuple cout
Definition: gather_cfg.py:121
T w() const
virtual double cutoff() const =0
AnnealingSchedule * theAssComp
int weight
Definition: histoStyle.py:50
TrackAndSeedToWeightMap theWeights
std::map< int, double > SeedToWeightMap