File indexing completed on 2025-08-06 08:12:52
0001
0002
0003 int Fun4All_EICAnalysis_TrackEval(
0004 const int nEvents = 10,
0005 const char * inputFile = "/gpfs/mnt/gpfs04/sphenix/user/nfeege/sphenixsw/devel/analysis/EICAnalysis/data/G4EICDetector_DIS_SingleParticle_ele_10GeV_m3eta.root",
0006
0007
0008
0009
0010 const char* evalFile = "eval_track_fastsim.root"
0011 )
0012 {
0013
0014 bool readdst = true;
0015 bool readhepmc = false;
0016
0017
0018
0019
0020
0021 gSystem->Load("libeicana.so");
0022 gSystem->Load("libfun4all.so");
0023 gSystem->Load("libg4eval.so");
0024
0025
0026
0027
0028
0029 Fun4AllServer *se = Fun4AllServer::instance();
0030 se->Verbosity(0);
0031
0032 recoConsts *rc = recoConsts::instance();
0033
0034
0035
0036
0037
0038 gROOT->LoadMacro("G4_FastSim_Reco_EIC.C");
0039 FastSim_Reco_EIC();
0040
0041
0042
0043
0044
0045 gSystem->Load("libFastTrackingEval.so");
0046 FastTrackingEval* eval_fasttrack;
0047 eval_fasttrack = new FastTrackingEval("FASTTRACKEVALUATOR", evalFile, "SvtxTrackMap_FastSim");
0048 se->registerSubsystem( eval_fasttrack );
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 if ( readdst )
0067 {
0068 Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
0069 hitsin->fileopen(inputFile);
0070 se->registerInputManager(hitsin);
0071 }
0072
0073 else if ( readhepmc )
0074 {
0075 Fun4AllInputManager *in = new Fun4AllHepMCInputManager( "DSTIN");
0076 se->registerInputManager( in );
0077 se->fileopen( in->Name().c_str(), inputFile );
0078 }
0079
0080
0081
0082
0083
0084 if (nEvents < 0)
0085 {
0086 return;
0087 }
0088
0089 if (nEvents == 0 && !readhits && !readhepmc)
0090 {
0091 cout << "using 0 for number of events is a bad idea when using particle generators" << endl;
0092 cout << "it will run forever, so I just return without running anything" << endl;
0093 return;
0094 }
0095
0096 se->run(nEvents);
0097
0098
0099
0100
0101
0102 se->End();
0103 std::cout << "All done" << std::endl;
0104 delete se;
0105 gSystem->Exit(0);
0106 }