Skip to content

Commit

Permalink
added files that were not included in the last commit to finish merge…
Browse files Browse the repository at this point in the history
… with cms-sw#1910
  • Loading branch information
jpavel committed Dec 20, 2013
1 parent d34b3a4 commit 13f6893
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 49 deletions.
45 changes: 6 additions & 39 deletions RecoTauTag/Configuration/python/HPSPFTaus_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,46 +544,13 @@
# Define the HPS selection discriminator used in cleaning
hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")

import RecoTauTag.RecoTau.RecoTauCleanerPlugins as cleaners

hpsPFTauProducerSansRefs = cms.EDProducer(
"RecoTauCleaner",
src = cms.InputTag("combinatoricRecoTaus"),
cleaners = cms.VPSet(
# Reject taus that have charge == 3
cleaners.unitCharge,
# Ignore taus reconstructed in pi0 decay modes in which the highest Pt ("leading") pi0 has pt below 2.5 GeV
# (in order to make decay mode reconstruction less sensitive to pile-up)
# NOTE: strips are sorted by decreasing pt
cms.PSet(
name = cms.string("leadStripPtLt2_5"),
plugin = cms.string("RecoTauStringCleanerPlugin"),
selection = cms.string("signalPiZeroCandidates().size() = 0 | signalPiZeroCandidates().at(0).pt() > 2.5"),
selectionPassFunction = cms.string("0"),
selectionFailValue = cms.double(1e3)
),
# Reject taus that are not within DR<0.1 of the jet axis
#cleaners.matchingConeCut,
# Reject taus that fail HPS selections
cms.PSet(
name = cms.string("HPS_Select"),
plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
src = cms.InputTag("hpsSelectionDiscriminator"),
),
# CV: Take highes pT tau (use for testing of new high pT tau reconstruction and check if it can become the new default)
cleaners.pt,
# CV: in case two candidates have the same Pt,
# prefer candidates in which PFGammas are part of strips (rather than being merged with PFRecoTauChargedHadrons)
cleaners.stripMultiplicity,
# Take most isolated tau
cleaners.combinedIsolation
)
)
from RecoTauTag.RecoTau.RecoTauCleaner_cfi import hpsPFTauProducerSansRefs
hpsPFTauProducerSansRefs.src=cms.InputTag("combinatoricRecoTaus")


from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import hpsPFTauProducer
hpsPFTauProducer.src = cms.InputTag("hpsPFTauProducerSansRefs")

hpsPFTauProducer = cms.EDProducer(
"RecoTauPiZeroUnembedder",
src = cms.InputTag("hpsPFTauProducerSansRefs")
)

from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import *
from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import *
Expand Down
11 changes: 3 additions & 8 deletions RecoTauTag/Configuration/python/RecoPFTauTag_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@

# Collection PFCandidates from a DR=0.8 cone about the jet axis and make new
# faux jets with this collection
recoTauAK5PFJets08Region = cms.EDProducer(
"RecoTauJetRegionProducer",
deltaR = cms.double(0.8),
src = cms.InputTag("ak5PFJets"),
pfCandSrc = cms.InputTag("particleFlow"),
pfCandAssocMapSrc = cms.InputTag("")
)

from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import \
recoTauAK5PFJets08Region
recoTauAK5PFJets08Region.src = cms.InputTag("ak5PFJets")


# Reconstruct the pi zeros in our pre-selected jets.
Expand Down
5 changes: 4 additions & 1 deletion RecoTauTag/RecoTau/plugins/RecoTauPileUpVertexSelector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"

#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
Expand Down Expand Up @@ -46,12 +47,14 @@ class RecoTauPileUpVertexSelector : public edm::EDFilter {
edm::InputTag src_;
VertexTrackPtSumFilter vtxFilter_;
bool filter_;
edm::EDGetTokenT<reco::VertexCollection> token;
};

RecoTauPileUpVertexSelector::RecoTauPileUpVertexSelector(
const edm::ParameterSet& pset):vtxFilter_(
pset.getParameter<double>("minTrackSumPt")) {
src_ = pset.getParameter<edm::InputTag>("src");
token = consumes<reco::VertexCollection>(src_);
filter_ = pset.exists("filter") ? pset.getParameter<bool>("filter") : false;
produces<reco::VertexCollection>();
}
Expand All @@ -60,7 +63,7 @@ RecoTauPileUpVertexSelector::RecoTauPileUpVertexSelector(
bool RecoTauPileUpVertexSelector::filter(
edm::Event& evt, const edm::EventSetup& es) {
edm::Handle<reco::VertexCollection> vertices_;
evt.getByLabel(src_, vertices_);
evt.getByToken(token, vertices_);
std::auto_ptr<reco::VertexCollection> output(new reco::VertexCollection);
// If there is only one vertex, there are no PU vertices!
if (vertices_->size() > 1) {
Expand Down
2 changes: 1 addition & 1 deletion RecoTauTag/RecoTau/python/RecoTauJetRegionProducer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"RecoTauJetRegionProducer",
deltaR = cms.double(0.8),
src = cms.InputTag("ak5PFJets"),
pfSrc = cms.InputTag("particleFlow"),
pfCandSrc = cms.InputTag("particleFlow"),
pfCandAssocMapSrc = cms.InputTag("")
)

0 comments on commit 13f6893

Please sign in to comment.