14 sort(tracks.begin(),tracks.end(),
Less());
15 typedef std::vector<TrackAndHits>::iterator Tracks_Itr;
16 Tracks_Itr it1 = tracks.begin();
17 while (it1 != tracks.end() ) {
18 for (Tracks_Itr it2 = it1+1; it1->first && it2<tracks.end(); it2++) {
19 if (! it2->first)
continue;
20 if ( it2->first->eta() - it1->first->eta() >
theDeltaEtaCut)
break;
21 switch (
compare( &(*it1), &(*it2) ) ) {
31 *it2 = *(
merge(&(*it1),&(*it2)));
37 if (0 == it1->first) tracks.erase(it1);
else it1++;
43 return (a.first->eta() < b.first->eta());
50 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) {
69 if (trhA==trhB) nshared++;
74 if (hitsA.
size() >= 3 && hitsB.
size() >= 3 )
76 else if (hitsB.
size() >= 3)
81 else if (nshared >= 1) {
84 else if ( hitsA.
size() >= 3
85 && a->first->charge()==b->first->charge()
86 && fabs(a->first->pt()-b->first->pt())/b->first->pt() <
theDiffRelPtCut )
88 else if ( hitsA.
size() == 2 )
T getParameter(std::string const &) const
std::pair< const reco::Track *, SeedingHitSet > TrackAndHits
bool operator()(const TrackAndHits &, const TrackAndHits &) const
Action compare(const TrackAndHits *, const TrackAndHits *) const
virtual void resolve(TracksAndHits &) const
L1MuonSeedsMerger(const edm::ParameterSet &cfg)
const TrackAndHits * merge(const TrackAndHits *, const TrackAndHits *) const
unsigned int size() const