Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
blob
master
A_N
Ana
AndersonAnalysisModules
AntiSigma
BBCStudy
Calo_Validation_Package
Calo_waveform_sim
Calorimeter
CalorimeterEmbedding
CalorimeterJets
cdbEMCalExample
cemcRecoAna
Centrality_Validation_Package
dNdEta_Run2023
EIC-IR
EIC-SynRad
EICAnalysis
eventgen
macros
diskinematics_analysis
diskinematics_fun4all
exclusive_analysis
exclusive_fun4all
leptoquarks_analysis
leptoquarks_fun4all
DisplayOn.C
Fun4All_EICAnalysis_Leptoquarks.C
Fun4All_G4_EICDetector_LQ.C
Fun4All_G4_EICDetector_LQ_analysis.C
Fun4All_G4_EICDetector_LQ_analysis_nf.C
Fun4All_G4_EICDetector_LQ_reference.C
G4_Aerogel.C
G4_Bbc.C
G4_CaloTrigger.C
G4_CEmc_Spacal.C
G4_DIRC.C
G4_DSTReader.C
G4_DSTReader_EICDetector.C
G4_DSTReader_fsPHENIX.C
G4_EEMC.C
G4_EGEM_EIC.C
G4_FEMC.C
G4_FEMC_EIC.C
G4_FGEM_EIC.C
G4_FGEM_fsPHENIX.C
G4_FHCAL.C
G4_FwdJets.C
G4_Global.C
G4_HcalIn_ref.C
G4_HcalOut_ref.C
G4_HIJetReco.C
G4_Jets.C
G4_Lepto.C
G4_Magnet.C
G4_Pipe.C
G4_PSTOF.C
G4_RICH.C
G4_Svtx.C
G4_Svtx_maps_ladders+intt_ladders+tpc_KalmanPatRec.C
G4_Svtx_MAPScyl_ITTcyl_TPC.C
G4_TPC.C
G4Setup_EICDetector.C
G4Setup_fsPHENIX.C
G4Setup_sPHENIX.C
scattered-electron_analysis
track2cluster_analysis
tracking_analysis
Fun4All_EICAnalysis_DVCS.C
Fun4All_EICAnalysis_JPsi.C
DISKinematicsReco.C
DISKinematicsReco.h
DISKinematicsRecoLinkDef.h
DVMPHelper.C
DVMPHelper.h
DVMPHelperLinkDef.h
ExclusiveReco.C
ExclusiveReco.h
ExclusiveRecoLinkDef.h
Leptoquarks.C
Leptoquarks.h
LeptoquarksLinkDef.h
LeptoquarksReco.C
LeptoquarksReco.h
LeptoquarksRecoLinkDef.h
PidCandidate.C
PidCandidate.h
PidCandidateLinkDef.h
PidCandidatev1.C
PidCandidatev1.h
PidCandidatev1LinkDef.h
Quarkonia2LeptonsMC.C
Quarkonia2LeptonsMC.h
Quarkonia2LeptonsMCLinkDef.h
TrackProjectionTools.C
TrackProjectionTools.h
TrackProjectionToolsLinkDef.h
TrackProjectorPlaneECAL.cc
TrackProjectorPlaneECAL.h
TrackProjectorPlaneECALLinkDef.h
TruthTrackerHepMC.C
TruthTrackerHepMC.h
TruthTrackerHepMCLinkDef.h
EICMCAnalysis
EICTrigger
ElectronID
EMCal-analysis
EMCal-calibration
EMCal-commissioning
EMCal-LEDs
EMCal-position-dependent-calibration
EMCal-QA
EMCal_pi0_Calib_2023
EMCTemplateFitting
EpFinder
Event-Display
EventMix
FilterEvents
FilterEventsUpsilon
Fluence
ForwardCalo
ForwardTracking
FrawleyTrackEvalMacros
hbcup
HCal-analysis
HCalCosmicCalib
HCalHotTowerFinder
HCalib
HcalSingleHadronCalib
HF-Jet
HF-Particle
isoCluster
IsolatedTrackAnalysis
JS-Jet
mbdAnalysis
MBDStudy
MultiDetectorMultiplicity
MvtxTelescope
mybuild
ParticleID
PHFlowJetMaker
PhotonConversion
PhotonJet
pi0ClusterAna
pi0Efficiency
Pi0MassAnalysis
Prototype2
Prototype3
Prototype4
psTOF
pythiaEMCalAna
pythiaInfo
QuarkoniaBG
quickHIJING
ResonanceJetTaggingOutputs
runTrackingDiagnostics
Shift_emcal_g4hits
SimpleTrackingAnalysis
singlePhotonClusterAna
sPhenixAj
SvtxSimPerformanceCheckReco
TemplateCreation
Test
TowerInfoExample
TPC
TPC-ClusterAnimation
TPC-GemGain
Tracking
TrackPid
TreeMaker
ZDC-CALIB
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Fun4All_G4_EICDetector_LQ_analysis_nf.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4All_G4_EICDetector_LQ_analysis_nf.C
1
int
Fun4All_G4_EICDetector_LQ_analysis_nf
(
2
string
fileindex=
"1"
,
3
string
n
=
"10"
,
4
string
ebeam=
"20"
,
5
string
pbeam=
"250"
,
6
//string inputFile,
7
//string output="tau"
8
)
9
{
10
// string inputFile="/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/G4_Leptoquark_DST_p250_e20_"+fileindex+"events.root";
11
//string inputFile="/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/G4_Leptoquark_DST_p250_e20_1000events_"+fileindex+".root";
12
// string inputFile="/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/G4_Leptoquark_DST_p250_e20_1093events.root";
13
14
// string inputFile = "/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/g4sim/G4_Leptoquark_DST_p250_e20_1000events_"+fileindex+"seed_3pion.root";
15
string
inputFile =
"/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/g4sim/G4_Leptoquark_DST_p250_e20_1000events_"
+fileindex+
"seed_3pion.root"
;
16
17
cout <<
"Using input file: "
<< inputFile << endl;
18
19
int
nEvents
;
20
stringstream geek(
n
);
21
geek>>
nEvents
;
22
23
string
directory =
"./"
;
//"/direct/phenix+u/spjeffas/leptoquark/output/"+output+"/";
24
25
//===============
26
// Input options
27
//===============
28
29
// Either:
30
// read previously generated g4-hits files, in this case it opens a DST and skips
31
// the simulations step completely. The G4Setup macro is only loaded to get information
32
// about the number of layers used for the cell reco code
33
//
34
// In case reading production output, please double check your G4Setup_sPHENIX.C and G4_*.C consistent with those in the production macro folder
35
// E.g. /sphenix/sim//sim01/production/2016-07-21/single_particle/spacal2d/
36
const
bool
readhits =
true
;
37
38
//do leptoquark analysis modules
39
bool
do_lepto_analysis =
true
;
40
41
// Other options
42
bool
do_cemc_eval =
false
;
43
44
bool
do_jet_reco =
true
;
45
bool
do_jet_eval = do_jet_reco &&
true
;
46
47
bool
do_fwd_jet_reco =
false
;
48
bool
do_fwd_jet_eval = do_fwd_jet_reco &&
false
;
49
50
// HI Jet Reco for jet simulations in Au+Au (default is false for
51
// single particle / p+p simulations, or for Au+Au simulations which
52
// don't care about jets)
53
bool
do_HIjetreco =
false
&& do_jet_reco && do_cemc_twr && do_hcalin_twr && do_hcalout_twr;
54
55
// Compress DST files
56
bool
do_dst_compress =
false
;
57
58
//Option to convert DST to human command readable TTree for quick poke around the outputs
59
bool
do_DSTReader =
false
;
60
61
//---------------
62
// Load libraries
63
//---------------
64
65
gSystem->Load(
"libfun4all.so"
);
66
gSystem->Load(
"libg4eval.so"
);
67
gSystem->Load(
"libeicana.so"
);
68
69
//---------------
70
// Fun4All server
71
//---------------
72
73
Fun4AllServer
*se =
Fun4AllServer::instance
();
74
se->
Verbosity
(0);
// uncomment for batch production running with minimal output messages
75
// se->Verbosity(Fun4AllServer::VERBOSITY_SOME); // uncomment for some info for interactive running
76
77
// just if we set some flags somewhere in this macro
78
recoConsts
*rc =
recoConsts::instance
();
79
// By default every random number generator uses
80
// PHRandomSeed() which reads /dev/urandom to get its seed
81
// if the RANDOMSEED flag is set its value is taken as seed
82
// You can either set this to a random value using PHRandomSeed()
83
// which will make all seeds identical (not sure what the point of
84
// this would be:
85
// rc->set_IntFlag("RANDOMSEED",PHRandomSeed());
86
// or set it to a fixed value so you can debug your code
87
// rc->set_IntFlag("RANDOMSEED", 12345);
88
89
//-----------------
90
// Event generation
91
//-----------------
92
93
//---------
94
// Jet reco
95
//---------
96
97
if
(do_jet_reco)
98
{
99
gROOT->LoadMacro(
"G4_Jets.C"
);
100
Jet_Reco
();
101
}
102
103
if
(do_HIjetreco) {
104
gROOT->LoadMacro(
"G4_HIJetReco.C"
);
105
HIJetReco
();
106
}
107
108
if
(do_fwd_jet_reco)
109
{
110
gROOT->LoadMacro(
"G4_FwdJets.C"
);
111
Jet_FwdReco
();
112
}
113
114
115
if
(do_cemc_eval)
116
{
117
//gROOT->LoadMacro("G4_CEmc_Spacal.C");
118
//CEMC_Eval("cemc_eval_lq.root");
119
120
CaloEvaluator
*eval =
new
CaloEvaluator
(
"CEMCEVALUATOR"
,
"CEMC"
,
121
directory+
"p"
+pbeam+
"_e"
+ebeam+
"_"
+
n
+
"events_file"
+fileindex+
"_cemceval.root"
);
122
se->
registerSubsystem
(eval);
123
124
}
125
126
//----------------------
127
// Simulation evaluation
128
//----------------------
129
130
if
(do_jet_eval)
131
{
132
Jet_Eval
(directory+
"p"
+pbeam+
"_e"
+ebeam+
"_"
+
n
+
"events_file"
+fileindex+
"_jeteval_r05.root"
);
133
}
134
135
if
(do_fwd_jet_eval)
Jet_FwdEval
(directory+
"p"
+pbeam+
"_e"
+ebeam+
"_"
+
n
+
"events_file"
+fileindex+
"_fwdjeteval.root"
);
136
137
if
(do_lepto_analysis){
138
gROOT->LoadMacro(
"G4_Lepto.C"
);
139
G4_Lepto
(directory+
"p"
+pbeam+
"_e"
+ebeam+
"_"
+
n
+
"events_file"
+fileindex+
"_LeptoAna"
);
140
}
141
142
143
//--------------
144
// IO management
145
//--------------
146
147
if
(readhits)
148
{
149
// Hits file
150
Fun4AllInputManager
*hitsin =
new
Fun4AllDstInputManager
(
"DSTin"
);
151
hitsin->
fileopen
(inputFile);
152
se->
registerInputManager
(hitsin);
153
}
154
155
//-----------------
156
// Event processing
157
//-----------------
158
if
(nEvents < 0)
159
{
160
return
;
161
}
162
163
164
se->
run
(nEvents);
165
166
//-----
167
// Exit
168
//-----
169
170
se->
End
();
171
std::cout <<
"All done"
<< std::endl;
172
delete
se;
173
gSystem->Exit(0);
174
}
analysis
blob
master
EICAnalysis
macros
leptoquarks_fun4all
Fun4All_G4_EICDetector_LQ_analysis_nf.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:48
using
1.8.2 with
sPHENIX GitHub integration