ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fitter.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fitter.cc
1 
7 //PHGenFit2
8 #include "Fitter.h"
9 
10 //GenFit
11 #include <GenFit/Exception.h>
12 #include <GenFit/FieldManager.h>
13 #include <GenFit/KalmanFitter.h>
14 #include <GenFit/MaterialEffects.h>
15 #include <GenFit/TGeoMaterialInterface.h>
16 
17 //GenFitExp
18 #include <genfitexp/Field.h>
19 
20 namespace PHGenFit2
21 {
22  Fitter::Fitter(TGeoManager* /*tgeo_manager*/, PHField* field)
23  // : _tgeo_manager(tgeo_manager)
24  // , _field(field)
25  {
26  genfit::Exception::quiet(true);
27  genfit::Field* fieldMap = new genfit::Field(field);
28  genfit::FieldManager::getInstance()->init(fieldMap);
29 
30  // TODO: vacuum option for material effects?
31  genfit::MaterialEffects::getInstance()->init(new genfit::TGeoMaterialInterface());
32 
33  // init fitters
34  _fitter5 = new genfit::KalmanFitter(5 /* maxIterations */);
35  _fitter1 = new genfit::KalmanFitter(1 /* maxIterations */);
36  }
37 
39  {
40  delete _fitter5;
41  delete _fitter1;
42  }
43 
44 } // namespace PHGenFit2