20 ?
reco::TrackBase::qualityByName(conf.getParameter<
std::
string>(
"trackQuality"))
22 DPtovPtCut_(conf.getParameter<
std::vector<double> >(
"DPtOverPtCuts_byTrackAlgo")),
23 NHitCut_(conf.getParameter<
std::vector<unsigned> >(
"NHitCuts_byTrackAlgo")),
26 conf.existsAs<
bool>(
"cleanBadConvertedBrems") ? conf.getParameter<
bool>(
"cleanBadConvertedBrems") :
false) {
29 pfmu_ = std::unique_ptr<PFMuonAlgo>(
new PFMuonAlgo(conf, postMuonCleaning));
43 std::unique_ptr<PFMuonAlgo>
pfmu_;
52 elems.reserve(elems.size() +
tracks->size());
53 std::vector<bool> mask(
tracks->size(),
true);
59 auto itr = elems.begin();
60 while (itr != elems.end()) {
73 itr = elems.erase(itr);
84 auto TKs_end = std::partition(
86 auto btk_elems = elems.begin();
87 auto btrack =
tracks->cbegin();
88 auto etrack =
tracks->cend();
91 std::find_if(btk_elems, TKs_end, [&](
const ElementType&
a) {
return (a->trackRef() ==
track->trackRef()); });
92 if (tk_elem != TKs_end) {
117 bool thisIsAPotentialMuon =
false;
126 if (thisIsAPotentialMuon) {
128 <<
"Potential Muon P " << pftrackref->trackRef()->p() <<
" pt " << pftrackref->trackRef()->p() << std::endl;
132 elems.emplace_back(trkElem);
135 elems.shrink_to_fit();
140 auto muon = std::find_if(muonh->cbegin(), muonh->cend(), [&](
const reco::Muon&
m) {
141 return (
m.track().isNonnull() &&
m.track() == trackref);
T getParameter(std::string const &) const
void importToBlock(const edm::Event &, ElementList &) const override
GeneralTracksImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
const bool useIterTracking_
const std::vector< double > DPtovPtCut_
edm::EDGetTokenT< reco::MuonCollection > muons_
static bool isMuon(const reco::PFBlockElement &elt)
TrackQuality
track quality
const reco::TrackRef & trackRef() const override
std::unique_ptr< PFMuonAlgo > pfmu_
const ConversionRefVector & convRefs() const override
bool trackType(TrackType trType) const override
int muAssocToTrack(const reco::TrackRef &trackref, const edm::Handle< reco::MuonCollection > &muonh) const
bool empty() const
Is the RefVector empty.
edm::EDGetTokenT< reco::PFRecTrackCollection > src_
std::vector< Muon > MuonCollection
collection of Muon objects
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Container::value_type value_type
edm::Ref< PFRecTrackCollection > PFRecTrackRef
persistent reference to PFRecTrack objects
const VertexCompositeCandidateRef & V0Ref() const override
edm::Ref< MuonCollection > MuonRef
presistent reference to a Muon
const std::vector< unsigned > NHitCut_
bool isNull() const
Checks for null.
const PFDisplacedTrackerVertexRef & displacedVertexRef(TrackType trType) const override
const reco::TrackBase::TrackQuality trackQuality_
static bool isLooseMuon(const reco::PFBlockElement &elt)
const bool cleanBadConvBrems_
void setMuonRef(const MuonRef &muref) override
reference to the Muon
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects