55
66# Function: Print a help message.
77usage () {
8- echo " Usage: $0 [ --primary primary physics process name ]
9- [ --campaign campaign name e.g. MDC2020 ]
10- [ --mver mixin (input) campaign version e.g. 'p' ]
11- [ --over output campaign version e.g. 'v' ]
12- [ --pbeam proton beam intensity e.g. Mix1BB (one Booster Batch), Mix2BB, MixLow, or MixSeq (sequential)]
13- [ --dbpurpose purpose of db e.g. perfect, startup, best ]
14- [ --dbversion db version ]
15- [ --early (opt) for early digitization. Intensity will be set to 'Low' ]
16- [ --merge-events (opt) merge events, default 5000 ]
17- [ --owner (opt) default mu2e ]
18- [ --field (opt) default = DS +TSD, override for special runs ]
19- [ --neutmix (opt) # of neutral pileup files ]
20- [ --elemix (opt) # of electron pileup files ]
21- [ --mustopmix (opt) # of mustop daughter pileup files ] [ --mubeammix (opt) # of mubeam pileup files ]
8+ echo " Usage: $0 [ --primary primary physics process name ]
9+ [ --campaign campaign name e.g. MDC2020 ]
10+ [ --mver mixin (input) campaign version e.g. 'p' ]
11+ [ --over output campaign version e.g. 'v' ]
12+ [ --pbeam proton beam intensity e.g. Mix1BB (one Booster Batch), Mix2BB, MixLow, or MixSeq (sequential)]
13+ [ --dbpurpose purpose of db e.g. perfect, startup, best ]
14+ [ --dbversion db version ]
15+ [ --early (opt) for early digitization. Intensity will be set to 'Low' ]
16+ [ --merge-events (opt) merge events, default 5000 ]
17+ [ --owner (opt) default mu2e ]
18+ [ --field (opt) default = DS +TSD, override for special runs ]
19+ [ --neutmix (opt) # of neutral pileup files ]
20+ [ --elemix (opt) # of electron pileup files ]
21+ [ --mustopmix (opt) # of mustop daughter pileup files ] [ --mubeammix (opt) # of mubeam pileup files ]
2222 [ --primary_dataset dts.mu2e.desc.dsconf.art ]
23+ [ --tarball (opt) location of tarball ]
2324 [ --ensemble 0 or 1 ]"
2425}
2526
@@ -39,14 +40,16 @@ PBEAM=""
3940EARLY=" "
4041MERGE_EVENTS=5000 # source events in mixing
4142OWNER=mu2e
42- NEUTNMIXIN=50
43- ELENMIXIN=25
43+ NEUTNMIXIN=40
44+ ELENMIXIN=50
4445MUSTOPNMIXIN=2
4546MUBEAMNMIXIN=1
4647FIELD=" Offline/Mu2eG4/geom/bfgeom_no_tsu_ps_v01.txt"
4748PRIMARY_DATASET=" "
4849ENSEMBLE=0
4950PUSHOUT=false
51+ DBSIM=" Sim"
52+ TB=" "
5053
5154# Loop: Get the next option;
5255while getopts " :-:" options; do
@@ -110,30 +113,33 @@ while getopts ":-:" options; do
110113 OPTIND=$(( $OPTIND + 1 ))
111114 ;;
112115 primary_dataset)
113- PRIMARY_DATASET=${! OPTIND}
114- OPTIND=$(( $OPTIND + 1 ))
115- ;;
116+ PRIMARY_DATASET=${! OPTIND}
117+ OPTIND=$(( $OPTIND + 1 ))
118+ ;;
116119 ensemble)
117- ENSEMBLE=${! OPTIND}
118- OPTIND=$(( $OPTIND + 1 ))
119- ;;
120- pushout)
121- PUSHOUT=${! OPTIND}
122- OPTIND=$(( $OPTIND + 1 ))
123- ;;
124-
125- esac
126- ;;
127- :)
128- echo " Error: -${OPTARG} requires an argument."
129- exit_abnormal
130- ;;
131- * )
132- echo " Unknown option ${OPTARG} "
133- exit_abnormal
134- ;;
135- esac
136- done
120+ ENSEMBLE=${! OPTIND}
121+ OPTIND=$(( $OPTIND + 1 ))
122+ ;;
123+ pushout)
124+ PUSHOUT=${! OPTIND}
125+ OPTIND=$(( $OPTIND + 1 ))
126+ ;;
127+ tarball)
128+ TB=${! OPTIND}
129+ OPTIND=$(( $OPTIND + 1 ))
130+ ;;
131+ esac
132+ ;;
133+ :)
134+ echo " Error: -${OPTARG} requires an argument."
135+ exit_abnormal
136+ ;;
137+ * )
138+ echo " Unknown option ${OPTARG} "
139+ exit_abnormal
140+ ;;
141+ esac
142+ done
137143
138144
139145# basic tests
@@ -228,11 +234,11 @@ echo $MERGE_FACTOR
228234
229235# Setup the beam intensity model
230236case " $PBEAM " in
231- Mix1BB) pbeam_fcl=OneBB.fcl ;;
232- Mix2BB) pbeam_fcl=TwoBB.fcl ;;
233- MixLow) pbeam_fcl=LowIntensity.fcl ;;
234- MixSeq) pbeam_fcl=NoPrimaryPBISequence.fcl ;;
235- * ) echo " Unknown PBEAM $PBEAM " ; exit_abnormal ;;
237+ Mix1BB) pbeam_fcl=OneBB.fcl ;;
238+ Mix2BB) pbeam_fcl=TwoBB.fcl ;;
239+ MixLow) pbeam_fcl=LowIntensity.fcl ;;
240+ MixSeq) pbeam_fcl=NoPrimaryPBISequence.fcl ;;
241+ * ) echo " Unknown PBEAM $PBEAM " ; exit_abnormal ;;
236242esac
237243echo " #include \" Production/JobConfig/mixing/${pbeam_fcl} \" " >> mix.fcl
238244
@@ -276,21 +282,27 @@ echo physics.filters.NeutralsFlashMixer.mu2e.MaxEventsToSkip: ${nskip_NeutralsFl
276282echo physics.filters.MuStopPileupMixer.mu2e.MaxEventsToSkip: ${nskip_MuStopPileup} >> mix.fcl
277283
278284# setup database access, for SimEfficiences and digi parameters
279- echo services.DbService.purpose: ${CAMPAIGN } _${DBPURPOSE} >> mix.fcl
285+ echo services.DbService.purpose: ${DBSIM } _${DBPURPOSE} >> mix.fcl
280286echo services.DbService.version: ${DBVERSION} >> mix.fcl
281287echo services.DbService.verbose : 2 >> mix.fcl
282288echo " services.GeometryService.bFieldFile : \" ${FIELD} \" " >> mix.fcl
283289# overwrite the outputs
284290echo outputs.TriggeredOutput.fileName: \" dig.owner.${DESC} Triggered.version.sequencer.art\" >> mix.fcl
285291echo outputs.TriggerableOutput.fileName: \" dig.owner.${DESC} Triggerable.version.sequencer.art\" >> mix.fcl
286292
293+
294+ JDSETUP=" --setup ${SETUP} "
295+ if [ " ${TB} " != " " ]; then
296+ JDSETUP=" --code ${TB} "
297+ fi
298+
287299cmd=(
288- mu2ejobdef --dsconf=${DSCONF} --dsowner=${OWNER} --description=${DESC} --embed mix.fcl --setup ${SETUP }
289- --inputs=${PRIMARY_DESC} .txt --merge-factor=${MERGE_FACTOR}
290- --auxinput=${MUSTOPNMIXIN} :physics.filters.MuStopPileupMixer.fileNames:${MUSTOPPILEUP}
291- --auxinput=${ELENMIXIN} :physics.filters.EleBeamFlashMixer.fileNames:${EBEAMPILEUP}
292- --auxinput=${MUBEAMNMIXIN} :physics.filters.MuBeamFlashMixer.fileNames:${MUBEAMPILEUP}
293- --auxinput=${NEUTNMIXIN} :physics.filters.NeutralsFlashMixer.fileNames:${NPILEUP}
300+ mu2ejobdef --dsconf=${DSCONF} --dsowner=${OWNER} --description=${DESC} --embed mix.fcl ${JDSETUP }
301+ --inputs=${PRIMARY_DESC} .txt --merge-factor=${MERGE_FACTOR}
302+ --auxinput=${MUSTOPNMIXIN} :physics.filters.MuStopPileupMixer.fileNames:${MUSTOPPILEUP}
303+ --auxinput=${ELENMIXIN} :physics.filters.EleBeamFlashMixer.fileNames:${EBEAMPILEUP}
304+ --auxinput=${MUBEAMNMIXIN} :physics.filters.MuBeamFlashMixer.fileNames:${MUBEAMPILEUP}
305+ --auxinput=${NEUTNMIXIN} :physics.filters.NeutralsFlashMixer.fileNames:${NPILEUP}
294306)
295307
296308echo " Running: ${cmd[*]} "
@@ -301,7 +313,12 @@ parfile="cnf.${OWNER}.${DESC}.${DSCONF}.0.tar"
301313echo " parfile: $parfile "
302314
303315test_fcl=${parfile} .fcl
304- mu2ejobfcl --jobdef $parfile --index 0 --default-proto root --default-loc tape > ${test_fcl}
316+ mu2ejobfcl --jobdef $parfile --index 0 --default-proto root --default-loc tape \
317+ --location " dts.mu2e.MuBeamFlashCat.${MIXINCONF} .art:tape" \
318+ --location " dts.mu2e.NeutralsFlashCat.${MIXINCONF} .art:disk" \
319+ --location " dts.mu2e.EleBeamFlashCat.${MIXINCONF} .art:disk" \
320+ --location " dts.mu2e.MuStopPileupCat.${MIXINCONF} .art:disk" \
321+ > ${test_fcl}
305322cat ${test_fcl}
306323
307324
0 commit comments