Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_RTrack.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_RTrack.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 
4 #include <fun4all/SubsysReco.h>
8 
11 #include <fun4all/Fun4AllServer.h>
12 
13 #include <phool/PHRandomSeed.h>
14 #include <phool/recoConsts.h>
15 
16 #include <g4jets/FastJetAlgo.h>
17 #include <g4jets/JetReco.h>
18 #include <g4jets/TowerJetInput.h>
19 #include <g4jets/TruthJetInput.h>
20 
22 
29 
30 
31 #include <G4_Bbc.C>
32 #include <G4_CaloTrigger.C>
33 #include <G4_Centrality.C>
34 #include <G4_DSTReader.C>
35 #include <G4_Global.C>
36 #include <G4_Input.C>
37 #include <G4_KFParticle.C>
38 #include <G4_ParticleFlow.C>
39 #include <G4_Production.C>
40 #include <G4_TopoClusterReco.C>
41 #include <G4_Tracking.C>
42 #include <G4_User.C>
43 #include <QA.C>
44 #include "HIJetReco.C"
45 
46 // #include <G4_CEmc_Spacal.C>
47 #include <jetrtrack/jetrtrack.h>
48 
49 R__LOAD_LIBRARY(libfun4all.so)
50 R__LOAD_LIBRARY(libg4jets.so)
51 R__LOAD_LIBRARY(libjetbackground.so)
52 R__LOAD_LIBRARY(libjetrtrack.so)
53 R__LOAD_LIBRARY(libg4centrality.so)
54 R__LOAD_LIBRARY(libg4dst.so)
55 
56 #endif
57 
58 
59 void Fun4All_RTrack(const char *filetruthjet = "DST_TRACKS_pythia8_Jet30-0000000062-00000.root",
60  const char *filecalo = "DST_CALO_CLUSTER_pythia8_Jet30-0000000062-00000.root",
61  const char *filetruthjets = "DST_TRUTH_JET_pythia8_Jet30-0000000062-00000.root",
62  const char *filetruth = "DST_TRUTH_pythia8_Jet30-0000000062-00000.root",
63  const char * oufilename = "tree_test.root"
64  )
65 {
66 
67 
69  int verbosity = 0;
70 
71  se->Verbosity(verbosity);
73 
74 
75 
76 
78  cent->Verbosity(0);
79  cent->GetCalibrationParameters().ReadFromFile("centrality", "xml", 0, 0, string(getenv("CALIBRATIONROOT")) + string("/Centrality/"));
80  se->registerSubsystem( cent );
81 
82  HIJetReco(); // Performs the officially reccomended jet reconstruction
83 
84 
85  jetrtrack *myJetVal = new jetrtrack("analysis");
86  myJetVal->SetOutputFileName(oufilename);
87  se->registerSubsystem(myJetVal);
88 
89 
90 
91  Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTcalocluster");
92  intrue->AddFile(filetruthjet);
93  se->registerInputManager(intrue);
94 
95  Fun4AllInputManager *in2 = new Fun4AllDstInputManager("DSTcalo");
96  in2->AddFile(filecalo);
97  se->registerInputManager(in2);
98 
99  Fun4AllInputManager *in3 = new Fun4AllDstInputManager("DSTtruthjets");
100  in3->AddFile(filetruthjets);
101  se->registerInputManager(in3);
102 
103  Fun4AllInputManager *in4 = new Fun4AllDstInputManager("DSTtrackseeds");
104  in4->AddFile(filetruth);
105  se->registerInputManager(in4);
106 
107 
108  se->run();
109  se->End();
110 
111  gSystem->Exit(0);
112  return 0;
113 
114 }