Skip to content

Commit

Permalink
Merge pull request #37728 from drkovalskyi/nanoaod_prompt
Browse files Browse the repository at this point in the history
added NanoAOD to PromptReco
  • Loading branch information
cmsbuild authored May 2, 2022
2 parents d8a5096 + 5a4da5e commit 303dd5e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
14 changes: 10 additions & 4 deletions Configuration/DataProcessing/python/Reco.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ def promptReco(self, globalTag, **args):
if ('nThreads' in args) :
options.nThreads=args['nThreads']

miniAODStep=''
miniAODStep = ''
nanoAODStep = ''

# if miniAOD is asked for - then retrieve the miniaod config
if 'outputs' in args:
print(args['outputs'])
for a in args['outputs']:
if a['dataTier'] == 'MINIAOD':
miniAODStep=',PAT'
miniAODStep = ',PAT'
if a['dataTier'] in ['NANOAOD', 'NANOEDMAOD']:
nanoAODStep = ',NANO'

self._checkRepackedFlag(options, **args)

Expand All @@ -74,7 +77,10 @@ def promptReco(self, globalTag, **args):

eiStep=''

options.step = 'RAW2DIGI,L1Reco,RECO'+self.recoSeq+eiStep+step+PhysicsSkimStep+miniAODStep+',DQM'+dqmStep+',ENDJOB'
options.step = 'RAW2DIGI,L1Reco,RECO'
options.step += self.recoSeq + eiStep + step + PhysicsSkimStep
options.step += miniAODStep + nanoAODStep
options.step += ',DQM' + dqmStep + ',ENDJOB'

dictIO(options,args)
options.conditions = gtNameAndConnect(globalTag, args)
Expand Down
9 changes: 8 additions & 1 deletion Configuration/DataProcessing/test/RunPromptReco.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def __init__(self):
self.writeRECO = False
self.writeAOD = False
self.writeMINIAOD = False
self.writeNANOAOD = False
self.writeDQM = False
self.writeDQMIO = False
self.noOutput = False
Expand Down Expand Up @@ -65,6 +66,9 @@ def __call__(self):
if self.writeMINIAOD:
dataTiers.append("MINIAOD")
print("Configuring to Write out MiniAOD")
if self.writeNANOAOD:
dataTiers.append("NANOAOD")
print("Configuring to Write out NanoAOD")
if self.writeDQM:
dataTiers.append("DQM")
print("Configuring to Write out DQM")
Expand Down Expand Up @@ -143,7 +147,7 @@ def __call__(self):


if __name__ == '__main__':
valid = ["scenario=", "reco", "aod", "miniaod","dqm", "dqmio", "no-output", "nThreads=",
valid = ["scenario=", "reco", "aod", "miniaod", "nanoaod", "dqm", "dqmio", "no-output", "nThreads=",
"global-tag=", "lfn=", "alcarecos=", "PhysicsSkims=", "dqmSeq=", "isRepacked", "isNotRepacked" ]
usage = \
"""
Expand All @@ -153,6 +157,7 @@ def __call__(self):
--reco (to enable RECO output)
--aod (to enable AOD output)
--miniaod (to enable MiniAOD output)
--nanoaod (to enable NanoAOD output)
--dqm (to enable DQM output)
--dqmio (to enable DQMIO output)
--isRepacked --isNotRepacked (to override default repacked flags)
Expand Down Expand Up @@ -187,6 +192,8 @@ def __call__(self):
recoinator.writeAOD = True
if opt == "--miniaod":
recoinator.writeMINIAOD = True
if opt == "--nanoaod":
recoinator.writeNANOAOD = True
if opt == "--dqm":
recoinator.writeDQM = True
if opt == "--dqmio":
Expand Down
7 changes: 7 additions & 0 deletions Configuration/DataProcessing/test/run_CfgTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ do
runTest "${LOCAL_TEST_DIR}/RunPromptReco.py --scenario $scenario --reco --aod --dqmio --global-tag GLOBALTAG --lfn=/store/whatever --alcareco TkAlMinBias+SiStripCalMinBias --PhysicsSkim=@SingleMuon"
done

declare -a arr=("ppEra_Run3")
for scenario in "${arr[@]}"
do
runTest "${LOCAL_TEST_DIR}/RunPromptReco.py --scenario $scenario --reco --aod --miniaod --nanoaod --dqmio --global-tag GLOBALTAG --lfn=/store/whatever --alcareco TkAlMinBias+SiStripCalMinBias"
done


runTest "${LOCAL_TEST_DIR}/RunExpressProcessing.py --scenario AlCaTestEnable --global-tag GLOBALTAG --lfn /store/whatever --alcareco PromptCalibProdEcalPedestals "
runTest "${LOCAL_TEST_DIR}/RunAlcaSkimming.py --scenario AlCaTestEnable --lfn=/store/whatever --global-tag GLOBALTAG --skims PromptCalibProdEcalPedestals"
runTest "${LOCAL_TEST_DIR}/RunAlcaHarvesting.py --scenario AlCaTestEnable --lfn /store/whatever --dataset /A/B/C --global-tag GLOBALTAG --alcapromptdataset=PromptCalibProdEcalPedestals"
Expand Down

0 comments on commit 303dd5e

Please sign in to comment.