Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_testingGround.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_testingGround.C
1 // $Id: $
2 
11 #if ROOT_VERSION_CODE >= ROOT_VERSION(6, 00, 0)
12 
16 #include <fun4all/Fun4AllServer.h>
17 #include <fun4all/SubsysReco.h>
18 #include <antitrigger/AntiTrigger.h>
19 
20 R__LOAD_LIBRARY(libantitrigger.so)
21 R__LOAD_LIBRARY(libfun4all.so)
22 R__LOAD_LIBRARY(libg4dst.so)
23 
24 #endif
25 
26 using namespace std;
27 
29 
30  const int nEvents = 200;
31  int verbosity = INT_MAX - 10;
32  //---------------
33  // Load libraries
34  //---------------
35  gSystem->Load("libfun4all.so");
36  gSystem->Load("libg4dst.so");
37  //---------------
38  // Fun4All server
39  //---------------
41  se->Verbosity(verbosity);
42 
43  //--------------
44  // IO management
45  //--------------
46  // Hits file
47  Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
48 
49  hitsin->AddFile("DST_HF_BOTTOM_pythia8-0000000001-00000.root");
50  se->registerInputManager(hitsin);
51 
52  AntiTrigger* myFinder = new AntiTrigger("myTestAntiTrigger");
53  myFinder->Verbosity(verbosity);
54  std::vector<std::string> particleList = {"D0", "D+", "Ds+", "Lambdac+", "B+", "B0", "Bs0", "Lambdab0"};
55  myFinder->setParticleList(particleList);
56  se->registerSubsystem(myFinder);
57 
58  //-----------------
59  // Event processing
60  //-----------------
61  if (nEvents < 0)
62  return 0;
63 
64  se->run(nEvents);
65 
66  //-----
67  // Exit
68  //-----
69 
70  se->End();
71  std::cout << "All done" << std::endl;
72  delete se;
73  gSystem->Exit(0);
74  return 0;
75 }