25 theSL(sl), theChi2(-1.) , theHits(hits){
34 theSL(sl), thePosition(position), theDirection(direction), theChi2(chi2),
35 theCovMatrix( covMat), theHits(hits) {
44 static const double epsilon=0.00001;
46 if (fabs(
chi2()-seg.
chi2())>epsilon)
return false;
73 for (AssPointCont::const_iterator
hit=
theHits.begin();
75 for (AssPointCont::const_iterator hit2=hitsCont.begin();
76 hit2!=hitsCont.end() ; ++hit2) {
78 if ((*(*hit).first)==(*(*hit2).first)) {
94 AssPointCont::const_iterator hitBegin2 = hits2.begin(), hitEnd2 = hits2.end();
97 for (AssPointCont::const_iterator hit2 = hitBegin2; hit2 != hitEnd2; ++hit2) {
98 if ((*(*hit).first)==(*(*hit2).first) &&
99 (*hit).second != (*hit2).second) {
111 if(
NDOF() == 0)
return false;
125 if (
theHits.size()>20)
return false;
127 for(DTSegmentCand::AssPointCont::iterator assHit=
theHits.begin();
128 assHit!=
theHits.end(); ++assHit) {
129 layerN[
i]=(*assHit).first->id().layerId().layer()+10*(*assHit).first->id().superlayerId().superlayer();
134 for(
int i=0;i<(int)
theHits.size();i++){
135 for(
int j=0;
j<
i;
j++){
136 if(layerN[i] == layerN[
j])
return true;
152 double seg2DChi2 = chi2();
155 std::vector<DTRecHit1D> hits1D;
156 for(DTSegmentCand::AssPointCont::iterator assHit=theHits.begin();
157 assHit!=theHits.end(); ++assHit) {
160 theSL->toGlobal( (*assHit).first->localPosition((*assHit).second) );
163 theSL->layer( (*assHit).first->id().layerId() )->
toLocal(hitGlobalPos);
167 ((*assHit).first)->digiTime(),
169 ((*assHit).first)->localPositionError() );
170 hits1D.push_back(
hit);
174 seg2Dposition,seg2DDirection,seg2DCovMatrix,
185 LocalVector dirInCh= theSL->chamber()->toLocal(theSL->toGlobal( direction() ));
189 double seg2DChi2 = chi2();
192 std::vector<DTRecHit1D> hits1D;
193 for(DTSegmentCand::AssPointCont::iterator assHit=theHits.begin();
194 assHit!=theHits.end(); ++assHit) {
197 theSL->toGlobal( (*assHit).first->localPosition((*assHit).second) );
201 ->superLayer((*assHit).first->id().superlayerId())
202 ->layer( (*assHit).first->id().layerId() )->
toLocal(hitGlobalPos);
206 ((*assHit).first)->digiTime(),
208 ((*assHit).first)->localPositionError() );
209 hits1D.push_back(
hit);
213 pos,dirInCh,seg2DCovMatrix,
223 return *(pt1.first) < *(pt2.first);
228 <<
" chi2/nHits: " << seg.
chi2() <<
"/" << seg.DTSegmentCand::nHits()
229 <<
" t0: " << seg.
t0();
std::pair< std::shared_ptr< DTHitPairForFit >, DTEnums::DTCellSide > AssPoint
virtual void add(std::shared_ptr< DTHitPairForFit > hit, DTEnums::DTCellSide code)
add hits to the hit list.
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 const unsigned int nHitsMin
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)
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
virtual AssPointCont hits() const
the used hits
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
volatile std::atomic< bool > shutdown_flag false
virtual LocalVector direction() const