File indexing completed on 2025-08-05 08:13:04
0001 #include <fun4all/SubsysReco.h>
0002 #include <fun4all/Fun4AllServer.h>
0003 #include <fun4all/Fun4AllInputManager.h>
0004 #include <fun4all/Fun4AllOutputManager.h>
0005 #include <fun4all/Fun4AllDstInputManager.h>
0006 #include <fun4all/Fun4AllDstOutputManager.h>
0007
0008
0009
0010 #include <phool/recoConsts.h>
0011
0012 #include <Trkr_Clustering.C>
0013 #include <Trkr_Reco.C>
0014 #include <Trkr_RecoInit.C>
0015 #include <G4Setup_sPHENIX.C>
0016
0017 #include <inttzvertexfindertrapezoidal/InttZVertexFinderTrapezoidal.h>
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 R__LOAD_LIBRARY(libfun4all.so)
0051 R__LOAD_LIBRARY(libInttZVertexFinderTrapezoidal.so)
0052
0053
0054 int F4AINTTzTrapezoidal()
0055 {
0056 int process_id = 0;
0057 int run_num = 54280;
0058 int nevents = 5000;
0059 string inputDST_directory = "/sphenix/tg/tg01/commissioning/INTT/work/cwshih/seflgendata/run_54280/From_official_INTTRAWHIT_DST_ColdHotChannelMask/completed";
0060 string inputDST_filename = "DST_physics_intt-54280_HotChannel_BCOCut_CaloCombined_00000.root";
0061 string outputDST_directory = "/sphenix/user/ChengWei/sPH_analysis_repo/INTTvtxZTrapezoidal/macro";
0062 string outputDST_filename = "DSTvtxZTrapezoidal.root";
0063
0064 pair<double, double> vertexXYIncm = {-0.0215087, 0.223197};
0065 bool IsFieldOn = false;
0066 bool IsDCACutApplied = true;
0067 std::pair<std::pair<double,double>,std::pair<double,double>> DeltaPhiCutInDegree = {{-0.5, 0.5},{-1000.,1000.}};
0068 std::pair<std::pair<double,double>,std::pair<double,double>> DCAcutIncm = {{-0.1,0.1},{-1000.,1000.}};
0069 int ClusAdcCut = 35;
0070 int ClusPhiSizeCut = 5;
0071 bool PrintRecoDetails = true;
0072
0073
0074 TStopwatch* watch = new TStopwatch();
0075 watch->Start();
0076
0077
0078 string run_type = "physics";
0079 int total_run_len = 5;
0080 string run_num_str = to_string( run_num );
0081 run_num_str.insert(0, total_run_len - run_num_str.size(), '0');
0082
0083
0084
0085 Fun4AllServer* se = Fun4AllServer::instance();
0086
0087
0088
0089 recoConsts *rc = recoConsts::instance();
0090
0091 Enable::CDB = true;
0092 rc->set_StringFlag("CDB_GLOBALTAG",CDB::global_tag);
0093
0094 rc->set_uint64Flag("TIMESTAMP",CDB::timestamp);
0095 rc->set_IntFlag("RUNNUMBER", run_num );
0096
0097
0098 Fun4AllInputManager *in = new Fun4AllDstInputManager("DST_track");
0099 in->Verbosity(2);
0100 in->AddFile( inputDST_directory + "/" + inputDST_filename);
0101
0102
0103 in->Print("ALL");
0104 se->registerInputManager(in);
0105
0106
0107
0108 Enable::MVTX = true;
0109 Enable::INTT = true;
0110 Enable::TPC = true;
0111 Enable::MICROMEGAS = true;
0112 G4Init();
0113 G4Setup();
0114
0115 TrackingInit();
0116
0117
0118 InttZVertexFinderTrapezoidal * inttz = new InttZVertexFinderTrapezoidal(
0119 "inttz",
0120 vertexXYIncm,
0121 IsFieldOn,
0122 IsDCACutApplied,
0123 DeltaPhiCutInDegree,
0124 DCAcutIncm,
0125 ClusAdcCut,
0126 ClusPhiSizeCut,
0127 PrintRecoDetails
0128 );
0129 se->registerSubsystem(inttz);
0130
0131 Fun4AllOutputManager* out = new Fun4AllDstOutputManager("DST", outputDST_directory + "/" + outputDST_filename);
0132 se->registerOutputManager(out);
0133
0134 se->run(nevents);
0135 se->End();
0136
0137 return 0;
0138 }