From bc4b0ece92186f99d9aa8a15a47034b5d8f0b134 Mon Sep 17 00:00:00 2001 From: Patin Inkaew Date: Sat, 7 Sep 2024 14:23:44 +0200 Subject: [PATCH 1/6] introduce run3_scouting_nanoAOD_post2023 modifier and add it to Run3_2024 --- Configuration/Eras/python/Era_Run3_2024_cff.py | 3 ++- .../Eras/python/Modifier_run3_scouting_nanoAOD_post2023_cff.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 Configuration/Eras/python/Modifier_run3_scouting_nanoAOD_post2023_cff.py diff --git a/Configuration/Eras/python/Era_Run3_2024_cff.py b/Configuration/Eras/python/Era_Run3_2024_cff.py index fec4b81b1ddfb..0942fc2cad206 100644 --- a/Configuration/Eras/python/Era_Run3_2024_cff.py +++ b/Configuration/Eras/python/Era_Run3_2024_cff.py @@ -2,5 +2,6 @@ from Configuration.Eras.Era_Run3_cff import Run3 from Configuration.Eras.Modifier_run3_2024_L1T_cff import run3_2024_L1T +from Configuration.Eras.Modifier_run3_scouting_nanoAOD_post2023_cff import run3_scouting_nanoAOD_post2023 -Run3_2024 = cms.ModifierChain(Run3, run3_2024_L1T) +Run3_2024 = cms.ModifierChain(Run3, run3_2024_L1T, run3_scouting_nanoAOD_post2023) diff --git a/Configuration/Eras/python/Modifier_run3_scouting_nanoAOD_post2023_cff.py b/Configuration/Eras/python/Modifier_run3_scouting_nanoAOD_post2023_cff.py new file mode 100644 index 0000000000000..b7606c383dd13 --- /dev/null +++ b/Configuration/Eras/python/Modifier_run3_scouting_nanoAOD_post2023_cff.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +run3_scouting_nanoAOD_post2023 = cms.Modifier() From 279fcb05fabde806b98c12c3ca90d573c1125861 Mon Sep 17 00:00:00 2001 From: Patin Inkaew Date: Sat, 7 Sep 2024 14:33:31 +0200 Subject: [PATCH 2/6] Change ScoutingNano event content: add ScoutingMuonNoVtx and ScoutingMuonVtx for Run3_2024, drop scouting PF candidates, drop scouting tracks, add scouting PF jets (clustered at HLT), remove remove tasks related to TrigObj table, change _lambda to lambda_ for ScoutingTrack, change branch names and docs for jets to clarity, fix typo particlenet_uds to particleNet_uds, fix incorrect orders of particleNet branches in reclustered AK8 jets --- .../SimpleScoutingFlatTableProducerPlugins.cc | 4 + .../NanoAOD/python/custom_run3scouting_cff.py | 25 +++--- .../NanoAOD/python/run3scouting_cff.py | 77 ++++++++++++++++--- 3 files changed, 83 insertions(+), 23 deletions(-) diff --git a/PhysicsTools/NanoAOD/plugins/SimpleScoutingFlatTableProducerPlugins.cc b/PhysicsTools/NanoAOD/plugins/SimpleScoutingFlatTableProducerPlugins.cc index 9f586eda01ed9..4e7afe4cd2757 100644 --- a/PhysicsTools/NanoAOD/plugins/SimpleScoutingFlatTableProducerPlugins.cc +++ b/PhysicsTools/NanoAOD/plugins/SimpleScoutingFlatTableProducerPlugins.cc @@ -15,9 +15,13 @@ typedef SimpleFlatTableProducer SimpleRun3ScoutingElectron #include "DataFormats/Scouting/interface/Run3ScoutingTrack.h" typedef SimpleFlatTableProducer SimpleRun3ScoutingTrackFlatTableProducer; +#include "DataFormats/Scouting/interface/Run3ScoutingPFJet.h" +typedef SimpleFlatTableProducer SimpleRun3ScoutingPFJetFlatTableProducer; + #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE(SimpleRun3ScoutingVertexFlatTableProducer); DEFINE_FWK_MODULE(SimpleRun3ScoutingPhotonFlatTableProducer); DEFINE_FWK_MODULE(SimpleRun3ScoutingMuonFlatTableProducer); DEFINE_FWK_MODULE(SimpleRun3ScoutingElectronFlatTableProducer); DEFINE_FWK_MODULE(SimpleRun3ScoutingTrackFlatTableProducer); +DEFINE_FWK_MODULE(SimpleRun3ScoutingPFJetFlatTableProducer); diff --git a/PhysicsTools/NanoAOD/python/custom_run3scouting_cff.py b/PhysicsTools/NanoAOD/python/custom_run3scouting_cff.py index 7cb5191b85605..08953279f25ab 100644 --- a/PhysicsTools/NanoAOD/python/custom_run3scouting_cff.py +++ b/PhysicsTools/NanoAOD/python/custom_run3scouting_cff.py @@ -10,14 +10,20 @@ # common tasks particleTask = cms.Task(scoutingPFCands) -particleTableTask = cms.Task(particleScoutingTable) ak4JetTableTask = cms.Task(ak4ScoutingJets,ak4ScoutingJetParticleNetJetTagInfos,ak4ScoutingJetParticleNetJetTags,ak4ScoutingJetTable) ak8JetTableTask = cms.Task(ak8ScoutingJets,ak8ScoutingJetsSoftDrop,ak8ScoutingJetsSoftDropMass,ak8ScoutingJetEcfNbeta1,ak8ScoutingJetNjettiness,ak8ScoutingJetParticleNetJetTagInfos,ak8ScoutingJetParticleNetJetTags,ak8ScoutingJetParticleNetMassRegressionJetTags,ak8ScoutingJetTable) +muonScoutingTableTask = cms.Task(muonScoutingTable) +displacedvertexScoutingTableTask = cms.Task(displacedvertexScoutingTable) + +# from 2024, there are two scouting muon collections +from Configuration.Eras.Modifier_run3_scouting_nanoAOD_post2023_cff import run3_scouting_nanoAOD_post2023 +run3_scouting_nanoAOD_post2023.toReplaceWith(muonScoutingTableTask, cms.Task(muonVtxScoutingTable, muonNoVtxScoutingTable))\ + .toReplaceWith(displacedvertexScoutingTableTask, cms.Task(displacedvertexVtxScoutingTable, displacedvertexNoVtxScoutingTable)) + ## L1 decisions gtStage2DigisScouting = gtStage2Digis.clone(InputLabel="hltFEDSelectorL1") l1bitsScouting = l1bits.clone(src="gtStage2DigisScouting") -patTriggerScouting = patTrigger.clone(l1tAlgBlkInputTag="gtStage2DigisScouting",l1tExtBlkInputTag="gtStage2DigisScouting") ## L1 objects from PhysicsTools.NanoAOD.l1trig_cff import * @@ -34,22 +40,17 @@ l1TauScoutingTable.variables = cms.PSet(l1TauReducedVars) l1EtSumScoutingTable.variables = cms.PSet(l1EtSumReducedVars) -selectedPatTriggerScouting = selectedPatTrigger.clone(src="patTriggerScouting") -slimmedPatTriggerScouting = slimmedPatTrigger.clone(src="selectedPatTriggerScouting") -unpackedPatTriggerScouting = unpackedPatTrigger.clone(patTriggerObjectsStandAlone="slimmedPatTriggerScouting") -triggerObjectTableScouting = triggerObjectTable.clone(src="unpackedPatTriggerScouting") - triggerTask = cms.Task( - gtStage2DigisScouting, l1MuScoutingTable, l1EGScoutingTable, l1TauScoutingTable, l1JetScoutingTable, l1EtSumScoutingTable, - unpackedPatTriggerScouting,triggerObjectTableScouting,l1bitsScouting + gtStage2DigisScouting, l1bitsScouting, + l1MuScoutingTable, l1EGScoutingTable, l1TauScoutingTable, l1JetScoutingTable, l1EtSumScoutingTable, ) -triggerSequence = cms.Sequence(L1TRawToDigi+patTriggerScouting+selectedPatTriggerScouting+slimmedPatTriggerScouting+cms.Sequence(triggerTask)) +triggerSequence = cms.Sequence(L1TRawToDigi+cms.Sequence(triggerTask)) # MC tasks genJetTask = cms.Task(ak4ScoutingJetMatchGen,ak4ScoutingJetExtTable,ak8ScoutingJetMatchGen,ak8ScoutingJetExtTable) puTask = cms.Task(puTable) -nanoTableTaskCommon = cms.Task(photonScoutingTable,muonScoutingTable,electronScoutingTable,trackScoutingTable,primaryvertexScoutingTable,displacedvertexScoutingTable,rhoScoutingTable,metScoutingTable,particleTask,particleTableTask,ak4JetTableTask,ak8JetTableTask) +nanoTableTaskCommon = cms.Task(photonScoutingTable,muonScoutingTableTask,electronScoutingTable,primaryvertexScoutingTable,displacedvertexScoutingTableTask,jetScoutingTable,rhoScoutingTable,metScoutingTable,particleTask,ak4JetTableTask,ak8JetTableTask) nanoSequenceCommon = cms.Sequence(triggerSequence,nanoTableTaskCommon) @@ -58,4 +59,4 @@ nanoSequenceMC = cms.Sequence(nanoSequenceCommon + cms.Sequence(cms.Task(genJetTask,puTask))) def nanoAOD_customizeCommon(process): - return process \ No newline at end of file + return process diff --git a/PhysicsTools/NanoAOD/python/run3scouting_cff.py b/PhysicsTools/NanoAOD/python/run3scouting_cff.py index 2f3ec743c9e69..a95fec516b433 100644 --- a/PhysicsTools/NanoAOD/python/run3scouting_cff.py +++ b/PhysicsTools/NanoAOD/python/run3scouting_cff.py @@ -3,7 +3,7 @@ from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi import simpleCandidateFlatTableProducer ################ -# Scouting photons, electrons, muons, tracks, primary vertices, displaced vertices, rho and MET +# Scouting photons, electrons, muons, tracks, primary vertices, displaced vertices, jets (clustered at HLT), rho and MET photonScoutingTable = cms.EDProducer("SimpleRun3ScoutingPhotonFlatTableProducer", src = cms.InputTag("hltScoutingEgammaPacker"), @@ -141,7 +141,7 @@ nValidStripHits = Var('tk_nValidStripHits', 'int', doc='number of valid strip hits'), nTrackerLayersWithMeasurement = Var('tk_nTrackerLayersWithMeasurement', 'int', doc='number of tracker layers with measurements'), qoverp = Var('tk_qoverp', 'float', precision=10, doc='qoverp'), - _lambda = Var('tk_lambda', 'float', precision=10, doc='lambda'), + lambda_ = Var('tk_lambda', 'float', precision=10, doc='lambda'), dxyError = Var('tk_dxy_Error', 'float', precision=10, doc='dxyError'), dzError = Var('tk_dz_Error', 'float', precision=10, doc='dzError'), qoverpError = Var('tk_qoverp_Error', 'float', precision=10, doc='qoverpError'), @@ -208,6 +208,35 @@ ) ) +jetScoutingTable = cms.EDProducer("SimpleRun3ScoutingPFJetFlatTableProducer", + src = cms.InputTag("hltScoutingPFPacker"), + cut = cms.string(""), + name = cms.string("ScoutingPFJet"), + doc = cms.string("PFJet scouting information"), + singleton = cms.bool(False), + extension = cms.bool(False), + variables = cms.PSet( + P3Vars, + m = Var('m', 'float', precision=10, doc='mass'), + jetArea = Var('jetArea', 'float', precision=10, doc='jet area'), + chargedHadronEnergy = Var('chargedHadronEnergy', 'float', precision=10, doc='charged hadron energy'), + neutralHadronEnergy = Var('neutralHadronEnergy', 'float', precision=10, doc='neutral hadron energy'), + photonEnergy = Var('photonEnergy', 'float', precision=10, doc='photon energy'), + electronEnergy = Var('electronEnergy', 'float', precision=10, doc='electron energy'), + muonEnergy = Var('muonEnergy', 'float', precision=10, doc='muon energy'), + HFHadronEnergy = Var('HFHadronEnergy', 'float', precision=10, doc='hadronic energy in HF'), + HFEMEnergy = Var('HFEMEnergy', 'float', precision=10, doc='electromagnetic energy in HF'), + chargedHadronMultiplicity = Var('chargedHadronMultiplicity', 'int', doc='number of charged hadrons in the jet'), + neutralHadronMultiplicity = Var('neutralHadronMultiplicity', 'int', doc='number of neutral hadrons in the jet'), + photonMultiplicity = Var('photonMultiplicity', 'int', doc='number of photons in the jet'), + electronMultiplicity = Var('electronMultiplicity', 'int', doc='number of electrons in the jet'), + muonMultiplicity = Var('muonMultiplicity', 'int', doc='number of muons in the jet'), + HFHadronMultiplicity = Var('HFHadronMultiplicity', 'int', doc='number of HF hadronic particles in the jet'), + HFEMMultiplicity = Var('HFEMMultiplicity', 'int', doc='number of HF electromagnetic particles in the jet'), + HOEnergy = Var('HOEnergy', 'float', precision=10, doc='hadronic energy in HO'), + ) +) + rhoScoutingTable = cms.EDProducer("GlobalVariablesTableProducer", name = cms.string(""), variables = cms.PSet( @@ -223,6 +252,32 @@ ) ) +# from 2024, there are two scouting muon collections + +# muonVtx +muonVtxScoutingTable = muonScoutingTable.clone( + src = cms.InputTag("hltScoutingMuonPackerVtx"), + name = cms.string("ScoutingMuonVtx"), + doc = cms.string("Scouting Muon Vtx information"), +) +displacedvertexVtxScoutingTable = displacedvertexScoutingTable.clone( + src = cms.InputTag("hltScoutingMuonPackerVtx", "displacedVtx"), + name = cms.string("ScoutingMuonVtxDisplacedVertex"), + doc = cms.string("Scouting Muon Vtx DisplacedVertex information"), +) + +# muonNoVtx +muonNoVtxScoutingTable = muonScoutingTable.clone( + src = cms.InputTag("hltScoutingMuonPackerNoVtx"), + name = cms.string("ScoutingMuonNoVtx"), + doc = cms.string("Scouting Muon NoVtx information"), +) +displacedvertexNoVtxScoutingTable = displacedvertexScoutingTable.clone( + src = cms.InputTag("hltScoutingMuonPackerNoVtx", "displacedVtx"), + name = cms.string("ScoutingMuonNoVtxDisplacedVertex"), + doc = cms.string("Scouting Muon NoVtx DisplacedVertex information"), +) + ################ # Scouting particles @@ -308,9 +363,9 @@ ak4ScoutingJetTable = cms.EDProducer("SimplePFJetFlatTableProducer", src = cms.InputTag("ak4ScoutingJets"), - name = cms.string("ScoutingJet"), + name = cms.string("ScoutingPFJetRecluster"), cut = cms.string(""), - doc = cms.string("ScoutingJet"), + doc = cms.string("ak4 jets from re-clustering scouting PF candidates"), singleton = cms.bool(False), extension = cms.bool(False), # this is the main table externalVariables = cms.PSet( @@ -318,7 +373,7 @@ particleNet_prob_bb = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probbb'), float, doc="ParticleNet probability of bb", precision=10), particleNet_prob_c = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probc'), float, doc="ParticleNet probability of c", precision=10), particleNet_prob_cc = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probcc'), float, doc="ParticleNet probability of cc", precision=10), - particlenet_prob_uds = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probuds'), float, doc="particlenet probability of uds", precision=10), + particleNet_prob_uds = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probuds'), float, doc="particlenet probability of uds", precision=10), particleNet_prob_g = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probg'), float, doc="ParticleNet probability of g", precision=10), particleNet_prob_undef = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probundef'), float, doc="ParticleNet probability of undef", precision=10), ), @@ -348,7 +403,7 @@ ak4ScoutingJetExtTable = cms.EDProducer("SimpleCandidateFlatTableProducer", src = cms.InputTag("ak4ScoutingJets"), - name = cms.string("ScoutingJet"), + name = cms.string("ScoutingPFJetRecluster"), cut = cms.string(""), singleton = cms.bool(False), extension = cms.bool(True), @@ -429,7 +484,7 @@ src = cms.InputTag("ak8ScoutingJetParticleNetJetTagInfos"), preprocess_json = cms.string("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/General/V00/preprocess.json"), model_path = cms.FileInPath("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/General/V00/particle-net.onnx"), - flav_names = cms.vstring(["probHbb", "probHcc","probHqq", "probQCDall"]), + flav_names = cms.vstring([ "probQCDall", "probHbb", "probHcc", "probHqq"]), debugMode = cms.untracked.bool(False), ) @@ -445,9 +500,9 @@ ak8ScoutingJetTable = cms.EDProducer("SimplePFJetFlatTableProducer", src = cms.InputTag("ak8ScoutingJets"), - name = cms.string("ScoutingFatJet"), + name = cms.string("ScoutingFatPFJetRecluster"), cut = cms.string(""), - doc = cms.string("ScoutingFatJet"), + doc = cms.string("ak8 jets from re-clustering scouting PF candidates"), singleton = cms.bool(False), extension = cms.bool(False), # this is the main table externalVariables = cms.PSet( @@ -460,10 +515,10 @@ tau3 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau3'), float, doc="Nsubjettiness (3 axis)", precision=10), tau4 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau4'), float, doc="Nsubjettiness (4 axis)", precision=10), particleNet_mass = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetMassRegressionJetTags:mass'), float, doc="ParticleNet regressed mass", precision=10), + particleNet_prob_QCD = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probQCDall'), float, doc="ParticleNet probability of QCD", precision=10), particleNet_prob_Hbb = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHbb'), float, doc="ParticleNet probability of Hbb", precision=10), particleNet_prob_Hcc = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHcc'), float, doc="ParticleNet probability of Hcc", precision=10), particleNet_prob_Hqq = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHqq'), float, doc="ParticleNet probability of Hqq", precision=10), - particleNet_prob_QCD = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probQCDall'), float, doc="ParticleNet probability of QCD", precision=10), ), variables = cms.PSet( P4Vars, @@ -491,7 +546,7 @@ ak8ScoutingJetExtTable = cms.EDProducer("SimpleCandidateFlatTableProducer", src = cms.InputTag("ak8ScoutingJets"), - name = cms.string("ScoutingFatJet"), + name = cms.string("ScoutingFatPFJetRecluster"), cut = cms.string(""), singleton = cms.bool(False), extension = cms.bool(True), From 944210fb77ae36e0e2ade8edb1a3924a70684ad7 Mon Sep 17 00:00:00 2001 From: Patin Inkaew Date: Sat, 7 Sep 2024 14:38:46 +0200 Subject: [PATCH 3/6] introduce hltScouting, hltScoutingEra_Run3_2024 T0 processing scenarios with HLTSCOUT datatier as input --- .../DataProcessing/python/Impl/hltScouting.py | 104 ++++++++++++++++++ .../python/Impl/hltScoutingEra_Run3_2024.py | 26 +++++ 2 files changed, 130 insertions(+) create mode 100644 Configuration/DataProcessing/python/Impl/hltScouting.py create mode 100644 Configuration/DataProcessing/python/Impl/hltScoutingEra_Run3_2024.py diff --git a/Configuration/DataProcessing/python/Impl/hltScouting.py b/Configuration/DataProcessing/python/Impl/hltScouting.py new file mode 100644 index 0000000000000..4734e5b8caa14 --- /dev/null +++ b/Configuration/DataProcessing/python/Impl/hltScouting.py @@ -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 diff --git a/Configuration/DataProcessing/python/Impl/hltScoutingEra_Run3_2024.py b/Configuration/DataProcessing/python/Impl/hltScoutingEra_Run3_2024.py new file mode 100644 index 0000000000000..b6c679771a40f --- /dev/null +++ b/Configuration/DataProcessing/python/Impl/hltScoutingEra_Run3_2024.py @@ -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 + """ From ba415005fe88a764e29ba13b1147d781a19de6b0 Mon Sep 17 00:00:00 2001 From: Patin Inkaew Date: Sat, 7 Sep 2024 17:15:49 +0200 Subject: [PATCH 4/6] add hltScouting scenario in run_CfgTest_8.sh, and add test specifically for hltScouting scenario in run_CfgTest_13.sh and add it to BuildFile.xml --- Configuration/DataProcessing/test/BuildFile.xml | 1 + .../DataProcessing/test/run_CfgTest_13.sh | 17 +++++++++++++++++ .../DataProcessing/test/run_CfgTest_8.sh | 3 +-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Configuration/DataProcessing/test/run_CfgTest_13.sh diff --git a/Configuration/DataProcessing/test/BuildFile.xml b/Configuration/DataProcessing/test/BuildFile.xml index 4ce1d364c06b6..2040ca4ba1350 100644 --- a/Configuration/DataProcessing/test/BuildFile.xml +++ b/Configuration/DataProcessing/test/BuildFile.xml @@ -10,3 +10,4 @@ + diff --git a/Configuration/DataProcessing/test/run_CfgTest_13.sh b/Configuration/DataProcessing/test/run_CfgTest_13.sh new file mode 100644 index 0000000000000..8493526529d07 --- /dev/null +++ b/Configuration/DataProcessing/test/run_CfgTest_13.sh @@ -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 diff --git a/Configuration/DataProcessing/test/run_CfgTest_8.sh b/Configuration/DataProcessing/test/run_CfgTest_8.sh index 62bc5c078b29b..e60552a98fcb1 100755 --- a/Configuration/DataProcessing/test/run_CfgTest_8.sh +++ b/Configuration/DataProcessing/test/run_CfgTest_8.sh @@ -10,11 +10,10 @@ function die { echo $1: status $2 ; exit $2; } function runTest { echo $1 ; python3 $1 || die "Failure for configuration: $1" $?; } -declare -a arr=("ppEra_Run3" "ppEra_Run3_2023" "ppEra_Run3_2023_repacked" "ppEra_Run3_2024") +declare -a arr=("ppEra_Run3" "ppEra_Run3_2023" "ppEra_Run3_2023_repacked" "ppEra_Run3_2024" "hltScoutingEra_Run3_2024") for scenario in "${arr[@]}" do runTest "${SCRAM_TEST_PATH}/RunPromptReco.py --scenario $scenario --reco --aod --miniaod --nanoaod --dqmio --global-tag GLOBALTAG --lfn=/store/whatever --alcareco TkAlMinBias+SiStripCalMinBias" runTest "${SCRAM_TEST_PATH}/RunPromptReco.py --scenario $scenario --reco --aod --miniaod --nanoaod --dqmio --global-tag GLOBALTAG --lfn=/store/whatever --alcareco TkAlMinBias+SiStripCalMinBias --nanoFlavours=@PHYS" runTest "${SCRAM_TEST_PATH}/RunPromptReco.py --scenario $scenario --reco --aod --dqmio --global-tag GLOBALTAG --lfn=/store/whatever --alcareco TkAlMinBias+SiStripCalMinBias --PhysicsSkim=@Muon0" done - From d6cebf1dbd978c9d7bfb3cd532f2daebe3d76852 Mon Sep 17 00:00:00 2001 From: Patin Inkaew Date: Sat, 7 Sep 2024 18:15:00 +0200 Subject: [PATCH 5/6] add relval_nano matrix for ScoutingNano in 14_0_X --- .../PyReleaseValidation/python/relval_nano.py | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_nano.py b/Configuration/PyReleaseValidation/python/relval_nano.py index db10045d16474..03f38a8982591 100644 --- a/Configuration/PyReleaseValidation/python/relval_nano.py +++ b/Configuration/PyReleaseValidation/python/relval_nano.py @@ -234,6 +234,19 @@ def subnext(self): steps['NANO_mcScouting13.X']=merge([{'-s':'NANO:@Scout'}, steps['NANO_mc13.3']]) + +##14.0 INPUT +lumis_Run2024D = {380306: [[28, 273]]} +steps['NANO_data14.0'] = merge([{'--era': 'Run3_2024', '--conditions': 'auto:run3_data_prompt'}, + _NANO_data]) + +steps['ScoutingPFRun32024RAW14.0'] = {'INPUT': InputInfo(location='STD', ls=lumis_Run2024D, + dataSet='/ScoutingPFRun3/Run2024D-v1/HLTSCOUT')} + +steps['NANO_dataRun3ScoutingPF14.0']=merge([{'-s': 'NANO:@Scout'}, + steps['NANO_data14.0']]) + + _wfn=WFN(2500) ################ #10.6 input @@ -289,8 +302,15 @@ def subnext(self): _wfn.next() ################ #13.X workflows -workflows[_wfn()] = ['ScoutingNanodata13X',['ScoutingPFRun32022DRAW13.X', 'NANO_dataRun3ScoutingPF13.X']] +workflows[_wfn()] = ['ScoutingNANOdata13X',['ScoutingPFRun32022DRAW13.X', 'NANO_dataRun3ScoutingPF13.X']] _wfn.subnext() -workflows[_wfn()] = ['ScoutingNanomc13X',['TTBarMINIAOD13.3','NANO_mcScouting13.X']] +workflows[_wfn()] = ['ScoutingNANOmc13X',['TTBarMINIAOD13.3','NANO_mcScouting13.X']] + +################ + +_wfn.next() +################ +#14.0 workflows +workflows[_wfn()] = ['ScoutingNANOdata140Xrun3', ['ScoutingPFRun32024RAW14.0', 'NANO_dataRun3ScoutingPF14.0']] ################ From 565b24157e5e230854a7ae0f9c81468c68248294 Mon Sep 17 00:00:00 2001 From: Patin Inkaew Date: Mon, 9 Sep 2024 13:19:06 +0200 Subject: [PATCH 6/6] set run_CfgTest_13.sh file's permision to 755 --- Configuration/DataProcessing/test/run_CfgTest_13.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 Configuration/DataProcessing/test/run_CfgTest_13.sh diff --git a/Configuration/DataProcessing/test/run_CfgTest_13.sh b/Configuration/DataProcessing/test/run_CfgTest_13.sh old mode 100644 new mode 100755