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();
std::pair< std::shared_ptr< DTHitPairForFit >, DTEnums::DTCellSide > AssPoint
DTCellSide
Which side of the DT cell.
virtual AssPointCont conflictingHitPairs(const DTSegmentCand &seg) const
virtual unsigned int nHits() const
static const unsigned int nHitsMin
DTSegmentCand(AssPointCont &hits, const DTSuperLayer *sl)
Constructor.
virtual LocalPoint position() const
virtual bool good() const
virtual bool operator==(const DTSegmentCand &seg)
equality operator based on position, direction, chi2 and nHits
virtual LocalVector direction() const
virtual void add(AssPoint newHit)
add hits to the hit list.
virtual bool operator<(const DTSegmentCand &seg)
less operator based on nHits and chi2
virtual bool hitsShareLayer() const
Cos< T >::type cos(const T &t)
static const double chi2max
virtual double chi2() const
the chi2 (NOT chi2/NDOF) of the fit
virtual const AssPointCont & hits() const
the used hits
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
std::set< AssPoint, AssPointLessZ > AssPointCont
virtual int nSharedHitPairs(const DTSegmentCand &seg) const
number of shared hit pair with other segment candidate
std::ostream & operator<<(std::ostream &out, const DTSegmentCand &seg)
static int position[264][3]
virtual void removeHit(AssPoint hit)
remove hit from the candidate
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual ~DTSegmentCand()
Destructor.
virtual double t0() const
the t0 of the segment
virtual int nLayers() const
number of different layers with hits
virtual unsigned int NDOF() const
bool operator()(const AssPoint &pt1, const AssPoint &pt2) const
Geom::Theta< T > theta() const