File indexing completed on 2025-08-06 08:12:53
0001 int Fun4All_G4_EICDetector_LQ_analysis(
0002 string n="1000",
0003 string ebeam="20",
0004 string pbeam="250",
0005 string seed="1",
0006 string type="3pion"
0007 )
0008 {
0009
0010
0011
0012
0013 string inputFile="/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/g4sim/G4_Leptoquark_DST_p"+pbeam+"_e"+ebeam+"_"+n+"events_"+seed+"seed_"+type+".root";
0014
0015 int nEvents;
0016 stringstream geek(n);
0017 geek>>nEvents;
0018
0019
0020 string directory = "/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/";
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 const bool readhits = true;
0035
0036
0037 bool do_lepto_analysis = true;
0038
0039
0040 bool do_jet_reco = true;
0041 bool do_jet_eval = do_jet_reco && false;
0042
0043 bool do_fwd_jet_reco = true;
0044 bool do_fwd_jet_eval = do_fwd_jet_reco && false;
0045
0046
0047
0048
0049 bool do_HIjetreco = false && do_jet_reco && do_cemc_twr && do_hcalin_twr && do_hcalout_twr;
0050
0051
0052 bool do_dst_compress = false;
0053
0054
0055 bool do_DSTReader = false;
0056
0057
0058
0059
0060
0061
0062 gSystem->Load("libfun4all.so");
0063
0064
0065
0066 gSystem->Load("libg4hough.so");
0067 gSystem->Load("libg4eval.so");
0068 gSystem->Load("libeicana.so");
0069
0070
0071
0072
0073
0074
0075 Fun4AllServer *se = Fun4AllServer::instance();
0076 se->Verbosity(0);
0077
0078
0079
0080 recoConsts *rc = recoConsts::instance();
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099 if (do_jet_reco)
0100 {
0101 gROOT->LoadMacro("G4_Jets.C");
0102 Jet_Reco();
0103 }
0104
0105 if (do_HIjetreco) {
0106 gROOT->LoadMacro("G4_HIJetReco.C");
0107 HIJetReco();
0108 }
0109
0110 if (do_fwd_jet_reco)
0111 {
0112 gROOT->LoadMacro("G4_FwdJets.C");
0113 Jet_FwdReco();
0114 }
0115
0116
0117
0118
0119
0120
0121
0122 if (do_jet_eval) Jet_Eval(directory+"g4jet_p"+pbeam+"_e"+ebeam+"_"+n+"events_"+seed+"seed_"+type+"_eval.root");
0123
0124 if (do_fwd_jet_eval) Jet_FwdEval(directory+"g4fwdjet_p"+pbeam+"_e"+ebeam+"_"+n+"events_"+seed+"seed_"+type+"_eval.root");
0125
0126 if(do_lepto_analysis){
0127 gROOT->LoadMacro("G4_Lepto.C");
0128 G4_Lepto(directory+"LeptoAna_p"+pbeam+"_e"+ebeam+"_"+n+"events_"+seed+"seed_"+type);
0129 }
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139 if (readhits)
0140 {
0141
0142 Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
0143 hitsin->fileopen(inputFile);
0144 se->registerInputManager(hitsin);
0145 }
0146
0147
0148
0149
0150 if (nEvents < 0)
0151 {
0152 return;
0153 }
0154
0155
0156 se->run(nEvents);
0157
0158
0159
0160
0161
0162 se->End();
0163 std::cout << "All done" << std::endl;
0164 delete se;
0165 gSystem->Exit(0);
0166 }