20 for(std::vector<reco::Muon>::iterator muonIter1 =
inputMuons->begin();
23 if(muonIter1->isTrackerMuon()){
26 for(std::vector<reco::Muon>::iterator muonIter2 =
inputMuons->begin();
29 if(muonIter2->isTrackerMuon()) {
30 if(muonIter2 != muonIter1) {
33 for(std::vector<reco::MuonChamberMatch>::iterator chamberIter1 = muonIter1->matches().begin();
34 chamberIter1 != muonIter1->matches().end();
36 for(std::vector<reco::MuonSegmentMatch>::iterator segmentIter1 = chamberIter1->segmentMatches.begin();
37 segmentIter1 != chamberIter1->segmentMatches.end();
39 for(std::vector<reco::MuonChamberMatch>::iterator chamberIter2 = muonIter2->matches().begin();
40 chamberIter2 != muonIter2->matches().end();
42 for(std::vector<reco::MuonSegmentMatch>::iterator segmentIter2 = chamberIter2->segmentMatches.begin();
43 segmentIter2 != chamberIter2->segmentMatches.end();
49 bool addsegment(
false);
51 if( segmentIter1->cscSegmentRef.isNonnull() && segmentIter2->cscSegmentRef.isNonnull() ) {
54 isDuplicateOf(segmentIter1->cscSegmentRef,segmentIter2->cscSegmentRef) &&
56 chamberIter1->id == chamberIter2->id ) {
63 std::make_pair(
CSCDetId(chamberIter2->id),segmentIter2->cscSegmentRef)) ) {
70 std::make_pair(
CSCDetId(chamberIter2->id),segmentIter2->cscSegmentRef)) ) {
81 std::make_pair(&*muonIter2,
82 std::make_pair(&*chamberIter2,
85 ) ==
mesh_[&*muonIter1].end()) {
86 mesh_[&*muonIter1].push_back(std::make_pair(&*muonIter2,
87 std::make_pair(&*chamberIter2,
109 if(
mesh_.size() == 1) {
110 for(std::vector<reco::MuonChamberMatch>::iterator chamberIter1 =
mesh_.begin()->first->matches().begin();
111 chamberIter1 !=
mesh_.begin()->first->matches().end();
113 for(std::vector<reco::MuonSegmentMatch>::iterator segmentIter1 = chamberIter1->segmentMatches.begin();
114 segmentIter1 != chamberIter1->segmentMatches.end();
123 if(
mesh_.size() > 1) {
124 for( MeshType::iterator
i =
mesh_.begin();
i !=
mesh_.end(); ++
i ) {
125 for( std::vector<reco::MuonChamberMatch>::iterator chamberIter1 =
i->first->matches().begin();
126 chamberIter1 !=
i->first->matches().end();
128 for(std::vector<reco::MuonSegmentMatch>::iterator segmentIter1 = chamberIter1->segmentMatches.begin();
129 segmentIter1 != chamberIter1->segmentMatches.end();
134 for( AssociationType::iterator j =
i->second.begin();
135 j !=
i->second.end();
138 if( segmentIter1->cscSegmentRef.isNonnull() &&
139 j->second.second->cscSegmentRef.isNonnull() ) {
142 CSCDetId segIterId(chamberIter1->id), shareId(j->second.first->id);
145 isDuplicateOf(std::make_pair(segIterId,segmentIter1->cscSegmentRef),
146 std::make_pair(shareId,j->second.second->cscSegmentRef)) )
150 isDuplicateOf(segmentIter1->cscSegmentRef,j->second.second->cscSegmentRef) &&
151 segIterId.ring() == 4 && shareId.ring() == 4 &&
152 segIterId == segIterId)
157 std::make_pair(
CSCDetId(j->second.first->id),j->second.second->cscSegmentRef)) )
164 if( ((segmentIter1->mask&0x1e0000) == 0x1e0000 && !shared) ||
165 (chamberIter1->id.subdetId() ==
MuonSubdetId::DT && (segmentIter1->mask&0x1e0000)) )
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool isClusteredWith(const std::pair< CSCDetId, CSCSegmentRef > &lhs, const std::pair< CSCDetId, CSCSegmentRef > &rhs) const
static const unsigned int BelongsToTrackByCleaning
bool isDuplicateOf(const CSCSegmentRef &lhs, const CSCSegmentRef &rhs) const