File indexing completed on 2025-08-05 08:21:37
0001 #ifndef MACRO_FUN4ALLJETANA_C
0002 #define MACRO_FUN4ALLJETANA_C
0003
0004 #include <fun4all/Fun4AllDstInputManager.h>
0005 #include <fun4all/Fun4AllInputManager.h>
0006 #include <fun4all/Fun4AllServer.h>
0007 #include <fun4all/SubsysReco.h>
0008
0009
0010 #include <myjetanalysis/MyJetAnalysis.h>
0011 R__LOAD_LIBRARY(libfun4all.so)
0012 R__LOAD_LIBRARY(libmyjetanalysis.so)
0013
0014 void Fun4All_JetAna(const int nevnt = 0, const char *inputfile = "/sphenix/sim/sim01/tutorials/myjetanalysis/G4sPHENIX_Pythia8.root")
0015 {
0016 gSystem->Load("libmyjetanalysis");
0017 gSystem->Load("libg4dst");
0018
0019 Fun4AllServer *se = Fun4AllServer::instance();
0020
0021 MyJetAnalysis *myJetAnalysis = new MyJetAnalysis("AntiKt_Tower_r04", "AntiKt_Truth_r04", "myjetanalysis.root");
0022
0023
0024
0025 myJetAnalysis->setPtRange(1, 100);
0026 myJetAnalysis->setEtaRange(-1.1, 1.1);
0027 se->registerSubsystem(myJetAnalysis);
0028
0029 Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTin");
0030 in->fileopen(inputfile);
0031 se->registerInputManager(in);
0032
0033 se->run(nevnt);
0034 se->End();
0035 delete se;
0036 gSystem->Exit(0);
0037 }
0038
0039 #endif