Skip to content

Commit 7e87aff

Browse files
committed
add option to set predefined particle acceptance
1 parent 9fa3747 commit 7e87aff

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
parser.add_argument('-ptTrigMin',help='generated pT trigger minimum', default=0)
3636
parser.add_argument('-ptTrigMax',help='generated pT trigger maximum', default=-1)
37+
parser.add_argument('-acceptance',help='select particles within predefined acceptance in ${O2DPG_ROOT}/MC/run/common/detector_acceptance.C', default=0)
3738

3839
parser.add_argument('--embedding',action='store_true', help='With embedding into background')
3940
parser.add_argument('-nb',help='number of background events / timeframe', default=20)
@@ -175,6 +176,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
175176

176177
PTTRIGMIN=float(args.ptTrigMin)
177178
PTTRIGMAX=float(args.ptTrigMax)
179+
PARTICLE_ACCEPTANCE=int(args.acceptance)
178180

179181
## Pt Hat productions
180182
WEIGHTPOW=int(args.weightPow)

MC/config/PWGGAJE/hooks/jets_hook.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ pythia8_userhooks_jets(int acc = 0, int pdgPar = 0)
103103
printf("Select outgoing partons with pdg = %d\n",pdgPar);
104104
}
105105

106-
if ( !acc && gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE") )
106+
if ( !acc && gSystem->Getenv("PARTICLE_ACCEPTANCE") )
107107
{
108-
acc = atoi(gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE"));
108+
acc = atoi(gSystem->Getenv("PARTICLE_ACCEPTANCE"));
109109
printf("Requested acceptance %d\n",acc);
110110
}
111111

MC/config/PWGGAJE/hooks/prompt_gamma_hook.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ Pythia8::UserHooks*
121121
printf("Select outgoing partons with pdg = %d\n",pdgPar);
122122
}
123123

124-
if ( !acc && gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE") )
124+
if ( !acc && gSystem->Getenv("PARTICLE_ACCEPTANCE") )
125125
{
126-
acc = atoi(gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE"));
126+
acc = atoi(gSystem->Getenv("PARTICLE_ACCEPTANCE"));
127127
printf("Requested acceptance %d\n",acc);
128128
}
129129

MC/config/PWGGAJE/trigger/decay_gamma_jets.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ o2::eventgen::Trigger decay_gamma_jets( )
2727
// Select photons within acceptance
2828
//
2929
Int_t acceptance = 0;
30-
if ( gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE") )
31-
acceptance = atoi(gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE"));
30+
if ( gSystem->Getenv("PARTICLE_ACCEPTANCE") )
31+
acceptance = atoi(gSystem->Getenv("PARTICLE_ACCEPTANCE"));
3232
//printf("Requested acceptance %d\n",acceptance);
3333

3434
// Particle loop

MC/config/PWGGAJE/trigger/prompt_gamma.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ o2::eventgen::Trigger prompt_gamma( )
7171
// Select photons within acceptance
7272
//
7373
Int_t acceptance = 0;
74-
if ( gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE") )
75-
acceptance = atoi(gSystem->Getenv("CONFIG_DETECTOR_ACCEPTANCE"));
74+
if ( gSystem->Getenv("PARTICLE_ACCEPTANCE") )
75+
acceptance = atoi(gSystem->Getenv("PARTICLE_ACCEPTANCE"));
7676
//printf("Requested acceptance %d\n",acceptance);
7777

7878
if ( detector_acceptance(acceptance, gamma.Phi(),gamma.Eta()) )

0 commit comments

Comments
 (0)