19 std::vector<const reco::Track*>&)
override;
25 std::vector<const reco::Track*> &);
48 std::vector<const reco::Track*> &nonTauTracks){
64 std::vector<const reco::Track*> &nonTauTracks){
67 for(
const auto&
cand: cands){
68 if(
cand.vertexRef().isNull())
continue;
70 if(
cand.vertexRef().key()!=thePVkey ||
74 if(track ==
nullptr)
continue;
79 for(
const auto& tauTrack: tauTracks){
82 &&
std::abs(tauTrack->pt()/track->
pt()-1.)<0.005
88 if( !matched ) nonTauTracks.push_back(track);
98 descriptions.
add(
"pfTauMiniAODPrimaryVertexProducer", desc);
void beginEvent(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< pat::PackedCandidateCollection > lostCandsToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< pat::PackedCandidateCollection > packedCandsToken_
std::vector< pat::PackedCandidate > PackedCandidateCollection
double phi() const
azimuthal angle of momentum vector
key_type key() const
Accessor for product key.
PFTauMiniAODPrimaryVertexProducer(const edm::ParameterSet &iConfig)
void nonTauTracksInPVFromPackedCands(const size_t &, const pat::PackedCandidateCollection &, const std::vector< edm::Ptr< reco::TrackBase > > &, std::vector< const reco::Track * > &)
#define DEFINE_FWK_MODULE(type)
double eta() const
pseudorapidity of momentum vector
double pt() const
track transverse momentum
MiniAOD implementation of the PFTauPrimaryVertexProducer plugin.
Abs< T >::type abs(const T &t)
void nonTauTracksInPV(const reco::VertexRef &, const std::vector< edm::Ptr< reco::TrackBase > > &, std::vector< const reco::Track * > &) override
~PFTauMiniAODPrimaryVertexProducer() override
edm::Handle< pat::PackedCandidateCollection > packedCands_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static edm::ParameterSetDescription getDescriptionsBase()
edm::Handle< pat::PackedCandidateCollection > lostCands_