-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fitter.cc
56 lines (44 loc) · 1.25 KB
/
Fitter.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*!
* \file Fitter.cc
* \brief
* \author Dmitry Arkhipkin <arkhipkin@gmail.com>
*/
//PHGenFit2
#include "Fitter.h"
#include "Track.h"
//ROOT
#include <TGeoManager.h>
#include <RVersion.h>
//GenFit
#include <GenFit/AbsKalmanFitter.h>
#include <GenFit/DAF.h>
#include <GenFit/FieldManager.h>
#include <GenFit/FitStatus.h>
#include <GenFit/KalmanFitter.h>
#include <GenFit/KalmanFitterRefTrack.h>
#include <GenFit/MaterialEffects.h>
#include <GenFit/TGeoMaterialInterface.h>
#include <GenFit/Track.h>
//GenFitExp
#include <genfitexp/Field.h>
#include <cassert>
#include <cstddef>
#include <iostream>
namespace PHGenFit2
{
Fitter::Fitter( TGeoManager* tgeo_manager, PHField* field )
: _tgeo_manager(tgeo_manager), _field( field ) {
genfit::Exception::quiet(true);
genfit::Field* fieldMap = new genfit::Field( field );
genfit::FieldManager::getInstance()->init( fieldMap );
// TODO: vacuum option for material effects?
genfit::MaterialEffects::getInstance()->init( new genfit::TGeoMaterialInterface() );
// init fitters
_fitter5 = new genfit::KalmanFitter( 5 /* maxIterations */ );
_fitter1 = new genfit::KalmanFitter( 1 /* maxIterations */ );
}
Fitter::~Fitter() {
delete _fitter5;
delete _fitter1;
}
} // namespace PHGenFit2