Skip to content

Commit d53e5ff

Browse files
authored
Add a 2-particle RG-L EB test (#575)
* add rg-l generator * add rg-l test * 12 degrees for inbending * fix column types * fix RNG seed * fix seed * fix lund "index"
1 parent 61fa188 commit d53e5ff

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

validation/advanced-tests/src/eb/scripts/gemc.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
usage() { echo "Usage: $0 [-g GEMC] [-n NEV] [-p PARTS] [-c GCARD] [-m]" 1>&2; exit $1; }
44

55
run=11
6-
gemc=5.10
6+
gemc=dev
77
nevents=100
88
particles=()
9+
seed=1234567
910

1011
while getopts "g:n:c:p:mdh" o
1112
do
@@ -53,7 +54,7 @@ function run_gemc () {
5354
[ -e "$_output" ] && echo Output file already exists: $_output && exit 3
5455
[ -z ${dryrun+x} ] && set -x
5556
$dryrun gemc \
56-
$_gcard -RUNNO=$_run -USE_GUI=0 -N=$_nevents \
57+
$_gcard -RANDOM=$seed -RUNNO=$_run -USE_GUI=0 -N=$_nevents \
5758
-SAVE_ALL_MOTHERS=1 -SKIPREJECTEDHITS=1 -INTEGRATEDRAW="*" -NGENP=50 \
5859
-INPUT_GEN_FILE="LUND, $_input" \
5960
-OUTPUT="hipo, $_output" &
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env python
2+
import random,math,sys
3+
4+
mp = 0.93827
5+
me = 0.00051
6+
fmt = ' '.join(6*['%d']+8*['%.4f'])
7+
8+
def cartesian(p,t,h,m):
9+
x = p * math.cos(h) * math.sin(t)
10+
y = p * math.sin(h) * math.sin(t)
11+
z = p * math.cos(t)
12+
e = math.sqrt(p*p + m*m)
13+
return [x,y,z,e]
14+
15+
for i in range(int(sys.argv[1])):
16+
p = 0.1+0.1*random.random()
17+
e = math.sqrt(p*p+mp*mp)
18+
t = math.radians(70+40*random.random())
19+
h = 2*math.pi*random.random()
20+
z = -5+10*random.random()
21+
header = [2,1,1,0,0,0,0,0,0,0]
22+
electron = [1,0,1,11,0,0] + cartesian(9.0,math.radians(12),0,me) + [me,0,0,z]
23+
hadron = [2,0,1,2212,0,0] + cartesian(p,t,h,mp) + [mp,0,0,z]
24+
print(' '.join([str(x) for x in header]))
25+
print(fmt%tuple(electron))
26+
print(fmt%tuple(hadron))

validation/advanced-tests/src/eb/scripts/list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ electrondeuteronC -pid 45 -cd
1212
electronFTpion -pid -211 -ft
1313
electronFTproton -pid -2212 -ft
1414
electronFTkaon -pid -321 -ft
15+
electronprotonA -pid -2212 -al

0 commit comments

Comments
 (0)