-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45950 from patinkaew/scouting_nano_test_14_0_15
[14_0_X] Backport of 44970 and 45820 (ScoutingNano event content changes for 2024 and T0 scenario for HLTSCOUT datatier)
- Loading branch information
Showing
11 changed files
with
259 additions
and
28 deletions.
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
Configuration/DataProcessing/python/Impl/hltScouting.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
_hltScouting_ | ||
Scenario supporting proton collisions with input HLT scouting data | ||
""" | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
import sys | ||
|
||
from Configuration.DataProcessing.Scenario import * | ||
from Configuration.DataProcessing.Utils import stepSKIMPRODUCER, addMonitoring, dictIO, nanoFlavours, gtNameAndConnect | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
import warnings | ||
|
||
class hltScouting(Scenario): | ||
def __init__(self): | ||
Scenario.__init__(self) | ||
self.recoSeq = '' | ||
self.cbSc = 'pp' | ||
self.isRepacked = False | ||
self.promptCustoms = ['Configuration/DataProcessing/RecoTLR.customisePrompt'] | ||
self.promptModifiers = cms.ModifierChain() | ||
""" | ||
_hltScouting_ | ||
Implement configuration building for data processing for proton | ||
collision data taking with input HLT scouting data | ||
""" | ||
|
||
def promptReco(self, globalTag, **args): | ||
""" | ||
_promptReco_ | ||
Proton collision data taking prompt reco with input HLT scouting data | ||
""" | ||
|
||
options = Options() | ||
options.__dict__.update(defaultOptions.__dict__) | ||
options.scenario = self.cbSc | ||
|
||
if 'nThreads' in args: | ||
options.nThreads = args['nThreads'] | ||
|
||
PhysicsSkimStep = '' | ||
if 'PhysicsSkims' in args: | ||
PhysicsSkimStep = stepSKIMPRODUCER(args['PhysicsSkims']) | ||
|
||
miniAODStep = '' | ||
nanoAODStep = '' | ||
|
||
if 'outputs' in args: | ||
outputs = [] | ||
for a in args['outputs']: | ||
if a['dataTier'] in ['NANOAOD', 'NANOEDMAOD']: | ||
if 'nanoFlavours' in args: | ||
for nanoFlavour in args['nanoFlavours']: | ||
if nanoFlavour != '@Scout': | ||
warnings.warn('nanoFlavour: ' + nanoFlavour + 'is currently not supported and will be removed from outputs. Only supported nanoFlavour is @Scout') | ||
args['nanoFlavours'] = ['@Scout'] | ||
nanoAODStep = ',NANO' + nanoFlavours(args['nanoFlavours']) | ||
else: | ||
nanoAODStep = ',NANO:@Scout' # default to Scouting NANO | ||
outputs.append(a) | ||
else: | ||
warnings.warn('dataTier:' + str(a['dataTier']) + ' is currently not supported and will be removed from outputs') | ||
if {output['dataTier'] for output in outputs} != {a['dataTier'] for a in args['outputs']}: | ||
warnings.warn('The outputs will be changed from ' + str(args['outputs']) + ' to' + str(outputs)) | ||
args['outputs'] = outputs | ||
|
||
if not 'customs' in args: | ||
args['customs'] = [] | ||
|
||
for c in self.promptCustoms: | ||
args['customs'].append(c) | ||
options.customisation_file = args['customs'] | ||
|
||
options.isRepacked = args.get('repacked', self.isRepacked) | ||
|
||
options.step = '' | ||
options.step += self.recoSeq + PhysicsSkimStep | ||
options.step += miniAODStep + nanoAODStep | ||
|
||
dictIO(options, args) | ||
options.conditions = gtNameAndConnect(globalTag, args) | ||
|
||
process = cms.Process('HLTSCOUT', cms.ModifierChain(self.eras, self.promptModifiers)) | ||
cb = ConfigBuilder(options, process = process, with_output = True) | ||
|
||
# Input source | ||
process.source = cms.Source("PoolSource", | ||
fileNames = cms.untracked.vstring() | ||
) | ||
|
||
cb.prepare() | ||
|
||
addMonitoring(process) | ||
|
||
return process |
26 changes: 26 additions & 0 deletions
26
Configuration/DataProcessing/python/Impl/hltScoutingEra_Run3_2024.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
_hltScoutingEra_Run3_2024_ | ||
Scenario supporting proton collisions with input HLT scouting data for 2024 | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
from Configuration.Eras.Era_Run3_2024_cff import Run3_2024 | ||
from Configuration.DataProcessing.Impl.hltScouting import hltScouting | ||
|
||
class hltScoutingEra_Run3_2024(hltScouting): | ||
def __init__(self): | ||
hltScouting.__init__(self) | ||
self.recoSeq = '' | ||
self.cbSc = 'pp' | ||
self.eras = Run3_2024 | ||
self.promptCustoms += ['Configuration/DataProcessing/RecoTLR.customisePostEra_Run3_2024'] | ||
""" | ||
_hltScoutingEra_Run3_2024_ | ||
Implement configuration building for data processing for proton | ||
collision data taking with input HLT scouting data for Era_Run3_2024 | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Test suite for various ConfigDP scenarios | ||
# run using: scram build runtests | ||
# feel free to contribute with your favourite configuration | ||
|
||
|
||
# Pass in name and status | ||
function die { echo $1: status $2 ; exit $2; } | ||
|
||
function runTest { echo $1 ; python3 $1 || die "Failure for configuration: $1" $?; } | ||
|
||
declare -a arr=("hltScoutingEra_Run3_2024") | ||
for scenario in "${arr[@]}" | ||
do | ||
runTest "${SCRAM_TEST_PATH}/RunPromptReco.py --scenario $scenario --nanoaod --global-tag GLOBALTAG --lfn=/store/whatever --nanoFlavours=@Scout" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Configuration/Eras/python/Modifier_run3_scouting_nanoAOD_post2023_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
run3_scouting_nanoAOD_post2023 = cms.Modifier() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.