ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_ReadDST.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_ReadDST.C
1 #ifndef MACRO_FUN4ALL_READDST_C
2 #define MACRO_FUN4ALL_READDST_C
3 
4 
5 #include <GlobalVariables.C>
6 #include <G4_Input.C>
7 
8 #include <anatutorialecce/AnaTutorialECCE.h>
9 
10 #include <TROOT.h>
13 #include <fun4all/Fun4AllServer.h>
14 
15 #include <phool/recoConsts.h>
16 
17 
18 R__LOAD_LIBRARY(libfun4all.so)
19 // Use libg4eicdst for campaign 2 DSTs
20 R__LOAD_LIBRARY(libg4eicdst.so)
21 // Use libg4dst for campaign 1 DSTs
22 //R__LOAD_LIBRARY(libg4dst.so)
23 R__LOAD_LIBRARY(libanatutorialecce.so)
24 
25 
26 
27 int Fun4All_ReadDST(const int nEvents = 1,
28  const string& inputFile = "DST_SIDIS_pythia6_ep_18x100lowq2_005_1486000_02000.root",
29  const string &outputFile = "G4EICDetector.root")
30 
31 {
32  //---------------
33  // Fun4All server
34  //---------------
36  se->Verbosity(1);
37 
38  // just if we set some flags somewhere in this macro
40 
41  Enable::IP6 = true;
42 
43  Input::READHITS = true;
44  INPUTREADHITS::filename[0] = inputFile;
45 
46  AnaTutorialECCE *anaTutorial = new AnaTutorialECCE("anaTutorial", outputFile + "_anaTutorial.root");
47  anaTutorial->setMinJetPt(3.);
48  anaTutorial->Verbosity(0);
49  anaTutorial->analyzeTracks(true);
50  anaTutorial->analyzeClusters(true);
51  anaTutorial->analyzeJets(true);
52  anaTutorial->analyzeTruth(false);
53  se->registerSubsystem(anaTutorial);
54 
55  InputManagers();
56 
57  se->run(nEvents);
58 
59  se->End();
60 
61  delete se;
62  std::cout << "All done processing" << std::endl;
63  gSystem->Exit(0);
64  return 0;
65 
66 }
67 #endif