3 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
10 #include <filterevents/FilterEvents.h>
12 R__LOAD_LIBRARY(libfun4all.so)
13 R__LOAD_LIBRARY(libfilterevents.so)
16 void Fun4All_FilterEvents(vector<string> myInputLists = {
"condorJob/fileLists/productionFiles-HIJING_0-20-tracks-00000.list"},
const int nEvents = 10)
21 string outDir =
"/sphenix/u/rosstom/analysis/FilterEvents/macro/";
23 string fileNumber = myInputLists[0];
24 size_t findLastDash = fileNumber.find_last_of(
"-");
25 if (findLastDash != string::npos) fileNumber.erase(0, findLastDash + 1);
26 string remove_this =
".list";
27 size_t pos = fileNumber.find(remove_this);
28 if (pos != string::npos) fileNumber.erase(pos, remove_this.length());
29 string outputFileName =
"outputFilteredTrackSeeds_" + fileNumber +
".root";
31 string outputRecoDir = outDir +
"inReconstruction/";
32 string makeDirectory =
"mkdir -p " + outputRecoDir;
33 system(makeDirectory.c_str());
36 cout <<
"output file name: " << outputRecoFile << endl;
38 bool upsilonFilter =
false;
44 for (
unsigned int i = 0;
i < myInputLists.size(); ++
i)
59 if (!upsilonFilter) filter->
setCuts(1.0, 0.01, 20,
false);
66 out->
AddNode(
"SiliconTrackSeedContainer");
67 out->
AddNode(
"TpcTrackSeedContainer");
68 out->
AddNode(
"SvtxTrackSeedContainer");
69 if (upsilonFilter) out->
AddNode(
"CLUSTER_CEMC");
71 out->
AddNode(
"GlobalVertexMap");
78 ifstream
file(outputRecoFile.c_str());
81 string moveOutput =
"mv " + outputRecoFile +
" " + outDir;
82 system(moveOutput.c_str());
85 cout <<
"all done." << endl;