-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_genie_splines_v2.sh
executable file
·2590 lines (2336 loc) · 79.8 KB
/
gen_genie_splines_v2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#! /usr/bin/env bash
export THISFILE="$0"
export b0=`basename $0`
export GEN_GENIE_SPLINE_VERSION=2017-10-29
#
# users need to modify the following products of this script:
# 'define_cfg.sh' adjust parameters in defined function
# 'isotopes.cfg' text file of which isotopes to use
# 'setup_genie.sh' define function ( for special cases )
#
##############################################################################
function usage() {
cat >&2 <<EOF
Purpose: Generate a full GENIE cross-section spline file and auxillary
packaging appropriate for UPS distribution.
There are two primary steps. The first initializes a working area and writes
preliminary configuration files. These are then edited before jobs are
submitted to be run. The second step finalizes the setup and makes the
necessary files for \"jobsub_client\" condor submission.
All instances need to include the flags:
${b0} --top /path/to/top \\
--version <version> --qualifier <qualifier> \\
[other flags and optargs]
-T | --top Directory under which to create working area
-V | --version e.g. v2_8_6b
scisoft expects "vX_Y_Z[a:z]"
-Q | --qualifier e.g. default
no spaces or special characters
Use --morehelp for further details.
[This script is not yet modified to use "ifdh cp" and assumes one can write
directly to the output area, both during initialization and processing stages]
EOF
}
function extended_help() {
cat >&2 <<EOF
Initialization step uses the flags:
${b0} { -T -V -Q } --init [ --rewrite ] [ <import-file1.xml> ... ]
--init Create directory structures in output area;
Create default configuration files;
optionally import XML files (e.g. such as
UserPhysicsOptions.xml and/or
EventGeneratorListAssembler.xml)
optional:
--rewrite Allow init to overwrite existing config files
the following initialize the files with some defaults ... but can
be edited after the init stage, before starting any processing stages
--setup <setup-string> [${INITSETUPSTR}] how to setup genie
ups:<prd-area>%<genie-ver>%<genie-qual>
file:</path/script.sh>
--knots <# knots> [${INITKNOTS}] # of spline knots
--emax <Enu max> [${INITEMAX}] max energy of spline
--genlist <evgenlist> [${INITGENLIST}] a config name found in
EventGeneratorListAssembler.xml
--no-Gd [${NOGDOPT}] exclude Gd isotopes
required prior to v2_9_0
--split-nu-isotopes [${SPLITNUISOTOPES}] when doing isotopes run single nu flavors
The initialization procedure creates the actual working area under the
top directory such that:
/output/path = /path/to/top/GXSPLINES-<version>-<qualifier>/
Once the output area has been initialized, then the user can modify the
files in </output/path>/cfg to define exactly what must be done:
general_cfg.sh
setup_genie.sh
isotopes.cfg
The init
After which one can run:
${b0} { -T -V -Q } --finalize-cfg[=<group>]
which generates the files:
</output/path>/cfg/gen_genie_splines.dag
</output/path>/cfg/cfg.tar.gz # collection of all other cfg files
if <group> isn't specified then it will be picked up from \$JOBSUB_GROUP
or \$GROUP.
which allows one to:
${b0} { -T -V -Q } --launch-dag[=<group>]
The current status of work products can be check with:
${b0} { -T -V -Q } --status
and individual substeps can be run by hand via:
${b0} { -T -V -Q } --run-stage <stage> [ -s <subproc-in-stage> ]
The following stages:
0: simply check current progress (equiv to --status)
1: generate individual single nu flavor off a single free nucleon
2: combine all sub-files from stage 1
3: generate all nu flavors of a single isotope
4: combine all sub-files from stage 3
+ create a reduced list of isotopes
+ create ROOT TGraph file
5: package into UPS format
-r | --run-stage=STAGE do processing for stage [$STAGE]
-s | --subprocess=INSTANCE do n-th subprocess for a stage [\$PROCESS]
(starting with 0)
--status equivalent to --stage 0
-v | --verbose increase verbosity
--debug used to debug this script
--trace enable trace
EOF
# --ups <expt> setup from an experiment's UPS installation
# nova, larsoft, genie
# [ add +trycvmfs or +cvmfs ]
# (if not specified, best guess [${INITUPS}])
# --genie-v <gversion> [${INITGENIEV}] UPS version for GENIE
# --genie-q <gqualfier> [${INITGENIEQ}] UPS qualifier for GENIE
#
}
##############################################################################
if [ -z "$PS1" ]; then
# if $- contains "i" then interactive session
export ESCCHAR="\x1B" # or \033 # Mac OS X bash doesn't support \e as esc?
export OUTBLACK="${ESCCHAR}[0;30m"
export OUTBLUE="${ESCCHAR}[0;34m"
export OUTGREEN="${ESCCHAR}[0;32m"
export OUTCYAN="${ESCCHAR}[0;36m"
export OUTRED="${ESCCHAR}[0;31m"
export OUTPURPLE="${ESCCHAR}[0;35m"
export OUTORANGE="${ESCCHAR}[0;33m" # orange, more brownish?
export OUTLTGRAY="${ESCCHAR}[0;37m"
export OUTDKGRAY="${ESCCHAR}[1;30m"
# labelled "light but appear in some cases to show as "bold"
export OUTLTBLUE="${ESCCHAR}[1;34m"
export OUTLTGREEN="${ESCCHAR}[1;32m"
export OUTLTCYAN="${ESCCHAR}[1;36m"
export OUTLTRED="${ESCCHAR}[1;31m"
export OUTLTPURPLE="${ESCCHAR}[1;35m"
export OUTYELLOW="${ESCCHAR}[1;33m"
export OUTWHITE="${ESCCHAR}[1;37m"
export OUTNOCOL="${ESCCHAR}[0m" # No Color
fi
# use as: echo -e "${OUTRED} this is red ${OUTNOCOL}"
##############################################################################
#echo about to define create_define_cfg
function create_define_cfg()
{
if [ ${INITKNOTS} -lt 30 ]; then
echo -e "${OUTRED}${b0}: ===========================================================${OUTNOCOL}"
echo -e "${OUTRED}${b0}: choosing only ${INITKNOTS} knots (<30) probably isn't a good idea ${OUTNOCOL}"
echo -e "${OUTRED}${b0}: ===========================================================${OUTNOCOL}"
fi
cat > define_cfg.sh <<EOF
##############################################################################
#
# USER MODIFIABLE SCRIPT
# define the parameters of this run
#
##############################################################################
function define_cfg()
{
# This configuration is for:
# GXSPLVERSION="$GXSPLVERSION" # scisoft expects e.g. "v2_8_6a"
# GXSPLQUALIFIER="$GXSPLQUALIFIER" # normally "default"
# OUTPUTDIR=${OUTPUTTOP}/${GXSPLVERSION}-${GXSPLQUALIFIER}
#
#
# details of the actual splines
#
# if KNOTS=0, then use 15 knots per decade of energy range
# with a minimum of 30 knots totally.
export KNOTS=${INITKNOTS}
export EMIN=0.01 # (ignored by gxspl)
export EMAX=${INITEMAX}
export SPLITNUISOTOPES=${SPLITNUISOTOPES}
# collection of event generator process to calculate
# (see: \$GENIE/config//EventGeneratorListAssembler.xml )
#
export EVENTGENERATORLIST="${INITGENLIST}" # normally "Default"
# scisoft tarball distribution expects files names of the form
# genie_xsec-2.9.0-noarch-default.tar.bz2
export GXSPLVDOTS=`echo \${GXSPLVERSION} | sed -e 's/^v//' -e 's/_/\./g' `
export UPSTARFILE="genie_xsec-\${GXSPLVDOTS}-noarch-\${GXSPLQUALIFIERDASHES}.tar.bz2"
#
# two spline files will be generated:
# file names of the form:
# gxspl-\${GXSPLBASE}\${GXSPLFULLNAME}.xml
# complete set of all generated combinations of nu flavor & isotopes
# gxspl-\${GXSPLBASE}\${GXSPLREDUCEDNAME}.xml
# reduced set from the former containing only necessary combinations
export GXSPLBASE="FNAL"
export GXSPLFULLNAME="big"
export GXSPLREDUCEDNAME="small"
#
# TGraph file xsec_graphs.root
export GXSECTGRAPH="xsec_graphs.root"
#
# \${OUTPUTTOP}/
# GXSPLINES-\${GXSPLVERSION}-\${GXSPLQUALIFIERDASHES}/ <--- this is $OUTPUTDIR
# cfg/ # configuration files
# define_cfg.sh
# isotopes.cfg
# setup_genie.sh
# (optional GENIE XML files)
# bin/
# gen_genie_splines.sh # copy of this script
# work-products/ # individual splines & work logs
# freenucs/
# isotopes/
# ups/ # top of area used for tarball creation
# genie_xsec/
# \${GXSPLVERSION}.version/
# NULL_\${GXSPLQUALIFIERDASHES}
# \${GXSPLVERSION}/NULL/\${GXSPLQUALIFIERDASHES}/
# ups/
# genie_xsec.table
# data/
# README
# gxspl-\${GXSPLBASE}\${GXSPLREDUCEDNAME}.xml
# gxspl-\${GXSPLBASE}\${GXSPLFULLNAME}.xml.gz
# gxspl-freenuc.xml.gz
# \${GXSECTGRAPH} # e.g. xsec_graphs.root
# reduce_gxspl.awk # script used for reduction
#
# which neutrino flavors to include
# NULISTFULL - all combinations to generate
# NULISTREDUCED - flavors to retain in reduced file
#
export NUARRAYFULL=( 12 -12 14 -14 16 -16 )
export NUARRAYREDUCED=( 12 -12 14 -14 16 -16 )
############################################################################
# do not change the following lines
#echo "=== call process_lists from define_cfg()"
if [ \${VERBOSE} -gt 0 ]; then echo process_lists; fi
process_lists
#echo "=== done process_lists from define_cfg()"
}
EOF
} # end-of-function create_define_cfg
##############################################################################
#echo about to define create_isotopes_file
function create_isotopes_file()
{
## GENIE version isn't necessarily known at this point
# gmajor=`echo ${GXSPLVDOTS} | cut -d. -f1`
# gminor=`echo ${GXSPLVDOTS} | cut -d. -f2`
# if [ "${gmajor}" == 2 ]; then
# if [ "${gminor}" == 6 -o "${gminor}" == 8 ]; then export NOGDOPT="true"; fi
# fi
if [ -n "${NOGDOPT}" ]; then
export NOGDOPT="# exclude Gd isotopes "
echo -e "${OUTBLUE}${b0}: exclude Gd isotopes${OUTNOCOL}"
fi
cat > isotopes.cfg <<EOF
##############################################################################
#
# which isotopes to include
#
# lines of the form: 100ZZZAAA0 isoName [%abundance] [ reduced [ root ] ]
# comment out (leading '#') lines for undesired isotopes (& comments)
# add 'reduced' to keep in 'small' file
# add 'root' to include in TGraph file
# %abundance isn't used, but there for reference
# if %abundance < 0 then not found in nature but sometimes appears
# in geometry specifications (often an average of others isotopes)
#
##############################################################################
#
### neutron
1000000010 free-n 100. reduced root
#
### hydrogen
1000010010 H1 99.9885 reduced root
1000010020 H2 0.0115 reduced root
#
### helium # skip He3
# 1000020030 He3 0.000137
1000020040 He4 99.9999 reduced
#
### lithium # skip all
# 1000030060 Li6 7.59
# 1000030070 Li7 92.41
#
### beryllium
1000040090 Be9 100. reduced
#
### boron
1000050100 B10 19.9
1000050110 B11 80.1 reduced
#
### carbon
1000060120 C12 98.93 reduced root
1000060130 C13 1.07
#
### nitrogen
1000070140 N14 99.632 reduced root
1000070150 N15 0.368
#
### oxygen
1000080160 O16 99.757 reduced root
1000080170 O17 0.038
1000080180 O18 0.205
#
### fluorine
1000090190 F19 100. reduced
#
### neon # skip all
# 1000100200 Ne20 90.48
# 1000100210 Ne21 0.27
# 1000100220 Ne22 9.25
#
### sodium
1000110230 Na23 100. reduced
#
### magnesium
1000120240 Mg24 78.99 reduced
1000120250 Mg25 10.0
1000120260 Mg26 11.01
#
### aluminum
1000130270 Al27 100. reduced
#
### silicon
1000140280 Si28 92.2297 reduced
1000140290 Si29 4.6832
1000140300 Si30 3.0872
#
### phosphorus
1000150310 P31 100. reduced
#
### sulfur # skip 36
1000160320 S32 94.93 reduced root
1000160330 S33 0.76
1000160340 S34 4.29
# 1000160360 S36 0.02
#
### chlorine
1000170350 Cl35 75.78 reduced root
1000170360 Cl36 -999.0 reduced
1000170370 Cl37 24.22 reduced
#
### argon
1000180360 Ar36 0.3365
1000180380 Ar38 0.0632
1000180390 Ar39 -999.0
1000180400 Ar40 99.6003 reduced root
#
### potassium
1000190390 K39 93.2581 reduced
1000190400 K40 0.0117
1000190410 K41 6.7302
#
# calcium
1000200400 Ca40 96.941 reduced
1000200410 Ca41 -999.0
1000200420 Ca42 0.647
1000200430 Ca43 0.135
1000200440 Ca44 2.086
# 1000200460 Ca46 0.004
# 1000200480 Ca48 0.187
#
### scandium
# 1000210450 Sc45 100.
#
### titanium
1000220460 Ti46 8.25
1000220470 Ti47 7.44
1000220480 Ti48 73.72 reduced root
1000220490 Ti49 5.41
1000220500 Ti50 5.18
#
### vanadium
1000230500 V50 0.25
1000230510 V51 99.75 reduced
#
### chromium
1000240500 Cr50 4.345
1000240510 Cr51 -999.0
1000240520 Cr52 83.789 reduced
1000240530 Cr53 9.501
1000240540 Cr54 2.365
#
### manganese
1000250550 Mn55 100. reduced
#
### iron
1000260540 Fe54 5.845 reduced
1000260560 Fe56 91.754 reduced root
1000260570 Fe57 2.119 reduced
1000260580 Fe58 0.282 reduced
#
### cobalt
1000270590 Co59 100.
#
### nickel
1000280580 Ni58 68.0769 reduced
1000280590 Ni59 -999.0 reduced
1000280600 Ni60 26.2231 reduced
1000280610 Ni61 1.1399
1000280620 Ni62 3.6345
1000280640 Ni64 0.9256
#
### copper
1000290630 Cu63 69.17 reduced
1000290640 Cu64 -999.0 reduced
1000290650 Cu65 30.83 reduced
#
### zinc
1000300640 Zn64 48.63 reduced
1000300660 Zn66 27.9
1000300670 Zn67 4.1
1000300680 Zn68 18.75
1000300700 Zn70 0.62
#
### gallium
# 1000310690 Ga69 60.108
# 1000310710 Ga71 39.892
#
### germanium
# 1000320700 Ge70 20.84
# 1000320720 Ge72 27.54
# 1000320730 Ge73 7.73
# 1000320740 Ge74 36.28
# 1000320760 Ge76 7.61
#
### arsenic
# 1000330750 As75 100.
#
### selenium
# 1000340740 Se74 0.89
# 1000340760 Se76 9.37
# 1000340770 Se77 7.63
# 1000340780 Se78 23.77
# 1000340800 Se80 49.61
# 1000340820 Se82 8.73
#
### bromine
1000350790 Br79 50.69
1000350800 Br80 -999.0 reduced
1000350810 Br81 49.31
#
### krypton
# 1000360780 Kr78 0.35
# 1000360800 Kr80 2.28
# 1000360820 Kr82 11.58
# 1000360830 Kr83 11.49
# 1000360840 Kr84 57.0
# 1000360860 Kr86 17.3
#
### rubidium
# 1000370850 Rb85 72.17
# 1000370870 Rb87 27.83
#
### strontium
# 1000380840 Sr84 0.56
# 1000380860 Sr86 9.86
# 1000380870 Sr87 7.0
# 1000380880 Sr88 82.58
#
### yttrium
# 1000390890 Y89 100.
#
### zirconium
# 1000400900 Zr90 51.45
# 1000400910 Zr91 11.22
# 1000400920 Zr92 17.15
# 1000400940 Zr94 17.38
# 1000400960 Zr96 2.8
#
### niobium
1000410930 Nb93 100.
#
### molybdenum
# 1000420920 Mo92 14.84
# 1000420940 Mo94 9.25
1000420950 Mo95 15.92
1000420960 Mo96 16.68
# 1000420970 Mo97 9.55
# 1000420980 Mo98 24.13
# 1000421000 Mo100 9.63
#
### technetium
# 1000430980 Tc98 100.
#
### ruthenium
# DUNE hptpcnd (high pressue TPC NearDet) might have:
# (all isotopes ... average out to A=101)
# <material name="TitaniumR56323" state="solid">
# <T unit="K" value="293.15"/>
# <MEE unit="eV" value="230.954724444742"/>
# <D unit="g/cm3" value="4.48"/>
# <fraction n="0.944" ref="Ti"/>
# <fraction n="0.03" ref="Al"/>
# <fraction n="0.025" ref="V"/> <!-- vanadium -->
# <fraction n="0.001" ref="Ru"/> <!-- ruthenium -->
# </material>
# 1000440960 Ru96 5.54
# 1000440980 Ru98 1.87
# 1000440990 Ru99 12.76
# 1000441000 Ru100 12.6
1000441010 Ru101 17.06 reduced
# 1000441020 Ru102 31.55
# 1000441040 Ru104 18.62
#
### rhodium
# 1000451030 Rh103 100.
#
### palladium
# 1000461020 Pd102 1.02
# 1000461040 Pd104 11.14
# 1000461050 Pd105 22.33
# 1000461060 Pd106 27.33
# 1000461080 Pd108 26.46
# 1000461100 Pd110 11.72
#
### silver
# 1000471070 Ag107 51.839
# 1000471090 Ag109 48.161
#
### cadmium
# 1000481060 Cd106 1.25
# 1000481080 Cd108 0.89
# 1000481100 Cd110 12.49
# 1000481110 Cd111 12.8
# 1000481120 Cd112 24.13
# 1000481130 Cd113 12.22
# 1000481140 Cd114 28.73
# 1000481160 Cd116 7.49
#
### indium
# 1000491130 In113 4.29
# 1000491150 In115 95.71
#
### tin
# 1000501120 Sn112 0.97
# 1000501140 Sn114 0.66
# 1000501150 Sn115 0.34
1000501160 Sn116 14.54
1000501170 Sn117 7.68
1000501180 Sn118 24.22
1000501190 Sn119 8.59 reduced
1000501200 Sn120 32.58
# 1000501220 Sn122 4.63
# 1000501240 Sn124 5.79
#
### antimony
1000511210 Sb121 57.21
1000511220 Sb122 -999.0 perhapsfuturered
1000511230 Sb123 42.79
#
### tellurium
# 1000521200 Te120 0.09
# 1000521220 Te122 2.55
# 1000521230 Te123 0.89
# 1000521240 Te124 4.74
# 1000521250 Te125 7.07
# 1000521260 Te126 18.84
# 1000521280 Te128 31.74
# 1000521300 Te130 34.08
#
### iodine
# 1000531270 I127 100.
#
### xenon
## for 2.8.6 skip 124, 126 (no input isotope defined)
## for 2.8.6 skip 136 (no output I135 isotope)
# 1000541240 Xe124 0.09
# 1000541260 Xe126 0.09
1000541280 Xe128 1.92
1000541290 Xe129 26.44
1000541300 Xe130 4.08
1000541310 Xe131 21.18 reduced root
1000541320 Xe132 26.89
1000541340 Xe134 10.44
1000541360 Xe136 8.87
#
### cesium
1000551330 Cs133 100. perhapsfuturered
#
### barium
## for 2.8.6 skip 130, 132
# 1000561300 Ba130 0.106
# 1000561320 Ba132 0.101
1000561340 Ba134 2.417
1000561350 Ba135 6.592
1000561360 Ba136 7.854
1000561370 Ba137 7.854 reduced
1000561380 Ba138 71.698
#
### lanthanum
# 1000571380 La138 0.09
# 1000571390 La139 99.91
#
### cerium
# 1000581360 Ce136 0.185
# 1000581380 Ce138 0.251
# 1000581400 Ce140 88.45
# 1000581420 Ce142 11.114
#
### praseodynium
# 1000591410 Pr141 100.
#
### neodymium
# 1000601420 Nd142 27.2
# 1000601430 Nd143 12.2
# 1000601440 Nd144 23.8
# 1000601450 Nd145 8.3
# 1000601460 Nd146 17.2
# 1000601480 Nd148 5.7
# 1000601500 Nd15 5.6
#
### promethium
# 1000611450 Pm145 100.
#
### samarium
# 1000621440 Sm144 3.07
# 1000621470 Sm147 14.99
# 1000621480 Sm148 11.24
# 1000621490 Sm149 13.82
# 1000621500 Sm150 7.38
# 1000621520 Sm152 26.75
# 1000621540 Sm154 22.75
#
### europium
# 1000631510 Eu151 47.81
# 1000631530 Eu153 52.19
#
### gadolinium
## Gd isotopes are not supported prior to R-2_9_0
#use ${NOGDOPT}1000641520 Gd152
1000641520 Gd152 0.2
1000641540 Gd154 2.18
1000641550 Gd155 14.8
1000641560 Gd156 20.47
1000641570 Gd157 15.65
1000641580 Gd158 24.84 reduced
1000641600 Gd160 21.86
#
### terbium
# 1000651590 Tb159 100.
#
### dysprosium
# 1000661560 Dy156 0.06
# 1000661580 Dy158 0.1
# 1000661600 Dy160 2.34
# 1000661610 Dy161 18.91
# 1000661620 Dy162 25.51
# 1000661630 Dy163 24.9
# 1000661640 Dy164 28.18
#
### holmium
# 1000671650 Ho165 100.
#
### erbium
# 1000681620 Er162 0.14
# 1000681640 Er164 1.61
# 1000681660 Er166 33.61
# 1000681670 Er167 22.93
# 1000681680 Er168 26.78
# 1000681700 Er170 14.93
#
### thulium
# 1000691690 Tm169 100.
#
### ytterbium
# 1000701680 Yb168 0.13
# 1000701700 Yb170 3.04
# 1000701710 Yb171 14.28
# 1000701720 Yb172 21.83
# 1000701730 Yb173 16.13
# 1000701740 Yb174 31.83
# 1000701760 Yb176 12.76
#
### lutetium
# 1000711750 Lu175 97.41
# 1000711760 Lu176 2.59
#
### hafnium
# 1000721740 Hf174 0.16
# 1000721760 Hf176 5.26
# 1000721770 Hf177 18.6
# 1000721780 Hf178 27.28
# 1000721790 Hf179 13.62
# 1000721800 Hf180 35.08
#
### tantaium
# 1000731800 Ta180 0.012
# 1000731810 Ta181 99.988
#
### tungsten
# 1000741800 W180 0.12
# 1000741820 W182 26.5
# 1000741830 W183 14.31
# 1000741840 W184 30.64
# 1000741860 W186 28.43
#
### rhenium
# 1000751850 Re185 37.4
# 1000751870 Re187 62.6
#
### osmium
# 1000761840 Os184 0.02
# 1000761860 Os186 1.59
# 1000761870 Os187 1.96
# 1000761880 Os188 13.24
# 1000761890 Os189 16.15
# 1000761900 Os190 26.26
# 1000761920 Os192 40.78
#
### irdium
# 1000771910 Ir191 37.3
# 1000771930 Ir193 62.7
#
### platinum
# 1000781840 Pt184 0.014
# 1000781860 Pt186 0.782
# 1000781880 Pt188 32.967
# 1000781890 Pt189 33.832
# 1000781900 Pt190 25.242
# 1000781920 Pt192 7.163
#
### gold
# 1000791970 Au197 100.
#
### mercury
# 1000801960 Hg196 0.15
# 1000801980 Hg198 9.97
# 1000801990 Hg199 16.87
# 1000802000 Hg200 23.1
# 1000802010 Hg201 13.18
# 1000802020 Hg202 29.86
# 1000802040 Hg204 6.87
#
### thallium
# 1000812030 Tl203 29.524
# 1000812050 Tl205 70.476
#
### lead
1000822040 Pb204 1.4
1000822060 Pb206 24.1
1000822070 Pb207 22.1 reduced
1000822080 Pb208 52.4
#
### bismuth
# 1000832090 Bi209 100.
#
### polonium
# 1000842090 Po209 100.
#
### astatine
# 1000852100 At210 100.
#
### radon
# 1000862220 Rn222 100.
#
### francium
# 1000872230 Fr223 100.
#
### radium
# 1000882260 Ra226 100.
#
### actinium
# 1000892270 Ac227 100.
#
### thorium
# 1000902320 Th232 100.
#
### protactinium
# 1000912310 Pa231 100.
#
### uranium
# 1000922340 U234 0.0055
# 1000922350 U235 0.72
# 1000922380 U238 99.2745
#
### neptunium
# 1000932370 Np237 100.
#
### plutonium
# 1000942440 Pu244 100.
#
### americium
# 1000952430 Am243 100.
#
### curium
# 1000962470 Cm247 100.
#
### berkelium
# 1000972470 Bk247 100.
#
### californium
# 1000982510 Cf251 100.
#
### einsteinium
# 1000992520 Es252 100.
#
### fermium
# 1001002570 Fm257 100.
#
### mendelevium
# 1001012580 Md258 100.
#
### nobelium
# 1001022590 No259 100.
#
### lawrencium
# 1001032620 Lr262 100.
#
#### end-of-isotope_table
EOF
} # end-of-function create_isotopes_file()
##############################################################################
#echo about to define create_setup_genie
function create_setup_genie()
{
# did we get passed a script file? ... grab it.
if [[ ${INITSETUPSTR} == file:* ]]; then
fname=`echo ${INITSETUPSTR} | cut -c6-`
cat $fname > setup_genie.sh
return
fi
# otherwise should be ups:
if [[ ${INITSETUPSTR} == ups:* ]]; then
xyzzy=`echo ${INITSETUPSTR} | cut -c5-`
export INITUPS=`echo $xyzzy | cut -d"%" -f1`
export INITGENIEV=`echo $xyzzy | cut -d"%" -f2`
export INITGENIEQ=`echo $xyzzy | cut -d"%" -f3`
else
echo -e "${OUTRED}${b0}: can't handle setup ${INITSETUPSTR}${OUTNOCOL}"
exit 2
fi
cat > setup_genie.sh <<EOF
# this file is intended to be sourced by a bash shell
# initially created using GEN_GENIE_SPLINE_VERSION=${GEN_GENIE_SPLINE_VERSION}
if [ -z "\${VERBOSE}" ]; then export VERBOSE=1 ; fi
if [ -z "\${b0}" ]; then export b0=\`basename \${BASH_SOURCE}\` ; fi
# echo VERBOSE=\${VERBOSE} b0=\${b0}
##############################################################################
#
# This source-able (bash) shell script should define a function 'setup_genie'
# that sets up the GENIE environment sufficient for running gmkspl and gspladd
# executables.
#
##############################################################################
function setup_genie()
{
INITSETPUSTR="${INITSETUPSTR}"
exptups="${INITUPS}"
version="${INITGENIEV}"
qualifier="${INITGENIEQ}"
if [ \$VERBOSE -gt 0 ]; then
echo "setup_genie: trying \$exptups \$version \$qualifier"
fi
echo "setup_genie: bootstrap_ups \$exptups"
bootstrap_ups \$exptups
bootups_status=\$?
if [ \${bootups_status} -ne 0 ]; then
echo -e "\${OUTRED}bootstrap_ups returned \${bootups_status}, setup failed \${OUTNOCOL}"
return \${bootups_status}
fi
echo "setup_genie: setup genie \$version -q \$qualifier"
setup genie \$version -q \$qualifier
}
##############################################################################
# bootstrap_ups() is a function that will initialize UPS for many FNAL
# software installations and is used by default by initially created script
##############################################################################
function bootstrap_ups()
{
exptups=\$1
# hack, hack - look at me, I'm special...
if [ "\$exptups" == "rhatcher-nova" ]; then
source /nova/app/users/rhatcher/externals/setup.sh
export PRODUCTS=\${PRODUCTS}:/grid/fermiapp/products/common/db
return 0
fi
if [ "\$exptups" == "genie" ]; then
source /grid/fermiapp/products/genie/bootstrap_genie_ups.sh
return 0
fi
UPS_CVMFS_SETUP=""
UPS_CVMFS_AUX=/cvmfs/fermilab.opensciencegrid.org/products/common/db
UPS_DIRECT_AUX=/grid/fermiapp/products/common/db/
case "\$exptups" in
rhatcher* ) # my laptop
UPS_CVMFS_SETUP=""
UPS_DIRECT_SETUP=/Users/\${USER}/Work/externals/setup
UPS_DIRECT_AUX=""
;;
genie* ) # genie developer's work area installation
UPS_CVMFS_SETUP=/cvmfs/fermilab.opensciencegrid.org/products/genie/externals/setup
UPS_DIRECT_SETUP=/grid/fermiapp/products/genie/externals/setup
#/grid/fermiapp/products/genie/externals
#/grid/fermiapp/products/genie/local
#/grid/fermiapp/products/common/db
#/grid/fermiapp/products/larsoft
#/grid/fermiapp/products/nova/externals
UPS_CVMFS_AUX=/cvmfs/fermilab.opensciencegrid.org/products/genie/local:/cvmfs/fermilab.opensciencegrid.org/products/common/db:/cvmfs/fermilab.opensciencegrid.org/products/larsoft:/cvmfs/nova.opensciencegrid.org/externals
UPS_DIRECT_AUX=/grid/fermiapp/products/genie/local:/grid/fermiapp/products/common/db:/grid/fermiapp/products/larsoft:/grid/fermiapp/products/nova/externals
;;
larsoft* | dune* | lbne* | uboone* )
UPS_CVMFS_SETUP="/cvmfs/fermilab.opensciencegrid.org/products/larsoft"
UPS_DIRECT_SETUP=/grid/fermiapp/products/larsoft/setup
;;
nova* )
UPS_CVMFS_SETUP=""
UPS_DIRECT_SETUP=/grid/fermiapp/products/nova/externals/setup
;;
esac
# diskorder
# trycvmfs = 2 = try CVMFS first, fall back otherwise
# cvmfs = 1 = only allow CVMFS
# -other- = 0 = try only non-CVMFS location
case "\$exptups" in
*try* ) diskorder="\${UPS_CVMFS_SETUP} \${UPS_DIRECT_SETUP}"
order="CVMFS then direct"
;;
*cvmfs* ) diskorder="\${UPS_CVMFS_SETUP}"
order="CVMFS only"
;;
* ) diskorder="\${UPS_DIRECT_SETUP}"
order="direct only"
;;
esac
if [ \${VERBOSE} -gt 0 ]; then
echo -e "bootstrap_ups: exptups=\$exptups order=\$order"
echo -e " locations: \$diskorder"
fi
# bootstrap the requested version of UPS installation
for setuploc in \$diskorder
do
iscvmfs=\`echo \$setuploc | cut -d/ -f2 | grep -c cvmfs\`
if [ \$iscvmfs -eq 0 ]; then
auxpath=\${UPS_DIRECT_AUX}
else
auxpath=\${UPS_CVMFS_AUX}
# check that CVMFS is functional
/cvmfs/grid.cern.ch/util/cvmfs-uptodate \${setuploc}
uptodate_status=\$?
if [ \${uptodate_status} -ne 0 ]; then
echo -e "bootstrap_ups: \${OUTRED}no cvmfs available\${OUTNOCOL}"
continue
fi
fi