#include "TrkReco/TTrack.h"
#include "TrkReco/TSegment.h"
#include "TrkReco/TMDCUtil.h"
#include "TrkReco/TMLink.h"
#include "TrkReco/TMDC.h"
#include "TrkReco/TMDCWire.h"
#include "TrkReco/TMDCWireHit.h"
#include "TrkReco/Range.h"
#include "CLHEP/Vector/ThreeVector.h"
#include <math.h>
#include "CLHEP/Matrix/Vector.h"
Go to the source code of this file.
Functions | |
unsigned | NCoreLinks (const CAList< TSegment > &list) |
returns # of core links in segments. | |
AList< TMLink > | Links (const TSegment &s, const TTrack &t) |
returns AList of TMLink used for a track. | |
unsigned | NUniqueLinks (const TSegment &a) |
returns # of unique segment links. | |
AList< TSegment > | UniqueLinks (const TSegment &a) |
returns a list of unique segments in links. | |
unsigned | NMajorLinks (const TSegment &a) |
returns # of links in the major link. | |
AList< TSegment > | MajorLinks (const TSegment &a) |
returns a list of segments in major links. | |
unsigned | NLinkBranches (const TSegment &a) |
returns # of link branches in the major link. | |
void | SeparateCrowded (const AList< TSegment > &in, AList< TSegment > &isolated, AList< TSegment > &crowded) |
returns isolated and crowded list. | |
unsigned | SuperLayer (const AList< TSegment > &list) |
returns super layer pattern. | |
TSegment * | OuterMostUniqueLink (const TSegment &a) |
returns a segment to the outer-most unique segment. | |
AList< TMLink > | Links (const AList< TSegment > &list) |
returns AList of TMLink. |
returns AList of TMLink used for a track.
Definition at line 963 of file TSegment.cxx.
Referenced by TBuilder::buildRphi(), TBuilder::buildStereo(), TBuilder::buildStereoNew(), TConformalFinder::expand(), TConformalFinder::refineSegments(), TConformalFinder::removeBadSegments(), TConformalFinder::removeUsedSegments(), and TConformalFinder::salvage().
00963 { 00964 AList<TMLink> a; 00965 00966 const AList<TMLink> & links = s.links(); 00967 const AList<TMLink> & trackLinks = t.links(); 00968 unsigned n = links.length(); 00969 for (unsigned i = 0; i < n; i++) { 00970 if (trackLinks.hasMember(links[i])) 00971 a.append(links[i]); 00972 } 00973 00974 return a; 00975 }
returns a list of segments in major links.
Definition at line 1026 of file TSegment.cxx.
References genRecEmupikp::i, s, and t().
Referenced by TConformalFinder::fastFinding2D().
01026 { 01027 AList<TSegment> links; 01028 const TSegment * s = & a; 01029 while (s) { 01030 unsigned nLinks = s->innerLinks().length(); 01031 if (nLinks == 0) return links; 01032 int tmp = 0, ii = 0; 01033 for (int i = 0; i < nLinks; ++i) { 01034 if(s->innerLinks()[i]->links().length() > tmp) { 01035 tmp = s->innerLinks()[i]->links().length(); 01036 ii = i; 01037 } 01038 } 01039 const TSegment * t = s->innerLinks()[ii]; 01040 // const TSegment * t = s->innerLinks()[0]; //tmp for tsf 01041 links.append((TSegment *) t); 01042 s = t; 01043 } 01044 return links; 01045 }
unsigned NCoreLinks | ( | const CAList< TSegment > & | list | ) |
returns # of core links in segments.
Definition at line 947 of file TSegment.cxx.
Referenced by TConformalFinder0::specialFinding(), and TConformalFinder0::standardFinding().
00947 { 00948 unsigned n = 0; 00949 unsigned nList = list.length(); 00950 for (unsigned i = 0; i < nList; i++) { 00951 const AList<TMLink> & links = list[i]->links(); 00952 for (unsigned j = 0; j < links.length(); j++) { 00953 unsigned state = links[j]->hit()->state(); 00954 if ((! (state & WireHitPatternLeft)) && 00955 (! (state & WireHitPatternRight))) 00956 ++n; 00957 } 00958 } 00959 return n; 00960 }
unsigned NLinkBranches | ( | const TSegment & | a | ) |
returns # of link branches in the major link.
Definition at line 1048 of file TSegment.cxx.
References s.
Referenced by TSegment::dump().
01048 { 01049 unsigned n = 0; 01050 const TSegment * s = & a; 01051 while (s) { 01052 unsigned nLinks = s->innerLinks().length(); 01053 if (nLinks == 0) return n; 01054 if (nLinks > 1) ++n; 01055 s = s->innerLinks()[0]; 01056 } 01057 return n; 01058 }
unsigned NMajorLinks | ( | const TSegment & | a | ) |
returns # of links in the major link.
Definition at line 1005 of file TSegment.cxx.
References genRecEmupikp::i, and s.
Referenced by TSegment::dump(), and TConformalFinder::fastFinding2D().
01005 { 01006 unsigned n = 0; 01007 const TSegment * s = & a; 01008 while (s) { 01009 unsigned nLinks = s->innerLinks().length(); 01010 if (nLinks == 0) return n; 01011 ++n; 01012 int tmp = 0, ii = 0; 01013 for (int i = 0; i < nLinks; ++i) { 01014 if(s->innerLinks()[i]->links().length() > tmp) { 01015 tmp = s->innerLinks()[i]->links().length(); 01016 ii = i; 01017 } 01018 } 01019 s = s->innerLinks()[ii]; 01020 // s = s->innerLinks()[0]; //tmp for tsf 01021 } 01022 return n; 01023 }
unsigned NUniqueLinks | ( | const TSegment & | a | ) |
returns # of unique segment links.
Definition at line 978 of file TSegment.cxx.
References s.
Referenced by TSegment::dump(), and TConformalFinder::fastFinding2D().
00978 { 00979 unsigned n = 0; 00980 const TSegment * s = & a; 00981 while (s) { 00982 unsigned nLinks = s->innerLinks().length(); 00983 if (nLinks != 1) return n; 00984 ++n; 00985 s = s->innerLinks()[0]; 00986 } 00987 return n; 00988 }
returns a segment to the outer-most unique segment.
Definition at line 1084 of file TSegment.cxx.
References TSegment::outerLinks().
Referenced by TConformalFinder::linkSegments().
01084 { 01085 const TSegment * o = & a; 01086 while (o->outerLinks().length() == 1) 01087 o = o->outerLinks()[0]; 01088 return (TSegment *) o; 01089 }
void SeparateCrowded | ( | const AList< TSegment > & | in, | |
AList< TSegment > & | isolated, | |||
AList< TSegment > & | crowded | |||
) |
returns isolated and crowded list.
Definition at line 1061 of file TSegment.cxx.
References genRecEmupikp::i, s, and TSegmentCrowd.
01063 { 01064 unsigned n = in.length(); 01065 if (n == 0) return; 01066 01067 for (unsigned i = 0; i < n; i++) { 01068 TSegment & s = * in[i]; 01069 if (s.state() & TSegmentCrowd) crowded.append(s); 01070 else isolated.append(s); 01071 } 01072 }
unsigned SuperLayer | ( | const AList< TSegment > & | list | ) |
returns super layer pattern.
Definition at line 1075 of file TSegment.cxx.
References genRecEmupikp::i.
01075 { 01076 unsigned sl = 0; 01077 unsigned n = list.length(); 01078 for (unsigned i = 0; i < n; i++) 01079 sl |= (1 << (list[i]->superLayerId())); 01080 return sl; 01081 }
returns a list of unique segments in links.
Definition at line 991 of file TSegment.cxx.
Referenced by TConformalFinder::fastFinding2D().
00991 { 00992 AList<TSegment> links; 00993 const TSegment * s = & a; 00994 while (s) { 00995 unsigned nLinks = s->innerLinks().length(); 00996 if (nLinks != 1) return links; 00997 const TSegment * t = s->innerLinks()[0]; 00998 links.append((TSegment *) t); 00999 s = t; 01000 } 01001 return links; 01002 }