67 typedef std::pair<edm::ProductID, unsigned> TrackProdIDKey;
68 std::vector<TrackProdIDKey> vetoed;
73 for (
const auto&
veto : vetoes)
74 vetoed.emplace_back(
veto.trackRef().id(),
veto.trackRef().key());
80 for (
const auto&
veto : vetoes) {
83 vetoed.emplace_back(tracksH.id(),
veto.index);
89 for (
const auto&
veto : vetoes) {
90 if (
veto.trackRef().isNull())
92 vetoed.emplace_back(
veto.trackRef().id(),
veto.trackRef().key());
99 const auto muonH =
e.getHandle(
muons_);
100 const auto&
muons = *muonH;
101 elems.reserve(elems.size() +
tracks->size());
108 auto itr = elems.begin();
109 while (itr != elems.end()) {
122 itr = elems.erase(itr);
135 auto btk_elems = elems.begin();
136 auto btrack =
tracks->cbegin();
137 auto etrack =
tracks->cend();
140 std::find_if(btk_elems, TKs_end, [&](
const ElementType&
a) {
return (
a->trackRef() ==
track->trackRef()); });
141 if (tk_elem != TKs_end) {
166 bool thisIsAPotentialMuon =
false;
169 thisIsAPotentialMuon =
176 if (thisIsAPotentialMuon) {
178 <<
"Potential Muon P " << pftrackref->trackRef()->p() <<
" pt " << pftrackref->trackRef()->p() << std::endl;
188 elems.emplace_back(trkElem);
190 TrackProdIDKey trk = std::make_pair(pftrackref->trackRef().
id(), pftrackref->trackRef().
key());
192 bool inVetoList = (lower != vetoed.end() && *lower == trk);
194 elems.emplace_back(trkElem);
200 elems.shrink_to_fit();
bool empty() const
Is the RefVector empty.
static int muAssocToTrack(const reco::TrackRef &trackref, const reco::MuonCollection &muons)
const ConversionRefVector & convRefs() const override
const PFDisplacedTrackerVertexRef & displacedVertexRef(TrackType trType) const override
ProductID id() const
Accessor for product ID.
const bool useIterTracking_
const std::vector< double > DPtovPtCut_
const double muonMaxDPtOPt_
static bool isMuon(const reco::PFBlockElement &elt)
edm::EDGetTokenT< reco::TrackCollection > tracksSrc_
edm::EDGetTokenT< std::vector< TICLSeedingRegion > > vetoTICLSeedingSrc_
key_type key() const
Accessor for product key.
const VertexCompositeCandidateRef & V0Ref() const override
Container::value_type value_type
const edm::EDGetTokenT< reco::MuonCollection > muons_
bool trackType(TrackType trType) const override
edm::Ref< PFRecTrackCollection > PFRecTrackRef
persistent reference to PFRecTrack objects
edm::Ref< MuonCollection > MuonRef
presistent reference to a Muon
const std::vector< unsigned > NHitCut_
bool isNull() const
Checks for null.
const reco::TrackBase::TrackQuality trackQuality_
edm::EDGetTokenT< reco::PFRecTrackCollection > vetoPFTracksSrc_
edm::EDGetTokenT< reco::PFCandidateCollection > vetoPFCandidatesSrc_
static bool isLooseMuon(const reco::PFBlockElement &elt)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
const reco::TrackRef & trackRef() const override
const bool cleanBadConvBrems_
void setMuonRef(const MuonRef &muref) override
reference to the Muon
static bool hasValidTrack(const reco::MuonRef &muonRef, bool loose, double maxDPtOPt)
const edm::EDGetTokenT< reco::PFRecTrackCollection > src_