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 MultiVertexReconstructor &)
 
 MultiVertexReconstructor (const VertexReconstructor &, const AnnealingSchedule &s=DefaultMVFAnnealing(), float revive=-1.)
 
VertexReconstructorreconstructor () const
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &) const override
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) 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. 
)

Definition at line 55 of file MultiVertexReconstructor.cc.

Referenced by clone().

◆ MultiVertexReconstructor() [2/2]

MultiVertexReconstructor::MultiVertexReconstructor ( const MultiVertexReconstructor o)

Definition at line 64 of file MultiVertexReconstructor.cc.

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

◆ ~MultiVertexReconstructor()

MultiVertexReconstructor::~MultiVertexReconstructor ( )
override

Definition at line 60 of file MultiVertexReconstructor.cc.

60 { delete theOldReconstructor; }

References theOldReconstructor.

Member Function Documentation

◆ clone()

MultiVertexReconstructor * MultiVertexReconstructor::clone ( void  ) const
overridevirtual

Implements VertexReconstructor.

Definition at line 62 of file MultiVertexReconstructor.cc.

62 { return new MultiVertexReconstructor(*this); }

References MultiVertexReconstructor().

◆ reconstructor()

VertexReconstructor * MultiVertexReconstructor::reconstructor ( ) const

Definition at line 147 of file MultiVertexReconstructor.cc.

147 { return theOldReconstructor; }

References theOldReconstructor.

◆ vertices() [1/4]

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

Reconstruct vertices

Implements VertexReconstructor.

Definition at line 78 of file MultiVertexReconstructor.cc.

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 }

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

◆ vertices() [2/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.

68  {
69  return vertices(trks);
70 }

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

◆ 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.

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 }

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

◆ 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. \paramname primaries Tracks that cannot come from a secondary vertex (but can, in principle, be non-primaries, also). \paramname tracks These are the tracks that are of unknown origin. These tracks are subjected to pattern recognition. \paramname spot A beamspot constraint is mandatory in this method.

Reimplemented from VertexReconstructor.

Definition at line 72 of file MultiVertexReconstructor.cc.

74  {
75  return vertices(trks, primaries);
76 }

References vertices().

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().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:373
MultiVertexReconstructor::theFitter
MultiVertexFitter theFitter
Definition: MultiVertexReconstructor.h:36
mps_fire.i
i
Definition: mps_fire.py:428
CachingVertex< 5 >
gather_cfg.cout
cout
Definition: gather_cfg.py:144
MultiVertexFitter
Definition: MultiVertexFitter.h:15
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
MultiVertexFitter::vertices
std::vector< CachingVertex< 5 > > vertices(const std::vector< std::vector< reco::TransientTrack > > &, const std::vector< reco::TransientTrack > &primaries=std::vector< reco::TransientTrack >())
Definition: MultiVertexFitter.cc:233
MultiVertexReconstructor::MultiVertexReconstructor
MultiVertexReconstructor(const VertexReconstructor &, const AnnealingSchedule &s=DefaultMVFAnnealing(), float revive=-1.)
Definition: MultiVertexReconstructor.cc:55
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
alignCSCRings.s
s
Definition: alignCSCRings.py:92
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
VertexReconstructor::vertices
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
DefaultLinearizationPointFinder
Definition: DefaultLinearizationPointFinder.h:13
MultiVertexReconstructor::theOldReconstructor
VertexReconstructor * theOldReconstructor
Definition: MultiVertexReconstructor.h:35
MultiVertexReconstructor::vertices
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const override
Definition: MultiVertexReconstructor.cc:67
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152