Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fitter.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fitter.h
1 
8 #ifndef PHGENFIT_FITTER_H
9 #define PHGENFIT_FITTER_H
10 
11 // needed, it crashes on Ubuntu using singularity with local cvmfs install
12 // shared pointer later on uses this, forward declaration does not cut it
13 #include <phgenfit/Track.h>
14 
15 #include <GenFit/EventDisplay.h>
16 #include "GenFit/Exception.h"
17 
18 #include <string>
19 
20 //BOOST
21 //#include<boost/make_shared.hpp>
22 //
23 //#define SMART(expr) boost::shared_ptr<expr>
24 //#define NEW(expr) boost::make_shared<expr>
25 
26 class TGeoManager;
27 class PHField;
28 
29 namespace genfit
30 {
31 class AbsKalmanFitter;
32 class AbsBField;
33 } // namespace genfit
34 
35 namespace PHGenFit
36 {
37 
38 class Fitter
39 {
40  public:
42  {
47  };
49  {
51  };
52 
54  Fitter(const std::string& tgeo_file_name,
55  const PHField* field,
56  const std::string& fitter_choice = "KalmanFitterRefTrack",
57  const std::string& track_rep_choice = "RKTrackRep",
58  const bool doEventDisplay = false);
59 
60  Fitter(TGeoManager* tgeo_manager,
61  genfit::AbsBField* fieldMap,
62  const std::string& fitter_choice = "KalmanFitterRefTrack",
63  const std::string& track_rep_choice = "RKTrackRep",
64  const bool doEventDisplay = false);
65 
66  Fitter(TGeoManager* tgeo_manager,
67  genfit::AbsBField* fieldMap,
70  const bool doEventDisplay = false);
71 
73  ~Fitter();
74  explicit Fitter(const Fitter&) = delete;
75  Fitter& operator=(const Fitter&) = delete;
76 
77  static Fitter* getInstance(const std::string& tgeo_file_name,
78  const PHField* field,
79  const std::string& fitter_choice = "KalmanFitterRefTrack",
80  const std::string& track_rep_choice = "RKTrackRep",
81  const bool doEventDisplay = false);
82 
83  static Fitter* getInstance(TGeoManager* tgeo_manager,
84  const PHField* field,
85  const std::string& fitter_choice = "KalmanFitterRefTrack",
86  const std::string& track_rep_choice = "RKTrackRep",
87  const bool doEventDisplay = false);
88 
89  static Fitter* getInstance(TGeoManager* tgeo_manager,
90  const PHField* field,
93  const bool doEventDisplay = false);
94 
95  int processTrack(PHGenFit::Track* track, const bool save_to_evt_disp = false);
96 
97  int displayEvent();
98 
99  bool is_do_Event_Display() const
100  {
101  return _doEventDisplay;
102  }
103 
104  void set_do_Event_Display(bool doEventDisplay)
105  {
106  _doEventDisplay = doEventDisplay;
107  if (!_display && _doEventDisplay)
109  }
110 
112  {
113  return _display;
114  }
115 
116  int get_verbosity() const
117  {
118  return verbosity;
119  }
120 
121  void set_verbosity(int v)
122  {
123  this->verbosity = v;
124  if (verbosity >= 1)
126  else
128  }
129 
130  private:
140 
141  TGeoManager* _tgeo_manager;
142 
144 
147 
148 }; //class Fitter
149 
150 } // namespace PHGenFit
151 
152 #endif