Skip to content

Commit

Permalink
Add specific tau PV producer for taus produced from MiniAOD input (ba…
Browse files Browse the repository at this point in the history
…sed on work by Michal Bluj), and adapt MiniAOD tau sequence accordingly
  • Loading branch information
steggema committed Feb 28, 2018
1 parent 99a3384 commit 5294f0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions RecoTauTag/Configuration/python/tools/adaptToRunAtMiniAOD.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def adaptTauToMiniAODReReco(process, reclusterJets=True):
convertModuleToMiniAODInput(process, 'hpsPFTauPhotonPtSumOutsideSignalConedR03')

# Redefine tau PV producer
process.hpsPFTauPrimaryVertexProducer.__dict__['_TypedParameterizable__type'] = 'PFTauMiniAODPrimaryVertexProducer'
process.hpsPFTauPrimaryVertexProducer.PVTag = 'offlineSlimmedPrimaryVertices'
process.hpsPFTauPrimaryVertexProducer.qualityCuts.primaryVertexSrc = 'offlineSlimmedPrimaryVertices'
process.hpsPFTauPrimaryVertexProducer.packedCandidatesTag = cms.InputTag("packedPFCandidates")
Expand Down Expand Up @@ -298,6 +299,10 @@ def setOutputModule(mode=0):
)
)
output.outputCommands.append('keep *_selectedPatTaus_*_*')
output.outputCommands.append('keep *_combinatoricReco*_*_*')
output.outputCommands.append('keep *_ak4PFJetsRecoTauChargedHadrons_*_*')
output.outputCommands.append('keep *_ak4PFJetsLegacyHPSPiZeros_*_*')
output.outputCommands.append('keep *_patAK4PFJets_*_*')

This comment has been minimized.

Copy link
@mbluj

mbluj Mar 1, 2018

Contributor

Do we really want these additional products to be stored when mode == 0. Should this be moved to mode == 1, i.e. to an extended event content with intermediate products?

if mode==1:
for prod in evtContent.RecoTauTagAOD.outputCommands:
if prod.find('ElectronRejection') > -1:
Expand Down
5 changes: 0 additions & 5 deletions RecoTauTag/RecoTau/plugins/PFTauPrimaryVertexProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,7 @@ void PFTauPrimaryVertexProducer::produce(edm::Event& iEvent,const edm::EventSetu
}
if (passed && cut_.get()){passed = (*cut_)(*tau);}
if (passed){
// Use two signal track collections: One with Refs for taus made from PFCandidates,
// and one with pointers for taus made from PackedCandidates
std::vector<reco::TrackBaseRef> SignalTracks;
// std::vector<reco::Track*> SignalTrackPtrs;
// JAN - FIXME - THIS NEEDS TO BE CHANGED WITH MICHAL'S ADAPTIONS

for(reco::PFTauCollection::size_type jPFTau = 0; jPFTau < Tau->size(); jPFTau++) {
if(useSelectedTaus_ || iPFTau==jPFTau){
reco::PFTauRef RefPFTau(Tau, jPFTau);
Expand Down

2 comments on commit 5294f0e

@mbluj
Copy link
Contributor

@mbluj mbluj commented on 5294f0e Mar 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steggema It looks to me that the PFTauMiniAODPrimaryVertexProducer module was not added to CMSSW in this commit; please add. Thanks.

@steggema
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done both, thanks for the comment.

Please sign in to comment.