CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MultiVertexReconstructor Class Reference

#include <MultiVertexReconstructor.h>

Inheritance diagram for MultiVertexReconstructor:
VertexReconstructor

Public Member Functions

MultiVertexReconstructorclone () const override
 
 MultiVertexReconstructor (const VertexReconstructor &, const AnnealingSchedule &s=DefaultMVFAnnealing(), float revive=-1.)
 
 MultiVertexReconstructor (const MultiVertexReconstructor &)
 
VertexReconstructorreconstructor () const
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const override
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &) const override
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &, const std::vector< reco::TransientTrack > &primaries) const
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &, const std::vector< reco::TransientTrack > &primaries, const reco::BeamSpot &spot) const override
 
 ~MultiVertexReconstructor () override
 
- Public Member Functions inherited from VertexReconstructor
 VertexReconstructor ()
 
virtual ~VertexReconstructor ()
 

Private Attributes

MultiVertexFitter theFitter
 
VertexReconstructortheOldReconstructor
 

Detailed Description

Class that wraps the MultiVertexFitter, together with a user-supplied VertexReconstructor into a VertexReconstructor.

Definition at line 12 of file MultiVertexReconstructor.h.

Constructor & Destructor Documentation

◆ MultiVertexReconstructor() [1/2]

MultiVertexReconstructor::MultiVertexReconstructor ( const VertexReconstructor o,
const AnnealingSchedule s = DefaultMVFAnnealing(),
float  revive = -1. 
)

◆ MultiVertexReconstructor() [2/2]

MultiVertexReconstructor::MultiVertexReconstructor ( const MultiVertexReconstructor o)

Definition at line 64 of file MultiVertexReconstructor.cc.

65  : theOldReconstructor(o.theOldReconstructor->clone()), theFitter(o.theFitter) {}
VertexReconstructor * theOldReconstructor

◆ ~MultiVertexReconstructor()

MultiVertexReconstructor::~MultiVertexReconstructor ( )
override

Definition at line 60 of file MultiVertexReconstructor.cc.

References theOldReconstructor.

60 { delete theOldReconstructor; }
VertexReconstructor * theOldReconstructor

Member Function Documentation

◆ clone()

MultiVertexReconstructor * MultiVertexReconstructor::clone ( void  ) const
overridevirtual

Implements VertexReconstructor.

Definition at line 62 of file MultiVertexReconstructor.cc.

References MultiVertexReconstructor().

62 { return new MultiVertexReconstructor(*this); }
MultiVertexReconstructor(const VertexReconstructor &, const AnnealingSchedule &s=DefaultMVFAnnealing(), float revive=-1.)

◆ reconstructor()

VertexReconstructor * MultiVertexReconstructor::reconstructor ( ) const

Definition at line 147 of file MultiVertexReconstructor.cc.

References theOldReconstructor.

147 { return theOldReconstructor; }
VertexReconstructor * theOldReconstructor

◆ vertices() [1/4]

vector< TransientVertex > MultiVertexReconstructor::vertices ( const std::vector< reco::TransientTrack > &  t,
const reco::BeamSpot  
) const
overridevirtual

Reconstruct vertices, exploiting the beamspot constraint for the primary vertex

Reimplemented from VertexReconstructor.

Definition at line 67 of file MultiVertexReconstructor.cc.

References hltEgammaHLTExtra_cfi::trks.

Referenced by vertices(), and ConfigurableMultiVertexFitter::vertices().

68  {
69  return vertices(trks);
70 }
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const override

◆ vertices() [2/4]

vector< TransientVertex > MultiVertexReconstructor::vertices ( const std::vector< reco::TransientTrack > &  ) const
overridevirtual

Reconstruct vertices

Implements VertexReconstructor.

Definition at line 78 of file MultiVertexReconstructor.cc.

References gather_cfg::cout, mps_fire::i, runTheMatrix::ret, theFitter, theOldReconstructor, createJobs::tmp, hltEgammaHLTExtra_cfi::trks, trackerHitRTTI::vector, verbose, VertexReconstructor::vertices(), and MultiVertexFitter::vertices().

78  {
79  /*
80  cout << "[MultiVertexReconstructor] input trks: ";
81  for ( vector< reco::TransientTrack >::const_iterator i=trks.begin();
82  i!=trks.end() ; ++i )
83  {
84  cout << i->id() << " ";
85  }
86  cout << endl;*/
87  vector<TransientVertex> tmp = theOldReconstructor->vertices(trks);
88  if (verbose()) {
89  cout << "[MultiVertexReconstructor] non-freezing seeder found " << tmp.size() << " vertices from " << trks.size()
90  << " tracks." << endl;
91  }
92  vector<vector<TrackAndWeight> > rc = recover(tmp, trks);
93  vector<CachingVertex<5> > cvts = theFitter.vertices(rc);
94  vector<TransientVertex> ret;
95  for (vector<CachingVertex<5> >::const_iterator i = cvts.begin(); i != cvts.end(); ++i) {
96  ret.push_back(*i);
97  };
98 
99  if (verbose()) {
100  cout << "[MultiVertexReconstructor] input " << tmp.size() << " vertices, output " << ret.size() << " vertices."
101  << endl;
102  };
103  return ret;
104 }
std::vector< CachingVertex< 5 > > vertices(const std::vector< std::vector< reco::TransientTrack > > &, const std::vector< reco::TransientTrack > &primaries=std::vector< reco::TransientTrack >())
bool verbose
ret
prodAgent to be discontinued
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
VertexReconstructor * theOldReconstructor
tmp
align.sh
Definition: createJobs.py:716

◆ vertices() [3/4]

vector< TransientVertex > MultiVertexReconstructor::vertices ( const std::vector< reco::TransientTrack > &  trks,
const std::vector< reco::TransientTrack > &  primaries 
) const

Definition at line 106 of file MultiVertexReconstructor.cc.

References gather_cfg::cout, mps_fire::i, runTheMatrix::ret, theFitter, theOldReconstructor, createJobs::tmp, dqmMemoryStats::total, hltEgammaHLTExtra_cfi::trks, trackerHitRTTI::vector, verbose, VertexReconstructor::vertices(), and MultiVertexFitter::vertices().

107  {
108  /*
109  cout << "[MultiVertexReconstructor] with " << primaries.size()
110  << " primaries!" << endl;
111  */
112 
113  map<reco::TransientTrack, bool> st;
114 
115  vector<reco::TransientTrack> total = trks;
116  for (vector<reco::TransientTrack>::const_iterator i = trks.begin(); i != trks.end(); ++i) {
117  st[(*i)] = true;
118  }
119 
120  // cout << "[MultiVertexReconstructor] FIXME dont just add up tracks. superpose" << endl;
121  for (vector<reco::TransientTrack>::const_iterator i = primaries.begin(); i != primaries.end(); ++i) {
122  if (!(st[(*i)])) {
123  total.push_back(*i);
124  }
125  }
126 
127  vector<TransientVertex> tmp = theOldReconstructor->vertices(total);
128 
129  if (verbose()) {
130  cout << "[MultiVertexReconstructor] freezing seeder found " << tmp.size() << " vertices from " << total.size()
131  << " tracks." << endl;
132  }
133  vector<vector<TrackAndWeight> > rc = recover(tmp, trks);
134  vector<CachingVertex<5> > cvts = theFitter.vertices(rc, primaries);
135 
136  vector<TransientVertex> ret;
137  for (vector<CachingVertex<5> >::const_iterator i = cvts.begin(); i != cvts.end(); ++i) {
138  ret.push_back(*i);
139  };
140  if (verbose()) {
141  cout << "[MultiVertexReconstructor] input " << tmp.size() << " vertices, output " << ret.size() << " vertices."
142  << endl;
143  };
144  return ret;
145 }
std::vector< CachingVertex< 5 > > vertices(const std::vector< std::vector< reco::TransientTrack > > &, const std::vector< reco::TransientTrack > &primaries=std::vector< reco::TransientTrack >())
bool verbose
ret
prodAgent to be discontinued
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
VertexReconstructor * theOldReconstructor
tmp
align.sh
Definition: createJobs.py:716

◆ vertices() [4/4]

vector< TransientVertex > MultiVertexReconstructor::vertices ( const std::vector< reco::TransientTrack > &  primaries,
const std::vector< reco::TransientTrack > &  tracks,
const reco::BeamSpot spot 
) const
overridevirtual

Reconstruct vertices, but exploit the fact that you know that some tracks cannot come from a secondary vertex. primaries Tracks that cannot come from a secondary vertex (but can, in principle, be non-primaries, also). tracks These are the tracks that are of unknown origin. These tracks are subjected to pattern recognition. spot A beamspot constraint is mandatory in this method.

Reimplemented from VertexReconstructor.

Definition at line 72 of file MultiVertexReconstructor.cc.

References hltEgammaHLTExtra_cfi::trks, and vertices().

74  {
75  return vertices(trks, primaries);
76 }
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const override

Member Data Documentation

◆ theFitter

MultiVertexFitter MultiVertexReconstructor::theFitter
mutableprivate

Definition at line 36 of file MultiVertexReconstructor.h.

Referenced by vertices().

◆ theOldReconstructor

VertexReconstructor* MultiVertexReconstructor::theOldReconstructor
private

Definition at line 35 of file MultiVertexReconstructor.h.

Referenced by reconstructor(), vertices(), and ~MultiVertexReconstructor().