31 : theSL(sl), thePosition(position), theDirection(direction), theChi2(chi2), theCovMatrix(covMat), theHits(hits) {}
38 static const double epsilon = 0.00001;
41 if (fabs(
chi2() - seg.
chi2()) > epsilon)
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);
191 return new DTChamberRecSegment2D(theSL->chamber()->id(), pos, dirInCh, seg2DCovMatrix, seg2DChi2, hits1D);
198 return *(pt1.first) < *(pt2.first);
202 out <<
" pos: " << seg.
position() <<
" dir: " << seg.
direction() <<
" chi2/nHits: " << seg.
chi2() <<
"/"
203 << seg.DTSegmentCand::nHits() <<
" t0: " << seg.
t0();
std::pair< std::shared_ptr< DTHitPairForFit >, DTEnums::DTCellSide > AssPoint
virtual const AssPointCont & hits() const
the used hits
DTCellSide
Which side of the DT cell.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
virtual bool good() const
virtual unsigned int NDOF() const
static const unsigned int nHitsMin
constexpr std::array< uint8_t, layerIndexSize > layer
DTSegmentCand(AssPointCont &hits, const DTSuperLayer *sl)
Constructor.
Geom::Theta< T > theta() const
virtual bool operator==(const DTSegmentCand &seg)
equality operator based on position, direction, chi2 and nHits
virtual bool hitsShareLayer() 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
Cos< T >::type cos(const T &t)
static const double chi2max
bool operator()(const AssPoint &pt1, const AssPoint &pt2) const
virtual int nLayers() const
number of different layers with hits
virtual double chi2() const
the chi2 (NOT chi2/NDOF) of the fit
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
virtual AssPointCont conflictingHitPairs(const DTSegmentCand &seg) const
std::set< AssPoint, AssPointLessZ > AssPointCont
virtual unsigned int nHits() const
virtual double t0() const
the t0 of the segment
virtual LocalPoint position() const
static int position[264][3]
virtual void removeHit(AssPoint hit)
remove hit from the candidate
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual ~DTSegmentCand()
Destructor.
virtual int nSharedHitPairs(const DTSegmentCand &seg) const
number of shared hit pair with other segment candidate
virtual LocalVector direction() const