Go to the documentation of this file.
44 elems.reserve(elems.size() +
tracks->size());
45 std::vector<bool> mask(
tracks->size(),
true);
51 auto itr = elems.begin();
52 while (
itr != elems.end()) {
76 auto TKs_end = std::partition(
78 auto btk_elems = elems.begin();
79 auto btrack =
tracks->cbegin();
80 auto etrack =
tracks->cend();
83 std::find_if(btk_elems, TKs_end, [&](
const ElementType&
a) {
return (
a->trackRef() ==
track->trackRef()); });
84 if (tk_elem != TKs_end) {
91 static_cast<reco::PFBlockElementTrack*>(tk_elem->get())->setMuonRef(muonref);
109 bool thisIsAPotentialMuon =
false;
112 thisIsAPotentialMuon =
119 if (thisIsAPotentialMuon) {
121 <<
"Potential Muon P " << pftrackref->trackRef()->p() <<
" pt " << pftrackref->trackRef()->p() << std::endl;
125 elems.emplace_back(trkElem);
128 elems.shrink_to_fit();
133 auto muon = std::find_if(muonh->cbegin(), muonh->cend(), [&](
const reco::Muon&
m) {
134 return (
m.track().isNonnull() &&
m.track() == trackref);
bool trackType(TrackType trType) const override
edm::EDGetTokenT< reco::MuonCollection > muons_
const std::vector< unsigned > NHitCut_
edm::EDGetTokenT< reco::PFRecTrackCollection > src_
const VertexCompositeCandidateRef & V0Ref() const override
bool isNull() const
Checks for null.
const reco::TrackRef & trackRef() const override
TrackQuality
track quality
const bool cleanBadConvBrems_
const bool useIterTracking_
int muAssocToTrack(const reco::TrackRef &trackref, const edm::Handle< reco::MuonCollection > &muonh) const
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::Ref< PFRecTrackCollection > PFRecTrackRef
persistent reference to PFRecTrack objects
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
GeneralTracksImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
static bool hasValidTrack(const reco::MuonRef &muonRef, bool loose, double maxDPtOPt)
const std::vector< double > DPtovPtCut_
Container::value_type value_type
const double muonMaxDPtOPt_
std::vector< std::pair< float, float > >::iterator itr
const reco::TrackBase::TrackQuality trackQuality_
static bool isMuon(const reco::PFBlockElement &elt)
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
void importToBlock(const edm::Event &, ElementList &) const override
static bool isLooseMuon(const reco::PFBlockElement &elt)
const ConversionRefVector & convRefs() const override