CMS 3D CMS Logo

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

#include <ReconstructorFromFitter.h>

Inheritance diagram for ReconstructorFromFitter:
AbstractConfReconstructor VertexReconstructor

Public Member Functions

ReconstructorFromFitterclone () const override
 
void configure (const edm::ParameterSet &) override
 
edm::ParameterSet defaults () const override
 
 ReconstructorFromFitter (const ReconstructorFromFitter &o)
 
 ReconstructorFromFitter (std::unique_ptr< AbstractConfFitter > &&)
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &) const override
 
std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &, const reco::BeamSpot &) const override
 
 ~ReconstructorFromFitter () override
 
- Public Member Functions inherited from AbstractConfReconstructor
 ~AbstractConfReconstructor () override
 
- Public Member Functions inherited from VertexReconstructor
 VertexReconstructor ()
 
virtual std::vector< TransientVertexvertices (const std::vector< reco::TransientTrack > &primaries, const std::vector< reco::TransientTrack > &tracks, const reco::BeamSpot &spot) const
 
virtual ~VertexReconstructor ()
 

Private Attributes

const AbstractConfFittertheFitter
 

Detailed Description

Wrap any VertexFitter into the VertexReconstructor interface

Definition at line 12 of file ReconstructorFromFitter.h.

Constructor & Destructor Documentation

◆ ReconstructorFromFitter() [1/2]

ReconstructorFromFitter::ReconstructorFromFitter ( std::unique_ptr< AbstractConfFitter > &&  f)
explicit

Definition at line 6 of file ReconstructorFromFitter.cc.

6 : theFitter(f.release()) {}

Referenced by clone().

◆ ReconstructorFromFitter() [2/2]

ReconstructorFromFitter::ReconstructorFromFitter ( const ReconstructorFromFitter o)

Definition at line 40 of file ReconstructorFromFitter.cc.

40 : theFitter(o.theFitter->clone()) {}

◆ ~ReconstructorFromFitter()

ReconstructorFromFitter::~ReconstructorFromFitter ( )
override

Definition at line 38 of file ReconstructorFromFitter.cc.

38 { delete theFitter; }

References theFitter.

Member Function Documentation

◆ clone()

ReconstructorFromFitter * ReconstructorFromFitter::clone ( void  ) const
overridevirtual

Implements AbstractConfReconstructor.

Definition at line 49 of file ReconstructorFromFitter.cc.

49 { return new ReconstructorFromFitter(*this); }

References ReconstructorFromFitter().

◆ configure()

void ReconstructorFromFitter::configure ( const edm::ParameterSet )
overridevirtual

The configure method configures the vertex reconstructor. It also should also write all its applied defaults back into the map,

Implements AbstractConfReconstructor.

Definition at line 44 of file ReconstructorFromFitter.cc.

44  {
45  //this looks better than changing the data member to be non-const ptr and allow changes in all calls
46  const_cast<AbstractConfFitter*>(theFitter)->configure(s);
47 }

References alignCSCRings::s, and theFitter.

◆ defaults()

edm::ParameterSet ReconstructorFromFitter::defaults ( ) const
overridevirtual

Implements AbstractConfReconstructor.

Definition at line 42 of file ReconstructorFromFitter.cc.

42 { return theFitter->defaults(); }

References AbstractConfFitter::defaults(), and theFitter.

◆ vertices() [1/2]

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

Reconstruct vertices

Implements VertexReconstructor.

Definition at line 8 of file ReconstructorFromFitter.cc.

8  {
9  vector<TransientVertex> ret;
10  // cout << "[ReconstructorFromFitter] debug: fitting without bs!" << endl;
11  try {
13  if (tmp.isValid())
14  ret.push_back(tmp);
15  } catch (VertexException& e) {
16  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
17  }
18  return ret;
19 }

References MillePedeFileConverter_cfg::e, runTheMatrix::ret, OrderedSet::t, theFitter, createJobs::tmp, and AbstractConfFitter::vertex().

◆ vertices() [2/2]

vector< TransientVertex > ReconstructorFromFitter::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 21 of file ReconstructorFromFitter.cc.

22  {
23  vector<TransientVertex> ret;
24  try {
25  /*
26  cout << "[ReconstructorFromFitter] debug: fitting with s: " << s.BeamWidth()
27  << " sz=" << s.sigmaZ() << endl;
28  */
30  if (tmp.isValid())
31  ret.push_back(tmp);
32  } catch (VertexException& e) {
33  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
34  }
35  return ret;
36 }

References MillePedeFileConverter_cfg::e, runTheMatrix::ret, alignCSCRings::s, OrderedSet::t, theFitter, createJobs::tmp, and AbstractConfFitter::vertex().

Member Data Documentation

◆ theFitter

const AbstractConfFitter* ReconstructorFromFitter::theFitter
private

Definition at line 25 of file ReconstructorFromFitter.h.

Referenced by configure(), defaults(), vertices(), and ~ReconstructorFromFitter().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
AbstractConfFitter::vertex
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
Definition: AbstractConfFitter.cc:14
VertexException
Common base class.
Definition: VertexException.h:12
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
CachingVertex< 5 >
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
ReconstructorFromFitter::ReconstructorFromFitter
ReconstructorFromFitter(std::unique_ptr< AbstractConfFitter > &&)
Definition: ReconstructorFromFitter.cc:6
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
alignCSCRings.s
s
Definition: alignCSCRings.py:92
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::LogWarning
Definition: MessageLogger.h:141
ReconstructorFromFitter::theFitter
const AbstractConfFitter * theFitter
Definition: ReconstructorFromFitter.h:25
AbstractConfFitter::defaults
virtual edm::ParameterSet defaults() const =0
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37