EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_DSTReader_Babar.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_DSTReader_Babar.C
1 #ifndef MACRO_G4DSTREADERBEAST_C
2 #define MACRO_G4DSTREADERBEAST_C
3 
4 #include "GlobalVariables.C"
5 
6 #include "G4_Magnet.C"
7 #include "G4_Pipe_EIC.C"
8 
9 #include <g4eval/PHG4DSTReader.h>
10 
11 #include <fun4all/Fun4AllServer.h>
12 
13 R__LOAD_LIBRARY(libg4eval.so)
14 
15 
16 
23 
24 namespace Enable
25 {
26  bool DSTREADER = false;
27  int DSTREADER_VERBOSITY = 0;
28 } // namespace Enable
29 
30 namespace G4DSTREADER
31 {
32  bool save_g4_raw = true;
33 } // namespace G4DSTREADER
34 
35 void G4DSTreader(const string &outputFile = "G4JLeic.root")
36 {
39 
40  // save a comprehensive evaluation file
41  PHG4DSTReader *ana = new PHG4DSTReader(outputFile);
42  ana->set_save_particle(true);
43  ana->set_load_all_particle(false);
44  ana->set_load_active_particle(true);
45  ana->set_save_vertex(true);
46 
47  ana->Verbosity(verbosity);
48 
50  {
51  if (Enable::PIPE)
52  {
54  ana->AddNode("PIPE");
55  }
56  if (Enable::MAGNET)
57  {
59  ana->AddNode("MAGNET");
60  }
62  {
63  ana->AddNode("BH_1");
64  ana->AddNode("BH_FORWARD_PLUS");
65  ana->AddNode("BH_FORWARD_NEG");
66  }
67  }
69  se->registerSubsystem(ana);
70 }
71 #endif // MACRO_G4DSTREADERJLEIC_C