Skip to content

Commit 9652285

Browse files
committed
add Sim09h
1 parent 581af17 commit 9652285

File tree

3 files changed

+741
-0
lines changed

3 files changed

+741
-0
lines changed
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
#!/bin/bash
2+
3+
#2016
4+
#from https://its.cern.ch/jira/browse/LHCBGAUSS-1183
5+
#Stripping 28r1/28r1p1
6+
7+
. /cvmfs/lhcb.cern.ch/lib/LbEnv
8+
9+
Optfile=$1
10+
Nevents=$2
11+
Polarity=$3
12+
RunNumber=$4
13+
Turbo=$5
14+
muDST=$6
15+
Stripping=$7
16+
ReDecay=$8
17+
Model=${9:-"pythia8"}
18+
19+
if [ "$Polarity" == "MagUp" ]; then
20+
SimCond=Gauss/Beam6500GeV-mu100-2016-nu1.6.py
21+
DBtag="sim-20170721-2-vc-mu100"
22+
elif [ "$Polarity" == "MagDown" ]; then
23+
SimCond=Gauss/Beam6500GeV-md100-2016-nu1.6.py
24+
DBtag="sim-20170721-2-vc-md100"
25+
else
26+
echo "Error, Polarity '$Polarity' is not valid!"
27+
exit 1
28+
fi
29+
30+
DDDBtag="dddb-20170721-3"
31+
32+
CONDITIONS=$PWD/Conditions.py
33+
34+
# Prepare conditions
35+
echo "from Configurables import LHCbApp" >> $CONDITIONS
36+
echo "LHCbApp().DDDBtag = '$DDDBtag'" >> $CONDITIONS
37+
echo "LHCbApp().CondDBtag = '$DBtag'" >> $CONDITIONS
38+
39+
#-------------#
40+
# GAUSS #
41+
#-------------#
42+
43+
GAUSSJOB=$PWD/Gauss-Job.py
44+
GAUSSOUTPUT=$PWD/Gauss.sim
45+
46+
47+
# Prepare files
48+
echo "from Gauss.Configuration import *" >> $GAUSSJOB
49+
echo "GaussGen = GenInit('GaussGen')" >> $GAUSSJOB
50+
echo "GaussGen.FirstEventNumber = 1" >> $GAUSSJOB
51+
echo "GaussGen.RunNumber = $RunNumber" >> $GAUSSJOB
52+
echo "LHCbApp().EvtMax = $Nevents" >> $GAUSSJOB
53+
54+
55+
if [ "$Model" == "pythia8" ]; then
56+
echo 'importOptions("$LBPYTHIA8ROOT/options/Pythia8.py")' >> $GAUSSJOB
57+
elif [ "$Model" == "BcVegPy" ]; then
58+
echo 'importOptions("$LBBCVEGPYROOT/options/BcVegPyPythia8.pyy")' >> $GAUSSJOB
59+
else
60+
echo 'importOptions("$LBPYTHIA8ROOT/options/Pythia8.py")' >> $GAUSSJOB
61+
fi
62+
63+
echo "from Configurables import OutputStream" >> $GAUSSJOB
64+
echo "OutputStream('GaussTape').Output = \"DATAFILE='PFN:$GAUSSOUTPUT' TYP='POOL_ROOTTREE' OPT='RECREATE'\"" >> $GAUSSJOB
65+
66+
# Run
67+
68+
if [ "$ReDecay" == "True" ]; then
69+
lb-run -c x86_64-slc6-gcc48-opt --use="AppConfig v3r392" Gauss/v49r15p1 gaudirun.py \$APPCONFIGOPTS/$SimCond \$APPCONFIGOPTS/Gauss/EnableSpillover-25ns.py \$APPCONFIGOPTS/Gauss/DataType-2016.py \$APPCONFIGOPTS/Gauss/RICHRandomHits.py \$APPCONFIGOPTS/Gauss/G4PL_FTFP_BERT_EmNoCuts.py \$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py \$APPCONFIGOPTS/Gauss/ReDecay-100times.py \$APPCONFIGOPTS/Gauss/ReDecay-FullGenEventCutTool-fix.py $Optfile $CONDITIONS $GAUSSJOB
70+
else
71+
lb-run -c x86_64-slc6-gcc48-opt --use="AppConfig v3r392" Gauss/v49r15p1 gaudirun.py \$APPCONFIGOPTS/$SimCond \$APPCONFIGOPTS/Gauss/EnableSpillover-25ns.py \$APPCONFIGOPTS/Gauss/DataType-2016.py \$APPCONFIGOPTS/Gauss/RICHRandomHits.py \$APPCONFIGOPTS/Gauss/G4PL_FTFP_BERT_EmNoCuts.py \$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py $Optfile $CONDITIONS $GAUSSJOB
72+
fi
73+
74+
rm $GAUSSJOB
75+
76+
#-------------#
77+
# BOOLE #
78+
#-------------#
79+
80+
BOOLEFILES=$PWD/Boole-Files.py
81+
82+
# Prepare files
83+
echo "from Gaudi.Configuration import *" >> $BOOLEFILES
84+
echo "EventSelector().Input = [\"DATAFILE='PFN:$GAUSSOUTPUT' TYP='POOL_ROOTTREE' OPT='READ'\"]" >> $BOOLEFILES
85+
if [ "$Turbo" == "True" ]; then
86+
echo "from Configurables import Boole" >> $BOOLEFILES
87+
echo "Boole().DigiType = 'Extended'" >> $BOOLEFILES
88+
BOOLEOUTPUT=$PWD/Boole-Extended.digi
89+
else
90+
BOOLEOUTPUT=$PWD/Boole.digi
91+
fi
92+
93+
# Run
94+
lb-run -c x86_64-slc6-gcc49-opt --use="AppConfig v3r338" Boole/v30r2p1 gaudirun.py \$APPCONFIGOPTS/Boole/Default.py \$APPCONFIGOPTS/Boole/EnableSpillover.py \$APPCONFIGOPTS/Boole/DataType-2015.py \$APPCONFIGOPTS/Boole/Boole-SetOdinRndTrigger.py \$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py $CONDITIONS $BOOLEFILES
95+
96+
rm $GAUSSOUTPUT
97+
rm $BOOLEFILES
98+
99+
#------------#
100+
# L0 #
101+
#------------#
102+
103+
L0CONFIG=$PWD/L0Configuration.py
104+
L0OUTPUT=$PWD/L0.digi
105+
106+
#Prepare special conditions
107+
echo "from Gaudi.Configuration import *" > $L0CONFIG
108+
echo "from Configurables import L0App" >> $L0CONFIG
109+
echo "L0App().outputFile='$L0OUTPUT'" >> $L0CONFIG
110+
echo "EventSelector().Input = [\"DATAFILE='PFN:$BOOLEOUTPUT' TYP='POOL_ROOTTREE' OPT='READ'\"]" >> $L0CONFIG
111+
112+
# Run
113+
lb-run -c x86_64-slc6-gcc48-opt --use="AppConfig v3r297" Moore/v25r4 gaudirun.py \$APPCONFIGOPTS/L0App/L0AppSimProduction.py \$APPCONFIGOPTS/L0App/L0AppTCK-0x160F.py \$APPCONFIGOPTS/L0App/ForceLUTVersionV8.py \$APPCONFIGOPTS/L0App/DataType-2016.py \$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py $L0CONFIG $CONDITIONS
114+
115+
rm $BOOLEOUTPUT
116+
rm $L0CONFIG
117+
118+
#------------#
119+
# HLT1 #
120+
#------------#
121+
122+
HLT1CONFIG=$PWD/HLT1Configuration.py
123+
HLT1OUTPUT=$PWD/HLT1.digi
124+
125+
# Prepare special conditions
126+
echo "from Gaudi.Configuration import *" > $HLT1CONFIG
127+
echo "from Configurables import Moore" >> $HLT1CONFIG
128+
echo "Moore().DDDBtag = '$DDDBtag'" >> $HLT1CONFIG
129+
echo "Moore().CondDBtag = '$DBtag'" >> $HLT1CONFIG
130+
echo "EventSelector().Input = [\"DATAFILE='PFN:$L0OUTPUT' TYP='POOL_ROOTTREE' OPT='READ'\"]" >> $HLT1CONFIG
131+
echo "Moore().outputFile = '$HLT1OUTPUT'" >> $HLT1CONFIG
132+
133+
# Run
134+
lb-run -c x86_64-slc6-gcc48-opt --use="AppConfig v3r297" Moore/v25r4 gaudirun.py \$APPCONFIGOPTS/Moore/MooreSimProductionForSeparateL0AppStep2015.py \$APPCONFIGOPTS/Conditions/TCK-0x5138160F.py \$APPCONFIGOPTS/Moore/DataType-2016.py \$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py \$APPCONFIGOPTS/Moore/MooreSimProductionHlt1.py $HLT1CONFIG $CONDITIONS
135+
136+
rm $L0OUTPUT
137+
rm $HLT1CONFIG
138+
139+
#------------#
140+
# HLT2 #
141+
#------------#
142+
143+
HLT2CONFIG=$PWD/HLT2Configuration.py
144+
HLT2OUTPUT=$PWD/HLT2.digi
145+
146+
# Prepare special conditions
147+
echo "from Gaudi.Configuration import *" > $HLT2CONFIG
148+
echo "from Configurables import Moore" >> $HLT2CONFIG
149+
echo "Moore().DDDBtag = '$DDDBtag'" >> $HLT2CONFIG
150+
echo "Moore().CondDBtag = '$DBtag'" >> $HLT2CONFIG
151+
echo "EventSelector().Input = [\"DATAFILE='PFN:$HLT1OUTPUT' TYP='POOL_ROOTTREE' OPT='READ'\"]" >> $HLT2CONFIG
152+
echo "Moore().outputFile = '$HLT2OUTPUT'" >> $HLT2CONFIG
153+
154+
# Run
155+
lb-run -c x86_64-slc6-gcc48-opt --use="AppConfig v3r297" Moore/v25r4 gaudirun.py \$APPCONFIGOPTS/Moore/MooreSimProductionForSeparateL0AppStep2015.py \$APPCONFIGOPTS/Conditions/TCK-0x6139160F.py \$APPCONFIGOPTS/Moore/DataType-2016.py \$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py \$APPCONFIGOPTS/Moore/MooreSimProductionHlt2.py $HLT2CONFIG $CONDITIONS
156+
157+
rm $HLT1OUTPUT
158+
rm $HLT2CONFIG
159+
160+
#-------------#
161+
# BRUNEL #
162+
#-------------#
163+
164+
BRUNELFILES=$PWD/Brunel-Files.py
165+
166+
# Prepare files
167+
echo "from Gaudi.Configuration import *" >> $BRUNELFILES
168+
echo "EventSelector().Input = [\"DATAFILE='PFN:$HLT2OUTPUT' TYP='POOL_ROOTTREE' OPT='READ'\"]" >> $BRUNELFILES
169+
if [ "$Turbo" == "True" ]; then
170+
echo "from Configurables import Brunel" >> $BRUNELFILES
171+
echo "Brunel().OutputType = 'XDST'" >> $BRUNELFILES
172+
BRUNELOUTPUT=$PWD/Brunel.xdst
173+
else
174+
BRUNELOUTPUT=$PWD/Brunel.dst
175+
fi
176+
177+
# Run
178+
lb-run -c x86_64-slc6-gcc49-opt --use="AppConfig v3r314" --use="SQLDDDB v7r10" Brunel/v50r2 gaudirun.py \$APPCONFIGOPTS/Brunel/DataType-2016.py \$APPCONFIGOPTS/Brunel/MC-WithTruth.py \$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py $BRUNELFILES $CONDITIONS
179+
180+
rm $HLT2OUTPUT
181+
rm $BRUNELFILES
182+
183+
if [ "$Turbo" == "True" ]; then
184+
#-------------#
185+
# TURBO #
186+
#-------------#
187+
188+
TESLAFILES=$PWD/Tesla-Files.py
189+
190+
# Prepare files
191+
echo "from Gaudi.Configuration import *" >> $TESLAFILES
192+
echo "EventSelector().Input = [\"DATAFILE='PFN:$BRUNELOUTPUT' TYP='POOL_ROOTTREE' OPT='READ'\"]" >> $TESLAFILES
193+
if [ "$muDST" == "True" ]; then
194+
echo 'importOptions("$APPCONFIGOPTS/Turbo/Tesla_FilterMC.py")' >> $TESLAFILES
195+
fi
196+
197+
#run
198+
lb-run -c x86_64-slc6-gcc48-opt --use="AppConfig v3r322" --use="TurboStreamProd v4r1p4" DaVinci/v41r4p3 gaudirun.py \$APPCONFIGOPTS/Turbo/Tesla_2016_LinesFromStreams_MC.py \$APPCONFIGOPTS/Turbo/Tesla_PR_Truth_2016.py \$APPCONFIGOPTS/Turbo/Tesla_Simulation_2016.py $CONDITIONS $TESLAFILES
199+
200+
rm $BrunelOutput
201+
rm $TESLAFILES
202+
203+
TURBOOUTPUT=$PWD/Tesla.dst
204+
else
205+
TURBOOUTPUT=$BRUNELOUTPUT
206+
fi
207+
208+
#------------------------#
209+
# DAVINCI/STRIPPING #
210+
#------------------------#
211+
212+
DAVINCIFILES=$PWD/DaVinci-Files.py
213+
214+
# Prepare files
215+
echo "from Gaudi.Configuration import *" >> $DAVINCIFILES
216+
echo "EventSelector().Input = [\"DATAFILE='PFN:$TURBOOUTPUT' TYP='POOL_ROOTTREE' OPT='READ'\"]" >> $DAVINCIFILES
217+
if [ "$muDST" == "True" ]; then
218+
echo 'importOptions("$APPCONFIGOPTS/DaVinci/DV-Stripping-MC-muDST.py")' >> $DAVINCIFILES
219+
fi
220+
221+
## Run
222+
if [ "$Stripping" == "28r1" ]; then
223+
lb-run -c x86_64-slc6-gcc49-opt --use="AppConfig v3r348" --use="TMVAWeights v1r9" DaVinci/v41r4p4 gaudirun.py \$APPCONFIGOPTS/DaVinci/DV-Stripping28r1-Stripping-MC-NoPrescaling-DST.py \$APPCONFIGOPTS/DaVinci/DataType-2016.py \$APPCONFIGOPTS/DaVinci/InputType-DST.py $CONDITIONS $DAVINCIFILES
224+
elif [ "$Stripping" == "28r1p1" ]; then
225+
lb-run -c x86_64-slc6-gcc49-opt --use="AppConfig v3r350" --use="TMVAWeights v1r9" DaVinci/v41r4p5 gaudirun.py \$APPCONFIGOPTS/DaVinci/DV-Stripping28r1p1-Stripping-MC-NoPrescaling-DST.py \$APPCONFIGOPTS/DaVinci/DataType-2016.py \$APPCONFIGOPTS/DaVinci/InputType-DST.py $CONDITIONS $DAVINCIFILES
226+
fi
227+
228+
rm $TURBOOUTPUT
229+
rm $DAVINCIFILES
230+
231+
rm *.root
232+
rm *.py
233+
rm core.*
234+
235+
rm test_catalog.xml
236+
rm NewCatalog.xml
237+
238+
if [ "$muDST" == "True" ]; then
239+
mv *AllStreams.mdst ${PWD}/${Nevents}_events.mdst
240+
else
241+
mv *AllStreams.dst ${PWD}/${Nevents}_events.dst
242+
fi
243+
244+
# Finish
245+
246+
# EOF

0 commit comments

Comments
 (0)