Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_JetVal.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_JetVal.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 #include <fun4all/SubsysReco.h>
7 
10 #include <fun4all/Fun4AllServer.h>
11 
12 #include <phool/PHRandomSeed.h>
13 #include <phool/recoConsts.h>
14 
16 
17 #include <HIJetReco.C>
18 #include </sphenix/user/jamesj3j3/analysis/JS-Jet/JetValidation/src/JetValidation.h>
19 
20 R__LOAD_LIBRARY(libfun4all.so)
21 R__LOAD_LIBRARY(libg4jets.so)
22 R__LOAD_LIBRARY(libjetbackground.so)
23 R__LOAD_LIBRARY(libJetValidation.so)
24 R__LOAD_LIBRARY(libg4centrality.so)
25 R__LOAD_LIBRARY(libg4dst.so)
26 
27 
28 #endif
29 void Fun4All_JetVal(const char *filelisttruth = "dst_truth_jet.list",
30  const char *filelistcalo = "dst_calo_cluster.list",
31  const char *filelistglobal = "dst_global.list",
32  const char *outname = "outputest.root")
33 {
34 
35 
37  int verbosity = 0;
38 
39  se->Verbosity(verbosity);
41 
43  cent->Verbosity(0);
44  cent->GetCalibrationParameters().ReadFromFile("centrality", "xml", 0, 0, string(getenv("CALIBRATIONROOT")) + string("/Centrality/"));
45  se->registerSubsystem( cent );
46 
47  HIJetReco();
48 
49  JetValidation *myJetVal = new JetValidation("AntiKt_Tower_r04_Sub1", "AntiKt_Truth_r04", outname);
50 
51  myJetVal->setPtRange(5, 100);
52  myJetVal->setEtaRange(-1.1, 1.1);
53  myJetVal->doUnsub(1);
54  myJetVal->doTruth(1);
55  myJetVal->doSeeds(1);
56  se->registerSubsystem(myJetVal);
57 
58  Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTtruth");
59  intrue->AddListFile(filelisttruth,1);
60  se->registerInputManager(intrue);
61 
62  Fun4AllInputManager *in2 = new Fun4AllDstInputManager("DSTcalo");
63  in2->AddListFile(filelistcalo,1);
64  se->registerInputManager(in2);
65 
66  Fun4AllInputManager *in3 = new Fun4AllDstInputManager("DSTglobal");
67  in3->AddListFile(filelistglobal,1);
68  se->registerInputManager(in3);
69 
70  se->run(1000);
71  se->End();
72 
73  gSystem->Exit(0);
74  return 0;
75 
76 }