Implements BlockElementImporterBase.
Definition at line 64 of file GeneralTracksImporter.cc.
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();
References a, cms::cuda::assert(), cleanBadConvBrems_, reco::PFBlockElementTrack::convRefs(), reco::PFBlockElementTrack::displacedVertexRef(), HLT_FULL_cff::distance, DPtovPtCut_, MillePedeFileConverter_cfg::e, PFTrackAlgoTools::goodPtResolution(), PFMuonAlgo::hasValidTrack(), edm::Ref< C, T, F >::id(), heavyIonCSV_trainingSettings::idx, PFMuonAlgo::isLooseMuon(), PFMuonAlgo::isMuon(), edm::Ref< C, T, F >::isNull(), edm::Ref< C, T, F >::key(), LogDebug, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, PFMuonAlgo::muAssocToTrack(), muonMaxDPtOPt_, PDWG_BPHSkim_cff::muons, muons_, NHitCut_, BlockElementImporterBase::pfCandidateCollection, BlockElementImporterBase::pfRecTrackCollection, reco::PFBlockElementTrack::setMuonRef(), jetUpdater_cfi::sort, src_, reco::PFBlockElement::T_FROM_DISP, reco::PFBlockElement::T_FROM_GAMMACONV, BlockElementImporterBase::ticlSeedingRegion, reco::PFBlockElement::TRACK, HLT_FULL_cff::track, trackQuality_, reco::PFBlockElementTrack::trackRef(), tracks, tracksSrc_, reco::PFBlockElementTrack::trackType(), useIterTracking_, reco::PFBlockElementTrack::V0Ref(), PbPb_ZMuSkimMuonDPG_cff::veto, vetoEndcap_, vetoMode_, vetoPFCandidatesSrc_, vetoPFTracksSrc_, and vetoTICLSeedingSrc_.