12 sort(tracks.begin(), tracks.end(),
Less());
13 typedef std::vector<TrackAndHits>::iterator Tracks_Itr;
14 Tracks_Itr it1 = tracks.begin();
15 while (it1 != tracks.end()) {
16 for (Tracks_Itr it2 = it1 + 1; it1->first && it2 < tracks.end(); it2++) {
21 switch (
compare(&(*it1), &(*it2))) {
31 *it2 = *(
merge(&(*it1), &(*it2)));
39 if (
nullptr == it1->first)
47 return (a.first->eta() < b.first->eta());
52 if (a->first->pt() > b->first->pt()) {
65 for (
unsigned int iHitA = 0, nHitsA = hitsA.size(); iHitA < nHitsA; ++iHitA) {
67 for (
unsigned int iHitB = 0, nHitsB = hitsB.size(); iHitB < nHitsB; ++iHitB) {
75 if (hitsA.size() >= 3 && hitsB.size() >= 3)
77 else if (hitsB.size() >= 3)
81 }
else if (nshared >= 1) {
82 if (hitsA.size() != hitsB.size())
84 else if (hitsA.size() >= 3 && a->first->charge() == b->first->charge() &&
85 fabs(a->first->pt() - b->first->pt()) / b->first->pt() <
theDiffRelPtCut)
87 else if (hitsA.size() == 2)
bool operator()(const TrackAndHits &, const TrackAndHits &) const
auto const & tracks
cannot be loose
Action compare(const TrackAndHits *, const TrackAndHits *) const
virtual void resolve(TracksAndHits &) const
L1MuonSeedsMerger(const edm::ParameterSet &cfg)
std::pair< const reco::Track *, SeedingHitSet > TrackAndHits
T getParameter(std::string const &) const
const TrackAndHits * merge(const TrackAndHits *, const TrackAndHits *) const