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
Muon puppi iso miniAOD 91x #18275
Muon puppi iso miniAOD 91x #18275
Conversation
A new Pull Request was created by @jshlee (Jason Lee) for master. It involves the following packages: DataFormats/PatCandidates @perrotta, @cmsbuild, @slava77, @monttj, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here #13028 |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@slava77 This adds 6 floats to pat::muons File step3_inMINIAODSIM.root Events 100 |
float puppiNoLeptonsNeutralHadronIso() const {return puppiNoLeptonsNeutralHadronIso_; } | ||
float puppiNoLeptonsPhotonIso() const {return puppiNoLeptonsPhotonIso_; } | ||
/// sets PUPPI isolations | ||
void setIsolationPUPPI(float chargedhadrons_, float neutralhadrons_, float photons_) |
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.
trailing underscores in local scope variables are confusing: they are typically used for member data.
Please drop
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.
done
else useValueMapForPUPPI = false; | ||
else { | ||
useValueMapForPUPPI = false; | ||
usePUPPINoLepton = (c.exists("usePUPPINoLepton") ? c.getParameter<bool>("usePUPPINoLepton") : false); |
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.
fillDescriptions already defines the usePUPPINoLepton parameter and its default value (false).
Please change this to usePUPPINoLepton = c.getParameter<bool>("usePUPPINoLepton")
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.
also, this appears to be a bugfix to the usePUPPINoLepton
, which should explain why the electron puppi isolations have changed.
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.
yep. electron puppi no lepton was incorrect.
@@ -244,6 +275,15 @@ void PATMuonProducer::produce(edm::Event & iEvent, const edm::EventSetup & iSetu | |||
if( embedPFCandidate_ ) aMuon.embedPFCandidate(); | |||
fillMuon( aMuon, muonBaseRef, pfBaseRef, genMatches, deposits, isolationValues ); | |||
|
|||
if (addPuppiIsolation_) { | |||
aMuon.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[muonBaseRef], (*PUPPIIsolation_neutral_hadrons)[muonBaseRef], (*PUPPIIsolation_photons)[muonBaseRef]); | |||
aMuon.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[muonBaseRef], (*PUPPINoLeptonsIsolation_neutral_hadrons)[muonBaseRef], (*PUPPINoLeptonsIsolation_photons)[muonBaseRef]); |
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.
some line breaks would be nice to improve readability (or shorter local variable names)
cms.PSet( isolationAlgo = cms.string('MuonPFIsolationWithConeVeto'), | ||
coneSize = cms.double(0.4), | ||
VetoThreshold = cms.double(0.0), | ||
VetoConeSize = cms.double(0.01), |
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.
it may be worth to add a comment that VetoConeSize
corresponds to a square of the deltaR.
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.
done
jenkins reco comparisons show differences in slimmedElectron neutral hadron and photon isolation I think that this fix should be mentioned in the PR description and maybe also in the title. |
removed _ from not member variables removed check of usePUPPINoLepton
@slava77 - Thanks as always for your comments. I've updated the code with your suggestions. Cheers, |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1
|
adding muon puppi isolation into miniAOD
pat::Muons added puppi isolation
This is exactly the same as the implementation done for electrons, except
@calabria @kpedro88 @jhgoh