Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:37

0001 
0002 #pragma once
0003 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
0004 #include <fun4all/SubsysReco.h>
0005 #include <fun4all/Fun4AllServer.h>
0006 #include <fun4all/Fun4AllInputManager.h>
0007 #include <fun4all/Fun4AllDstInputManager.h>
0008 #include <fun4all/Fun4AllDstOutputManager.h>
0009 
0010 #include </gpfs/mnt/gpfs02/sphenix/user/lebedev/mdc/analysis/FilterEventsUpsilon/install/include/filtereventsupsilon/FilterEventsUpsilon.h>
0011 
0012 R__LOAD_LIBRARY(libfun4all.so)
0013 R__LOAD_LIBRARY(libfiltereventsupsilon.so)
0014 #endif
0015 
0016 void run(int kkk=0)
0017 {
0018 
0019 //  gSystem->Load("libg4dst");
0020 //  gSystem->Load("libfiltereventsupsilon");
0021 
0022   char outfilename[99];
0023   char infilename1[99];
0024   char infilename2[99];
0025   sprintf(outfilename,"test.root");
0026   cout << "output file name: " << outfilename << endl;
0027 
0028   Fun4AllServer *se = Fun4AllServer::instance();
0029   se->Verbosity(1);
0030 
0031   Fun4AllInputManager *in1 = new Fun4AllDstInputManager("in1");
0032   se->registerInputManager(in1);
0033 //  Fun4AllInputManager *in2 = new Fun4AllDstInputManager("in2");
0034 //  se->registerInputManager(in2);
0035 //  Fun4AllInputManager *in3 = new Fun4AllDstInputManager("in3");
0036 //  se->registerInputManager(in3);
0037 //  Fun4AllInputManager *in4 = new Fun4AllDstInputManager("in4");
0038 //  se->registerInputManager(in4);
0039 
0040   in1->AddFile("/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/embedupsilonsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00110.root");
0041   in1->AddFile("/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/embedupsilonsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00111.root");
0042   in1->AddFile("/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/embedupsilonsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00112.root");
0043   in1->AddFile("/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/embedupsilonsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00113.root");
0044   in1->AddFile("/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/embedupsilonsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00114.root");
0045 
0046 //  in1->AddFile("DST_TRACKS_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00090.root");
0047 //  in2->AddFile("DST_TRACKSEEDS_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00090.root");
0048 //  in3->AddFile("DST_TRKR_CLUSTER_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00090.root");
0049 //  in4->AddFile("DST_CALO_CLUSTER_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-00090.root");
0050 
0051 /*
0052   for(int i=0; i<10; i++) {
0053     sprintf(infilename1,"DST_TRACKS_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-%05d.root",kkk+i);
0054     cout << "in1:  " << infilename1 << endl;
0055     in1->AddFile(infilename1);
0056     sprintf(infilename2,"DST_CALO_CLUSTER_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000060-%05d.root",kkk+i);
0057     cout << "in2:  " << infilename2 << endl;
0058     in2->AddFile(infilename2);
0059   }
0060 */
0061 
0062   FilterEventsUpsilon *filter = new FilterEventsUpsilon("FilterEventsUpsilon");
0063   se->registerSubsystem(filter);
0064 
0065   Fun4AllOutputManager *outee = new Fun4AllDstOutputManager("outee",outfilename);
0066   outee->Verbosity(1);
0067   outee->AddNode("SvtxTrackMap_ee");
0068   outee->AddNode("TRKR_CLUSTER");
0069   outee->AddNode("SiliconTrackSeedContainer");
0070   outee->AddNode("TpcTrackSeedContainer");
0071   outee->AddNode("SvtxTrackSeedContainer");
0072   outee->AddNode("CLUSTER_CEMC");
0073   outee->AddNode("SvtxVertexMap");
0074   outee->AddNode("GlobalVertexMap");
0075   se->registerOutputManager(outee);
0076   outee->Print();
0077 
0078   se->run(10);
0079   se->End();
0080 cout << "all done." << endl;
0081 }
0082 
0083 
0084