CMS 3D CMS Logo

ReconstructorFromFitter.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 
6 ReconstructorFromFitter::ReconstructorFromFitter ( std::unique_ptr<AbstractConfFitter>&& f ) :
7  theFitter ( f.release() )
8 {}
9 
10 vector < TransientVertex > ReconstructorFromFitter::vertices
11  ( const vector < reco::TransientTrack > & t ) const
12 {
13  vector < TransientVertex > ret;
14  // cout << "[ReconstructorFromFitter] debug: fitting without bs!" << endl;
15  try {
17  if ( tmp.isValid() ) ret.push_back ( tmp );
18  } catch ( VertexException & e ) {
19  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
20  }
21  return ret;
22 }
23 
24 vector < TransientVertex > ReconstructorFromFitter::vertices
25  ( const vector < reco::TransientTrack > & t, const reco::BeamSpot & s ) const
26 {
27  vector < TransientVertex > ret;
28  try {
29  /*
30  cout << "[ReconstructorFromFitter] debug: fitting with s: " << s.BeamWidth()
31  << " sz=" << s.sigmaZ() << endl;
32  */
34  if ( tmp.isValid() ) ret.push_back ( tmp );
35  } catch ( VertexException & e ) {
36  edm::LogWarning("ReconstructorFromFitter") << "exception caught: " << e.what();
37  }
38  return ret;
39 }
40 
42 {
43  delete theFitter;
44 }
45 
47  theFitter ( o.theFitter->clone() )
48 {}
49 
51 {
52  return theFitter->defaults();
53 }
54 
56 {
57  //this looks better than changing the data member to be non-const ptr and allow changes in all calls
58  const_cast < AbstractConfFitter *> (theFitter)->configure (s );
59 }
60 
62 {
63  return new ReconstructorFromFitter ( *this );
64 }
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &t) const override
ReconstructorFromFitter(std::unique_ptr< AbstractConfFitter > &&)
virtual edm::ParameterSet defaults() const =0
Common base class.
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const override
edm::ParameterSet defaults() const override
double f[11][100]
const char * what() const override
ReconstructorFromFitter * clone() const override
void configure(const edm::ParameterSet &) override
const AbstractConfFitter * theFitter
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool isValid() const