|
|
Go to the documentation of this file.
68 typedef std::pair<edm::ProductID, unsigned> TrackProdIDKey;
69 std::vector<TrackProdIDKey> vetoed;
74 for (
const auto&
veto : vetoes)
75 vetoed.emplace_back(
veto.trackRef().id(),
veto.trackRef().key());
81 for (
const auto&
veto : vetoes) {
84 vetoed.emplace_back(tracksH.id(),
veto.index);
90 for (
const auto&
veto : vetoes) {
91 if (
veto.trackRef().isNull())
93 vetoed.emplace_back(
veto.trackRef().id(),
veto.trackRef().key());
100 const auto muonH =
e.getHandle(
muons_);
101 const auto muons = *muonH;
102 elems.reserve(elems.size() +
tracks->size());
103 std::vector<bool> mask(
tracks->size(),
true);
109 auto itr = elems.begin();
110 while (itr != elems.end()) {
123 itr = elems.erase(itr);
134 auto TKs_end = std::partition(
136 auto btk_elems = elems.begin();
137 auto btrack =
tracks->cbegin();
138 auto etrack =
tracks->cend();
141 std::find_if(btk_elems, TKs_end, [&](
const ElementType&
a) {
return (
a->trackRef() ==
track->trackRef()); });
142 if (tk_elem != TKs_end) {
149 static_cast<reco::PFBlockElementTrack*>(tk_elem->get())->setMuonRef(muonref);
167 bool thisIsAPotentialMuon =
false;
170 thisIsAPotentialMuon =
177 if (thisIsAPotentialMuon) {
179 <<
"Potential Muon P " << pftrackref->trackRef()->p() <<
" pt " << pftrackref->trackRef()->p() << std::endl;
189 elems.emplace_back(trkElem);
191 TrackProdIDKey trk = std::make_pair(pftrackref->trackRef().
id(), pftrackref->trackRef().
key());
193 bool inVetoList = (lower != vetoed.end() && *lower == trk);
195 elems.emplace_back(trkElem);
201 elems.shrink_to_fit();
bool trackType(TrackType trType) const override
const std::vector< unsigned > NHitCut_
const VertexCompositeCandidateRef & V0Ref() const override
bool isNull() const
Checks for null.
const edm::EDGetTokenT< reco::MuonCollection > muons_
edm::EDGetTokenT< reco::TrackCollection > tracksSrc_
const reco::TrackRef & trackRef() const override
TrackQuality
track quality
edm::EDGetTokenT< std::vector< TICLSeedingRegion > > vetoTICLSeedingSrc_
const bool cleanBadConvBrems_
const bool useIterTracking_
const edm::EDGetTokenT< reco::PFRecTrackCollection > src_
const PFDisplacedTrackerVertexRef & displacedVertexRef(TrackType trType) const override
void setMuonRef(const MuonRef &muref) override
\set reference to the Muon
std::vector< Muon > MuonCollection
collection of Muon objects
edm::Ref< MuonCollection > MuonRef
presistent reference to a Muon
edm::EDGetTokenT< reco::PFCandidateCollection > vetoPFCandidatesSrc_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::Ref< PFRecTrackCollection > PFRecTrackRef
persistent reference to PFRecTrack objects
#define DEFINE_EDM_PLUGIN(factory, type, name)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
GeneralTracksImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
static bool hasValidTrack(const reco::MuonRef &muonRef, bool loose, double maxDPtOPt)
edm::EDGetTokenT< reco::PFRecTrackCollection > vetoPFTracksSrc_
const std::vector< double > DPtovPtCut_
Container::value_type value_type
const double muonMaxDPtOPt_
ProductID id() const
Accessor for product ID.
const reco::TrackBase::TrackQuality trackQuality_
static bool isMuon(const reco::PFBlockElement &elt)
static int muAssocToTrack(const reco::TrackRef &trackref, const reco::MuonCollection &muons)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
T getParameter(std::string const &) const
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
key_type key() const
Accessor for product key.
void importToBlock(const edm::Event &, ElementList &) const override
std::vector< Track > TrackCollection
collection of Tracks
static bool isLooseMuon(const reco::PFBlockElement &elt)
const ConversionRefVector & convRefs() const override