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
Split up GEM and ME0 customizations #13963
Changes from all commits
5c7b30a
319906d
6ff53db
ee31c3a
acc7dcb
8f2aa35
9909b4a
65dcd41
da0fd7c
f6647d7
22fd2d2
14f7390
d86cec3
75514f3
e41bb44
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 |
---|---|---|
|
@@ -28,13 +28,11 @@ | |
'keep *_cscSegments_*_*', | ||
'keep *_rpcRecHits_*_*') | ||
) | ||
|
||
def _modifyRecoLocalMuonEventContentForPhase2( object ): | ||
object.outputCommands.append('keep *_gemRecHits_*_*') | ||
object.outputCommands.append('keep *_me0RecHits_*_*') | ||
object.outputCommands.append('keep *_me0Segments_*_*') | ||
|
||
from Configuration.StandardSequences.Eras import eras | ||
eras.phase2_muon.toModify( RecoLocalMuonFEVT, func=_modifyRecoLocalMuonEventContentForPhase2 ) | ||
eras.phase2_muon.toModify( RecoLocalMuonRECO, func=_modifyRecoLocalMuonEventContentForPhase2 ) | ||
eras.phase2_muon.toModify( RecoLocalMuonAOD, func=_modifyRecoLocalMuonEventContentForPhase2 ) | ||
def _updateOutput( era, outputPSets, commands): | ||
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. for the next PR... this should just get moved to normal cff that manage the event content. If the collections are not produced, they won't be part of the event content 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. @davidlange6 Which file is that? 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. its in fact this same one.. RecoLocalMuon/Configuration/python/RecoLocalMuon_EventContent_cff.py - we hopefully can avoid era statements in the event content
|
||
for o in outputPSets: | ||
era.toModify( o, outputCommands = o.outputCommands + commands ) | ||
|
||
_outputs = [RecoLocalMuonFEVT, RecoLocalMuonRECO, RecoLocalMuonAOD] | ||
_updateOutput( eras.run3_GEM, _outputs, ['keep *_gemRecHits_*_*'] ) | ||
_updateOutput(eras.phase2_muon, _outputs, ['keep *_me0RecHits_*_*', 'keep *_me0Segments_*_*']) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,11 +37,15 @@ | |
# DT, CSC and RPC together (correct sequence for the standard path) | ||
muonlocalreco = cms.Sequence(dtlocalreco+csclocalreco+rpcRecHits) | ||
|
||
def _modifyRecoLocalMuonForPhase2( theProcess ): | ||
theProcess.load("RecoLocalMuon.GEMRecHit.gemRecHits_cfi") | ||
theProcess.load("RecoLocalMuon.GEMRecHit.me0LocalReco_cff") | ||
theProcess.muonlocalreco += theProcess.gemRecHits | ||
theProcess.muonlocalreco += theProcess.me0LocalReco | ||
from RecoLocalMuon.GEMRecHit.gemRecHits_cfi import * | ||
from RecoLocalMuon.GEMRecHit.me0LocalReco_cff import * | ||
|
||
_run3_muonlocalreco = muonlocalreco.copy() | ||
_run3_muonlocalreco += gemRecHits | ||
|
||
_phase2_muonlocalreco = _run3_muonlocalreco.copy() | ||
_phase2_muonlocalreco += me0LocalReco | ||
|
||
from Configuration.StandardSequences.Eras import eras | ||
modifyConfigurationStandardSequencesRecoLocalMuonForPhase2_ = eras.phase2_muon.makeProcessModifier( _modifyRecoLocalMuonForPhase2 ) | ||
eras.run3_GEM.toReplaceWith( muonlocalreco , _run3_muonlocalreco ) | ||
eras.phase2_muon.toReplaceWith( muonlocalreco , _phase2_muonlocalreco ) | ||
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. @Dr15Jones could it be that this line is interfering with from RecoMuon.MuonIdentification.me0MuonReco_cff import me0MuonReco _phase2_muonGlobalReco = muonGlobalReco.copy() _phase2_muonGlobalReco += me0MuonReco eras.phase2_muon.toReplaceWith( muonGlobalReco, _phase2_muonGlobalReco ) If so, what is the recommended way to fix it? 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 it requires doing from RecoMuon.MuonIdentification.me0MuonReco_cff import * in order to guarantee that all modules being used by 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. Ok, this is fixed. I will some local integration tests to be sure. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,11 +120,15 @@ | |
) | ||
globalValidationTrackingOnly = cms.Sequence() | ||
|
||
def _modifyGlobalValidationForPhase2( theProcess ): | ||
theProcess.load('Validation.Configuration.gemSimValid_cff') | ||
theProcess.load('Validation.Configuration.me0SimValid_cff') | ||
theProcess.globalValidation += theProcess.gemSimValid | ||
theProcess.globalValidation += theProcess.me0SimValid | ||
from Validation.Configuration.gemSimValid_cff import * | ||
from Validation.Configuration.me0SimValid_cff import * | ||
|
||
_run3_globalValidation = globalValidation.copy() | ||
_run3_globalValidation += gemSimValid | ||
|
||
_phase2_globalValidation = _run3_globalValidation.copy() | ||
_phase2_globalValidation += me0SimValid | ||
|
||
from Configuration.StandardSequences.Eras import eras | ||
modifyConfigurationStandardSequencesGlobalValidationForPhase2_ = eras.phase2_muon.makeProcessModifier( _modifyGlobalValidationForPhase2 ) | ||
eras.run3_GEM.toReplaceWith( globalValidation, _run3_globalValidation ) | ||
eras.phase2_muon.toReplaceWith( globalValidation, _phase2_globalValidation ) | ||
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. @Dr15Jones is this the most practical way of dealing with modifications of the same thing by a "sequence" of modifiers? 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. The order is guaranteed. 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. For clarification (and my education), in case both
right? (I'm mainly confused by @slava77's "phase2_muon is executed first") 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. What is we had another from of def _run3_globalValidation(seq):
global gemSimValid
return seq+gemSimValid
def _phase2_globalValidation(seq):
global gemSimValid
seq = seq.copyAndExclude([gemSimValid])
return seq+ me0SimValid
eras.run3_GEM.toReplaceWith( globalValidation, transform=_run3_globalValidation )
eras.phase2_muon.toReplaceWith(globalValidation, transform=_phase2_globalValidation) 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. @makortel The order is the other way around. @slava77 had This also means that if one ran 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. @Dr15Jones Now I'm confused even more. Has the implementation of Here is my understanding of the (current) internals of the era system. The fact that It also looks to me that the intention is to have in
To me it looks like the configuration above would do what is expected. But maybe I've missed some detail. 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. @makortel You are right and I am wrong. I was thinking about how 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. However, I think my proposal about def _run3_globalValidation(seq):
global gemSimValid
return seq+gemSimValid
def _phase2_globalValidation(seq):
global me0SimValid
return seq+ me0SimValid
eras.run3_GEM.toReplaceWith( globalValidation, transform=_run3_globalValidation )
eras.phase2_muon.toReplaceWith(globalValidation, transform=_phase2_globalValidation) and the end result of both 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. @Dr15Jones - that would be my preference in terms of simplicity, ease of use, and correct handling of multiple customizations. I'm curious, though, why this syntax for 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. @kpedro88 good catch! I had forgotten about the other syntax for
would not actually change |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,15 +73,19 @@ | |
electronPostValidationSequenceMiniAOD | ||
) | ||
|
||
def _modifyPostValidationForPhase2( theProcess ): | ||
theProcess.load('Validation.MuonGEMHits.PostProcessor_cff') | ||
theProcess.load('Validation.MuonGEMDigis.PostProcessor_cff') | ||
theProcess.load('Validation.MuonGEMRecHits.PostProcessor_cff') | ||
theProcess.load('Validation.HGCalValidation.HGCalPostProcessor_cff') | ||
theProcess.postValidation += theProcess.MuonGEMHitsPostProcessors | ||
theProcess.postValidation += theProcess.MuonGEMDigisPostProcessors | ||
theProcess.postValidation += theProcess.MuonGEMRecHitsPostProcessors | ||
theProcess.postValidation += theProcess.hgcalPostProcessor | ||
from Validation.MuonGEMHits.PostProcessor_cff import * | ||
from Validation.MuonGEMDigis.PostProcessor_cff import * | ||
from Validation.MuonGEMRecHits.PostProcessor_cff import * | ||
from Validation.HGCalValidation.HGCalPostProcessor_cff import * | ||
|
||
_run3_postValidation = postValidation.copy() | ||
_run3_postValidation += MuonGEMHitsPostProcessors | ||
_run3_postValidation += MuonGEMDigisPostProcessors | ||
_run3_postValidation += MuonGEMRecHitsPostProcessors | ||
|
||
_phase2_postValidation = _run3_postValidation.copy() | ||
_phase2_postValidation += hgcalPostProcessor | ||
|
||
from Configuration.StandardSequences.Eras import eras | ||
modifyConfigurationStandardSequencesPostValidationForPhase2_ = eras.phase2_muon.makeProcessModifier( _modifyPostValidationForPhase2 ) | ||
eras.run3_GEM.toReplaceWith( postValidation, _run3_postValidation ) | ||
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. @kpedro88 - also for the future - none of this should be on the post validation sequence - as nothing here depends on hlt - it can be on the prevalidation sequence. 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. @davidlange6 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. err- sorry - yes - never mind me. |
||
eras.phase2_hgcal.toReplaceWith( postValidation, _phase2_postValidation ) |
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 didn't realize that
simMuonGEMDigis
does not already exist inRandomNumberGeneratorService
. Becuase it does not exist you can't use a dictionary and instead must declare a new PSet