-
Notifications
You must be signed in to change notification settings - Fork 4.4k
HLTTauDQM: support for PatTau ref objects #45648
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
Open
slehti
wants to merge
4
commits into
cms-sw:master
Choose a base branch
from
slehti:HLTTauValidationUpdate_PatTauRef
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9cd6573
HLTTauDQM: support for PatTau ref objects
slehti 279a67e
HLTTauRefProducer: separate input parameter for pat taus
slehti 6792b7d
HLTTauDQMOffline_cfi: PFTauProducer->PatTauProducer
slehti 9765bdb
PATTauProducer.cc: try-catch causing problem when running PATTaus in …
slehti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
12 changes: 12 additions & 0 deletions
12
DQMOffline/Trigger/python/HLTTauDQMOfflineTauProducer_cfi.py
This file contains hidden or 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,12 @@ | ||
from PhysicsTools.PatAlgos.producersLayer1.tauProducer_cfi import * | ||
patTaus.addGenMatch = cms.bool(False) | ||
patTaus.embedGenMatch = cms.bool(False) | ||
patTaus.addGenJetMatch = cms.bool(False) | ||
patTaus.embedGenJetMatch = cms.bool(False) | ||
|
||
from Configuration.StandardSequences.MagneticField_cff import * | ||
|
||
patAlgosToolsTask = cms.Task() | ||
patAlgosToolsTask.add(patTaus) | ||
|
||
HLTTauDQMOfflineTauProducer = cms.Sequence(patAlgosToolsTask) |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -9,15 +9,18 @@ | |
PFTauDiscriminatorContainers = cms.untracked.VInputTag(), | ||
PFTauDiscriminatorContainerWPs = cms.untracked.vstring(), | ||
PFTauDiscriminators = cms.untracked.VInputTag( | ||
cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding") | ||
#cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding") | ||
cms.InputTag("decayModeFindingNewDMs"), | ||
cms.InputTag("byMediumCombinedIsolationDeltaBetaCorr3Hits") | ||
), | ||
doPFTaus = cms.untracked.bool(True), | ||
ptMin = cms.untracked.double(15.0), | ||
etaMin = cms.untracked.double(-2.5), | ||
etaMax = cms.untracked.double(2.5), | ||
phiMin = cms.untracked.double(-3.15), | ||
phiMax = cms.untracked.double(3.15), | ||
PFTauProducer = cms.untracked.InputTag("hpsPFTauProducer") | ||
#PFTauProducer = cms.untracked.InputTag("hpsPFTauProducer") | ||
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. Is this commented out line really needed, if not please remove |
||
PatTauProducer = cms.untracked.InputTag("patTaus") | ||
), | ||
Electrons = cms.untracked.PSet( | ||
ElectronCollection = cms.untracked.InputTag("gedGsfElectrons"), | ||
|
@@ -70,6 +73,24 @@ | |
PhiMax = cms.untracked.double(3.15) | ||
) | ||
|
||
TauRefProducerLowPurity = TauRefProducer.clone( | ||
PFTaus = cms.untracked.PSet( | ||
PFTauDiscriminatorContainers = cms.untracked.VInputTag(), | ||
PFTauDiscriminatorContainerWPs = cms.untracked.vstring(), | ||
PFTauDiscriminators = cms.untracked.VInputTag( | ||
cms.InputTag("decayModeFindingNewDMs"), | ||
), | ||
doPFTaus = cms.untracked.bool(True), | ||
ptMin = cms.untracked.double(15.0), | ||
etaMin = cms.untracked.double(-2.5), | ||
etaMax = cms.untracked.double(2.5), | ||
phiMin = cms.untracked.double(-3.15), | ||
phiMax = cms.untracked.double(3.15), | ||
#PFTauProducer = cms.untracked.InputTag("hpsPFTauProducer") | ||
PatTauProducer = cms.untracked.InputTag("patTaus") | ||
) | ||
) | ||
|
||
#----------------------------------MONITORS-------------------------------------------------------------------------- | ||
kEverything = 0 | ||
kVital = 1 | ||
|
@@ -129,6 +150,36 @@ | |
) | ||
) | ||
|
||
hltTauOfflineMonitor_PFTausLowPurity = hltTauOfflineMonitor_PFTaus.clone( | ||
DQMBaseFolder = cms.untracked.string("HLT/TAU/PFTausLowPurity"), | ||
Matching = cms.PSet( | ||
doMatching = cms.untracked.bool(True), | ||
matchFilters = cms.untracked.VPSet( | ||
cms.untracked.PSet( | ||
FilterName = cms.untracked.InputTag("TauRefProducerLowPurity","PFTaus"), | ||
matchObjectID = cms.untracked.int32(15), | ||
), | ||
cms.untracked.PSet( | ||
FilterName = cms.untracked.InputTag("TauRefProducerLowPurity","Electrons"), | ||
matchObjectID = cms.untracked.int32(11), | ||
), | ||
cms.untracked.PSet( | ||
FilterName = cms.untracked.InputTag("TauRefProducerLowPurity","Muons"), | ||
matchObjectID = cms.untracked.int32(13), | ||
), | ||
cms.untracked.PSet( | ||
FilterName = cms.untracked.InputTag("TauRefProducerLowPurity","MET"), | ||
matchObjectID = cms.untracked.int32(0), | ||
), | ||
), | ||
), | ||
) | ||
|
||
hltTauOfflineMonitor_PNetTausLowPurity = hltTauOfflineMonitor_PFTausLowPurity.clone( | ||
DQMBaseFolder = cms.untracked.string("HLT/TAU/PNetTausLowPurity"), | ||
Paths = cms.untracked.string("PNetTauh") | ||
) | ||
|
||
def TriggerSelectionParameters(hltpaths): | ||
genericTriggerSelectionParameters = cms.PSet( | ||
andOr = cms.bool( False ),#specifies the logical combination of the single filters' (L1, HLT and DCS) decisions at top level (True=OR) | ||
|
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
as discussed by e-mail, this line triggers the execution of
process.patTaus = cms.EDProducer("PATTauProducer,...
, which in turn is configured as:cmssw/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py
Lines 3 to 5 in 8f4b703
Now, since in cosmics workflows
hpsPFTauProducer
is not executed and thistry
/catch
construct doesn't work (as it was presumably originally intended), it leads to the runtime exception observed in the PR tests:cmssw/PhysicsTools/PatAlgos/plugins/PATTauProducer.cc
Lines 290 to 298 in 8f4b703
For my own understanding @cms-sw/core-l2 can you confirm the right way to go about this is just to do:
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'm not sure if
iEvent.getBy*()
has ever thrown an exception for a missing data product. The right way would indeed be to either check the return value ofgetByToken()
if(!iEvent.getByToken(baseTauToken_, anyTaus)) {
or check the handle, e.g. along
or
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.
Thanks!
@slehti can you follow-up with one of the suggestions above?