test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
16  CachingVertex<5> tmp = theFitter->vertex ( t );
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  */
33  CachingVertex<5> tmp = theFitter->vertex ( t, s );
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  const_cast < AbstractConfFitter *> (theFitter)->configure (s );
58 }
59 
61 {
62  return new ReconstructorFromFitter ( *this );
63 }
ReconstructorFromFitter(std::unique_ptr< AbstractConfFitter > &&)
Common base class.
virtual const char * what() const
double f[11][100]
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
const AbstractConfFitter * theFitter
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool isValid() const
Definition: CachingVertex.h:96
void configure(const edm::ParameterSet &)
virtual edm::ParameterSet defaults() const =0
ReconstructorFromFitter * clone() const
edm::ParameterSet defaults() const