20 :
RecSegment(buildDetId(proto_segment.front()->cscDetId())),
22 theLocalDirection(direction),
25 aME11a_duplicate(
false) {
26 for (
unsigned int i = 0;
i < proto_segment.size(); ++
i)
33 std::vector<const TrackingRecHit*> pointersOfRecHits;
35 pointersOfRecHits.push_back(&(*irh));
37 return pointersOfRecHits;
41 std::vector<TrackingRecHit*> pointersOfRecHits;
43 pointersOfRecHits.push_back(&(*irh));
45 return pointersOfRecHits;
85 for (
unsigned int i = 0;
i < duplicates.size(); ++
i) {
93 const std::vector<CSCRecHit2D>& specificRecHits_2,
95 const std::vector<CSCRecHit2D>* rhContainer_1 = &specificRecHits_1;
96 const std::vector<CSCRecHit2D>* rhContainer_2 = &specificRecHits_2;
97 if (specificRecHits_1.size() > specificRecHits_2.size()) {
98 rhContainer_2 = &specificRecHits_1;
99 rhContainer_1 = &specificRecHits_2;
102 bool shareConditionPassed =
true;
103 for (std::vector<CSCRecHit2D>::const_iterator itRH = rhContainer_1->begin(); itRH != rhContainer_1->end(); ++itRH) {
105 bool sharedHit =
false;
106 for (std::vector<CSCRecHit2D>::const_iterator itRH2 = rhContainer_2->begin(); itRH2 != rhContainer_2->end();
108 if (itRH2->sharesInput(firstRecHit,
sharesInput)) {
114 shareConditionPassed =
false;
118 return shareConditionPassed;
145 float averageTime = 0;
146 std::vector<float> wireTimes;
149 averageTime +=
recHit->tpeak();
150 averageTime +=
recHit->wireTime();
151 wireTimes.push_back(
recHit->wireTime());
156 bool modified =
true;
160 std::vector<float>::iterator
maxHit;
161 for (std::vector<float>::iterator itWT = wireTimes.begin(); itWT != wireTimes.end(); ++itWT) {
162 float diff = fabs(*itWT - averageTime);
170 averageTime = (averageTime *
N - (*maxHit)) / (
N - 1);