From 633f3938b998c8049ea3901c81ef5332488fd6d8 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Tue, 6 Aug 2024 11:28:18 -0500 Subject: [PATCH 01/16] norm fix --- JobConfig/ensemble/python/normalizations.py | 43 +++++++++++++-------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py index 49fc3667..959e6b49 100644 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -35,19 +35,7 @@ target_stopped_mu_per_POT = rate * 1000 #print(f"Final stops rate muon {target_stopped_mu_per_POT}") -# get number of target pions stops: -""" -target_stopped_pi_per_POT = 1.0 -rate = 1.0 -lines= rr.split("\n") -for line in lines: - words = line.split(",") - if words[0] == "PiminusStopsCat" or words[0] == "PiBeamCat" : - print(f"Including {words[0]} with rate {words[3]}") - rate = rate * float(words[3]) - target_stopped_pi_per_POT = rate * 1000 -print(f"Final stops rate pion {target_stopped_pi_per_POT}") -""" + # get number of POTs in given livetime def livetime_to_pot(livetime, run_mode = '1BB'): #livetime in seconds @@ -57,10 +45,10 @@ def livetime_to_pot(livetime, run_mode = '1BB'): #livetime in seconds if(run_mode == '1BB'): # 1BB mean_PBI_low = 1.6e7 - Tcycle = 1.33 # sec + Tcycle = 1.33 #s onspill_dutyfactor = 0.323 POT_per_cycle = 4e12 - onspill_time = onspill_dutyfactor*livetime + onspill_time = livetime Ncycles = onspill_time/Tcycle NPOT = Ncycles * POT_per_cycle if(run_mode == '2BB'): @@ -69,7 +57,7 @@ def livetime_to_pot(livetime, run_mode = '1BB'): #livetime in seconds Tcycle = 1.4 #s onspill_dutyfactor = 0.246 POT_per_cycle = 8e12 - onspill_time = onspill_dutyfactor*livetime + onspill_time = livetime Ncycles = onspill_time/Tcycle NPOT = Ncycles * POT_per_cycle return NPOT @@ -172,7 +160,23 @@ def corsika_offspill_normalization(livetime, run_mode = '1BB'): offspill_dutyfactor = 0.246 #print(f"cosmics live time {livetime*offspill_dutyfactor}") return livetime*offspill_dutyfactor - + + +# get number of target pions stops: +""" +target_stopped_pi_per_POT = 1.0 +rate = 1.0 +lines= rr.split("\n") +for line in lines: + words = line.split(",") + if words[0] == "PiminusStopsCat" or words[0] == "PiBeamCat" : + print(f"Including {words[0]} with rate {words[3]}") + rate = rate * float(words[3]) + target_stopped_pi_per_POT = rate * 1000 +print(f"Final stops rate pion {target_stopped_pi_per_POT}") +""" + +""" def rpc_normalization(livetime, emin, tmin, internal): # calculate fraction of spectrum being generated @@ -233,7 +237,12 @@ def rpc_normalization(livetime, emin, tmin, internal): gen_events *= internalRPC_per_RPC; return gen_events +""" def pot_to_livetime(pot): return pot / POT_per_second +if __name__ == '__main__': + tst_1BB = livetime_to_pot(9.52e6) + tst_2BB = livetime_to_pot(1.58e6) + print("SU2020", tst_1BB, tst_2BB) From cea5cb34438e14806c9736c5dd0342102ecc57a8 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Mon, 12 Aug 2024 14:38:55 -0500 Subject: [PATCH 02/16] scripts --- .../__pycache__/normalizations.cpython-39.pyc | Bin 0 -> 3465 bytes JobConfig/ensemble/python/calculateEvents.py | 4 ++++ JobConfig/ensemble/python/normalizations.py | 10 +++++++++- JobConfig/ensemble/scripts/Stage1_makeinputs.sh | 14 ++++++++------ .../ensemble/scripts/Stage2_submitensemble.sh | 2 +- .../scripts/initialscripts/getLivetime.sh | 2 +- 6 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc mode change 100644 => 100755 JobConfig/ensemble/python/calculateEvents.py mode change 100644 => 100755 JobConfig/ensemble/scripts/Stage1_makeinputs.sh mode change 100644 => 100755 JobConfig/ensemble/scripts/Stage2_submitensemble.sh diff --git a/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc b/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0ce62bc1b63045c40ecc70068b711585c91280ce GIT binary patch literal 3465 zcmb_f&2J+~74PaVw>!4u%w#fgGM~#ZJ6<;9Btn1?vmu`B!hqt8l35TXR;_kd+3tIrGY2>zfdnfqNY27#B(&P|9{3m70}`SoB+wp)IjqEmJvMdtY zt*UzUy6XA8dhh*S+0Ex|1)iUh_Z!}IMfp%nPCf=qz6mXU3n>aw2x=>MG$M@TT*ay! zHLS@|$2wJp#-V~uY7R4p3R0R1QQtw>f_au&hX^S^+2RX~Q?N2eG@OT4pt<2R(GL+W z(&C2l#w&P+&H%>%&N+IHC?$oMyK4OQ5uMppSwsu;Jj|_CLH30+w@d^1KJTD(#*!zIoAk(A>vggPQIrm7x7s(gNc`^%}d2*9n zAag*K$cyA6nFnft+#)5i0MsHWlSOg~s7vHBxdJ;c(<|iauKEkaeoSY{wF88&!gw9V zYxFvKfnKH84m1R3zoV32dMdnAE8G2S#QcCSv2M`ME-gh}7KJgzxy_BctIMm)PMyYF zeAuTf_QL?{`zy{$-&hhGu)eaoyxh+$EpfNrrntD{cV2BYe9xx=w0Ko)^umDCfIktx zrzrngOOgEyy^Nw6MbM1V_*_Y6fAnYH z{no$Np7fsHT(SP}=QZ)^onI~dyxPw^@OoaG-su8{d>8%33F3;|Y&!>HxcN*Hvh2uXo$$02zICR|CBL_JUk8U&}FXdLh)(V@Wz!JyWfBOiUZ zR#v6#w8UN3q}+)i8zM@aPFMOHj<;+u5%Q_Vx|HQ4C45x!+=zD>jpe#ewuON_-BC9! zmKQzhOq|d6fE$Y-RKRFmWwStefXc^@utkL?Q*0gxVb1{?Ah1SFkhDe}Te5e@{>$&8 zkB%*w^CR~xGc;)iI}hUUBAlc{sOR=RTm6e5Z`1c$v^{CX8zAV&3UHvx=3qYIl{_$n zmC}m$f%wEL9C7tcZKy+U5CpYAJygLyy{QZgXl9~A%~*znH-;w9B$=Ugs1Qxm1yOSn z^8{BPbN6lo_*l@gJj?CGJU|Bsq}&?V06=D9mz1vxFfs&{pk0G;0HiTLyT<{trXW(L zAWEPOa!D?M>XTTDB4W%M&TqcH^Q!axt?lnR8~3*R)&HIsElRyzrvVAXoVp(be$aGQ zmsh^x#C^BH!r(Tqx0&$yQ_(et3zfg!F#oz%&W*xR4LnxVnI z51UgH5|#!eH5%>E<*5-zZ65~a22Gl3Z5pr{kXp`5mqQr`pqHU5y`SoFL_H|#pj)$- zYWr?G)kUgfn}^&TxfxqtmrIAI$j7rA_qLvkb6kj8z1a6+hwejtiBHG<4DrLskRhN{ zd<{AXe05$TfQ9DJyhMW{%E4Pubv385o3O?cDKLH}QsM@1N2wsIP7$0AX+dB3@71Q1V#M8H4IX5)WW?EcPj2hrlgp zDibL8|Le_O1ToJkh|hglyK=19nMZbbre;e*vy*r&=wrMV5tabfN!&oSGQ!8VhnT`$ zi~vW2f_U0<)4&t8a$Gl`iQkqffY@!IQ_FEWt{*s#ymCah>g$sD`{LKuvAOfQxGX|7 z6Nvj-8OiZ~8D7BIjrtB{`@RQP5-5U^%i#K{Z*M`7(>nk@tOO#lxlw-*hHY$;Iv1nv z2LL%bY>06trhFX;Q6mGKg*v)T<8GT{l`)A#SZ6M$?5Z%s5Kt2{k;B+{7%~zwQL-iO zu?vC{^-z`*2?H{xmjT89H&oBH5V?Me7@I zxrOjfTtp|P5b&J$JFhNm9a~9PQE{|G`SD`2Oj7y Aj{pDw literal 0 HcmV?d00001 diff --git a/JobConfig/ensemble/python/calculateEvents.py b/JobConfig/ensemble/python/calculateEvents.py old mode 100644 new mode 100755 index c5fb24d4..7231df3e --- a/JobConfig/ensemble/python/calculateEvents.py +++ b/JobConfig/ensemble/python/calculateEvents.py @@ -1,7 +1,10 @@ +#! /usr/bin/env python from normalizations import * def main(args): Yield = 0 + if (str(args.printpot) == "print"): + livetime_to_pot(float(args.livetime), str(args.BB),True) if(args.prc == "CEMLL"): Yield = ce_normalization(float(args.livetime), float(args.rue), str(args.BB)) print("CEMLL=",Yield) @@ -21,6 +24,7 @@ def main(args): parser.add_argument("--rue", help="signal branching rate") parser.add_argument("--dem_emin", help="min energy cut") parser.add_argument("--prc", help="process") + parser.add_argument("--printpot", help="print pot", default="no") args = parser.parse_args() (args) = parser.parse_args() main(args) diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py index 959e6b49..05eec39b 100644 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -38,7 +38,7 @@ # get number of POTs in given livetime -def livetime_to_pot(livetime, run_mode = '1BB'): #livetime in seconds +def livetime_to_pot(livetime, run_mode = '1BB',printout=False): #livetime in seconds # numbers from SU2020 # see https://github.com/Mu2e/su2020/blob/master/analysis/pot_normalization.org NPOT = 0. @@ -51,6 +51,10 @@ def livetime_to_pot(livetime, run_mode = '1BB'): #livetime in seconds onspill_time = livetime Ncycles = onspill_time/Tcycle NPOT = Ncycles * POT_per_cycle + if( printout): + print("Tcycle=",Tcycle) + print("POT_per_cycle=",POT_per_cycle) + print ("NPOT=",NPOT) if(run_mode == '2BB'): # 2BB mean_PBI_high = 3.9e7 @@ -60,6 +64,10 @@ def livetime_to_pot(livetime, run_mode = '1BB'): #livetime in seconds onspill_time = livetime Ncycles = onspill_time/Tcycle NPOT = Ncycles * POT_per_cycle + if( printout): + print("Tcycle=",Tcycle) + print("POT_per_cycle=",POT_per_cycle) + print ("NPOT=",NPOT) return NPOT # get number of ipa muon stops: diff --git a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh old mode 100644 new mode 100755 index e1d766d1..c83adf6d --- a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh +++ b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash usage() { echo "Usage: $0 - e.g. bash ../Production/Scripts/calculateInputs.sh --cosmics filenames_CORSIKACosmic --dem_emin 95 --rmue 1e-13 --BB 1BB + e.g. bash Stage1_makeinputs.sh --cosmics filenames_CORSIKACosmic --dem_emin 95 --rmue 1e-13 --BB 1BB " } @@ -66,18 +66,20 @@ mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${RELEASE}${VERSION}.art" | head -${ echo -n "njobs= " >> output_${DEM_EMIN}.txt wc -l ${COSMICS} | awk '{print $1}' >> output_${DEM_EMIN}.txt -echo "BB=" ${BB} >> output_${DEM_EMIN}.txt + echo "rmue=" ${RMUE} >> output_${DEM_EMIN}.txt echo "dem_emin=" ${DEM_EMIN} >> output_${DEM_EMIN}.txt #echo "input file="${COSMICS} >> output_${DEM_EMIN}.txt -mu2e -c /exp/mu2e/app/users/sophie/newOffline/Offline/Print/fcl/printCosmicLivetime.fcl -S ${COSMICS} | grep 'Livetime:' | awk -F: '{print $NF}' > ${COSMICS}.livetime +mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -S ${COSMICS} | grep 'Livetime:' | awk -F: '{print $NF}' > ${COSMICS}.livetime LIVETIME=$(awk '{sum += $1} END {print sum}' ${COSMICS}.livetime) echo "livetime=" ${LIVETIME} >> output_${DEM_EMIN}.txt +echo "BB=" ${BB} >> output_${DEM_EMIN}.txt +python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --BB ${BB} --printpot "print" >> output_${DEM_EMIN}.txt -python /exp/mu2e/app/users/sophie/newOffline/Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --rue ${RMUE} --prc "CEMLL" --BB ${BB} >> output_${DEM_EMIN}.txt +python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --rue ${RMUE} --prc "CEMLL" --BB ${BB} --printpot "no">> output_${DEM_EMIN}.txt -python /exp/mu2e/app/users/sophie/newOffline/Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --dem_emin ${DEM_EMIN} --prc "DIO" --BB ${BB} >> output_${DEM_EMIN}.txt +python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --dem_emin ${DEM_EMIN} --prc "DIO" --BB ${BB} --printpot "no" >> output_${DEM_EMIN}.txt -python /exp/mu2e/app/users/sophie/newOffline/Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --prc "CORSIKA" --BB ${BB} >> output_${DEM_EMIN}.txt +python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --prc "CORSIKA" --BB ${BB} --printpot "no" >> output_${DEM_EMIN}.txt diff --git a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh old mode 100644 new mode 100755 index cd9b0659..7af40044 --- a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh +++ b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash usage() { echo "Usage: $0 - e.g. bash FileInMakeAndSubmitEnsemble.sh --config poutput.txt --tagg MDS1a + e.g. bash Stage2_submitensemble.sh --config poutput.txt --tagg MDS1a " } diff --git a/JobConfig/ensemble/scripts/initialscripts/getLivetime.sh b/JobConfig/ensemble/scripts/initialscripts/getLivetime.sh index 70e07627..d95f54e6 100644 --- a/JobConfig/ensemble/scripts/initialscripts/getLivetime.sh +++ b/JobConfig/ensemble/scripts/initialscripts/getLivetime.sh @@ -34,5 +34,5 @@ while getopts ":-:" options; do esac done -mu2e -c ../Offline/Print/fcl/printCosmicLivetime.fcl -S ${FILENAME} | grep 'Livetime:' | awk -F: '{print $NF}' > ${FILENAME}.livetime +mu2e -c /exp/mu2e/app/users/sophie/newOffline/Offline/Print/fcl/printCosmicLivetime.fcl -S ${FILENAME} | grep 'Livetime:' | awk -F: '{print $NF}' > ${FILENAME}.livetime awk '{sum += $1} END {print "Total Livetime:", sum}' ${FILENAME}.livetime From cccee0d8daa215643006c855def2bc129baa3745 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Tue, 13 Aug 2024 08:54:20 -0500 Subject: [PATCH 03/16] preparing scripts for POMs --- .../ensemble/python/make_template_fcl.py | 1 + JobConfig/ensemble/python/normalizations.py | 10 +----- JobConfig/ensemble/python/run_si.py | 4 +++ .../ensemble/scripts/Stage1_makeinputs.sh | 34 ++++++++++++------- .../ensemble/scripts/Stage2_submitensemble.sh | 4 +-- 5 files changed, 29 insertions(+), 24 deletions(-) mode change 100644 => 100755 JobConfig/ensemble/python/make_template_fcl.py mode change 100644 => 100755 JobConfig/ensemble/python/normalizations.py diff --git a/JobConfig/ensemble/python/make_template_fcl.py b/JobConfig/ensemble/python/make_template_fcl.py old mode 100644 new mode 100755 index 9bab0f59..f76adb14 --- a/JobConfig/ensemble/python/make_template_fcl.py +++ b/JobConfig/ensemble/python/make_template_fcl.py @@ -1,3 +1,4 @@ +#! /usr/bin/env from string import Template import argparse import sys diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py old mode 100644 new mode 100755 index 05eec39b..4e8c4a79 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -1,18 +1,10 @@ +#! /usr/bin/env import DbService import argparse import ROOT import math import os -# general -""" -mean_PBI = mean_PBI_low*0.75 + mean_PBI_high*0.25 # 2.175e7 protons per pulse -npulses_per_s = 189898.75 -onspill_dutyfactor = 0.323 # for 1BB -offspill_dutyfactor = 0.323 -ub_per_second = (1/1695e-9)*onspill_dutyfactor # 1.905e5 -POT_per_second = ub_per_second*mean_PBI # TODO 4.1447e12 POT/s -""" # get stopped rates from DB dbtool = DbService.DbTool() diff --git a/JobConfig/ensemble/python/run_si.py b/JobConfig/ensemble/python/run_si.py index 4b4863b6..87a35120 100644 --- a/JobConfig/ensemble/python/run_si.py +++ b/JobConfig/ensemble/python/run_si.py @@ -1,3 +1,7 @@ +#! /usr/bin/env +""" +for interactive use only!!! +""" from string import Template import argparse import sys diff --git a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh index c83adf6d..6646a1d1 100755 --- a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh +++ b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash usage() { echo "Usage: $0 - e.g. bash Stage1_makeinputs.sh --cosmics filenames_CORSIKACosmic --dem_emin 95 --rmue 1e-13 --BB 1BB + e.g. Stage1_makeinputs.sh --cosmics filenames_CORSIKACosmic --dem_emin 95 --rmue 1e-13 --BB 1BB --tag MDS1a " } @@ -18,6 +18,8 @@ BB=1BB RMUE=1e-13 RELEASE="MDC2024" VERSION="a_sm4" +tag="MDS1a_test" +stops="MDC2020p" # Loop: Get the next option; while getopts ":-:" options; do case "${options}" in @@ -38,6 +40,12 @@ while getopts ":-:" options; do rmue) RMUE=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) ;; + tag) + TAG=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + stops) + STOPS=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; *) echo "Unknown option " ${OPTARG} exit_abnormal @@ -53,7 +61,7 @@ while getopts ":-:" options; do esac done -rm output_${DEM_EMIN}.txt +rm ${tag}.txt rm filenames_CORSIKACosmic rm filenames_DIO rm filenames_CeMLL @@ -63,23 +71,23 @@ mu2eDatasetFileList "dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art" | head -${NJ mu2eDatasetFileList "dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${RELEASE}${VERSION}.art"| head -${NJOBS} > filenames_DIO mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${RELEASE}${VERSION}.art" | head -${NJOBS} > filenames_CeMLL -echo -n "njobs= " >> output_${DEM_EMIN}.txt -wc -l ${COSMICS} | awk '{print $1}' >> output_${DEM_EMIN}.txt +echo -n "njobs= " >> ${tag}.txt +wc -l ${COSMICS} | awk '{print $1}' >> ${tag}.txt -echo "rmue=" ${RMUE} >> output_${DEM_EMIN}.txt -echo "dem_emin=" ${DEM_EMIN} >> output_${DEM_EMIN}.txt -#echo "input file="${COSMICS} >> output_${DEM_EMIN}.txt +echo "rmue=" ${RMUE} >> ${tag}.txt +echo "dem_emin=" ${DEM_EMIN} >> ${tag}.txt +echo "stops=MDC2020p" >> ${tag}.txt mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -S ${COSMICS} | grep 'Livetime:' | awk -F: '{print $NF}' > ${COSMICS}.livetime LIVETIME=$(awk '{sum += $1} END {print sum}' ${COSMICS}.livetime) -echo "livetime=" ${LIVETIME} >> output_${DEM_EMIN}.txt -echo "BB=" ${BB} >> output_${DEM_EMIN}.txt -python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --BB ${BB} --printpot "print" >> output_${DEM_EMIN}.txt +echo "livetime=" ${LIVETIME} >> ${tag}.txt +echo "BB=" ${BB} >> ${tag}.txt +calculateEvents.py --livetime ${LIVETIME} --BB ${BB} --printpot "print" >> ${tag}.txt -python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --rue ${RMUE} --prc "CEMLL" --BB ${BB} --printpot "no">> output_${DEM_EMIN}.txt +calculateEvents.py --livetime ${LIVETIME} --rue ${RMUE} --prc "CEMLL" --BB ${BB} --printpot "no">> ${tag}.txt -python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --dem_emin ${DEM_EMIN} --prc "DIO" --BB ${BB} --printpot "no" >> output_${DEM_EMIN}.txt +calculateEvents.py --livetime ${LIVETIME} --dem_emin ${DEM_EMIN} --prc "DIO" --BB ${BB} --printpot "no" >> ${tag}.txt -python Production/JobConfig/ensemble/python/calculateEvents.py --livetime ${LIVETIME} --prc "CORSIKA" --BB ${BB} --printpot "no" >> output_${DEM_EMIN}.txt +calculateEvents.py --livetime ${LIVETIME} --prc "CORSIKA" --BB ${BB} --printpot "no" >> ${tag}.txt diff --git a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh index 7af40044..373f73ae 100755 --- a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh +++ b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash usage() { echo "Usage: $0 - e.g. bash Stage2_submitensemble.sh --config poutput.txt --tagg MDS1a + e.g. Stage2_submitensemble.sh --config poutput.txt --tagg MDS1a " } @@ -93,7 +93,7 @@ mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${RELEASE}${VERSION}.art" | head -${ STDPATH=$pwd # this should be the path where you are currently running echo "making template fcl" -python /exp/mu2e/app/users/sophie/newOffline/Production/JobConfig/ensemble/python/make_template_fcl.py --stdpath=${STDPATH} --BB=${BB} --tag=${TAGG} --verbose=${VERBOSE} --rue=${RMUE} --livetime=${LIVETIME} --run=${RUN} --dem_emin=${DEM_EMIN} --tmin=${TMIN} --samplingseed=${SAMPLINGSEED} --prc "CeMLL" "DIO" "CORSIKACosmic" +make_template_fcl.py --stdpath=${STDPATH} --BB=${BB} --tag=${TAGG} --verbose=${VERBOSE} --rue=${RMUE} --livetime=${LIVETIME} --run=${RUN} --dem_emin=${DEM_EMIN} --tmin=${TMIN} --samplingseed=${SAMPLINGSEED} --prc "CeMLL" "DIO" "CORSIKACosmic" ##### Below is genEnsemble and Grid: echo "remove old files" From 34b64705d09fd00df095a5165ffc0e3d40a90f1f Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Tue, 13 Aug 2024 09:00:27 -0500 Subject: [PATCH 04/16] preparing scripts for POMs --- JobConfig/ensemble/python/normalizations.py | 1 + .../ensemble/scripts/Stage2_submitensemble.sh | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py index 4e8c4a79..9eb187d2 100755 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -110,6 +110,7 @@ def dio_normalization(livetime, emin, run_mode = '1BB'): physics_events = POT * target_stopped_mu_per_POT * DIO_per_stopped_muon #print(f"Expected DIO {physics_events* cut_norm/total_norm}") + print("DIOfrac",cut_norm/total_norm) return physics_events * cut_norm/total_norm diff --git a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh index 373f73ae..95e881b9 100755 --- a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh +++ b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash usage() { echo "Usage: $0 - e.g. Stage2_submitensemble.sh --config poutput.txt --tagg MDS1a + e.g. Stage2_submitensemble.sh --tag MDS1a " } @@ -9,11 +9,11 @@ exit_abnormal() { usage exit 1 } -CONFIG="" + RELEASE=MDC2024 VERSION=a_sm4 PRC="" -TAGG="" # MDS1a +TAG="" # MDS1a VERBOSE=1 SETUP=/cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2020af/setup.sh @@ -26,11 +26,8 @@ while getopts ":-:" options; do prc) PRC=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) ;; - config) - CONFIG=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) - ;; - tagg) - TAGG=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + tag) + TAG=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) ;; verbose) VERBOSE=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) @@ -58,6 +55,7 @@ TMIN=450 SAMPLINGSEED=1 BB="" RMUE="" +CONFIG=${TAG}.txt while IFS='= ' read -r col1 col2 do @@ -93,7 +91,7 @@ mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${RELEASE}${VERSION}.art" | head -${ STDPATH=$pwd # this should be the path where you are currently running echo "making template fcl" -make_template_fcl.py --stdpath=${STDPATH} --BB=${BB} --tag=${TAGG} --verbose=${VERBOSE} --rue=${RMUE} --livetime=${LIVETIME} --run=${RUN} --dem_emin=${DEM_EMIN} --tmin=${TMIN} --samplingseed=${SAMPLINGSEED} --prc "CeMLL" "DIO" "CORSIKACosmic" +make_template_fcl.py --stdpath=${STDPATH} --BB=${BB} --tag=${TAG} --verbose=${VERBOSE} --rue=${RMUE} --livetime=${LIVETIME} --run=${RUN} --dem_emin=${DEM_EMIN} --tmin=${TMIN} --samplingseed=${SAMPLINGSEED} --prc "CeMLL" "DIO" "CORSIKACosmic" ##### Below is genEnsemble and Grid: echo "remove old files" From 92b025315d44274505c58e06c4e7e3da2ebe71cd Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Fri, 16 Aug 2024 17:39:18 -0500 Subject: [PATCH 05/16] fixes to scripts for tests --- .../__pycache__/normalizations.cpython-39.pyc | Bin 3465 -> 3515 bytes .../ensemble/python/make_template_fcl.py | 16 ++- JobConfig/ensemble/python/normalizations.py | 10 +- JobConfig/ensemble/python/run_si.py | 2 +- .../ensemble/scripts/Stage1_makeinputs.sh | 44 ++++----- .../ensemble/scripts/Stage1_makelivetime.sh | 91 ++++++++++++++++++ .../ensemble/scripts/Stage2_submitensemble.sh | 33 +++---- 7 files changed, 142 insertions(+), 54 deletions(-) create mode 100644 JobConfig/ensemble/scripts/Stage1_makelivetime.sh diff --git a/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc b/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc index 0ce62bc1b63045c40ecc70068b711585c91280ce..898f9f945a9ba93a2e48388c802eb858583d4306 100644 GIT binary patch delta 491 zcmZusJ4*yH5Y8mIY%aUEDqNwSg|EiK&PoIkZA5&4#i57~42t;V?h3(drHzFkjD>=Y zh#-i_p@kq~qo9o-mi`Va8z*ZeTt4Q@%rNuu&3@sb5HI9%hS7Vzcv|{tt;REaz}J#u zkfMA~WFZj_EMMiN87mTLWsV&fVl<34H_BTpYipI2bzBvFVDM7RVqPBf zwt440L`+D~TtW)2K~rW3F-6Tje#sA*!0XHl6tS$j;T6wRwWShS<+4r}(u-W=vU%n! z@)F>DupCYYL&M`srG>?=9KHo3ykxLJAE{Yyq#dtx2af^Y^*L-~DO-g->@>%4h>zw3 zPO%v7!1wKEI0r@U7siOZ*A(*aC%>Sjzr$w+8hJe!Wjg+Mlr(`3OtXnnOlgts!7q-N BU9tcG delta 430 zcmZ{eyGsK>5XN_I@3FUc7X>324#6NODeO$4ty+l|3WA^pafyV)2S%{jZA_u5d<+(X zNJKlUAQr~T!p6?pKO&8lm2)R{x*zi~Gdn+Kp5tbmS&t&g=pCz0c_ZJ>tXMMvm7HRV zqJBrFz;F%9s#<#siW^(m#!-%Om1{iBjLP|@t{hb4S*USSoF+%f3jqub8tQ2SY?Ma*cui-+E(RS5CZo5g8y=Bi}f z5Ppc^bN?0$c4a?4`B%_Pv#M;s1!b3Tlh)Tk8NMEzumpXOfb(R@U8y2Ghz3XV$-R;~ W5(cbZaBb-cPv&HpYFY5)Prx^Hqgjst diff --git a/JobConfig/ensemble/python/make_template_fcl.py b/JobConfig/ensemble/python/make_template_fcl.py index f76adb14..2b653a58 100755 --- a/JobConfig/ensemble/python/make_template_fcl.py +++ b/JobConfig/ensemble/python/make_template_fcl.py @@ -1,4 +1,4 @@ -#! /usr/bin/env +#! /usr/bin/env python from string import Template import argparse import sys @@ -11,15 +11,13 @@ """ How to use: -python ../Production/JobConfig/ensemble/python/run_si_v2.py --stdpath=/pnfs/mu2e/scratch/users/sophie/filelists/ --BB=1BB --verbose=1 --rue=1e-13 --livetime=60 --run=1201 --dem_emin=75 --tmin=450 --samplingseed=1 --prc "CE" "DIO" +python ../Production/JobConfig/ensemble/python/make_template_fcl.py --BB=1BB --verbose=1 --rue=1e-13 --livetime=60 --run=1201 --dem_emin=75 --tmin=450 --samplingseed=1 --prc "CE" "DIO" """ def main(args): if int(args.verbose) == 1: print(" Running SI with options : verbose ",args.verbose," BB mode ", args.BB, " livetime [s] ", args.livetime, " Rmue ", args.rue) - print(" filelists located in ", args.stdpath) - print(" Output passed to ", args.stdpath) print(" Signals ", args.prc) print(" tag ", args.tag) @@ -63,7 +61,7 @@ def main(args): #FIXME starting and ending event # open file list from the filelists directory - ffns = open(os.path.join(args.stdpath,"filenames_%s" % signal)) + ffns = open(os.path.join("filenames_%s" % signal)) # add empty file list filenames[signal] = [] @@ -175,8 +173,8 @@ def main(args): d = {} d["datasets"] = datasets - d["outnameMC"] = os.path.join("dts.mu2e.ensemble"+args.tag+".MDC2024.%06d_%08d.art" % (run,subrun)) - d["outnameData"] = os.path.join("dts.mu2e.ensemble"+args.tag+".MDC2024.%06d_%08d.art" % (run,subrun)) + d["outnameMC"] = os.path.join("dts.mu2e.ensemble"+args.tag+"."+args.release+".%06d_%08d.art" % (run,subrun)) + d["outnameData"] = os.path.join("dts.mu2e.ensemble"+args.tag+"."+args.release+".%06d_%08d.art" % (run,subrun)) d["run"] = run d["subRun"] = subrun d["samplingSeed"] = samplingseed + subrun @@ -184,7 +182,7 @@ def main(args): d["comments"] = "#livetime: %f\n#rue: %f\n#dem_emin: %f\n#tmin: %f\n#run: %f\n#nevts: %d\n" % (livetime,rue,dem_emin,tmin,run,events_this_run) # make the .fcl file for this subrun (subrun # d) - fout = open(os.path.join(args.stdpath,"SamplingInput_sr%d.fcl" % (subrun)),"w") + fout = open(os.path.join("SamplingInput_sr%d.fcl" % (subrun)),"w") fout.write(t.substitute(d)) fout.close() @@ -201,8 +199,8 @@ def main(args): if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--verbose", help="verbose") - parser.add_argument("--stdpath", help="name of directory with full path") parser.add_argument("--BB", help="BB mode e.g. 1BB") + parser.add_argument("--release", help="e.g. MDC2020ad") parser.add_argument("--livetime", help="simulated livetime") parser.add_argument("--rue", help="signal branching rate") parser.add_argument("--tmin", help="arrival time cut") diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py index 9eb187d2..917a166f 100755 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -40,12 +40,13 @@ def livetime_to_pot(livetime, run_mode = '1BB',printout=False): #livetime in sec Tcycle = 1.33 #s onspill_dutyfactor = 0.323 POT_per_cycle = 4e12 - onspill_time = livetime - Ncycles = onspill_time/Tcycle + #onspill_time = livetime*onspill_dutyfactor + Ncycles = livetime/Tcycle NPOT = Ncycles * POT_per_cycle if( printout): print("Tcycle=",Tcycle) print("POT_per_cycle=",POT_per_cycle) + print("onspilltime=",livetime*onspill_dutyfactor) print ("NPOT=",NPOT) if(run_mode == '2BB'): # 2BB @@ -53,12 +54,13 @@ def livetime_to_pot(livetime, run_mode = '1BB',printout=False): #livetime in sec Tcycle = 1.4 #s onspill_dutyfactor = 0.246 POT_per_cycle = 8e12 - onspill_time = livetime - Ncycles = onspill_time/Tcycle + #onspill_time = livetime*onspill_dutyfactor + Ncycles = livetime/Tcycle NPOT = Ncycles * POT_per_cycle if( printout): print("Tcycle=",Tcycle) print("POT_per_cycle=",POT_per_cycle) + print("onspilltime=",livetime*onspill_dutyfactor) print ("NPOT=",NPOT) return NPOT diff --git a/JobConfig/ensemble/python/run_si.py b/JobConfig/ensemble/python/run_si.py index 87a35120..3823739b 100644 --- a/JobConfig/ensemble/python/run_si.py +++ b/JobConfig/ensemble/python/run_si.py @@ -132,7 +132,7 @@ def main(args): print("mean_reco_events",mean_gen_events,reco_events,float(gen_events)) # factors in efficiency - mean_reco_events[signal] = mean_gen_events*reco_events/float(gen_events) + mean_reco_events[signal] = mean_gen_events*reco_events/float(gen_events) if int(args.verbose) == 1: print(signal,"GEN_EVENTS:",gen_events,"RECO_EVENTS:",reco_events,"EXPECTED EVENTS:",mean_reco_events[signal]) diff --git a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh index 6646a1d1..8c0c1956 100755 --- a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh +++ b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash usage() { echo "Usage: $0 - e.g. Stage1_makeinputs.sh --cosmics filenames_CORSIKACosmic --dem_emin 95 --rmue 1e-13 --BB 1BB --tag MDS1a + e.g. Stage1_makeinputs.sh --cosmics MDC2020ae --dem_emin 95 --rmue 1e-13 --BB 1BB --tag MDS1a " } @@ -16,15 +16,16 @@ LIVETIME="" #seconds DEM_EMIN=95 BB=1BB RMUE=1e-13 -RELEASE="MDC2024" -VERSION="a_sm4" -tag="MDS1a_test" -stops="MDC2020p" +TAG="MDS1a_test" +STOPS="MDC2020p" # Loop: Get the next option; while getopts ":-:" options; do case "${options}" in -) case "${OPTARG}" in + njobs) + NJOBS=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; cosmics) COSMICS=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) ;; @@ -61,33 +62,30 @@ while getopts ":-:" options; do esac done -rm ${tag}.txt -rm filenames_CORSIKACosmic -rm filenames_DIO -rm filenames_CeMLL +rm ${TAG}.txt +rm ${COSMICS} echo "accessing files, making file lists" -mu2eDatasetFileList "dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art" | head -${NJOBS} > filenames_CORSIKACosmic -mu2eDatasetFileList "dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${RELEASE}${VERSION}.art"| head -${NJOBS} > filenames_DIO -mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${RELEASE}${VERSION}.art" | head -${NJOBS} > filenames_CeMLL +mu2eDatasetFileList "dts.mu2e.CosmicCORSIKASignalAll.${COSMICS}.art" | head -${NJOBS} > ${COSMICS} + -echo -n "njobs= " >> ${tag}.txt -wc -l ${COSMICS} | awk '{print $1}' >> ${tag}.txt +echo -n "njobs= " >> ${TAG}.txt +wc -l ${COSMICS} | awk '{print $1}' >> ${TAG}.txt -echo "rmue=" ${RMUE} >> ${tag}.txt -echo "dem_emin=" ${DEM_EMIN} >> ${tag}.txt -echo "stops=MDC2020p" >> ${tag}.txt +echo "rmue=" ${RMUE} >> ${TAG}.txt +echo "dem_emin=" ${DEM_EMIN} >> ${TAG}.txt +echo "stops= " ${STOPS} >> ${TAG}.txt mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -S ${COSMICS} | grep 'Livetime:' | awk -F: '{print $NF}' > ${COSMICS}.livetime LIVETIME=$(awk '{sum += $1} END {print sum}' ${COSMICS}.livetime) -echo "livetime=" ${LIVETIME} >> ${tag}.txt -echo "BB=" ${BB} >> ${tag}.txt -calculateEvents.py --livetime ${LIVETIME} --BB ${BB} --printpot "print" >> ${tag}.txt +echo "livetime=" ${LIVETIME} >> ${TAG}.txt +echo "BB=" ${BB} >> ${TAG}.txt +calculateEvents.py --livetime ${LIVETIME} --BB ${BB} --printpot "print" >> ${TAG}.txt -calculateEvents.py --livetime ${LIVETIME} --rue ${RMUE} --prc "CEMLL" --BB ${BB} --printpot "no">> ${tag}.txt +calculateEvents.py --livetime ${LIVETIME} --rue ${RMUE} --prc "CEMLL" --BB ${BB} --printpot "no">> ${TAG}.txt -calculateEvents.py --livetime ${LIVETIME} --dem_emin ${DEM_EMIN} --prc "DIO" --BB ${BB} --printpot "no" >> ${tag}.txt +calculateEvents.py --livetime ${LIVETIME} --dem_emin ${DEM_EMIN} --prc "DIO" --BB ${BB} --printpot "no" >> ${TAG}.txt -calculateEvents.py --livetime ${LIVETIME} --prc "CORSIKA" --BB ${BB} --printpot "no" >> ${tag}.txt +calculateEvents.py --livetime ${LIVETIME} --prc "CORSIKA" --BB ${BB} --printpot "no" >> ${TAG}.txt diff --git a/JobConfig/ensemble/scripts/Stage1_makelivetime.sh b/JobConfig/ensemble/scripts/Stage1_makelivetime.sh new file mode 100644 index 00000000..231e793b --- /dev/null +++ b/JobConfig/ensemble/scripts/Stage1_makelivetime.sh @@ -0,0 +1,91 @@ +#!/usr/bin/bash +usage() { echo "Usage: $0 + e.g. Stage1_makeinputs.sh --livetime 60000 --dem_emin 95 --rmue 1e-13 --BB 1BB --tag MDS1a + +" +} + +# Function: Exit with error. +exit_abnormal() { + usage + exit 1 +} +COSMICS="MDC2020ae" +STOPS="MDC2020p" +NJOBS="" +LIVETIME="" #seconds +DEM_EMIN="" +BB="" +RMUE="" +TAG="" + +# Loop: Get the next option; +while getopts ":-:" options; do + case "${options}" in + -) + case "${OPTARG}" in + cosmics) + COSMICS=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + livetime) + LIVETIME=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + dem_emin) + DEM_EMIN=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + BB) + BB=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + rmue) + RMUE=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + tag) + TAG=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + stops) + STOPS=${!OPTIND} OPTIND=$(( $OPTIND + 1 )) + ;; + *) + echo "Unknown option " ${OPTARG} + exit_abnormal + ;; + esac;; + :) # If expected argument omitted: + echo "Error: -${OPTARG} requires an argument." + exit_abnormal # Exit abnormally. + ;; + *) # If unknown (any other) option: + exit_abnormal # Exit abnormally. + ;; + esac +done + +rm ${TAG}.txt +rm ${COSMICS} + +echo "accessing files, making file lists" +mu2eDatasetFileList "dts.mu2e.CosmicCORSIKASignalAll.${COSMICS}.art" > ${COSMICS} + +mu2e -c Offline/Print/fcl/printCosmicLivetime.fcl -S ${COSMICS} | grep 'Livetime:' | awk -F: '{print $NF}' > ${COSMICS}.livetime +TOTALLIVETIME=$(awk '{sum += $1} END {print sum}' ${COSMICS}.livetime) + +var=${TOTALLIVETIME}/${LIVETIME} +echo -n "njobs= " >> ${TAG}.txt +echo $(awk 'BEGIN { rounded = sprintf("%.0f", '${var}'); print rounded }')>> ${TAG}.txt + +echo "rmue=" ${RMUE} >> ${TAG}.txt +echo "dem_emin=" ${DEM_EMIN} >> ${TAG}.txt +echo "stops=" ${STOPS} >> ${TAG}.txt +echo "cosmics=" ${COSMICS} >> ${TAG}.txt +echo "livetime=" ${LIVETIME} >> ${TAG}.txt +echo "totalLtime=" ${TOTALLIVETIME} >> ${TAG}.txt +echo "BB=" ${BB} >> ${TAG}.txt + +# get yields: +calculateEvents.py --livetime ${LIVETIME} --BB ${BB} --printpot "print" >> ${TAG}.txt + +calculateEvents.py --livetime ${LIVETIME} --rue ${RMUE} --prc "CEMLL" --BB ${BB} --printpot "no">> ${TAG}.txt + +calculateEvents.py --livetime ${LIVETIME} --dem_emin ${DEM_EMIN} --prc "DIO" --BB ${BB} --printpot "no" >> ${TAG}.txt + +calculateEvents.py --livetime ${LIVETIME} --prc "CORSIKA" --BB ${BB} --printpot "no" >> ${TAG}.txt diff --git a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh index 95e881b9..9a2ce16b 100755 --- a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh +++ b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh @@ -10,8 +10,8 @@ exit_abnormal() { exit 1 } -RELEASE=MDC2024 -VERSION=a_sm4 +INRELEASE=MDC2024 +INVERSION=a_sm4 PRC="" TAG="" # MDS1a VERBOSE=1 @@ -56,7 +56,8 @@ SAMPLINGSEED=1 BB="" RMUE="" CONFIG=${TAG}.txt - +OUTRELEASE="MDC2020" +OUTVERSION="ag" while IFS='= ' read -r col1 col2 do if [[ "${col1}" == "njobs" ]] ; then @@ -85,30 +86,28 @@ rm filenames_CeMLL echo "accessing files, making file lists" mu2eDatasetFileList "dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art" | head -${NJOBS} > filenames_CORSIKACosmic -mu2eDatasetFileList "dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${RELEASE}${VERSION}.art"| head -${NJOBS} > filenames_DIO -mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${RELEASE}${VERSION}.art" | head -${NJOBS} > filenames_CeMLL - -STDPATH=$pwd # this should be the path where you are currently running +mu2eDatasetFileList "dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${INRELEASE}${INVERSION}.art"| head -${NJOBS} > filenames_DIO +mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_CeMLL echo "making template fcl" -make_template_fcl.py --stdpath=${STDPATH} --BB=${BB} --tag=${TAG} --verbose=${VERBOSE} --rue=${RMUE} --livetime=${LIVETIME} --run=${RUN} --dem_emin=${DEM_EMIN} --tmin=${TMIN} --samplingseed=${SAMPLINGSEED} --prc "CeMLL" "DIO" "CORSIKACosmic" +make_template_fcl.py --BB=${BB} --release=${OUTRELEASE}${OUTVERSION} --tag=${TAG} --verbose=${VERBOSE} --rue=${RMUE} --livetime=${LIVETIME} --run=${RUN} --dem_emin=${DEM_EMIN} --tmin=${TMIN} --samplingseed=${SAMPLINGSEED} --prc "CeMLL" "DIO" "CORSIKACosmic" ##### Below is genEnsemble and Grid: echo "remove old files" -rm cnf.sophie.ensemble.${RELEASE}${VERSION}.0.tar +rm cnf.sophie.ensemble.${INRELEASE}${INVERSION}.0.tar rm filenames_CORSIKACosmic_${NJOBS}.txt rm filenames_DIO_${NJOBS}.txt rm filenames_CeMLL_${NJOBS}.txt echo "get NJOBS files and list" samweb list-files "dh.dataset=dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art" | head -${NJOBS} > filenames_CORSIKACosmic_${NJOBS}.txt -samweb list-files "dh.dataset=dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${RELEASE}${VERSION}.art" | head -${NJOBS} > filenames_DIO_${NJOBS}.txt -samweb list-files "dh.dataset=dts.mu2e.CeMLeadingLog.${RELEASE}${VERSION}.art" | head -${NJOBS} > filenames_CeMLL_${NJOBS}.txt +samweb list-files "dh.dataset=dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_DIO_${NJOBS}.txt +samweb list-files "dh.dataset=dts.mu2e.CeMLeadingLog.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_CeMLL_${NJOBS}.txt -DSCONF=${RELEASE}${VERSION} +DSCONF=${INRELEASE}${INVERSION} echo "run mu2e jobdef" -cmd="mu2ejobdef --desc=ensemble${TAG} --dsconf=${DSCONF} --run=${RUN} --setup ${SETUP} --sampling=1:CeMLL:filenames_CeMLL_${NJOBS}.txt --sampling=1:DIO:filenames_DIO_${NJOBS}.txt --sampling=1:CORSIKACosmic:filenames_CORSIKACosmic_${NJOBS}.txt --embed SamplingInput_sr0.fcl --verb " +cmd="mu2ejobdef --desc=${TAG} --dsconf=${DSCONF} --run=${RUN} --setup ${SETUP} --sampling=1:CeMLL:filenames_CeMLL_${NJOBS}.txt --sampling=1:DIO:filenames_DIO_${NJOBS}.txt --sampling=1:CORSIKACosmic:filenames_CORSIKACosmic_${NJOBS}.txt --embed SamplingInput_sr0.fcl --verb " echo "Running: $cmd" $cmd @@ -126,7 +125,7 @@ samweb create-definition idx_${index_dataset} "dh.dataset etc.mu2e.index.000.txt echo "Created definiton: idx_${index_dataset}" samweb describe-definition idx_${index_dataset} -echo "submit jobs" -cmd="mu2ejobsub --jobdef cnf.sophie.ensemble.${RELEASE}${VERSION}.0.tar --firstjob=0 --njobs=${NJOBS} --predefined=sl7 --default-protocol ifdh --default-location tape" -echo "Running: $cmd" -$cmd +#echo "submit jobs" +#cmd="mu2ejobsub --jobdef cnf.sophie.ensemble.${INRELEASE}${INVERSION}.0.tar --firstjob=0 --njobs=${NJOBS} --predefined=sl7 --default-protocol ifdh --default-location tape" +#echo "Running: $cmd" +#$cmd From ee05e8f8a67779151a9afa6a7f6d734b5b6ede7c Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Mon, 19 Aug 2024 09:06:37 -0500 Subject: [PATCH 06/16] stashing --- CampaignConfig/mdc2020_RPC.ini | 223 ++++++++++++++++++ CampaignConfig/mdc2024_DIOtail.ini | 76 +++--- CampaignConfig/mdc2024_ensembles.cfg | 40 ++-- CampaignConfig/mdc2024_ensembles.ini | 44 ++-- CampaignConfig/mdc2024_primary.cfg | 129 +++++++--- .../__pycache__/normalizations.cpython-39.pyc | Bin 3515 -> 3515 bytes .../ensemble/python/make_template_fcl.py | 14 +- .../ensemble/scripts/Stage1_makeinputs.sh | 2 +- .../ensemble/scripts/Stage2_submitensemble.sh | 2 +- Scripts/gen_Primary.sh | 32 ++- Tests/RPCSteps.fcl | 4 +- 11 files changed, 423 insertions(+), 143 deletions(-) create mode 100644 CampaignConfig/mdc2020_RPC.ini diff --git a/CampaignConfig/mdc2020_RPC.ini b/CampaignConfig/mdc2020_RPC.ini new file mode 100644 index 00000000..20ec5a99 --- /dev/null +++ b/CampaignConfig/mdc2020_RPC.ini @@ -0,0 +1,223 @@ +[campaign] +experiment = mu2e +poms_role = production +name = MDC2020_rpc +campaign_stage_list = rpc_fcl, rpc, rpcdigi_fcl, rpcdigi, rpcmix_perfect_fcl, rpcmix_perfect, rpcmix1bbsignal_perfect_reco_fcl, rpcmix1bbsignal_perfect_reco, rpcdigitriggered_reco_fcl, rpcdigitriggered_reco, rpcmix_best_fcl, rpcmix_best, rpcmix_startup_fcl, rpcmix_startup, rpcmix1bbsignal_startup_reco_fcl, rpcmix1bbsignal_startup_reco, rpcmix1bbsignal_best_reco_fcl, rpcmix1bbsignal_best_reco, rpcmix1bbsignal_perfect_reco_fcl, rpcmix1bbsignal_perfect_reco, rpcmix2bbsignal_best_reco_fcl, rpcmix2bbsignal_best_reco + +[campaign_defaults] +vo_role=Production +software_version=Offline +dataset_or_split_data=None +cs_split_type=None +completion_pct=100 +param_overrides="[]" +test_param_overrides="[]" +merge_overrides=False +login_setup=mu2epro_login +job_type= mu2e_local_rpc_jobtype +stage_type=regular +output_ancestor_depth=1 +completion_type=located + +[campaign_stage rpc_fcl] +param_overrides = [["--stage ", "primary_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.stopped=", "Piminus"],["-Oglobal.njobs=", "1000"],["-Oglobal.evts=", "100000"]] +test_param_overrides = [["--stage ", "primary_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.stopped=", "Piminus"],["-Oglobal.njobs=", "10"],["-Oglobal.evts=", "100000"]] +job_type = generate_fcl_local_rpc_jobtype + +[campaign_stage rpc] +param_overrides = [["--stage ", "primary"], ["-Oglobal.primary_name=", "RPCInternal"]] +test_param_overrides = [["--stage ", "primary"], ["-Oglobal.primary_name=", "RPCInternal"]] + +[dependencies rpc] +campaign_stage_1 = rpc_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcdigi_fcl] +param_overrides = [["--stage ", "primarydigi_fcl"], ["-Oglobal.primary_name=", "RPCInternal"]] +test_param_overrides = [["--stage ", "primarydigi_fcl"], ["-Oglobal.primary_name=", "RPCInternal"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcdigi_fcl] +campaign_stage_1 = rpc +file_pattern_1 = %.art + +[campaign_stage rpcdigi] +param_overrides = [["--stage ", "primarydigi"], ["-Oglobal.primary_name=", "RPCInternal"]] +test_param_overrides = [["--stage ", "primarydigi"], ["-Oglobal.primary_name=", "RPCInternal"]] + +[dependencies rpcdigi] +campaign_stage_1 = rpcdigi_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcmix_perfect_fcl] +param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcmix_perfect_fcl] +campaign_stage_1 = rpc +file_pattern_1 = %.art + +[campaign_stage rpcmix_perfect] +param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] + +[dependencies rpcmix_perfect] +campaign_stage_1 = rpcmix_perfect_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcmix_best_fcl] +param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcmix_best_fcl] +campaign_stage_1 = rpc +file_pattern_1 = %.art + +[campaign_stage rpcmix_best] +param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"]] + +[dependencies rpcmix_best] +campaign_stage_1 = rpcmix_best_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcmix_startup_fcl] +param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcmix_startup_fcl] +campaign_stage_1 = rpc +file_pattern_1 = %.art + +[campaign_stage rpcmix_startup] +param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] + +[dependencies rpcmix_startup] +campaign_stage_1 = rpcmix_startup_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcmix1bbsignal_startup_reco_fcl] +param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcmix1bbsignal_startup_reco_fcl] +campaign_stage_1 = rpcmix_startup +file_pattern_1 = %.art + +[campaign_stage rpcmix1bbsignal_startup_reco] +param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "startup"]] + +[dependencies rpcmix1bbsignal_startup_reco] +campaign_stage_1 = rpcmix1bbsignal_startup_reco_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcmix1bbsignal_best_reco_fcl] +param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"], ["-Oglobal.digitype=", "Mix1BB"]] +test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcmix1bbsignal_best_reco_fcl] +campaign_stage_1 = rpcmix_best +file_pattern_1 = %.art + +[campaign_stage rpcmix1bbsignal_best_reco] +param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.digitype=", "Mix2BB"], ["-Oglobal.db_purpose=", "best"], ["-Oglobal.primary_name=", "RPCInternal"]] +test_param_overrides = [["--stage ", "primary_reco"]] + +[dependencies rpcmix1bbsignal_best_reco] +campaign_stage_1 = rpcmix1bbsignal_best_reco_fcl +file_pattern_1 = %.fcl + + +[campaign_stage rpcmix2bbsignal_best_reco_fcl] +param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"], ["-Oglobal.digitype=", "Mix2BB"]] +test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "best"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcmix2bbsignal_best_reco_fcl] +campaign_stage_1 = rpcmix_best +file_pattern_1 = %.art + +[campaign_stage rpcmix2bbsignal_best_reco] +param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.digitype=", "Mix2BB"], ["-Oglobal.db_purpose=", "best"], ["-Oglobal.primary_name=", "RPCInternal"]] +test_param_overrides = [["--stage ", "primary_reco"]] + +[dependencies rpcmix2bbsignal_best_reco] +campaign_stage_1 = rpcmix2bbsignal_best_reco_fcl +file_pattern_1 = %.fcl + + +[campaign_stage rpcmix1bbsignal_perfect_reco_fcl] +param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcmix1bbsignal_perfect_reco_fcl] +campaign_stage_1 = rpcmix_perfect +file_pattern_1 = %.art + +[campaign_stage rpcmix1bbsignal_perfect_reco] +param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "RPCInternal"], ["-Oglobal.db_purpose=", "perfect"]] + +[dependencies rpcmix1bbsignal_perfect_reco] +campaign_stage_1 = rpcmix1bbsignal_perfect_reco_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcdigitriggered_reco_fcl] +param_overrides = [["--stage ", "primarydigitriggered_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"],["-Oglobal.release_v_reco=", "z"],["-Oglobal.release_v_dig=", "r"]] +test_param_overrides = [["--stage ", "primarydigitriggered_reco_fcl"], ["-Oglobal.primary_name=", "RPCInternal"]] +job_type = generate_fcl_local_rpc_jobtype + +[dependencies rpcdigitriggered_reco_fcl] +campaign_stage_1 = rpcdigi +file_pattern_1 = %.art + +[campaign_stage rpcdigitriggered_reco] +param_overrides = [["--stage ", "primarydigitriggered_reco"], ["-Oglobal.primary_name=", "RPCInternal"]] +test_param_overrides = [["--stage ", "primarydigitriggered_reco"], ["-Oglobal.primary_name=", "RPCInternal"]] + +[dependencies rpcdigitriggered_reco] +campaign_stage_1 = rpcdigitriggered_reco_fcl +file_pattern_1 = %.fcl + +[campaign_stage rpcmix1bbsignal_perfect_reco_cat] +param_overrides = [["--stage ", "concat"], ["-Oglobal.nconcat=", "10"], ["-Oglobal.data_tier=", "mcs"], ["-Oglobal.outdir=", "/pnfs/mu2e/tape/phy-sim/mcs/mu2e/"]] +test_param_overrides = [["--stage ", "concat"], ["-Oglobal.nconcat=", "10"], ["-Oglobal.data_tier=", "mcs"], ["-Oglobal.outdir=", "/pnfs/mu2e/tape/phy-sim/mcs/mu2e/"]] + +[dependencies rpcmix1bbsignal_perfect_reco_cat] +campaign_stage_1 = rpcmix1bbsignal_perfect_reco +file_pattern_1 = %.art + +[job_type mu2e_local_rpc_jobtype] +launch_script = fife_launch +parameters = [["-c ", "/exp/mu2e/app/users/sophie/Offline_October/Production/CampaignConfig/mdc2020_primary.cfg"]] +output_file_patterns = %.art +recoveries = [["proj_status",[["-Osubmit.dataset=","%(dataset)s"]]]] + +[job_type generate_fcl_local_rpc_jobtype] +launch_script = fife_launch +parameters = [["-c ", "/exp/mu2e/app/users/sophie/Offline_October/Production/CampaignConfig/mdc2020_primary.cfg"]] +output_file_patterns = %.fcl + +[job_type mu2e_cvmfs_rpc_jobtype] +launch_script = fife_launch +parameters = [["-c ", "/cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2020z/Production/CampaignConfig/mdc2020_primary.cfg"]] +output_file_patterns = %.art +recoveries = [["proj_status",[["-Osubmit.dataset=","%(dataset)s"]]]] + +[job_type generate_fcl_cvmfs_rpc_jobtype] +launch_script = fife_launch +parameters = [["-c ", "/cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2020z/Production/CampaignConfig/mdc2020_primary.cfg"]] +output_file_patterns = %.fcl + +[login_setup mu2epro_login] +host=mu2egpvm01.fnal.gov +account=mu2epro +setup=export X509_USER_PROXY=/opt/mu2epro/mu2epro.Production.proxy;setup fife_utils v3_5_0, poms_client, poms_jobsub_wrapper; diff --git a/CampaignConfig/mdc2024_DIOtail.ini b/CampaignConfig/mdc2024_DIOtail.ini index 01e045ec..86f84414 100644 --- a/CampaignConfig/mdc2024_DIOtail.ini +++ b/CampaignConfig/mdc2024_DIOtail.ini @@ -14,27 +14,27 @@ completion_pct=100 param_overrides="[]" test_param_overrides="[]" merge_overrides=False -login_setup=mu2epro_login_v3 +login_setup=mu2epro_login_v7 job_type=mu2e_local_DIOtail_jobtype_v2 stage_type=regular output_ancestor_depth=1 [campaign_stage DIOtail_fcl] -param_overrides = [["--stage ", "DIOtail_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"],["-Oglobal.stopped=", "Muminus"],["-Oglobal.startmom=", "75"],["-Oglobal.endmom=", "105"],["-Oglobal.njobs=", "800"],["-Oglobal.evts=", "200000"],["-Oglobal.tag=", "DIOtail"]] -test_param_overrides = [["--stage ", "DIOtail_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"],["-Oglobal.stopped=", "Muminus"],["-Oglobal.startmom=", "75"],["-Oglobal.endmom=", "105"],["-Oglobal.njobs=", "100"],["-Oglobal.evts=", "1000"],["-Oglobal.tag=", "DIOtail"]] +param_overrides = [["--stage ", "DIOtail_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"],["-Oglobal.stopped=", "Muminus"],["-Oglobal.startmom=", "95"],["-Oglobal.endmom=", "105"],["-Oglobal.njobs=", "850"],["-Oglobal.evts=", "850"],["-Oglobal.tag=", "DIOtail"]] +test_param_overrides = [["--stage ", "DIOtail_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"],["-Oglobal.stopped=", "Muminus"],["-Oglobal.startmom=", "95"],["-Oglobal.endmom=", "105"],["-Oglobal.njobs=", "100"],["-Oglobal.evts=", "1000"],["-Oglobal.tag=", "DIOtail"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [campaign_stage DIOtail] -param_overrides = [["--stage ", "primary"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] -test_param_overrides = [["--stage ", "primary"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] +param_overrides = [["--stage ", "primary"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] +test_param_overrides = [["--stage ", "primary"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] [dependencies DIOtail] campaign_stage_1 = DIOtail_fcl file_pattern_1 = %.fcl [campaign_stage DIOtaildigi_fcl] -param_overrides = [["--stage ", "primarydigi_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] -test_param_overrides = [["--stage ", "primarydigi_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] +param_overrides = [["--stage ", "primarydigi_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] +test_param_overrides = [["--stage ", "primarydigi_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtaildigi_fcl] @@ -42,16 +42,16 @@ campaign_stage_1 = DIOtail file_pattern_1 = %.art [campaign_stage DIOtaildigi] -param_overrides = [["--stage ", "primarydigi"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] -test_param_overrides = [["--stage ", "primarydigi"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] +param_overrides = [["--stage ", "primarydigi"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] +test_param_overrides = [["--stage ", "primarydigi"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] [dependencies DIOtaildigi] campaign_stage_1 = DIOtaildigi_fcl file_pattern_1 = %.fcl [campaign_stage DIOtailmix_perfect_fcl] -param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtailmix_perfect_fcl] @@ -59,16 +59,16 @@ campaign_stage_1 = DIOtail file_pattern_1 = %.art [campaign_stage DIOtailmix_perfect] -param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] [dependencies DIOtailmix_perfect] campaign_stage_1 = DIOtailmix_perfect_fcl file_pattern_1 = %.fcl [campaign_stage DIOtailmix_best_fcl] -param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "best"]] -test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "best"]] +param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "best"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtailmix_best_fcl] @@ -76,16 +76,16 @@ campaign_stage_1 = DIOtail file_pattern_1 = %.art [campaign_stage DIOtailmix_best] -param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "best"]] -test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "best"]] +param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "best"]] [dependencies DIOtailmix_best] campaign_stage_1 = DIOtailmix_best_fcl file_pattern_1 = %.fcl [campaign_stage DIOtailmix_startup_fcl] -param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] -test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] +param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primarymix_purpose_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtailmix_startup_fcl] @@ -93,16 +93,16 @@ campaign_stage_1 = DIOtail file_pattern_1 = %.art [campaign_stage DIOtailmix_startup] -param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] -test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] +param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primarymix_purpose"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] [dependencies DIOtailmix_startup] campaign_stage_1 = DIOtailmix_startup_fcl file_pattern_1 = %.fcl [campaign_stage DIOtailmix1bbsignal_startup_reco_fcl] -param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] -test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] +param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtailmix1bbsignal_startup_reco_fcl] @@ -110,16 +110,16 @@ campaign_stage_1 = DIOtailmix_startup file_pattern_1 = %.art [campaign_stage DIOtailmix1bbsignal_startup_reco] -param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] -test_param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "startup"]] +param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] +test_param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "startup"]] [dependencies DIOtailmix1bbsignal_startup_reco] campaign_stage_1 = DIOtailmix1bbsignal_startup_reco_fcl file_pattern_1 = %.fcl [campaign_stage DIOtailmix1bbsignal_best_reco_fcl] -param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "best"]] -test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "best"]] +param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "best"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtailmix1bbsignal_best_reco_fcl] @@ -135,8 +135,8 @@ campaign_stage_1 = DIOtailmix1bbsignal_best_reco_fcl file_pattern_1 = %.fcl [campaign_stage DIOtailmix1bbsignal_perfect_reco_fcl] -param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primary_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtailmix1bbsignal_perfect_reco_fcl] @@ -144,16 +144,16 @@ campaign_stage_1 = DIOtailmix_perfect file_pattern_1 = %.art [campaign_stage DIOtailmix1bbsignal_perfect_reco] -param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "primary_reco"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] [dependencies DIOtailmix1bbsignal_perfect_reco] campaign_stage_1 = DIOtailmix1bbsignal_perfect_reco_fcl file_pattern_1 = %.fcl [campaign_stage DIOtaildigitriggered_reco_fcl] -param_overrides = [["--stage ", "primarydigitriggered_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] -test_param_overrides = [["--stage ", "primarydigitriggered_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] +param_overrides = [["--stage ", "primarydigitriggered_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] +test_param_overrides = [["--stage ", "primarydigitriggered_reco_fcl"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] job_type = generate_fcl_local_DIOtail_jobtype_v2 [dependencies DIOtaildigitriggered_reco_fcl] @@ -161,8 +161,8 @@ campaign_stage_1 = DIOtaildigi file_pattern_1 = %.art [campaign_stage DIOtaildigitriggered_reco] -param_overrides = [["--stage ", "primarydigitriggered_reco"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] -test_param_overrides = [["--stage ", "primarydigitriggered_reco"], ["-Oglobal.primary_name=", "DIOtailp75MeVc"]] +param_overrides = [["--stage ", "primarydigitriggered_reco"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] +test_param_overrides = [["--stage ", "primarydigitriggered_reco"], ["-Oglobal.primary_name=", "DIOtailp95MeVc"]] [dependencies DIOtaildigitriggered_reco] campaign_stage_1 = DIOtaildigitriggered_reco_fcl @@ -198,7 +198,7 @@ launch_script = fife_launch parameters = [["-c ", "/cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2024a/Production/CampaignConfig/mdc2024_primary.cfg"]] output_file_patterns = %.fcl -[login_setup mu2epro_login_v3] -host=mu2egpvm01.fnal.gov +[login_setup mu2epro_login_v7] +host=mu2egpvm04.fnal.gov account=mu2epro -setup=export X509_USER_PROXY=/opt/mu2epro/mu2epro.Production.proxy;setup fife_utils v3_5_0, poms_client, poms_jobsub_wrapper; +setup=setup fife_utils v3_5_0, poms_client, poms_jobsub_wrapper; diff --git a/CampaignConfig/mdc2024_ensembles.cfg b/CampaignConfig/mdc2024_ensembles.cfg index 652108fb..657ce48c 100644 --- a/CampaignConfig/mdc2024_ensembles.cfg +++ b/CampaignConfig/mdc2024_ensembles.cfg @@ -1,7 +1,6 @@ [global] -includes = /exp/mu2e/app/users/sophie/ProductionEnsembles/Production/CampaignConfig/mdc2020_prolog.cfg +includes = /exp/mu2e/app/users/sophie/newOffline/Production/CampaignConfig/mdc2020_prolog.cfg run_number = 1210 -njobs = 250 release = MDC2020 stoprelease = MDC2020 desc = MDC2024ae @@ -15,16 +14,12 @@ digidb_version = v1_3 recodb_version = v1_3 db_purpose = perfect data_tier = dts -stopped = Muminus -evts = 2000 + ensemble_name = Noensemble digitype = OnSpill beam = 1BB mix = Mix nconcat = 1 -pdgcode = -11 -startmom = 0 -endmom=110 bfield = "Offline/Mu2eG4/geom/bfgeom_no_tsu_ps_v01.txt" trkana_version_counter = a @@ -55,33 +50,38 @@ add_location = True hash = 2 hash_alg = sha256 -[stage_ensemble_old] +[stage_ensemble_par] global.stage_name = %(ensemble_name)s global.desc = %(release)s%(release_v_dts)s -job_output.dest = %(outdir_fcl_tape)s/%(stage_name)s/%(desc)s/fcl/ - -job_setup.prescript_1 = ifdh mkdir_p %(outdir_fcl_tape)s/%(stage_name)s/%(desc)s/art/ +job_output_7.addoutput = cnf*.tar +job_setup.prescript_1 = ifdh mkdir_p %(outdir_tar)s/%(stage_name)s/%(desc)s/tar/ executable.name = true +executable_2.name = Stage2_POMsEnsemble.sh +executable_2.arg_1 = --tag %(ensemble_name)s +job_setup.ifdh_art = False -submit.f_1=dropbox:////exp/mu2e/app/users/mu2epro/production_manager/run_si.py -job_setup.prescript_1 = ls -al $CONDOR_DIR_INPUT -job_setup.prescript_2 = chmod +x ${CONDOR_DIR_INPUT}/* - +[stage_ensemble] -submit.f_2=dropbox:////exp/mu2e/app/users/mu2epro/production_manager/config.tar -job_setup.prescript_3 = tar -xf \\\\\\\${CONDOR_DIR_INPUT}/config.tar +global.stage_name = %(ensemble_name)s +global.desc = %(release)s%(release_v_dts)s +job_output_1.dest = %(logdir_bck)s/%(stage_name)s/%(desc)s/tbz/ +job_output_2.addoutput = dts.%(ensemble_name)s.*.art +job_output_2.add_to_dataset = dts.%(submitter)s.%(stage_name)s.%(desc)s.art +job_output_2.dest = %(outdir_dts_tape)s/%(stage_name)s/%(desc)s/art -executable_2.name = python \\\\\\\$CONDOR_DIR_INPUT/run_si.py -executable_2.arg_1 = \\\\\\\$PWD/config/ -executable_2.arg_2 = %(outdir_dts_tape)s/%(stage_name)s/%(desc)s/art/ +job_setup.prescript_1 = ifdh mkdir_p %(outdir_dts_tape)s/%(stage_name)s/%(desc)s/art +executable.name = true job_setup.ifdh_art = False + + + [stage_ensembledigi] global.stage_name = %(ensemble_name)s%(digitype)s global.desc = %(release)s%(release_v_dig)s_%(db_purpose)s_%(db_version)s diff --git a/CampaignConfig/mdc2024_ensembles.ini b/CampaignConfig/mdc2024_ensembles.ini index 357e2421..582f24c8 100644 --- a/CampaignConfig/mdc2024_ensembles.ini +++ b/CampaignConfig/mdc2024_ensembles.ini @@ -20,13 +20,13 @@ stage_type=regular output_ancestor_depth=1 [campaign_stage ensemble] -param_overrides = [["--stage ", "ensemble"], ["-Oglobal.ensemble_name=", "ensemble"]] -test_param_overrides = [["--stage ", "ensemble"], ["-Oglobal.ensemble_name=", "ensemble"]] +param_overrides = [["--stage ", "ensemble"], ["-Oglobal.ensemble_name=", "MDS1a_test"]] +test_param_overrides = [["--stage ", "ensemble"], ["-Oglobal.ensemble_name=", "MDS1a_test"]] job_type = mu2e_local_ensemble_jobtype_v3 [campaign_stage ensemblemix_perfect_fcl] -param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] job_type = generate_fcl_local_ensemble_jobtype_v3 [dependencies ensemblemix_perfect_fcl] @@ -34,8 +34,8 @@ campaign_stage_1 = ensemble file_pattern_1 = %.art [campaign_stage ensemblemix_perfect] -param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] [dependencies ensemblemix_perfect] campaign_stage_1 = ensemblemix_perfect_fcl @@ -44,8 +44,8 @@ file_pattern_1 = %.fcl [campaign_stage ensemblemix_best_fcl] -param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] -test_param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] +param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "ensemblemix_purpose_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] job_type = generate_fcl_local_ensemble_jobtype_v3 [dependencies ensemblemix_best_fcl] @@ -53,8 +53,8 @@ campaign_stage_1 = ensemble file_pattern_1 = %.art [campaign_stage ensemblemix_best] -param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] -test_param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] +param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "ensemblemix_purpose"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] [dependencies ensemblemix_best] campaign_stage_1 = ensemblemix_best_fcl @@ -63,8 +63,8 @@ file_pattern_1 = %.fcl [campaign_stage ensemblemix_perfect_reco_fcl] -param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] job_type = generate_fcl_local_ensemble_jobtype_v3 [dependencies ensemblemix_perfect_reco_fcl] @@ -72,8 +72,8 @@ campaign_stage_1 = ensemblemix_perfect file_pattern_1 = %.art [campaign_stage ensemblemix_perfect_reco] -param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] -test_param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "perfect"]] +param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] +test_param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "perfect"]] [dependencies ensemblemix_perfect_reco] campaign_stage_1 = ensemblemix_perfect_reco_fcl @@ -82,8 +82,8 @@ file_pattern_1 = %.fcl [campaign_stage ensemblemix_best_reco_fcl] -param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] -test_param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] +param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "ensemble_reco_fcl"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] job_type = generate_fcl_local_ensemble_jobtype_v3 [dependencies ensemblemix_best_reco_fcl] @@ -91,16 +91,16 @@ campaign_stage_1 = ensemblemix_best file_pattern_1 = %.art [campaign_stage ensemblemix_best_reco] -param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] -test_param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVc"], ["-Oglobal.db_purpose=", "best"]] +param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] +test_param_overrides = [["--stage ", "ensemble_reco"], ["-Oglobal.ensemble_name=", "MDS1a_test"], ["-Oglobal.db_purpose=", "best"]] [dependencies ensemblemix_best_reco] campaign_stage_1 = ensemblemix_best_reco_fcl file_pattern_1 = %.fcl [campaign_stage trkana_perfect] -param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered.MDC2020ae_perfect_v1_3.art"],["-Oglobal.primary_name=","ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] -test_param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered.MDC2020z_perfect_v1_3.art"],["-Oglobal.primary_name=","ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] +param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.MDS1a_testMix1BBTriggered.MDC2020ae_perfect_v1_3.art"],["-Oglobal.primary_name=","MDS1a_testMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] +test_param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.MDS1a_testMix1BBTriggered.MDC2020z_perfect_v1_3.art"],["-Oglobal.primary_name=","MDS1a_testMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] job_type = mu2e_local_ensemble_jobtype_v3 [dependencies trkana_perfect] @@ -108,8 +108,8 @@ campaign_stage_1 = ensemblemix_perfect_reco file_pattern_1 = %.art [campaign_stage trkana_best] -param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered.MDC2020ae_best_v1_3.art"],["-Oglobal.primary_name=","ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] -test_param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered.MDC2020z_best_v1_3.art"],["-Oglobal.primary_name=","ensemble-1BB-CEDIOCRYCosmic-600000s-p95MeVcMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] +param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.MDS1a_testMix1BBTriggered.MDC2020ae_best_v1_3.art"],["-Oglobal.primary_name=","MDS1a_testMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] +test_param_overrides = [["--stage ", "trkana"], ["-Osubmit.dataset=", "mcs.mu2e.MDS1a_testMix1BBTriggered.MDC2020z_best_v1_3.art"],["-Oglobal.primary_name=","MDS1a_testMix1BBTriggered"],["-Oglobal.recotype=","Reco"]] job_type = mu2e_local_ensemble_jobtype_v3 [dependencies trkana_best] diff --git a/CampaignConfig/mdc2024_primary.cfg b/CampaignConfig/mdc2024_primary.cfg index 94b8f5e3..01ce0715 100644 --- a/CampaignConfig/mdc2024_primary.cfg +++ b/CampaignConfig/mdc2024_primary.cfg @@ -2,16 +2,16 @@ includes = /exp/mu2e/app/users/sophie/newOffline/Production/CampaignConfig/mdc2020_prolog.cfg run_number = 1210 njobs = 250 -release = MDC2024 +release = MDC2020 srelease = MDC2020 release_stops = MDC2020 -desc = MDC2024a_sm4 +desc = MDC2020ag release_v_stops = p -release_v_dts = a_sm4 -release_v_dig = a_sm4 -release_v_reco = a_sm4 -release_v_o = a_sm4 -db_folder = mdc2024a_sm4 +release_v_dts = ag +release_v_dig = ag +release_v_reco = ag +release_v_o = ag +db_folder = mdc2020ag digidb_version = v1_3 recodb_version = v1_3 db_purpose = best @@ -79,63 +79,88 @@ executable_2.arg_9 = --field %(bfield)s executable_2.arg_10 = --run %(run_number)s job_setup.ifdh_art = False -[stage_primary] + +[stage_primary_tar] global.stage_name = %(primary_name)s +global.desc = %(release)s%(release_v_dts)s +job_output.dest = %(outdir_tar)s/%(stage_name)s/%(desc)s/tar/ + +job_output_7.add_to_dataset = cnf.%(submitter)s.%(primary_name)s.%(desc)s.tar +job_output_7.dest = %(outdir_tar)s/%(stage_name)s/%(desc)s/tar/ + +executable.name = true +job_setup.prescript_1 = ifdh mkdir_p %(outdir_tar)s/%(stage_name)s/%(desc)s/tar/art/ + +submit.f_1=dropbox:////exp/mu2e/app/users/mu2epro/production_manager/gen_Primary.sh +job_setup.prescript_2 = ls -al $CONDOR_DIR_INPUT +job_setup.prescript_3 = chmod +x ${CONDOR_DIR_INPUT}/* + +executable_2.name = \\\\\\\${CONDOR_DIR_INPUT}/gen_Primary.sh +executable_2.arg_1 = --primary %(primary_name)s +executable_2.arg_2 = --campaign %(release)s +executable_2.arg_3 = --scampaign %(srelease)s +executable_2.arg_4 = --pver %(release_v_dts)s +executable_2.arg_5 = --sver %(release_v_stops)s +executable_2.arg_6 = --type %(stopped)s +executable_2.arg_7 = --njobs %(njobs)s +executable_2.arg_8 = --events %(evts)s +executable_2.arg_9 = --field %(bfield)s +executable_2.arg_10 = --run %(run_number)s + +job_setup.ifdh_art = False +[stage_primary] +global.stage_name = %(primary_name)s +global.upload_parfile = True job_output_1.dest = %(logdir_bck)s/%(stage_name)s/%(desc)s/tbz/ -job_output_2.addoutput = dts.*.%(primary_name)s.*.art +job_output_2.addoutput = dts.%(submitter)s.%(stage_name)s.%(desc)s.*.art job_output_2.add_to_dataset = dts.%(submitter)s.%(primary_name)s.%(desc)s.art job_output_2.dest = %(outdir_dts_tape)s/%(stage_name)s/%(desc)s/art - global.artRoot_dataset = dts.%(submitter)s.%(stage_name)s.%(desc)s.art -submit.dataset = cnf.%(submitter)s.%(stage_name)s.%(desc)s.fcl +submit.f_1 = dropbox:////tmp/%(parfile)s submit.n_files_per_job = 1 + +submit.f_2=dropbox:////exp/mu2e/app/users/mu2epro/production_manager/run_JITfcl.py +job_setup.prescript_2 = ls -al $CONDOR_DIR_INPUT +job_setup.prescript_3 = chmod +x ${CONDOR_DIR_INPUT}/* + +executable.name = true +executable_2.name = \\\\\\\$CONDOR_DIR_INPUT/run_JITfcl.py + sam_consumer.limit = 1 sam_consumer.schema = https -job_setup.getconfig = True -job_setup.multifile = False +job_setup.getconfig = False +job_setup.multifile = True job_setup.setup_local = True +job_setup.ifdh_art = False -[stage_primaryfilter_fcl] -global.stage_name = %(primary_name)sFilter -global.desc = %(release)s%(release_v_dts)s_%(db_purpose)s -job_output.dest = %(outdir_fcl)s/%(stage_name)s/%(desc)s/fcl/ -executable.name = true -executable_2.name = gen_DTSFilter.sh -executable_2.arg_1 = --primary %(primary_name)s -executable_2.arg_2 = --campaign %(release)s -executable_2.arg_3 = --pver %(release)s%(release_v_dts)s -executable_2.arg_4 = --over %(release)s%(release_v_dts)s -executable_2.arg_5 = --dbpurpose %(db_purpose)s -executable_2.arg_6 = --dbversion %(db_version)s -executable_2.arg_7 = --field %(bfield)s -executable_2.arg_8 = --beam %(beam)s -[stage_primaryfilter] -global.stage_name = %(primary_name)sFilter -global.desc = %(release)s%(release_v_dts)s_%(db_purpose)s_%(db_version)s -job_output_1.dest = %(logdir_bck)s/%(stage_name)s/%(desc)s/tbz/ +[stage_primary_old] +global.stage_name = %(primary_name)s -job_output_2.addoutput = dts.*.%(stage_name)s.*art -job_output_2.add_to_dataset = dts.%(submitter)s.%(stage_name)s.%(desc)s.art +job_output_1.dest = %(logdir_bck)s/%(stage_name)s/%(desc)s/tbz/ +job_output_2.addoutput = dts.*.%(primary_name)s.*.art +job_output_2.add_to_dataset = dts.%(submitter)s.%(primary_name)s.%(desc)s.art job_output_2.dest = %(outdir_dts_tape)s/%(stage_name)s/%(desc)s/art -global.artRoot_dataset = dts.%(submitter)s%(stage_name)s.%(desc)s.art - -sam_consumer.schema = https +global.artRoot_dataset = dts.%(submitter)s.%(stage_name)s.%(desc)s.art submit.dataset = cnf.%(submitter)s.%(stage_name)s.%(desc)s.fcl submit.n_files_per_job = 1 sam_consumer.limit = 1 +sam_consumer.schema = https + job_setup.getconfig = True job_setup.multifile = False job_setup.setup_local = True + + [stage_primarydigi_fcl] global.stage_name = %(primary_name)s%(digitype)sDigi global.desc = %(release)s%(release_v_dig)s_%(db_purpose)s_%(digidb_version)s @@ -338,6 +363,38 @@ job_setup.multifile = False job_setup.setup_local = True +[stage_DIOtail_tar] +global.stage_name = %(primary_name)s +global.desc = %(release)s%(release_v_dts)s +job_output.dest = %(outdir_tar)s/%(stage_name)s/%(desc)s/tar/ + +job_output_7.add_to_dataset = cnf.%(submitter)s.%(primary_name)s.%(desc)s.tar +job_output_7.dest = %(outdir_tar)s/%(stage_name)s/%(desc)s/tar/ + +executable.name = true +job_setup.prescript_1 = ifdh mkdir_p %(outdir_tar)s/%(stage_name)s/%(desc)s/tar/art/ + +submit.f_1=dropbox:////exp/mu2e/app/users/mu2epro/production_manager/gen_Primary.sh +job_setup.prescript_2 = ls -al $CONDOR_DIR_INPUT +job_setup.prescript_3 = chmod +x ${CONDOR_DIR_INPUT}/* + +executable_2.name = \\\\\\\${CONDOR_DIR_INPUT}/gen_Primary.sh +executable_2.arg_1 = --primary %(primary_name)s +executable_2.arg_2 = --campaign %(release)s +executable_2.arg_3 = --scampaign %(srelease)s +executable_2.arg_4 = --pver %(release_v_dts)s +executable_2.arg_5 = --sver %(release_v_stops)s +executable_2.arg_6 = --type %(stopped)s +executable_2.arg_7 = --njobs %(njobs)s +executable_2.arg_8 = --events %(evts)s +executable_2.arg_9 = --field %(bfield)s +executable_2.arg_10 = --run %(run_number)s +executable_2.arg_11 = --start %(startmom)s +executable_2.arg_12 = --end %(endmom)s +executable_2.arg_13 = --tag %(tag)s + +job_setup.ifdh_art = False + [stage_DIOtail_fcl] global.stage_name = %(primary_name)s diff --git a/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc b/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc index 898f9f945a9ba93a2e48388c802eb858583d4306..53db480b3ef8efc5e4bd6eea77d04b3846170192 100644 GIT binary patch delta 20 acmdljy<3_)k(ZZ?0SK&l4{YS#zzYB|)dao( delta 20 acmdljy<3_)k(ZZ?0SJyP-M^8011|tM9|hh3 diff --git a/JobConfig/ensemble/python/make_template_fcl.py b/JobConfig/ensemble/python/make_template_fcl.py index 2b653a58..8ddff5f9 100755 --- a/JobConfig/ensemble/python/make_template_fcl.py +++ b/JobConfig/ensemble/python/make_template_fcl.py @@ -16,20 +16,12 @@ def main(args): - if int(args.verbose) == 1: - print(" Running SI with options : verbose ",args.verbose," BB mode ", args.BB, " livetime [s] ", args.livetime, " Rmue ", args.rue) - print(" Signals ", args.prc) - print(" tag ", args.tag) - # live time in seconds livetime = float(args.livetime) # r mue and rmup rates rue = float(args.rue) - if int(args.verbose) == 1: - print( "Rmue chosen ", rue) - dem_emin = float(args.dem_emin) tmin = float(args.tmin) run = int(args.run) @@ -78,11 +70,9 @@ def main(args): # loop over files in list for line in ffns: - print("at line ", line, "of ", signal) # find a given filename fn = line.strip() - print("striped filename ",fn) # add this filename to the list of filenames filenames[signal].append(fn) @@ -93,7 +83,7 @@ def main(args): # determine total number of events surviving all cuts reco_events += te.GetEntries() - #print(" reco events ", te.GetEntries()) + print(" reco events ", te.GetEntries()) # determine total number of events generated t = fin.Get("SubRuns") @@ -120,7 +110,7 @@ def main(args): for i in range(t.GetEntries()): t.GetEntry(i) gen_events += getattr(t,bn).product().count() - #print("total gen events ",gen_events) + print("total gen events ",gen_events) # mean is the normalized number of that event type as expected mean_gen_events = norms[signal] diff --git a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh index 8c0c1956..463537b3 100755 --- a/JobConfig/ensemble/scripts/Stage1_makeinputs.sh +++ b/JobConfig/ensemble/scripts/Stage1_makeinputs.sh @@ -11,7 +11,7 @@ exit_abnormal() { exit 1 } COSMICS="" -NJOBS=5 +NJOBS=1 LIVETIME="" #seconds DEM_EMIN=95 BB=1BB diff --git a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh index 9a2ce16b..01b96034 100755 --- a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh +++ b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh @@ -104,7 +104,7 @@ samweb list-files "dh.dataset=dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art" | h samweb list-files "dh.dataset=dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_DIO_${NJOBS}.txt samweb list-files "dh.dataset=dts.mu2e.CeMLeadingLog.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_CeMLL_${NJOBS}.txt -DSCONF=${INRELEASE}${INVERSION} +DSCONF=${OUTRELEASE}${OUTVERSION} echo "run mu2e jobdef" cmd="mu2ejobdef --desc=${TAG} --dsconf=${DSCONF} --run=${RUN} --setup ${SETUP} --sampling=1:CeMLL:filenames_CeMLL_${NJOBS}.txt --sampling=1:DIO:filenames_DIO_${NJOBS}.txt --sampling=1:CORSIKACosmic:filenames_CORSIKACosmic_${NJOBS}.txt --embed SamplingInput_sr0.fcl --verb " diff --git a/Scripts/gen_Primary.sh b/Scripts/gen_Primary.sh index 536dfae5..997c54bf 100755 --- a/Scripts/gen_Primary.sh +++ b/Scripts/gen_Primary.sh @@ -196,16 +196,26 @@ if [[ "${FLAT}" == "FlatMuDaughter" ]]; then fi # -# now generate the fcl +# now generate the par tar # -generate_fcl --dsconf=${PRIMARY_CAMPAIGN} --dsowner=${OWNER} --run-number=${RUN} --description=${PRIMARY} --events-per-job=${EVENTS} --njobs=${JOBS} \ - --embed primary.fcl --auxinput=1:physics.filters.${resampler}.fileNames:Stops.txt -for dirname in 000 001 002 003 004 005 006 007 008 009; do - if test -d $dirname; then - echo "found dir $dirname" - rm -rf ${PRIMARY}\_$dirname - mv $dirname ${PRIMARY}\_$dirname - echo "moving $dirname to ${PRIMARY}_${dirname}" - fi -done +sed -e 's|^.*/||' Stops.txt > base.txt +cmd="mu2ejobdef --embed primary.fcl --setup /cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/${PRIMARY_CAMPAIGN}/setup.sh --run-number=${RUN} --events-per-job=${EVENTS} --jobdesc ${PRIMARY} --dsconf ${PRIMARY_CAMPAIGN} --auxinput=1:physics.filters.${resampler}.fileNames:base.txt" + +echo "Running: $cmd" +$cmd + +parfile=$(ls cnf.*.tar) +# Remove cnf. +index_dataset=${parfile:4} +# Remove .0.tar +index_dataset=${index_dataset::-6} + +idx_format=$(printf "%07d" ${NJOBS}) +echo $idx +echo "Creating index definiton with size: $idx" +samweb create-definition idx_${index_dataset} "dh.dataset etc.mu2e.index.000.txt and dh.sequencer < ${idx_format}" +echo "Created definiton: idx_${index_dataset}" +samweb describe-definition idx_${index_dataset} + + diff --git a/Tests/RPCSteps.fcl b/Tests/RPCSteps.fcl index 63264d77..e5a128c1 100644 --- a/Tests/RPCSteps.fcl +++ b/Tests/RPCSteps.fcl @@ -1,7 +1,7 @@ #include "Production/JobConfig/primary/RPC.fcl" -source.firstRun: 501 #TODO -physics.filters.TargetPiStopResampler.fileNames : ["/mu2e/app/users/sophie/Offline_October/Jobs/sim.owner.PiminusStopsCat.version.sequencer.art"] +source.firstRun: 1201 +physics.filters.TargetPiStopResampler.fileNames : ["/pnfs/mu2e/tape/phy-sim/sim/mu2e/PiminusStopsCat/MDC2020t/art/bb/f9/sim.mu2e.PiminusStopsCat.MDC2020t.001201_00000290.art"] # change for Int/Ext: physics.producers.generate.RPCType : "mu2eInternalRPC" From 9edb2579246d44c3802cac14e5ad2a492d663a23 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Mon, 26 Aug 2024 09:59:12 -0500 Subject: [PATCH 07/16] all commits --- JobConfig/ensemble/python/normalizations.py | 6 ++--- JobConfig/primary/StopParticle.fcl | 1 + JobConfig/primary/StopParticleFilter.fcl | 29 +++++++++++++++++++++ JobConfig/primary/TargetPiStopPreFilter.fcl | 13 +++++++++ JobConfig/primary/prolog.fcl | 24 +++++++++++++++++ Tests/RPCSteps.fcl | 6 ++++- Tests/RunStopPiFilter.fcl | 8 ++++++ 7 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 JobConfig/primary/StopParticleFilter.fcl create mode 100644 JobConfig/primary/TargetPiStopPreFilter.fcl create mode 100644 Tests/RunStopPiFilter.fcl diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py index 917a166f..c75fdb8f 100755 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -179,7 +179,7 @@ def corsika_offspill_normalization(livetime, run_mode = '1BB'): print(f"Final stops rate pion {target_stopped_pi_per_POT}") """ -""" + def rpc_normalization(livetime, emin, tmin, internal): # calculate fraction of spectrum being generated @@ -199,7 +199,7 @@ def rpc_normalization(livetime, emin, tmin, internal): if (energy[i]-bin_width/2. >= emin): cut_norm += val[i] - geometric_stopped_pion_per_POT = 0.002484 # stops assuming infinite pion lifetime (for cd3 sim sample. in docdb-7468) + geometric_stopped_pion_per_POT = 0.00211 # SU2020 - assumes infinite pion lifetime TODO - replace with SimEff RPC_per_stopped_pion = 0.0215; # from reference, uploaded on docdb-469 internalRPC_per_RPC = 0.00690; # from reference, uploaded on docdb-717 @@ -240,7 +240,7 @@ def rpc_normalization(livetime, emin, tmin, internal): gen_events *= internalRPC_per_RPC; return gen_events -""" + def pot_to_livetime(pot): return pot / POT_per_second diff --git a/JobConfig/primary/StopParticle.fcl b/JobConfig/primary/StopParticle.fcl index 6def3e2d..c8ce07ef 100644 --- a/JobConfig/primary/StopParticle.fcl +++ b/JobConfig/primary/StopParticle.fcl @@ -16,6 +16,7 @@ physics : { producers : { @table::Common.producers @table::Primary.producers + @table::genFilters.producers } filters : { @table::Common.filters diff --git a/JobConfig/primary/StopParticleFilter.fcl b/JobConfig/primary/StopParticleFilter.fcl new file mode 100644 index 00000000..47b9e9f2 --- /dev/null +++ b/JobConfig/primary/StopParticleFilter.fcl @@ -0,0 +1,29 @@ +# original author: S Middleton +# +#include "Offline/fcl/minimalMessageService.fcl" +#include "Offline/fcl/standardProducers.fcl" +#include "Offline/fcl/standardServices.fcl" +#include "Offline/EventGenerator/fcl/prolog.fcl" +#include "Production/JobConfig/common/prolog.fcl" +#include "Production/JobConfig/primary/prolog.fcl" +#include "Production/JobConfig/pileup/prolog.fcl" +# name all processes the same, to mask any provenance in ensemble creation +process_name: StopFilter +source: { module_type : RootInput } +services : @local::Services.Sim +physics : { + + producers : { + @table::genFilters.producers + } + + filters : { + @table::genFilters.filters + } + + analyzers : { + @table::Primary.analyzers + } + +} +services.SeedService.baseSeed : @local::Common.BaseSeed diff --git a/JobConfig/primary/TargetPiStopPreFilter.fcl b/JobConfig/primary/TargetPiStopPreFilter.fcl new file mode 100644 index 00000000..fb14914b --- /dev/null +++ b/JobConfig/primary/TargetPiStopPreFilter.fcl @@ -0,0 +1,13 @@ +// +// Base configuration for prefiltering pions based on time +// original author: Sophie Middleton, 2024 +// +#include "Production/JobConfig/primary/StopParticleFilter.fcl" + +physics.StopFilterPath : [PionFilter] +physics.trigger_paths : [ StopFilterPath ] +outputs : { + StopFilterOutput : @local::StopFilter.StopFilterOutput +} +physics.EndPath : [ @sequence::StopFilter.EndSequence, StopFilterOutput ] +physics.end_paths : [ EndPath ] diff --git a/JobConfig/primary/prolog.fcl b/JobConfig/primary/prolog.fcl index 2f40cc87..52b2f4d5 100644 --- a/JobConfig/primary/prolog.fcl +++ b/JobConfig/primary/prolog.fcl @@ -187,6 +187,30 @@ Primary: { } EndSequence : [ genCountLogger ] } + +StopFilter : { + + filters : { + @table::genFilters.filters + } + KeptProducts : ["keep mu2e::*_*_*_*"] + + analyzers: { + genCountLogger: { module_type: GenEventCountReader makeHistograms: false } + } + StopFilterOutput : { + module_type : RootOutput + SelectEvents : [ StopFilterPath ] + fileName : @nil + } + + EndSequence : [ genCountLogger ] +} +# define the main sequence +StopFilter.StopFilterOutput.outputCommands : [ "drop *_*_*_*", @sequence::StopFilter.KeptProducts] +StopFilter.EndPath : [ StopFilterOutput ] + + # define the main sequence Primary.PrimarySequence : [ @sequence::Primary.DetStepSequence, PrimaryFilter, @sequence::Primary.FinalizeSequence ] Primary.PrimaryOutput.outputCommands : [ "drop *_*_*_*", diff --git a/Tests/RPCSteps.fcl b/Tests/RPCSteps.fcl index e5a128c1..a3877546 100644 --- a/Tests/RPCSteps.fcl +++ b/Tests/RPCSteps.fcl @@ -1,13 +1,17 @@ +// +// this file is for interactive tests to make RPCs from the filtered stops (fileNames) +// #include "Production/JobConfig/primary/RPC.fcl" source.firstRun: 1201 -physics.filters.TargetPiStopResampler.fileNames : ["/pnfs/mu2e/tape/phy-sim/sim/mu2e/PiminusStopsCat/MDC2020t/art/bb/f9/sim.mu2e.PiminusStopsCat.MDC2020t.001201_00000290.art"] +physics.filters.TargetPiStopResampler.fileNames : ["/pnfs/mu2e/tape/phy-sim/sim/mu2e/PiminusStopsCat/MDC2020t/art/bb/f9/sim.mu2e.PiminusStopsCat.MDC2020t.001201_00000290.art"]//"sim.tester.RPC.Test.1.art"] # change for Int/Ext: physics.producers.generate.RPCType : "mu2eInternalRPC" physics.producers.FindMCPrimary.PrimaryProcess : "mu2eInternalRPC" physics.filters.TargetPiStopResampler.mu2e.MaxEventsToSkip: 0 +physics.filters.TargetStopResampler.mu2e.MaxEventsToSkip: 0 outputs.PrimaryOutput.fileName : "dts.tester.RPC.Test.1.art" services.TFileService.fileName: "nts.owner.GenPlots.version.sequencer.root" diff --git a/Tests/RunStopPiFilter.fcl b/Tests/RunStopPiFilter.fcl new file mode 100644 index 00000000..e4f8f7aa --- /dev/null +++ b/Tests/RunStopPiFilter.fcl @@ -0,0 +1,8 @@ +//to run: mu2e -c Production/Tests/RunStopPiFilter.fcl -S pions.txt +// +// this file makes a set of filtered stops (time > 450ns is nominal) +// +#include "Production/JobConfig/primary/TargetPiStopPreFilter.fcl" + +outputs.StopFilterOutput.fileName : "sim.tester.RPC.Test.1.art" +services.TFileService.fileName: "nts.owner.FilterPlots.version.sequencer.root" From cdf3981431b80ff9105f3b3cddc592d7edaec976 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Tue, 27 Aug 2024 09:10:59 -0500 Subject: [PATCH 08/16] RPC tests finished --- JobConfig/primary/StopParticle.fcl | 1 - JobConfig/primary/StopParticleFilter.fcl | 4 ---- JobConfig/primary/prolog.fcl | 6 +++++- Tests/RPCSteps.fcl | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/JobConfig/primary/StopParticle.fcl b/JobConfig/primary/StopParticle.fcl index c8ce07ef..6def3e2d 100644 --- a/JobConfig/primary/StopParticle.fcl +++ b/JobConfig/primary/StopParticle.fcl @@ -16,7 +16,6 @@ physics : { producers : { @table::Common.producers @table::Primary.producers - @table::genFilters.producers } filters : { @table::Common.filters diff --git a/JobConfig/primary/StopParticleFilter.fcl b/JobConfig/primary/StopParticleFilter.fcl index 47b9e9f2..176345ea 100644 --- a/JobConfig/primary/StopParticleFilter.fcl +++ b/JobConfig/primary/StopParticleFilter.fcl @@ -12,10 +12,6 @@ process_name: StopFilter source: { module_type : RootInput } services : @local::Services.Sim physics : { - - producers : { - @table::genFilters.producers - } filters : { @table::genFilters.filters diff --git a/JobConfig/primary/prolog.fcl b/JobConfig/primary/prolog.fcl index 52b2f4d5..3dcb9f67 100644 --- a/JobConfig/primary/prolog.fcl +++ b/JobConfig/primary/prolog.fcl @@ -190,6 +190,10 @@ Primary: { StopFilter : { + producers : { + @table::genFilters.producers + } + filters : { @table::genFilters.filters } @@ -204,7 +208,7 @@ StopFilter : { fileName : @nil } - EndSequence : [ genCountLogger ] + EndSequence : [genCountLogger ] } # define the main sequence StopFilter.StopFilterOutput.outputCommands : [ "drop *_*_*_*", @sequence::StopFilter.KeptProducts] diff --git a/Tests/RPCSteps.fcl b/Tests/RPCSteps.fcl index a3877546..4fb9ceaf 100644 --- a/Tests/RPCSteps.fcl +++ b/Tests/RPCSteps.fcl @@ -4,7 +4,7 @@ #include "Production/JobConfig/primary/RPC.fcl" source.firstRun: 1201 -physics.filters.TargetPiStopResampler.fileNames : ["/pnfs/mu2e/tape/phy-sim/sim/mu2e/PiminusStopsCat/MDC2020t/art/bb/f9/sim.mu2e.PiminusStopsCat.MDC2020t.001201_00000290.art"]//"sim.tester.RPC.Test.1.art"] +physics.filters.TargetPiStopResampler.fileNames : ["sim.tester.RPC-pionfilter-300ns.Test.1.art"]//"sim.tester.RPC.Test.1.art"] # change for Int/Ext: physics.producers.generate.RPCType : "mu2eInternalRPC" From 508fadd7d36e63842ee06dc10ba9bc5c24c19842 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Fri, 20 Sep 2024 10:59:46 -0500 Subject: [PATCH 09/16] all work --- JobConfig/primary/prolog.fcl | 7 ++----- Scripts/CreateSimEfficiency.sh | 9 ++++++--- Tests/RPCSteps.fcl | 2 +- Tests/RunStopPiFilter.fcl | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/JobConfig/primary/prolog.fcl b/JobConfig/primary/prolog.fcl index 3dcb9f67..9e12ff10 100644 --- a/JobConfig/primary/prolog.fcl +++ b/JobConfig/primary/prolog.fcl @@ -7,7 +7,7 @@ #include "Offline/Filters/fcl/prolog.fcl" #include "Offline/Compression/fcl/prolog.fcl" #include "Offline/CommonMC/fcl/prolog.fcl" -# +#include "Offline/EventGenerator/fcl/prolog.fcl" BEGIN_PROLOG Primary: { @@ -190,13 +190,10 @@ Primary: { StopFilter : { - producers : { - @table::genFilters.producers - } - filters : { @table::genFilters.filters } + KeptProducts : ["keep mu2e::*_*_*_*"] analyzers: { diff --git a/Scripts/CreateSimEfficiency.sh b/Scripts/CreateSimEfficiency.sh index bd1a0779..5c0ad6ac 100755 --- a/Scripts/CreateSimEfficiency.sh +++ b/Scripts/CreateSimEfficiency.sh @@ -1,13 +1,16 @@ #!/usr/bin/bash # # Script to create the SimEfficiency proditions content from a beam campaign. The campaign 'configuration' field must be provided -# as the first argument (ie MDC2020j) +# stopped muon/mubeam campaign is first argument +# IPA campaign is second +# stopped pion/pibeam campaign is third # setup mu2efiletools before executing this script # rm $1_SimEff.txt mu2eGenFilterEff --out=$1_SimEff.txt --chunksize=100 sim.mu2e.MuBeamCat.$1.art sim.mu2e.EleBeamCat.$1.art sim.mu2e.NeutralsCat.$1.art \ -sim.mu2e.MuminusStopsCat.$1.art sim.mu2e.MuplusStopsCat.$1.art sim.mu2e.IPAMuminusStopsCat.$1.art \ +sim.mu2e.MuminusStopsCat.$1.art sim.mu2e.MuplusStopsCat.$1.art sim.mu2e.IPAMuminusStopsCat.$2.art \ dts.mu2e.MuBeamFlashCat.$1.art dts.mu2e.EleBeamFlashCat.$1.art dts.mu2e.NeutralsFlashCat.$1.art \ dts.mu2e.MuStopPileupCat.$1.art \ -dts.mu2e.EarlyMuBeamFlashCat.$1.art dts.mu2e.EarlyEleBeamFlashCat.$1.art dts.mu2e.EarlyNeutralsFlashCat.$1.art +dts.mu2e.EarlyMuBeamFlashCat.$1.art dts.mu2e.EarlyEleBeamFlashCat.$1.art dts.mu2e.EarlyNeutralsFlashCat.$1.art \ +sim.mu2e.PiminusStopsCat.$3.art sim.mu2e.PiTargetStops.$3.art sed -i -e 's/dts\.mu2e\.//' -e 's/sim\.mu2e\.//' -e 's/\..*\.art//' -e 's/ IOV//' $1_SimEff.txt diff --git a/Tests/RPCSteps.fcl b/Tests/RPCSteps.fcl index 4fb9ceaf..c9bc1983 100644 --- a/Tests/RPCSteps.fcl +++ b/Tests/RPCSteps.fcl @@ -4,7 +4,7 @@ #include "Production/JobConfig/primary/RPC.fcl" source.firstRun: 1201 -physics.filters.TargetPiStopResampler.fileNames : ["sim.tester.RPC-pionfilter-300ns.Test.1.art"]//"sim.tester.RPC.Test.1.art"] +physics.filters.TargetPiStopResampler.fileNames : ["sim.tester.RPC-350GT.Test.1.art"]//"sim.tester.RPC.Test.1.art"] # change for Int/Ext: physics.producers.generate.RPCType : "mu2eInternalRPC" diff --git a/Tests/RunStopPiFilter.fcl b/Tests/RunStopPiFilter.fcl index e4f8f7aa..fb9eefac 100644 --- a/Tests/RunStopPiFilter.fcl +++ b/Tests/RunStopPiFilter.fcl @@ -4,5 +4,5 @@ // #include "Production/JobConfig/primary/TargetPiStopPreFilter.fcl" -outputs.StopFilterOutput.fileName : "sim.tester.RPC.Test.1.art" +outputs.StopFilterOutput.fileName : "sim.tester.PiMinusFilter.Test.1.art" services.TFileService.fileName: "nts.owner.FilterPlots.version.sequencer.root" From 6441732bc679ca090665cc22da67f8114e26ee7b Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Fri, 20 Sep 2024 11:16:59 -0500 Subject: [PATCH 10/16] all work --- .muse | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.muse b/.muse index 8b1c4c1b..0d2f5542 100644 --- a/.muse +++ b/.muse @@ -1,2 +1,5 @@ PATH Scripts PATH Scripts/POMS +PATH JobConfig/ensemble/python +PYTHONPATH JobConfig/ensemble/python +PATH JobConfig/ensemble/scripts From 97f49872de97118d3a1bfffbc02cf83c265575d3 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Fri, 20 Sep 2024 11:22:11 -0500 Subject: [PATCH 11/16] removed pycahce --- .../__pycache__/normalizations.cpython-39.pyc | Bin 3515 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc diff --git a/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc b/JobConfig/ensemble/python/__pycache__/normalizations.cpython-39.pyc deleted file mode 100644 index 53db480b3ef8efc5e4bd6eea77d04b3846170192..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3515 zcmb_eO>87b74GWp>FF8IjO|_TkL~@>ve^moj%^`8z{c3?1Quj_wcaSA6lk@(YQ`PU zboW-*cw?&vp?I%IK|+W_knC_;2_X(Sa6%lpkpmK)cyC_RW{5cvJ(#tdWLTHsogLICaXBV*YJiov$ZkTTq@qIqVF6|I{5$$EP zm-uCNgH7Z7WRz{eKBYd4%J)7CR0xR?!=Jbl0krgJ5o}0N@am>Ix%#j8wW`!M-7?3c2 zAeAuJ88Z%g<;+qNaEE~V9;@_9tP0#3aEFh@eeZw5wQvL@%Ppv{AK{?Uy&pV`=3C$V z>-N|$zwy!B~DVh)_kj}pO5Dr|4OX?=)>&yeb}EZ)Ja~@Zcs1hZaduM3MF@O z#9k+6oVxmB+?CW;z_ilge&pR*xb3y$2h`cuDL-+bg2%dYtLXyHdkgNdKK-r#R0jZSx#H~b`NbW=E8BaM^wkT)X!V5Qk?hY@ew5i#oq67Jae zR=jpAj+$Ys!K0LS;DwE3ORnQf6pN1E4!3i;JQ;gQEHC4i=@(ELmQ7sK zCi*p9;zBCpt)cv@aWR5*bm;b-`Mw7axT)eh<+j>QFF=q69L(G?dlnql&MXOz$!rv~ za0YX^wSOuf%+*beosUajw7B$AL`cG!*Xio>#)j4lVhE7ACAwTxw4_dDJn$3Q6+G4R zK3x_^dUyA$VKsdu;NHOg+`(w7oX~*DwkgIS1z_sKN7-VcXnW2=Q1bB>JK{n7h3Ku9i1NtR?eb9TrM0m}7W8HD6y<#FRniku2c%E(4R$gFfY zUb-(qV?*$iA$SQ&uOchV!3=j&(^OW;ke^f!{!?70)umTgU-n*Gx%+Kz@%G*Ag?}F< z>zoH0UK8OYytOcj!l>oVPS1SNOSk=|h@%^Ftu2%XJW*9^ccSslhj zy}IwEcAW4iH{&$76JM_9_8V~+({Jatq5)c#vGn&{fVx3fYG=qvNXMY# zGciDG$@*3r2C2t4k&n`+V`7wr@t`|>589+xP$4MHvzi@Ta+;jgOff<#cx$F@R?Hd^ z*Dxzk0n&d40_G}4_X9=esS&sYf`-}1E$48^rlJNFJdd1Zp+Iy#5Je@qsw$~UG329z zkWoP|ls7+Z#dsjLygm;Pg!r47ovL*PEK#h6Vv0KY|G(bidB8lQAUzp3n>r~S$p}v? zJfRit&l}MAAwZwi`17B!#^QQk_kGngL7op{Tz5A7Z|H{iCm}n_?0@*?SIo;p{2#ORW3He09O>G z$ix@8u-bQ5kOJ)vI7o~Gk~)iP_u{xs9kwP_Yljh-$Hsz`7E>EUj>FW{D@8Suyst6&$}72U7l3f67&m(~E*ITmd7@m=?{{2FuOt5i`TRGa From 2364c4e1874a7d640e7e802e488e983eb8fb9949 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Fri, 20 Sep 2024 14:18:20 -0500 Subject: [PATCH 12/16] additions --- Scripts/CreateSimEfficiency.sh | 3 ++- Scripts/removezero.sh | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Scripts/removezero.sh diff --git a/Scripts/CreateSimEfficiency.sh b/Scripts/CreateSimEfficiency.sh index 5c0ad6ac..057d8131 100755 --- a/Scripts/CreateSimEfficiency.sh +++ b/Scripts/CreateSimEfficiency.sh @@ -4,6 +4,7 @@ # stopped muon/mubeam campaign is first argument # IPA campaign is second # stopped pion/pibeam campaign is third +# filtered pions campaign is fourth # setup mu2efiletools before executing this script # rm $1_SimEff.txt @@ -12,5 +13,5 @@ sim.mu2e.MuminusStopsCat.$1.art sim.mu2e.MuplusStopsCat.$1.art sim.mu2e.IPAMumin dts.mu2e.MuBeamFlashCat.$1.art dts.mu2e.EleBeamFlashCat.$1.art dts.mu2e.NeutralsFlashCat.$1.art \ dts.mu2e.MuStopPileupCat.$1.art \ dts.mu2e.EarlyMuBeamFlashCat.$1.art dts.mu2e.EarlyEleBeamFlashCat.$1.art dts.mu2e.EarlyNeutralsFlashCat.$1.art \ -sim.mu2e.PiminusStopsCat.$3.art sim.mu2e.PiTargetStops.$3.art +sim.mu2e.PiminusStopsCat.$3.art sim.mu2e.PiTargetStops.$3.art sim.mu2e.PiMinusFilter.$4.art sed -i -e 's/dts\.mu2e\.//' -e 's/sim\.mu2e\.//' -e 's/\..*\.art//' -e 's/ IOV//' $1_SimEff.txt diff --git a/Scripts/removezero.sh b/Scripts/removezero.sh new file mode 100644 index 00000000..db2dc086 --- /dev/null +++ b/Scripts/removezero.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +#file loops over set of files and removes datasets with 0 events + +while IFS='= ' read -r col1 +do + tester=$( ./../build/al9-prof-e28-p057/Offline/bin/eventCount ${col1}) + echo ${tester} >> output_pions-350ns-1merge.txt +done < 350ns-1merge.txt + + +while IFS='= ' read -r r1 r2 r3 r4 r5 +do + if [[ "${r5}" != "0" ]] ; then + echo ${r1} >> output_pions-350ns-1merge-no0_fnal.txt + #echo ${r5} >> sum_it.txt + fi +done < output_pions-350ns-1merge.txt + +#echo "total " awk '{s+=$1} END {print s}' sum_it.txt + + From 682cac903da554d318fcd19a9affc3bc57a72469 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Mon, 23 Sep 2024 13:32:43 -0500 Subject: [PATCH 13/16] new scripts --- Scripts/CreatePionEfficency.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Scripts/CreatePionEfficency.sh diff --git a/Scripts/CreatePionEfficency.sh b/Scripts/CreatePionEfficency.sh new file mode 100644 index 00000000..86ce1eb4 --- /dev/null +++ b/Scripts/CreatePionEfficency.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash +# +# Script to create the SimEfficiency proditions content from a beam campaign. The campaign 'configuration' field must be provided +# stopped pion campaign is the argument +rm $1_SimEff.txt +mu2eGenFilterEff --out=$1_SimEff.txt --chunksize=100 +sim.mu2e.PiminusStopsCat.$1.art sim.mu2e.PiTargetStops.$1.art sim.mu2e.PiMinusFilter.$1.art +sed -i -e 's/dts\.mu2e\.//' -e 's/sim\.mu2e\.//' -e 's/\..*\.art//' -e 's/ IOV//' $1_SimEff.txt From e0decb1d2e52a5024776922f7ce03795ebabd19f Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Thu, 3 Oct 2024 10:23:44 -0500 Subject: [PATCH 14/16] removed pions from sim eff --- Scripts/CreateSimEfficiency.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Scripts/CreateSimEfficiency.sh b/Scripts/CreateSimEfficiency.sh index 057d8131..20a3b3d7 100755 --- a/Scripts/CreateSimEfficiency.sh +++ b/Scripts/CreateSimEfficiency.sh @@ -12,6 +12,5 @@ mu2eGenFilterEff --out=$1_SimEff.txt --chunksize=100 sim.mu2e.MuBeamCat.$1.art s sim.mu2e.MuminusStopsCat.$1.art sim.mu2e.MuplusStopsCat.$1.art sim.mu2e.IPAMuminusStopsCat.$2.art \ dts.mu2e.MuBeamFlashCat.$1.art dts.mu2e.EleBeamFlashCat.$1.art dts.mu2e.NeutralsFlashCat.$1.art \ dts.mu2e.MuStopPileupCat.$1.art \ -dts.mu2e.EarlyMuBeamFlashCat.$1.art dts.mu2e.EarlyEleBeamFlashCat.$1.art dts.mu2e.EarlyNeutralsFlashCat.$1.art \ -sim.mu2e.PiminusStopsCat.$3.art sim.mu2e.PiTargetStops.$3.art sim.mu2e.PiMinusFilter.$4.art +dts.mu2e.EarlyMuBeamFlashCat.$1.art dts.mu2e.EarlyEleBeamFlashCat.$1.art dts.mu2e.EarlyNeutralsFlashCat.$1.art sed -i -e 's/dts\.mu2e\.//' -e 's/sim\.mu2e\.//' -e 's/\..*\.art//' -e 's/ IOV//' $1_SimEff.txt From 6d1615bc80dbf0350305422c5aba18cdf649ae0c Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Thu, 3 Oct 2024 15:31:47 -0500 Subject: [PATCH 15/16] updated script --- .../ensemble/python/make_template_fcl.py | 6 ++- JobConfig/ensemble/python/normalizations.py | 11 +++--- .../ensemble/scripts/Stage2_submitensemble.sh | 37 ++++++++++--------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/JobConfig/ensemble/python/make_template_fcl.py b/JobConfig/ensemble/python/make_template_fcl.py index 8ddff5f9..6b4420a9 100755 --- a/JobConfig/ensemble/python/make_template_fcl.py +++ b/JobConfig/ensemble/python/make_template_fcl.py @@ -83,7 +83,8 @@ def main(args): # determine total number of events surviving all cuts reco_events += te.GetEntries() - print(" reco events ", te.GetEntries()) + if int(args.verbose) == 2: + print(" reco events ", te.GetEntries()) # determine total number of events generated t = fin.Get("SubRuns") @@ -110,7 +111,8 @@ def main(args): for i in range(t.GetEntries()): t.GetEntry(i) gen_events += getattr(t,bn).product().count() - print("total gen events ",gen_events) + if int(args.verbose) == 2: + print("total gen events ",gen_events) # mean is the normalized number of that event type as expected mean_gen_events = norms[signal] diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py index c75fdb8f..910bcf1d 100755 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -199,13 +199,12 @@ def rpc_normalization(livetime, emin, tmin, internal): if (energy[i]-bin_width/2. >= emin): cut_norm += val[i] - geometric_stopped_pion_per_POT = 0.00211 # SU2020 - assumes infinite pion lifetime TODO - replace with SimEff + geometric_stopped_pion_per_POT = 0.00211 # TODO - will be replaced by new sim efficiency RPC_per_stopped_pion = 0.0215; # from reference, uploaded on docdb-469 internalRPC_per_RPC = 0.00690; # from reference, uploaded on docdb-717 # calculate survival probability for tmin including smearing of POT - # ConditionsService/data/potTimingDistribution_20160511.txt, sampled by GenerateProtonTimes_module.cc pot = open(os.path.join(os.environ["MUSE_WORK_DIR"],"Production/JobConfig/ensemble/POTspectrum.tbl")) time = [] cdf = [] @@ -216,8 +215,8 @@ def rpc_normalization(livetime, emin, tmin, internal): cdf[i] += cdf[i+1] for i in range(len(cdf)-1,-1,-1): cdf[i] /= cdf[0] - # TODO this needs to be updated for MDC2020 - f = ROOT.TFile("/cvmfs/mu2e.opensciencegrid.org/DataFiles/mergedMuonStops/nts.mu2e.pion-DS-TGTstops.MDC2018a.001002_00000000.root"); + + f = ROOT.TFile("/cvmfs/mu2e.opensciencegrid.org/DataFiles/mergedMuonStops/nts.mu2e.pion-DS-TGTstops.MDC2018a.001002_00000000.root"); #TODO - need to get this from the art files... d = f.Get("stoppedPionDumper"); t = d.Get("stops"); total = 0; @@ -226,9 +225,9 @@ def rpc_normalization(livetime, emin, tmin, internal): # print i,t.GetEntries(),i/float(t.GetEntries()) t.GetEntry(i) index = int(tmin - t.time-time[0]) - if (index < 0): + if (index < 0): # if before tmin total += math.exp(-t.tauNormalized); - elif (index < len(time)-1): + elif (index < len(time)-1): # if total += math.exp(-t.tauNormalized)*cdf[index]; avg_survival_prob = total/t.GetEntries(); diff --git a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh index 01b96034..f25334e1 100755 --- a/JobConfig/ensemble/scripts/Stage2_submitensemble.sh +++ b/JobConfig/ensemble/scripts/Stage2_submitensemble.sh @@ -10,12 +10,12 @@ exit_abnormal() { exit 1 } -INRELEASE=MDC2024 -INVERSION=a_sm4 +INRELEASE=MDC2020 +INVERSION=ai PRC="" TAG="" # MDS1a VERBOSE=1 -SETUP=/cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2020af/setup.sh +SETUP=/cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2020ai/setup.sh # Loop: Get the next option; @@ -55,9 +55,10 @@ TMIN=450 SAMPLINGSEED=1 BB="" RMUE="" +COSMICTAG="MDC2020ae" CONFIG=${TAG}.txt OUTRELEASE="MDC2020" -OUTVERSION="ag" +OUTVERSION="ai" while IFS='= ' read -r col1 col2 do if [[ "${col1}" == "njobs" ]] ; then @@ -80,13 +81,14 @@ echo "extracted config from Stage 1" echo ${LIVETIME} ${DEM_EMIN} ${BB} ${RMUE} -rm filenames_CORSIKACosmic -rm filenames_DIO -rm filenames_CeMLL +#rm filenames_CORSIKACosmic +#rm filenames_DIO +#rm filenames_CeMLL +rm *.tar echo "accessing files, making file lists" -mu2eDatasetFileList "dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art" | head -${NJOBS} > filenames_CORSIKACosmic -mu2eDatasetFileList "dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${INRELEASE}${INVERSION}.art"| head -${NJOBS} > filenames_DIO +mu2eDatasetFileList "dts.mu2e.CosmicCORSIKASignalAll.${COSMICTAG}.art" | head -${NJOBS} > filenames_CORSIKACosmic +mu2eDatasetFileList "dts.mu2e.DIOtail_${DEM_EMIN}.${INRELEASE}${INVERSION}.art"| head -${NJOBS} > filenames_DIO mu2eDatasetFileList "dts.mu2e.CeMLeadingLog.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_CeMLL echo "making template fcl" @@ -94,23 +96,22 @@ make_template_fcl.py --BB=${BB} --release=${OUTRELEASE}${OUTVERSION} --tag=${TA ##### Below is genEnsemble and Grid: echo "remove old files" -rm cnf.sophie.ensemble.${INRELEASE}${INVERSION}.0.tar +rm cnf.sophie.ensemble${TAG}.${INRELEASE}${INVERSION}.0.tar rm filenames_CORSIKACosmic_${NJOBS}.txt rm filenames_DIO_${NJOBS}.txt rm filenames_CeMLL_${NJOBS}.txt echo "get NJOBS files and list" -samweb list-files "dh.dataset=dts.mu2e.CosmicCORSIKASignalAll.MDC2020ae.art" | head -${NJOBS} > filenames_CORSIKACosmic_${NJOBS}.txt -samweb list-files "dh.dataset=dts.mu2e.DIOtailp${DEM_EMIN}MeVc.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_DIO_${NJOBS}.txt +samweb list-files "dh.dataset=dts.mu2e.CosmicCORSIKASignalAll.${COSMICTAG}.art" | head -${NJOBS} > filenames_CORSIKACosmic_${NJOBS}.txt +samweb list-files "dh.dataset=dts.mu2e.DIOtail_${DEM_EMIN}.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_DIO_${NJOBS}.txt samweb list-files "dh.dataset=dts.mu2e.CeMLeadingLog.${INRELEASE}${INVERSION}.art" | head -${NJOBS} > filenames_CeMLL_${NJOBS}.txt DSCONF=${OUTRELEASE}${OUTVERSION} echo "run mu2e jobdef" -cmd="mu2ejobdef --desc=${TAG} --dsconf=${DSCONF} --run=${RUN} --setup ${SETUP} --sampling=1:CeMLL:filenames_CeMLL_${NJOBS}.txt --sampling=1:DIO:filenames_DIO_${NJOBS}.txt --sampling=1:CORSIKACosmic:filenames_CORSIKACosmic_${NJOBS}.txt --embed SamplingInput_sr0.fcl --verb " +cmd="mu2ejobdef --desc=ensemble${TAG} --dsconf=${DSCONF} --run=${RUN} --setup ${SETUP} --sampling=1:CeMLL:filenames_CeMLL_${NJOBS}.txt --sampling=1:DIO:filenames_DIO_${NJOBS}.txt --sampling=1:CORSIKACosmic:filenames_CORSIKACosmic_${NJOBS}.txt --embed SamplingInput_sr0.fcl --verb " echo "Running: $cmd" $cmd - parfile=$(ls cnf.*.tar) # Remove cnf. index_dataset=${parfile:4} @@ -125,7 +126,7 @@ samweb create-definition idx_${index_dataset} "dh.dataset etc.mu2e.index.000.txt echo "Created definiton: idx_${index_dataset}" samweb describe-definition idx_${index_dataset} -#echo "submit jobs" -#cmd="mu2ejobsub --jobdef cnf.sophie.ensemble.${INRELEASE}${INVERSION}.0.tar --firstjob=0 --njobs=${NJOBS} --predefined=sl7 --default-protocol ifdh --default-location tape" -#echo "Running: $cmd" -#$cmd +echo "submit jobs" +cmd="mu2ejobsub --jobdef cnf.sophie.ensemble${TAG}.${INRELEASE}${INVERSION}.0.tar --firstjob=0 --njobs=${NJOBS} --predefined=sl7 --default-protocol ifdh --default-location tape" +echo "Running: $cmd" +$cmd From 93588d4dfcd5329cf141425461461d85a4847c80 Mon Sep 17 00:00:00 2001 From: sophieMu2e Date: Fri, 4 Oct 2024 09:06:03 -0500 Subject: [PATCH 16/16] fixed missing eqal --- JobConfig/ensemble/python/normalizations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JobConfig/ensemble/python/normalizations.py b/JobConfig/ensemble/python/normalizations.py index 910bcf1d..73c36d06 100755 --- a/JobConfig/ensemble/python/normalizations.py +++ b/JobConfig/ensemble/python/normalizations.py @@ -112,7 +112,7 @@ def dio_normalization(livetime, emin, run_mode = '1BB'): physics_events = POT * target_stopped_mu_per_POT * DIO_per_stopped_muon #print(f"Expected DIO {physics_events* cut_norm/total_norm}") - print("DIOfrac",cut_norm/total_norm) + print("DIOfrac=",cut_norm/total_norm) return physics_events * cut_norm/total_norm