Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options to the produceSkeletons script to enable V11 #87

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions SubmitHGCalPGun.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def createParser():
parser.add_option('', '--storePFCandidates', action='store_true', dest='storePFCandidates', default=False, help='store PFCandidates collection')
parser.add_option('', '--multiClusterTag', action='store', dest='MULTICLUSTAG', default="hgcalMultiClusters", help='name of HGCalMultiCluster InputTag - use hgcalLayerClusters before CMSSW_10_3_X')
parser.add_option('', '--keepDQMfile', action='store_true', dest='DQM', default=False, help='store the DQM file in relevant folder locally or in EOS, default is False.')
parser.add_option('', '--useT3', action='store_true', dest='useT3', default=False, help='use the t3-specific share of the CERN HTCondor; adds a line to the condor .sub file')

return parser

Expand Down Expand Up @@ -129,10 +130,10 @@ def parseOptions(parser=None, opt=None):


### processing the external os commands
def processCmd(cmd, quite = 0):
def processCmd(cmd, quiet = 0):
#print cmd
status, output = commands.getstatusoutput(cmd)
if (status !=0 and not quite):
if (status !=0 and not quiet):
print 'Error in processing command:\n ['+cmd+']'
print 'Output:\n ['+output+'] \n'
return output
Expand Down Expand Up @@ -163,6 +164,8 @@ def printSetup(opt, CMSSW_BASE, CMSSW_VERSION, SCRAM_ARCH, currentDir, outDir):
print 'OUTPUT DIR: ', outDir
print 'QUEUE: ', opt.QUEUE
print ['NUM. EVTS: '+str(opt.NEVTS), ''][int(opt.DTIER!='GSD')]
if opt.useT3:
print 'CONDOR: using the T3 condor group for the submissions'
print '--------------------'

### prepare the list of input GSD files for RECO stage
Expand Down Expand Up @@ -249,6 +252,7 @@ def submitHGCalProduction(*args, **kwargs):
elif (opt.DTIER == 'GSD'):
outDir = "_".join([partGunType, tag]).replace(":", "_")
if (not os.path.isdir(outDir)):
# GF: option to send the logs in eos...
processCmd('mkdir -p '+outDir+'/cfg/')
processCmd('mkdir -p '+outDir+'/std/')
processCmd('mkdir -p '+outDir+'/jobs/')
Expand Down Expand Up @@ -299,7 +303,7 @@ def submitHGCalProduction(*args, **kwargs):
print '[Submitting jobs]'
jobCount=0

# read the template file in a single string
# read the CMSSW .py template file in a single string
f_template= open(opt.CONFIGFILE, 'r')
template= f_template.read()
f_template.close()
Expand Down Expand Up @@ -413,6 +417,8 @@ def submitHGCalProduction(*args, **kwargs):

write_condorjob= open(outDir+'/jobs/'+jobfile, 'w')
write_condorjob.write('+JobFlavour = "'+opt.QUEUE+'" \n\n')
if opt.useT3:
write_condorjob.write('+AccountingGroup = "group_u_CMST3.all"\n')
write_condorjob.write('executable = '+currentDir+'/SubmitFileGSD.sh \n')
write_condorjob.write('arguments = $(ClusterID) $(ProcId) '+currentDir+' '+outDir+' '+cfgfile+' '+str(opt.LOCAL)+' '+CMSSW_VERSION+' '+CMSSW_BASE+' '+SCRAM_ARCH+' '+opt.eosArea+' '+opt.DTIER+' '+str(opt.DQM)+'\n')
write_condorjob.write('output = '+outDir+'/std/'+basename+'.out \n')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ action() {
local geometry="Extended2026D41"
local pileup_input="das:/RelValMinBias_14TeV/CMSSW_10_6_0_patch2-106X_upgrade2023_realistic_v3_2023D41noPU-v1/GEN-SIM"
local custom=""
local conditions="auto:phase2_realistic"

# parse arguments
for arg in "$@"; do
Expand All @@ -51,6 +52,9 @@ action() {
elif [[ $arg =~ ^"custom" ]]; then
custom=${arg/custom=/}
echo "Custom options $custom"
elif [[ $arg =~ "conditions" ]]; then
conditions=${arg/conditions=/}
echo "Global tag modified to: $conditions"
elif [[ $arg =~ ^"pileup_input" ]]; then
pileup_input=${arg/pileup_input=/}
#if das is not given try to build the list of files by listing the local directory given
Expand All @@ -66,7 +70,7 @@ action() {
done

cmsDriver.py TTbar_14TeV_TuneCUETP8M1_cfi \
--conditions auto:phase2_realistic \
--conditions ${conditions} \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
Expand All @@ -82,7 +86,7 @@ action() {


cmsDriver.py step3 \
--conditions auto:phase2_realistic \
--conditions ${conditions} \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT,DQM \
Expand All @@ -107,7 +111,7 @@ action() {


cmsDriver.py step3 \
--conditions auto:phase2_realistic \
--conditions ${conditions} \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
Expand Down
27 changes: 21 additions & 6 deletions templates/python/produceSkeletons_D41_NoSmear_noPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,25 @@
action() {
# default arguments
local inject_ticl="1"
local geometry="Extended2026D41"
local custom=""
local conditions="auto:phase2_realistic"

# parse arguments
for arg in "$@"; do
if [ "$arg" = "ticl" ]; then
inject_ticl="1"
elif [ "$arg" = "no-ticl" ]; then
inject_ticl="0"
elif [[ $arg =~ "geometry" ]]; then
geometry=${arg/geometry=/}
echo "Geometry modified to: $geometry"
elif [[ $arg =~ "custom" ]]; then
custom=${arg/custom=/}
echo "Custom options (full command needed): $custom"
elif [[ $arg =~ "conditions" ]]; then
conditions=${arg/conditions=/}
echo "Global tag modified to: $conditions"
else
2>&1 echo "unknown argument: $arg"
return "1"
Expand All @@ -48,27 +60,29 @@ action() {


cmsDriver.py SinglePiPt25Eta1p7_2p7_cfi \
--conditions auto:phase2_realistic \
--conditions ${conditions} \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
-s GEN,SIM,DIGI:pdigi_valid,L1,L1TrackTrigger,DIGI2RAW,HLT:@fake2 \
--datatier GEN-SIM \
--beamspot NoSmear \
--geometry Extended2026D41 \
${custom} \
--geometry ${geometry} \
--no_exec \
--python_filename=GSD_fragment.py


cmsDriver.py step3 \
--conditions auto:phase2_realistic \
--conditions ${conditions} \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT,DQM \
--runUnscheduled \
-s RAW2DIGI,L1Reco,RECO,RECOSIM,VALIDATION:@phase2Validation,DQM:@phase2 \
--datatier GEN-SIM-RECO,DQMIO \
--geometry Extended2026D41 \
${custom} \
--geometry ${geometry} \
--no_exec \
--python_filename=RECO_fragment.py

Expand All @@ -86,14 +100,15 @@ action() {


cmsDriver.py step3 \
--conditions auto:phase2_realistic \
--conditions ${conditions} \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
--runUnscheduled \
-s RAW2DIGI,L1Reco,RECO,RECOSIM \
--datatier GEN-SIM-RECO \
--geometry Extended2026D41 \
${custom} \
--geometry ${geometry} \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
Expand Down