Implements BlockElementImporterBase.
Definition at line 63 of file GeneralTracksImporter.cc.
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());
102 std::vector<bool> mask(
tracks->size(),
true);
108 auto itr = elems.begin();
109 while (itr != elems.end()) {
122 itr = elems.erase(itr);
133 auto TKs_end = std::partition(
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) {
148 static_cast<reco::PFBlockElementTrack*>(tk_elem->get())->setMuonRef(muonref);
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();
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_.