Implements BlockElementImporterBase.
Definition at line 41 of file GeneralTracksImporterWithVeto.cc.
45 auto vetosH =
e.getHandle(
veto_);
46 const auto&
vetos = *vetosH;
47 std::unordered_set<unsigned> vetoed;
48 for (
unsigned i = 0;
i <
vetos.size(); ++
i) {
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()) {
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) {
99 static_cast<reco::PFBlockElementTrack*>(tk_elem->get())->setMuonRef(muonref);
117 bool thisIsAPotentialMuon =
false;
120 thisIsAPotentialMuon =
127 if (thisIsAPotentialMuon) {
128 LogDebug(
"GeneralTracksImporterWithVeto")
129 <<
"Potential Muon P " << pftrackref->trackRef()->p() <<
" pt " << pftrackref->trackRef()->p() << std::endl;
133 if (vetoed.count(pftrackref->trackRef().
key()) == 0 || muonref.isNonnull()) {
134 elems.emplace_back(trkElem);
139 elems.shrink_to_fit();
References a, cleanBadConvBrems_, reco::PFBlockElementTrack::convRefs(), reco::PFBlockElementTrack::displacedVertexRef(), HLT_FULL_cff::distance, DPtovPtCut_, MillePedeFileConverter_cfg::e, PFTrackAlgoTools::goodPtResolution(), PFMuonAlgo::hasValidTrack(), mps_fire::i, heavyIonCSV_trainingSettings::idx, PFMuonAlgo::isLooseMuon(), PFMuonAlgo::isMuon(), edm::Ref< C, T, F >::isNull(), crabWrapper::key, edm::Ref< C, T, F >::key(), LogDebug, muAssocToTrack(), muonMaxDPtOPt_, PDWG_BPHSkim_cff::muons, muons_, NHitCut_, reco::PFBlockElementTrack::setMuonRef(), src_, reco::PFBlockElement::T_FROM_DISP, reco::PFBlockElement::T_FROM_GAMMACONV, reco::PFBlockElement::TRACK, HLT_FULL_cff::track, trackQuality_, reco::PFBlockElementTrack::trackRef(), PDWG_EXOHSCP_cff::tracks, reco::PFBlockElementTrack::trackType(), useIterTracking_, reco::PFBlockElementTrack::V0Ref(), veto_, and boostedElectronIsolation_cff::vetos.