Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_JetAna.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_JetAna.C
1 #ifndef MACRO_FUN4ALLJETANA_C
2 #define MACRO_FUN4ALLJETANA_C
3 
7 #include <fun4all/SubsysReco.h>
8 
9 // here you need your package name (set in configure.ac)
10 #include <myjetanalysis/MyJetAnalysis.h>
11 R__LOAD_LIBRARY(libfun4all.so)
12 R__LOAD_LIBRARY(libmyjetanalysis.so)
13 
14 void Fun4All_JetAna(const int nevnt = 0, const char *inputfile = "/sphenix/sim/sim01/tutorials/myjetanalysis/G4sPHENIX_Pythia8.root")
15 {
16  gSystem->Load("libmyjetanalysis");
17  gSystem->Load("libg4dst");
18 
20 
21  MyJetAnalysis *myJetAnalysis = new MyJetAnalysis("AntiKt_Tower_r04", "AntiKt_Truth_r04", "myjetanalysis.root");
22  // myJetAnalysis->Verbosity(0);
23  // change lower pt and eta cut to make them visible using the example
24  // pythia8 file
25  myJetAnalysis->setPtRange(1, 100);
26  myJetAnalysis->setEtaRange(-1.1, 1.1);
27  se->registerSubsystem(myJetAnalysis);
28 
30  in->fileopen(inputfile);
31  se->registerInputManager(in);
32 
33  se->run(nevnt);
34  se->End();
35  delete se;
36  gSystem->Exit(0);
37 }
38 
39 #endif