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