File indexing completed on 2025-08-05 08:13:22
0001
0002 #pragma once
0003 #ifndef MACRO_FUN4ALLEVENTSELECTION_C
0004 #define MACRO_FUN4ALLEVENTSELECTION_C
0005
0006
0007 #include <fun4all/Fun4AllServer.h>
0008 #include <fun4all/Fun4AllDstInputManager.h>
0009 #include <fun4all/Fun4AllDstOutputManager.h>
0010 #include <phool/phool.h>
0011 #include <fun4all/Fun4AllSyncManager.h>
0012 #include <fun4all/Fun4AllInputManager.h>
0013 #include <fun4all/Fun4AllOutputManager.h>
0014 #include <phool/PHRandomSeed.h>
0015 #include <phool/recoConsts.h>
0016 #include <jetvalidation/EventSelection.h>
0017
0018
0019 R__LOAD_LIBRARY(libg4dst.so)
0020 R__LOAD_LIBRARY(libfun4all.so)
0021 R__LOAD_LIBRARY(libJetValidation.so)
0022
0023
0024
0025 void Fun4All_EventSelection(const char *filelisttruth = "dst_truth_jet.list",
0026 const char* outname = "eventselectest.root") {
0027
0028 Fun4AllServer *se = Fun4AllServer::instance();
0029 int verbosity = 0;
0030 se->Verbosity(verbosity);
0031
0032
0033 EventSelection *myEventSelection = new EventSelection("AntiKt_Truth_r04", outname);
0034 se->registerSubsystem(myEventSelection);
0035
0036 Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTtruth");
0037 intrue->AddListFile(filelisttruth,1);
0038 se->registerInputManager(intrue);
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 se->run(1000);
0052 se->End();
0053
0054
0055 delete se;
0056 std::cout << "Analysis Completed" << std::endl;
0057 }
0058
0059 #endif