31 : theSL(sl), thePosition(
position), theDirection(direction), theChi2(
chi2), theCovMatrix(covMat),
theHits(
hits) {}
38 static const double epsilon = 0.00001;
71 for (AssPointCont::const_iterator hit2 = seg.
hits().begin(); hit2 != seg.
hits().end(); ++hit2) {
73 if ((*(*hit).first) == (*(*hit2).first)) {
88 AssPointCont::const_iterator hitBegin2 = hits2.begin(), hitEnd2 = hits2.end();
90 for (AssPointCont::const_iterator hit2 = hitBegin2; hit2 != hitEnd2; ++hit2) {
91 if ((*(*hit).first) == (*(*hit2).first) && (*hit).second != (*hit2).second) {
114 const unsigned int hitsSize =
theHits.size();
119 int layerN[hitsSize];
121 for (DTSegmentCand::AssPointCont::iterator assHit =
theHits.begin(); assHit !=
theHits.end(); ++assHit) {
122 layerN[
i] = (*assHit).first->id().layerId().layer() + 10 * (*assHit).first->id().superlayerId().superlayer();
123 for (
unsigned int j = 0;
j <
i;
j++) {
124 if (layerN[
i] == layerN[
j])
141 double seg2DChi2 =
chi2();
144 std::vector<DTRecHit1D> hits1D;
145 for (DTSegmentCand::AssPointCont::iterator assHit =
theHits.begin(); assHit !=
theHits.end(); ++assHit) {
146 GlobalPoint hitGlobalPos = theSL->toGlobal((*assHit).first->localPosition((*assHit).second));
148 LocalPoint hitPosInLayer = theSL->layer((*assHit).first->id().layerId())->
toLocal(hitGlobalPos);
152 ((*assHit).first)->digiTime(),
154 ((*assHit).first)->localPositionError());
155 hits1D.push_back(
hit);
158 return new DTSLRecSegment2D(theSL->id(), seg2Dposition, seg2DDirection, seg2DCovMatrix, seg2DChi2, hits1D);
167 LocalVector dirInCh = theSL->chamber()->toLocal(theSL->toGlobal(direction()));
171 double seg2DChi2 =
chi2();
174 std::vector<DTRecHit1D> hits1D;
175 for (DTSegmentCand::AssPointCont::iterator assHit =
theHits.begin(); assHit !=
theHits.end(); ++assHit) {
176 GlobalPoint hitGlobalPos = theSL->toGlobal((*assHit).first->localPosition((*assHit).second));
179 ->superLayer((*assHit).first->id().superlayerId())
180 ->layer((*assHit).first->id().layerId())
185 ((*assHit).first)->digiTime(),
187 ((*assHit).first)->localPositionError());
188 hits1D.push_back(
hit);
198 return *(
pt1.first) < *(
pt2.first);
203 << seg.DTSegmentCand::nHits() <<
" t0: " << seg.
t0();