18 std::vector<const reco::Track *> &)
override;
24 std::vector<const reco::Track *> &);
47 std::vector<const reco::Track *> &nonTauTracks) {
60 const size_t &thePVkey,
63 std::vector<const reco::Track *> &nonTauTracks) {
65 for (
const auto &cand : cands) {
67 if (!std::isfinite(cand.pt()))
69 if (cand.vertexRef().isNull())
71 int quality = cand.pvAssociationQuality();
72 if (cand.vertexRef().key() != thePVkey ||
82 for (
const auto &tauTrack : tauTracks) {
83 if (
std::abs(tauTrack->eta() - track->
eta()) < 0.005 &&
85 std::abs(tauTrack->pt() / track->
pt() - 1.) < 0.005) {
91 nonTauTracks.push_back(track);
100 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
#define DEFINE_FWK_MODULE(type)
uint32_t const *__restrict__ Quality * quality
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 * > &)
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_