Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_EMJetVal.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_EMJetVal.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 "jetvalidation/EMJetVal.h"
19 //#include </sphenix/user/jamesj3j3/analysis/JS-Jet/JetValidation/src/EMJetVal.h>
20 //#include </sphenix/user/jamesj3j3/analysis/JS-Jet/JetValidation/src/JetValidation.h>
21 
22 R__LOAD_LIBRARY(libfun4all.so)
23 R__LOAD_LIBRARY(libg4jets.so)
24 R__LOAD_LIBRARY(libjetbackground.so)
25 R__LOAD_LIBRARY(libJetValidation.so)
26 R__LOAD_LIBRARY(libg4centrality.so)
27 R__LOAD_LIBRARY(libg4dst.so)
28 
29 
30 #endif
31 
32 
33 void Fun4All_EMJetVal(const char *filelisttruth = "dst_truth_jet.list",
34  const char *filelistcalo = "dst_calo_cluster.list",
35  const char *filelistglobal = "dst_global.list",
36  const char *outname = "output.root")
37 {
38 
39 
41  int verbosity = 0;
42 
43  se->Verbosity(verbosity);
45 
46 
48  cent->Verbosity(0);
49  cent->GetCalibrationParameters().ReadFromFile("centrality", "xml", 0, 0, string(getenv("CALIBRATIONROOT")) + string("/Centrality/"));
50  se->registerSubsystem( cent );
51 
52  HIJetReco();
53 
54 
55  // JetValidation *myJetVal = new JetValidation("AntiKt_Tower_r04_Sub1", "AntiKt_Truth_r04", outname);
56 
57  EMJetVal *myEMJetVal = new EMJetVal("AntiKt_Tower_r04_Sub1","AntiKt_Truth_r04", outname);
58 
59  myEMJetVal->setPtRange(5, 100);
60  myEMJetVal->setEtaRange(-1.1, 1.1);
61  myEMJetVal->doUnsub(1);
62  myEMJetVal->doTruth(0);
63  myEMJetVal->doSeeds(0);
64  // se->registerSubsystem(myJetVal);
65  se->registerSubsystem(myEMJetVal);
66 
67 
68  Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTtruth");
69  //intrue->AddListFile(filelisttruth,1);
70  // turn off for running data
71  // se->registerInputManager(intrue);
72 
73  Fun4AllInputManager *in2 = new Fun4AllDstInputManager("DSTcalo");
74  in2->AddListFile(filelistcalo,1);
75  // se->registerInputManager(in2);
76  se->registerInputManager(in2);
77 
78  Fun4AllInputManager *in3 = new Fun4AllDstInputManager("DSTglobal");
79  // in3->AddListFile(filelistglobal,1);
80  // turn off for running data
81  // se->registerInputManager(in3);
82 
83  se->run(10000);
84  se->End();
85 
86  gSystem->Exit(0);
87  return 0;
88 
89 }