27 theSL(sl), theChi2(-1.) , theHits(hits){
36 theSL(sl), thePosition(position), theDirection(direction), theChi2(chi2),
37 theCovMatrix( covMat), theHits(hits) {
46 static const double epsilon=0.00001;
48 if (fabs(
chi2()-seg.
chi2())>epsilon)
return false;
75 for (AssPointCont::const_iterator
hit=
theHits.begin();
77 for (AssPointCont::const_iterator hit2=hitsCont.begin();
78 hit2!=hitsCont.end() ; ++hit2) {
80 if ((*(*hit).first)==(*(*hit2).first)) {
96 AssPointCont::const_iterator hitBegin2 = hits2.begin(), hitEnd2 = hits2.end();
99 for (AssPointCont::const_iterator hit2 = hitBegin2; hit2 != hitEnd2; ++hit2) {
100 if ((*(*hit).first)==(*(*hit2).first) &&
101 (*hit).second != (*hit2).second) {
112 if(
NDOF() == 0)
return false;
122 std::vector<int> layerN;
124 for(DTSegmentCand::AssPointCont::iterator assHit=
theHits.begin();
125 assHit!=
theHits.end(); ++assHit) {
126 layerN.push_back((*assHit).first->id().layerId().layer());
131 for(
int i=0;
i<(int)layerN.size();
i++){
132 for(
int j=
i+1;
j<(int)layerN.size();
j++){
133 if(layerN[
i] == layerN[
j])
return true;
149 double seg2DChi2 = chi2();
152 std::vector<DTRecHit1D> hits1D;
153 for(DTSegmentCand::AssPointCont::iterator assHit=theHits.begin();
154 assHit!=theHits.end(); ++assHit) {
157 theSL->toGlobal( (*assHit).first->localPosition((*assHit).second) );
160 theSL->layer( (*assHit).first->id().layerId() )->
toLocal(hitGlobalPos);
164 ((*assHit).first)->digiTime(),
166 ((*assHit).first)->localPositionError() );
167 hits1D.push_back(
hit);
171 seg2Dposition,seg2DDirection,seg2DCovMatrix,
182 LocalVector dirInCh= theSL->chamber()->toLocal(theSL->toGlobal( direction() ));
186 double seg2DChi2 = chi2();
189 std::vector<DTRecHit1D> hits1D;
190 for(DTSegmentCand::AssPointCont::iterator assHit=theHits.begin();
191 assHit!=theHits.end(); ++assHit) {
194 theSL->toGlobal( (*assHit).first->localPosition((*assHit).second) );
198 ->superLayer((*assHit).first->id().superlayerId())
199 ->layer( (*assHit).first->id().layerId() )->
toLocal(hitGlobalPos);
203 ((*assHit).first)->digiTime(),
205 ((*assHit).first)->localPositionError() );
206 hits1D.push_back(
hit);
210 pos,dirInCh,seg2DCovMatrix,
220 return *(pt1.first) < *(pt2.first);
225 <<
" chi2/nHits: " << seg.
chi2() <<
"/" << seg.DTSegmentCand::nHits() <<
"/" << seg.
nHits();
static unsigned int nHitsMin
DTCellSide
Which side of the DT cell.
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
virtual bool good() const
virtual unsigned int NDOF() const
static int position[TOTALCHAMBERS][3]
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 bool operator<(const DTSegmentCand &seg)
less operator based on nHits and chi2
Cos< T >::type cos(const T &t)
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
virtual AssPointCont hits() const
the used hits
std::pair< DTHitPairForFit *, DTEnums::DTCellSide > AssPoint
virtual AssPointCont conflictingHitPairs(const DTSegmentCand &seg) const
std::set< AssPoint, AssPointLessZ > AssPointCont
virtual unsigned int nHits() const
virtual LocalPoint position() const
virtual void add(DTHitPairForFit *hit, DTEnums::DTCellSide code)
add hits to the hit list.
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