40 : src_(consumes<edm::
View<pat::
Tau>>(iConfig.getParameter<edm::
InputTag>(
"src"))),
41 linkToPackedPF_(iConfig.getParameter<bool>(
"linkToPackedPFCandidates")),
43 iConfig.getParameter<edm::
InputTag>(
"packedPFCandidates"))),
44 dropPiZeroRefs_(iConfig.exists(
"dropPiZeroRefs") ? iConfig.getParameter<bool>(
"dropPiZeroRefs") :
true),
45 dropTauChargedHadronRefs_(
46 iConfig.exists(
"dropTauChargedHadronRefs") ? iConfig.getParameter<bool>(
"dropTauChargedHadronRefs") :
true),
47 dropPFSpecific_(iConfig.exists(
"dropPFSpecific") ? iConfig.getParameter<bool>(
"dropPFSpecific") :
true),
48 modifyTau_(iConfig.getParameter<bool>(
"modifyTaus")) {
51 tauModifier_ = std::make_unique<pat::ObjectModifier<pat::Tau>>(mod_config, consumesCollector());
53 produces<std::vector<pat::Tau>>();
61 tauModifier_->setEventContent(iSetup);
70 auto out = std::make_unique<std::vector<pat::Tau>>();
74 tauModifier_->setEvent(iEvent);
82 tauModifier_->modify(tau);
89 if (linkToPackedPF_) {
123 if (dropPiZeroRefs_) {
124 tau.
pfSpecific_[0].signalPiZeroCandidates_.clear();
125 tau.
pfSpecific_[0].isolationPiZeroCandidates_.clear();
127 if (dropTauChargedHadronRefs_) {
128 tau.
pfSpecific_[0].signalTauChargedHadronCandidates_.clear();
129 tau.
pfSpecific_[0].isolationTauChargedHadronCandidates_.clear();
131 if (dropPFSpecific_) {
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void push_back(Ptr< T > const &iPtr)
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
std::vector< pat::PackedCandidate > PackedCandidateCollection
~PATTauSlimmer() override
const edm::EDGetTokenT< edm::View< pat::Tau > > src_
const bool dropPFSpecific_
const bool dropPiZeroRefs_
void setIsolationGammaCands(const reco::CandidatePtrVector &ptrs)
void setIsolationNeutralHadrCands(const reco::CandidatePtrVector &ptrs)
void setIsolationChargedHadrCands(const reco::CandidatePtrVector &ptrs)
PATTauSlimmer(const edm::ParameterSet &iConfig)
void setSignalChargedHadrCands(const reco::CandidatePtrVector &ptrs)
setters for the PtrVectors (for miniAOD)
Analysis-level tau class.
IsoDepositPairs isoDeposits_
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
void setSignalGammaCands(const reco::CandidatePtrVector &ptrs)
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
std::vector< float > isolations_
T getParameter(std::string const &) const
const bool dropTauChargedHadronRefs_
const bool linkToPackedPF_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
std::vector< pat::tau::TauPFSpecific > pfSpecific_
holder for PFTau info, or empty vector if CaloTau
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
void setSignalNeutralHadrCands(const reco::CandidatePtrVector &ptrs)
std::unique_ptr< pat::ObjectModifier< pat::Tau > > tauModifier_