-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Custom Run 3 PFScouting NanoAOD #40438
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,6 +155,28 @@ def subnext(self): | |
'--conditions':'auto:phase1_2022_realistic'}, | ||
_NANO_mc]) | ||
|
||
##13.X INPUT | ||
steps['RunScoutingPFRun32022D13.X']={'INPUT':InputInfo(dataSet='/ScoutingPFRun3/Run2022D-v1/RAW',label='2022D',events=100000,location='STD', ls=Run2022D)} | ||
|
||
steps['NANO_dataRun3ScoutingPF13.X']=merge([{'-s':'NANO:PhysicsTools/NanoAOD/custom_run3scouting_cff', | ||
'--conditions':'auto:run3_data', | ||
'-n':'10', | ||
'--era' : 'Run3', | ||
'--geometry' : 'DB:Extended', | ||
'--datatier':'NANOAOD', | ||
'--eventcontent':'NANOAOD'}]) | ||
|
||
steps['NANO_mcRun3ScoutingPF13.X']=merge([{'-s':'NANO:PhysicsTools/NanoAOD/custom_run3scouting_cff.nanoSequenceMC', | ||
'--conditions':'auto:phase1_2022_realistic', | ||
'-n':'10', | ||
'--mc':'', | ||
'--era' : 'Run3', | ||
'--geometry' : 'DB:Extended', | ||
'--datatier':'NANOAOD', | ||
'--eventcontent':'NANOAOD', | ||
'--filein':'/store/mc/Run3Summer22MiniAODv3/BulkGravitonToHH_MX1120_MH121_TuneCP5_13p6TeV_madgraph-pythia8/MINIAODSIM/124X_mcRun3_2022_realistic_v12-v3/2810000/f9cdd76c-faac-4f24-bf0c-2496c8fffe54.root', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I missed this in the first place ; we should not be using the |
||
'--secondfilein':'/store/mc/Run3Summer22DRPremix/BulkGravitonToHH_MX1120_MH121_TuneCP5_13p6TeV_madgraph-pythia8/AODSIM/124X_mcRun3_2022_realistic_v12-v3/2810000/ab09fc5d-859c-407f-b7ce-74b0bae9bb96.root'}]) | ||
|
||
_wfn=WFN(2500) | ||
################ | ||
#10.6 input | ||
|
@@ -191,3 +213,12 @@ def subnext(self): | |
################ | ||
#13.2 workflows | ||
workflows[_wfn()] = ['NANOmc132X', ['TTBarMINIAOD13.2', 'NANO_mc13.2', 'HRV_NANO_mc']] | ||
|
||
_wfn.next() | ||
################ | ||
#13.X workflows | ||
workflows[_wfn()] = ['ScoutingNanodata13X',['RunScoutingPFRun32022D13.X', 'NANO_dataRun3ScoutingPF13.X']] | ||
_wfn.subnext() | ||
workflows[_wfn()] = ['ScoutingNanomc13X',['NANO_mcRun3ScoutingPF13.X']] | ||
|
||
################ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
from PhysicsTools.NanoAOD.run3scouting_cff import * | ||
from PhysicsTools.NanoAOD.globals_cff import puTable | ||
from PhysicsTools.NanoAOD.triggerObjects_cff import unpackedPatTrigger, triggerObjectTable, l1bits | ||
from L1Trigger.Configuration.L1TRawToDigi_cff import * | ||
from EventFilter.L1TRawToDigi.gtStage2Digis_cfi import gtStage2Digis | ||
from PhysicsTools.PatAlgos.triggerLayer1.triggerProducer_cfi import patTrigger | ||
from PhysicsTools.PatAlgos.slimming.selectedPatTrigger_cfi import selectedPatTrigger | ||
from PhysicsTools.PatAlgos.slimming.slimmedPatTrigger_cfi import slimmedPatTrigger | ||
|
||
# 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) | ||
|
||
gtStage2DigisScouting = gtStage2Digis.clone(InputLabel="hltFEDSelectorL1") | ||
l1bitsScouting = l1bits.clone(src="gtStage2DigisScouting") | ||
patTriggerScouting = patTrigger.clone(l1tAlgBlkInputTag="gtStage2DigisScouting",l1tExtBlkInputTag="gtStage2DigisScouting") | ||
selectedPatTriggerScouting = selectedPatTrigger.clone(src="patTriggerScouting") | ||
slimmedPatTriggerScouting = slimmedPatTrigger.clone(src="selectedPatTriggerScouting") | ||
unpackedPatTriggerScouting = unpackedPatTrigger.clone(patTriggerObjectsStandAlone="slimmedPatTriggerScouting") | ||
triggerObjectTableScouting = triggerObjectTable.clone(src="unpackedPatTriggerScouting") | ||
|
||
triggerTask = cms.Task(gtStage2DigisScouting,unpackedPatTriggerScouting,triggerObjectTableScouting,l1bitsScouting) | ||
triggerSequence = cms.Sequence(L1TRawToDigi+patTriggerScouting+selectedPatTriggerScouting+slimmedPatTriggerScouting+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) | ||
|
||
nanoSequenceCommon = cms.Sequence(triggerSequence,nanoTableTaskCommon) | ||
|
||
nanoSequence = cms.Sequence(nanoSequenceCommon) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vlimant is this similar to what you had in mind when you said to create a plain cff? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good indeed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vlimant there is one thing I am struggling with in this new approach of a plain cff. Maybe you happen to know a way around it? For nanoSequenceMC there are two tasks in addition to nanoSequenceCommon. In the past I added them like this. Which in this new approach would translate to something like genJetTask = cms.Task(ak4MatchGen, ak8MatchGen)
nanoSequenceMC = cms.Sequence(nanoSequenceCommon + cms.Sequence(genJetTask)) However this would only run the two EDProducers and I would still need to add the results as external variables to the AK4 and AK8 jet table. In the old approach it was achieved with externalVariables = getattr(process.ak8JetTable, 'externalVariables', cms.PSet())
externalVariables.genJetAK8Idx = ExtVar(cms.InputTag("ak8MatchGen"), int, doc="gen jet idx")
process.ak8JetTable.externalVariables = externalVariables Which was fine as these lines would only be called if the input dataset was MC. However now with the plain cff, I am not sure how I can achieve this as there isn't a Would you happen to have any ideas? The best I can think of is to create a copy of both the AK4 and AK8 table, so that there are two separate AK4(8)JetTable tasks, one which is called in nanoSequence and one which is called in nanoSequenceMC. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @vlimant to follow-up on the above, are you aware of a way to distinguish between if the input dataset is MC or data when using the plain cff method? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hello, removing the distinction between MC and data in nano configuration was on the wish-list and done recently #40682 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to be more concrete make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I got it, thanks! I will implement it that way. |
||
|
||
nanoSequenceMC = cms.Sequence(nanoSequenceCommon + cms.Sequence(cms.Task(genJetTask,puTask))) | ||
|
||
def nanoAOD_customizeCommon(process): | ||
return process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the
.nanoSequenceMC
is not necessary, since--mc
will have cmsDriver pick that one up automatically. We'll deal with this at a later stage during theNANO:@Scouting
integration