14 #include <TGeoManager.h>
18 #include <GenFit/AbsKalmanFitter.h>
19 #include <GenFit/DAF.h>
20 #include <GenFit/EventDisplay.h>
21 #include <GenFit/FieldManager.h>
22 #include <GenFit/FitStatus.h>
23 #include <GenFit/KalmanFitter.h>
24 #include <GenFit/KalmanFitterRefTrack.h>
25 #include <GenFit/MaterialEffects.h>
26 #include <GenFit/TGeoMaterialInterface.h>
30 #include <genfitexp/Field.h>
36 namespace genfit {
class AbsTrackRep; }
38 #define LogDEBUG(exp) std::cout << "DEBUG: " << __FILE__ << ": " << __LINE__ << ": " << exp << std::endl
39 #define LogERROR(exp) std::cout << "ERROR: " << __FILE__ << ": " << __LINE__ << ": " << exp << std::endl
40 #define LogWARNING(exp) std::cout << "WARNING: " << __FILE__ << ": " << __LINE__ << ": " << exp << std::endl
49 const bool doEventDisplay)
51 , _doEventDisplay(doEventDisplay)
54 TGeoManager::Import(tgeo_file_name.data());
71 if (fitter_choice.compare(
"KalmanFitterRefTrack") == 0)
73 else if (fitter_choice.compare(
"KalmanFitter") == 0)
75 else if (fitter_choice.compare(
"DafSimple") == 0)
77 else if (fitter_choice.compare(
"DafRef") == 0)
97 #if ROOT_VERSION_CODE >= ROOT_VERSION(6, 00, 0)
106 std::cerr <<
"genfit::Track::checkConsistency() failed!" << std::endl;
107 std::cerr << e.
what();
126 std::cerr <<
"PHGenFit::Fitter::processTrack::Exception: \n";
127 std::cerr << e.
what();
128 std::cerr <<
"Exception, next track" << std::endl;
132 #if ROOT_VERSION_CODE >= ROOT_VERSION(6, 00, 0)
141 std::cerr <<
"genfit::Track::checkConsistency() failed!" << std::endl;
142 std::cerr << e.
what();
157 if (
verbosity >= 2)
LogWARNING(
"Track could not be fitted successfully! Fit is not converged!");
170 const bool doEventDisplay)
172 TGeoManager* tgeo_manager = TGeoManager::Import(tgeo_file_name.data(),
"Default");
181 return new Fitter(tgeo_manager, fieldMap, fitter_choice, track_rep_choice, doEventDisplay);
187 const bool doEventDisplay)
189 , _tgeo_manager(tgeo_manager)
190 , _doEventDisplay(doEventDisplay)
215 LogERROR(
"This fitter not implemented!");
222 const bool doEventDisplay)
232 return new Fitter(tgeo_manager, fieldMap, fitter_choice, track_rep_choice, doEventDisplay);
237 const bool doEventDisplay)
239 , _tgeo_manager(tgeo_manager)
240 , _doEventDisplay(doEventDisplay)
254 if (fitter_choice.compare(
"KalmanFitterRefTrack") == 0)
256 else if (fitter_choice.compare(
"KalmanFitter") == 0)
258 else if (fitter_choice.compare(
"DafSimple") == 0)
260 else if (fitter_choice.compare(
"DafRef") == 0)
265 LogERROR(
"This fitter not implemented!");
274 LogERROR(
"No genfit::EventDisplay found!");
283 const bool doEventDisplay)
294 return new Fitter(tgeo_manager, fieldMap, fitter_choice, track_rep_choice, doEventDisplay);