27 for (MuonRecHitContainer::const_iterator iter =
theRhits.begin(),
end =
theRhits.end(); iter !=
end; ++iter) {
29 if ((*iter)->isME0()) {
34 station1Hits.push_back(*iter);
36 station2Hits.push_back(*iter);
38 station3Hits.push_back(*iter);
40 station4Hits.push_back(*iter);
51 if (!station2Hits.empty() && !station3Hits.empty()) {
54 betterSecondHits = &station3Hits;
55 notAsGoodSecondHits = &station2Hits;
81 for (MuonRecHitContainer::const_iterator itr1 = hits1.begin(), end1 = hits1.end(); itr1 != end1; ++itr1) {
82 CSCDetId cscId1((*itr1)->geographicalId().rawId());
85 for (MuonRecHitContainer::const_iterator itr2 = hits2.begin(), end2 = hits2.end(); itr2 != end2; ++itr2) {
86 CSCDetId cscId2((*itr2)->geographicalId().rawId());
93 double sigmapt =
pts[1];
127 int nhits = segment->recHits().size();
128 if (segment->chi2() / (
nhits * 2. - 4.) > 3.)
130 if (segment->chi2() / (
nhits * 2. - 4.) > 9.)
140 float dPhiGloDir = fabs(
deltaPhi(segment->globalPosition().barePhi(), segment->globalDirection().barePhi()));
145 if (segment->isCSC() and
CSCDetId(segment->geographicalId()).
ring() == 4) {
146 const auto chamber = dynamic_cast<const CSCChamber*>(segment->det());
147 if (
chamber->specs()->gangedStrips())
157 float dPhiGloDir = .0;
158 float bestdPhiGloDir =
M_PI;
161 for (MuonRecHitContainer::const_iterator iter =
endcapHits.begin(); iter !=
endcapHits.end(); iter++) {
162 if (!(*iter)->isCSC() && !(*iter)->isME0())
171 dPhiGloDir = fabs(
deltaPhi(meit->globalPosition().barePhi(), meit->globalDirection().barePhi()));
176 bestdPhiGloDir = dPhiGloDir;
180 if (!
me1->isValid()) {
183 bestdPhiGloDir = dPhiGloDir;
189 bestdPhiGloDir = dPhiGloDir;
192 if (
me1->isValid() && bestdPhiGloDir > .03) {
193 if (dPhiGloDir < bestdPhiGloDir - .01 &&
quality == quality1) {
196 bestdPhiGloDir = dPhiGloDir;
211 if (
me1 &&
me1->isValid()) {
225 for (MuonRecHitContainer::const_iterator iter =
theRhits.begin(); iter !=
theRhits.end(); iter++) {
226 if (!(*iter)->isCSC())
228 for (MuonRecHitContainer::const_iterator iter2 = iter + 1; iter2 !=
theRhits.end(); ++iter2) {
229 if (!(*iter2)->isCSC())
232 CSCDetId cscId1((*iter)->geographicalId().rawId());
233 CSCDetId cscId2((*iter2)->geographicalId().rawId());
234 double dphi =
deltaPhi((**iter).globalPosition().barePhi(), (**iter2).globalPosition().barePhi());
236 int type1 = cscId1.iChamberType();
237 int type2 = cscId2.iChamberType();
241 std::cout <<
"HITPAIRA," << type1 << type2 <<
"," << dphi <<
"," << (**iter).globalPosition().eta()
245 std::cout <<
"HITPAIRB," << type2 << type1 <<
"," << -dphi <<
"," << (**iter2).globalPosition().eta()
248 if (type1 == type2) {
249 std::cout <<
"HITPAIRSAMESTATION," << type1 << cscId1.ring() << cscId2.ring() <<
"," << dphi <<
","
250 << (**iter).globalPosition().eta() << std::endl;