File indexing completed on 2025-08-06 08:16:18
0001
0002
0003
0004
0005
0006
0007 void RunGenFitTrackProp (
0008 const char* input = "SvtxClusters.root",
0009 const int pid_guess = 321,
0010 const int nevents = 0,
0011 const bool use_kalman_pat_rec = true,
0012 const char* output = "GenFitTrackProp.root") {
0013
0014 gSystem->Load("libphool.so");
0015 gSystem->Load("libfun4all.so");
0016 gSystem->Load("libg4dst.so");
0017 gSystem->Load("libg4hough.so");
0018
0019 Fun4AllServer *se = Fun4AllServer::instance();
0020
0021 if (use_kalman_pat_rec) {
0022
0023
0024
0025
0026 PHG4KalmanPatRec* kalman_pat_rec = new PHG4KalmanPatRec("PHG4KalmanPatRec", 3, 4, 40);
0027
0028
0029
0030 se->registerSubsystem(kalman_pat_rec);
0031
0032 } else {
0033
0034
0035
0036 PHG4TruthPatRec* pat_rec = new PHG4TruthPatRec();
0037 se->registerSubsystem(pat_rec);
0038
0039 }
0040
0041
0042
0043
0044 PHG4TrackKalmanFitter* kalman = new PHG4TrackKalmanFitter();
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 se->registerSubsystem(kalman);
0057
0058
0059
0060
0061
0062 gSystem->Load("libfun4all.so");
0063 gSystem->Load("libGenFitTrackProp.so");
0064
0065 Fun4AllServer *se = Fun4AllServer::instance();
0066
0067
0068
0069
0070
0071
0072 GenFitTrackProp *genfit_prop = new GenFitTrackProp("GenFitTrackProp",pid_guess);
0073 genfit_prop->Verbosity(100);
0074 se->registerSubsystem(genfit_prop);
0075
0076 Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTin");
0077
0078 TString tstr_input(input);
0079 if (tstr_input.EndsWith(".root"))
0080 in->AddFile(input);
0081 else
0082 in->AddListFile(input);
0083 se->registerInputManager(in);
0084
0085 se->run(nevents);
0086
0087 se->End();
0088
0089 std::cout << " Success!! " << std::endl;
0090 }