#include <T3DLine.h>
Inheritance diagram for T3DLine:
Public Member Functions | |
Vector | a (const Vector &) |
set track parameters | |
Vector | a (void) const |
Vector | a (const Vector &) |
set track parameters | |
Vector | a (void) const |
void | append (const AList< TMLink > &) |
appends TMLinks. | |
void | append (TMLink &) |
appends a TMLink. | |
void | append (const AList< TMLink > &) |
appends TMLinks. | |
void | append (TMLink &) |
appends a TMLink. | |
void | appendByApproach (AList< TMLink > &list, double maxSigma) |
appends TMLinks by approach. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned. | |
void | appendByApproach (AList< TMLink > &list, double maxSigma) |
appends TMLinks by approach. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned. | |
void | appendByDistance (AList< TMLink > &list, double maxDistance) |
appends TMLinks by distance. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned. | |
void | appendByDistance (AList< TMLink > &list, double maxDistance) |
appends TMLinks by distance. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned. | |
virtual int | approach (TMLink &) const |
calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened. | |
int | approach (TMLink &, bool sagCorrection=true) const |
calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened. | |
int | approach (TMLink &, bool sagCorrection=true) const |
calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened. | |
int | approach_line (const HepPoint3D &, const HepVector3D &, HepPoint3D &onLine, HepPoint3D &onTrack) const |
caluculate closest points between a line and this track | |
int | approach_line (const HepPoint3D &, const HepVector3D &, HepPoint3D &onLine, HepPoint3D &onTrack) const |
caluculate closest points between a line and this track | |
int | approach_point (const HepPoint3D &, HepPoint3D &onTrack) const |
caluculate closest point between a point and this track | |
int | approach_point (const HepPoint3D &, HepPoint3D &onTrack) const |
caluculate closest point between a point and this track | |
double | chi2 (void) const |
returns chi2. | |
double | chi2 (void) const |
returns chi2. | |
const AList< TMLink > & | cores (unsigned mask=0) const |
returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0. | |
const AList< TMLink > & | cores (unsigned mask=0) const |
returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0. | |
double | cosPhi0 (void) const |
double | cosPhi0 (void) const |
virtual double | distance (const TMLink &) const |
returns distance to a position of TMLink in TMLink space. | |
virtual double | distance (const TMLink &) const |
returns distance to a position of TMLink in TMLink space. | |
double | dr (void) const |
Track parameters. | |
double | dr (void) const |
Track parameters. | |
virtual void | dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const |
dumps debug information. | |
virtual void | dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const |
dumps debug information. | |
double | dz (void) const |
double | dz (void) const |
const SymMatrix & | Ea (const SymMatrix &) |
set error matrix | |
const SymMatrix & | Ea (void) const |
returns error matrix | |
const SymMatrix & | Ea (const SymMatrix &) |
set error matrix | |
const SymMatrix & | Ea (void) const |
returns error matrix | |
void | falseFit () |
false Fit | |
void | falseFit () |
false Fit | |
virtual int | fit (void) |
fits itself by a default fitter. Error was happened if return value is not zero. | |
virtual int | fit (void) |
fits itself by a default fitter. Error was happened if return value is not zero. | |
bool | fitted (void) const |
returns true if fitted. | |
bool | fitted (void) const |
returns true if fitted. | |
bool | fittedWithCathode (void) const |
returns true if fitted with cathode hits(TEMPORARY). | |
bool | fittedWithCathode (void) const |
returns true if fitted with cathode hits(TEMPORARY). | |
const TMFitter *const | fitter (const TMFitter *) |
sets a default fitter. | |
const TMFitter *const | fitter (void) const |
returns a pointer to a default fitter. | |
const TMFitter *const | fitter (const TMFitter *) |
sets a default fitter. | |
const TMFitter *const | fitter (void) const |
returns a pointer to a default fitter. | |
Helix | helix (void) const |
approximated helix class | |
Helix | helix (void) const |
approximated helix class | |
const TTrackHEP *const | hep (void) const |
returns TTrackHEP. | |
const TTrackHEP *const | hep (void) const |
returns TTrackHEP. | |
HepVector3D | k (void) const |
HepVector3D | k (void) const |
const AList< TMLink > & | links (unsigned mask=0) const |
returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0. | |
const AList< TMLink > & | links (unsigned mask=0) const |
returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0. | |
const TTrackMC *const | mc (void) const |
returns a pointer to TTrackMC. | |
const TTrackMC *const | mc (void) const |
returns a pointer to TTrackMC. | |
unsigned | nCores (unsigned mask=0) const |
returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0. | |
unsigned | nCores (unsigned mask=0) const |
returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0. | |
unsigned | ndf (void) const |
returns NDF | |
unsigned | ndf (void) const |
returns NDF | |
unsigned | nHeps (void) const |
returns # of contributed TTrackHEP tracks. | |
unsigned | nHeps (void) const |
returns # of contributed TTrackHEP tracks. | |
unsigned | nLinks (unsigned mask=0) const |
returns # of masked TMLinks assigned to this track object. | |
unsigned | nLinks (unsigned mask=0) const |
returns # of masked TMLinks assigned to this track object. | |
unsigned | objectType (void) const |
returns object type | |
unsigned | objectType (void) const |
returns object type | |
TMLink * | operator[] (unsigned i) const |
TMLink * | operator[] (unsigned i) const |
double | phi0 (void) const |
double | phi0 (void) const |
const HepPoint3D & | pivot (const HepPoint3D &) |
set new pivot | |
const HepPoint3D & | pivot (void) const |
pivot position | |
const HepPoint3D & | pivot (const HepPoint3D &) |
set new pivot | |
const HepPoint3D & | pivot (void) const |
pivot position | |
double | reducedchi2 (void) const |
returns reduced-chi2 | |
double | reducedchi2 (void) const |
returns reduced-chi2 | |
virtual void | refine (double maxSigma) |
removes bad points by pull. The bad points are masked not to be used in fit. | |
virtual void | refine (AList< TMLink > &list, double maxSigma) |
removes bad points by pull. The bad points are removed from the track, and are returned in 'list'. | |
virtual void | refine (double maxSigma) |
removes bad points by pull. The bad points are masked not to be used in fit. | |
virtual void | refine (AList< TMLink > &list, double maxSigma) |
removes bad points by pull. The bad points are removed from the track, and are returned in 'list'. | |
void | remove (const AList< TMLink > &) |
removes TMLinks. | |
void | remove (TMLink &a) |
removes a TMLink. | |
void | remove (const AList< TMLink > &) |
removes TMLinks. | |
void | remove (TMLink &a) |
removes a TMLink. | |
virtual void | removeLinks (void) |
virtual void | removeLinks (void) |
void | set (const HepPoint3D &, double t_dr, double t_phi0, double t_dz, double t_tanl) |
set track parameters,pivot | |
void | set (const HepPoint3D &, double t_dr, double t_phi0, double t_dz, double t_tanl) |
set track parameters,pivot | |
double | sinPhi0 (void) const |
double | sinPhi0 (void) const |
T3DLine (const T3DLine &) | |
T3DLine (const TTrack &) | |
T3DLine () | |
Constructors. | |
T3DLine (const T3DLine &) | |
T3DLine (const TTrack &) | |
T3DLine () | |
Constructors. | |
double | tanl (void) const |
double | tanl (void) const |
unsigned | testByApproach (const AList< TMLink > &list, double sigma) const |
unsigned | testByApproach (const TMLink &list, double sigma) const |
returns # of good hits to be appended. | |
unsigned | testByApproach (const AList< TMLink > &list, double sigma) const |
unsigned | testByApproach (const TMLink &list, double sigma) const |
returns # of good hits to be appended. | |
virtual unsigned | type (void) const |
returns type. Definition is depending on an object class. | |
virtual unsigned | type (void) const |
returns type. Definition is depending on an object class. | |
void | update (void) const |
update cache. | |
void | update (void) const |
update cache. | |
HepPoint3D | x (double) const |
returns position on 3D line | |
HepPoint3D | x (double) const |
returns position on 3D line | |
HepPoint3D | x0 (void) const |
returns 3D line component x(t)=x0 + t * k | |
HepPoint3D | x0 (void) const |
returns 3D line component x(t)=x0 + t * k | |
virtual | ~T3DLine () |
Destructor. | |
virtual | ~T3DLine () |
Destructor. | |
Protected Attributes | |
bool | _fitted |
bool | _fittedWithCathode |
AList< TMLink > | _links |
AList< TMLink > | _links |
TTrackMC * | _mc |
TTrackMC * | _mc |
Private Attributes | |
double | _chi2 |
double | _cos_phi0 |
double | _dr |
double | _dz |
SymMatrix | _Ea |
unsigned | _ndf |
double | _phi0 |
HepPoint3D | _pivot |
double | _sin_phi0 |
double | _tanl |
Static Private Attributes | |
const T3DLineFitter | _fitter = T3DLineFitter("T3DLine Default fitter") |
Friends | |
class | T3DLineFitter |
|
Constructors.
00022 : TTrackBase(), 00023 _dr(0),_phi0(0),_dz(0),_tanl(0), 00024 _chi2(0),_ndf(0),_Ea(SymMatrix(4,0)), 00025 _pivot(ORIGIN){ 00026 00027 _cos_phi0 = 1; 00028 _sin_phi0 = 0; 00029 00030 //...Set a default fitter... 00031 fitter(& T3DLine::_fitter); 00032 00033 _fitted = false; 00034 _fittedWithCathode = false; 00035 }
|
|
00038 : TTrackBase((TTrackBase &) a), 00039 _dr(a.helix().dr()), 00040 _phi0(a.helix().phi0()), 00041 _dz(a.helix().dz()), 00042 _tanl(a.helix().tanl()), 00043 _chi2(0),_ndf(0),_Ea(SymMatrix(4,0)), 00044 _pivot(a.helix().pivot()){ 00045 00046 _cos_phi0 = cos(_phi0); 00047 _sin_phi0 = sin(_phi0); 00048 00049 //...Set a default fitter... 00050 fitter(& T3DLine::_fitter); 00051 00052 _fitted = false; 00053 _fittedWithCathode = false; 00054 }
|
|
00060 : TTrackBase((TTrackBase &) a), 00061 _dr(a.dr()), 00062 _phi0(a.phi0()), 00063 _dz(a.dz()), 00064 _tanl(a.tanl()), 00065 _chi2(a.chi2()),_ndf(a.ndf()), 00066 _Ea(a.Ea()), 00067 _pivot(a.pivot()){ 00068 00069 _cos_phi0 = cos(_phi0); 00070 _sin_phi0 = sin(_phi0); 00071 00072 //...Set a default fitter... 00073 fitter(& T3DLine::_fitter); 00074 00075 _fitted = false; 00076 _fittedWithCathode = false; 00077 }
|
|
Destructor.
00056 { 00057 }
|
|
Constructors.
|
|
|
|
|
|
Destructor.
|
|
set track parameters
|
|
|
|
set track parameters
00187 { 00188 _dr = ta[0]; 00189 _phi0 = ta[1]; 00190 _dz = ta[2]; 00191 _tanl = ta[3]; 00192 _cos_phi0 = cos(_phi0); 00193 _sin_phi0 = sin(_phi0); 00194 return(ta); 00195 }
|
|
00107 { 00108 Vector ta(4); 00109 ta[0] = _dr; 00110 ta[1] = _phi0; 00111 ta[2] = _dz; 00112 ta[3] = _tanl; 00113 return(ta); 00114 }
|
|
appends TMLinks.
|
|
appends a TMLink.
|
|
appends TMLinks.
00357 { 00358 AList<TMLink> tmp; 00359 for (unsigned i = 0; i < a.length(); i++) { 00360 if ((_links.hasMember(a[i])) || (a[i]->hit()->state() & WireHitUsed)) { 00361 #ifdef TRKRECO_DEBUG_DETAIL 00362 std::cout << " TTrackBase::append(list) !!! "; 00363 std::cout << a[i]->wire()->name(); 00364 std::cout << " Hey!, this is already used! Don't mess with me."; 00365 std::cout << std::endl; 00366 #endif 00367 continue; 00368 } 00369 else { 00370 tmp.append(a[i]); 00371 } 00372 } 00373 _links.append(tmp); 00374 _updated = false; 00375 _fitted = false; 00376 _fittedWithCathode = false; // added by matsu ( 1999/05/24 ) 00377 }
|
|
appends a TMLink.
00335 { 00336 if ((a.hit()->state() & WireHitUsed)) { 00337 #ifdef TRKRECO_DEBUG_DETAIL 00338 std::cout << "TTrackBase::append !!! " << a.wire()->name() 00339 << " this is already used by another track!" << std::endl; 00340 #endif 00341 return; 00342 } 00343 if (_links.hasMember(a)) { 00344 #ifdef TRKRECO_DEBUG_DETAIL 00345 std::cout << "TTrackBase::append !!! " << a.wire()->name() 00346 << " this is already included in this track!" << std::endl; 00347 #endif 00348 return; 00349 } 00350 _links.append(a); 00351 _updated = false; 00352 _fitted = false; 00353 _fittedWithCathode = false; // added by matsu ( 1999/05/24 ) 00354 }
|
|
appends TMLinks by approach. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.
|
|
appends TMLinks by approach. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.
00101 { 00102 #ifdef TRKRECO_DEBUG_DETAIL 00103 std::cout << " TTrackBase::appendByApproach ... sigma=" << maxSigma << std::endl; 00104 #endif 00105 00106 AList<TMLink> unused; 00107 unsigned n = list.length(); 00108 for (unsigned i = 0; i < n; i++) { 00109 TMLink & l = * list[i]; 00110 00111 if ((_links.hasMember(l)) || (l.hit()->state() & WireHitUsed)) 00112 continue; 00113 00114 //...Calculate closest approach... 00115 int err = approach(l); 00116 if (err < 0) { 00117 unused.append(l); 00118 continue; 00119 } 00120 00121 //...Calculate sigma... 00122 float distance = (l.positionOnWire() - l.positionOnTrack()).mag(); 00123 float diff = fabs(distance - l.drift()); 00124 float sigma = diff / l.dDrift(); 00125 00126 //...For debug... 00127 #ifdef TRKRECO_DEBUG_DETAIL 00128 std::cout << " sigma=" << sigma; 00129 std::cout << ",dist=" << distance; 00130 std::cout << ",diff=" << diff; 00131 std::cout << ",err=" << l.hit()->dDrift() << ","; 00132 if (sigma < maxSigma) std::cout << "ok,"; 00133 else std::cout << "X,"; 00134 l.dump("mc"); 00135 #endif 00136 00137 //...Make sigma cut... 00138 if (sigma > maxSigma) { 00139 unused.append(l); 00140 continue; 00141 } 00142 00143 //...OK... 00144 _links.append(l); 00145 _updated = false; 00146 _fitted = false; 00147 } 00148 list.remove(unused); 00149 }
|
|
appends TMLinks by distance. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.
|
|
appends TMLinks by distance. 'list' is an input. Unappended TMLinks will be removed from 'list' when returned.
00152 {
00153 std::cout << "TTrackBase::appendByDistance !!! not implemented" << std::endl;
00154 list.removeAll();
00155 }
|
|
calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened.
Reimplemented in TTrack, and TTrack. 00095 { 00096 std::cout << "TTrackBase::approach !!! not implemented" << std::endl; 00097 return -1; 00098 }
|
|
calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened.
|
|
calculates the closest approach to a wire in real space. Results are stored in TMLink. Return value is negative if error happened.
00202 { 00203 00204 const TMDCWire& w=*l.wire(); 00205 HepPoint3D xw = w.xyPosition(); 00206 HepPoint3D wireBackwardPosition = w.backwardPosition(); 00207 HepVector3D v = w.direction(); 00208 00209 HepPoint3D onWire,onTrack; 00210 00211 if(approach_line(wireBackwardPosition,v,onWire,onTrack)<0) 00212 return(-1); 00213 00214 // onWire,onTrack filled 00215 00216 if(!doSagCorrection){ 00217 l.positionOnWire(onWire); 00218 l.positionOnTrack(onTrack); 00219 return(0); // no sag correction 00220 } 00221 // Sag correction 00222 // loop for sag correction 00223 double onWire_y = onWire.y(); 00224 double onWire_z = onWire.z(); 00225 00226 unsigned nTrial = 1; 00227 while(nTrial<100){ 00228 w.wirePosition(onWire_z,xw,wireBackwardPosition,(HepVector3D&)v); 00229 if(approach_line(wireBackwardPosition,v,onWire,onTrack)<0) 00230 return(-1); 00231 if(fabs(onWire_y - onWire.y())<0.0001) break; // |dy|< 1 micron 00232 onWire_y = onWire.y(); 00233 onWire_z = onWire.z(); 00234 00235 nTrial++; 00236 } 00237 00238 l.positionOnWire(onWire); 00239 l.positionOnTrack(onTrack); 00240 return(nTrial); 00241 }
|
|
caluculate closest points between a line and this track
|
|
caluculate closest points between a line and this track
00244 { 00245 // line = [w0] + s * [v] -> [onLine] 00246 // trk = [x0] + t * [k] -> [onTrack] 00247 // if [v]//[k] then return(-1) error 00248 00249 const HepVector3D k = this->k(); 00250 const double v_k = v.dot(k); 00251 const double v_2 = v.mag2(); 00252 const double k_2 = k.mag2(); 00253 const double tk = v_k*v_k - v_2*k_2; 00254 if(tk==0) return(-1); 00255 00256 const HepPoint3D x0 = this->x0(); 00257 const HepPoint3D dx = x0 - w0; 00258 const double t = dx.dot( v_2 * k - v_k * v)/tk; 00259 const double s = dx.dot( v_k * k - k_2 * v)/tk; 00260 00261 onLine = w0 + s * v; 00262 onTrack = x0 + t * k; 00263 return(0); 00264 }
|
|
caluculate closest point between a point and this track
|
|
caluculate closest point between a point and this track
00266 { 00267 // trk = [x0] + t * [k] -> [onTrack] 00268 // if [v]//[k] then return(-1) error 00269 00270 const HepVector3D k = this->k(); 00271 const HepPoint3D x0 = this->x0(); 00272 const HepPoint3D dx = p0 - x0; 00273 const double t = dx.dot(k)/k.mag2(); 00274 00275 onTrack = x0 + t * k; 00276 return(0); 00277 }
|
|
returns chi2.
|
|
returns chi2.
00131 {
00132 return _chi2;
00133 }
|
|
returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
|
|
returns a list of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
00290 { 00291 if (mask) 00292 std::cout << "TTrackBase::cores !!! mask is not supported" << std::endl; 00293 if (! _updated) update(); 00294 return _cores; 00295 }
|
|
|
|
00095 {
00096 return _cos_phi0;
00097 }
|
|
returns distance to a position of TMLink in TMLink space.
|
|
returns distance to a position of TMLink in TMLink space.
Reimplemented in TLine0, TMLine, TLine0, and TMLine. 00089 { 00090 std::cout << "TTrackBase::distance !!! not implemented" << std::endl; 00091 return 0.; 00092 }
|
|
Track parameters.
|
|
Track parameters.
00079 {
00080 return _dr;
00081 }
|
|
dumps debug information.
Reimplemented in TCircle, TLine0, TMLine, TSegment, TSegment0, TTrack, TCircle, TLine0, TMLine, TSegment, TSegment0, and TTrack. |
|
dumps debug information.
Reimplemented in TCircle, TLine0, TMLine, TSegment, TSegment0, TTrack, TCircle, TLine0, TMLine, TSegment, TSegment0, and TTrack. 00058 { 00059 bool mc = (msg.find("mc") != std::string::npos); 00060 bool pull = (msg.find("pull") != std::string::npos); 00061 bool flag = (msg.find("flag") != std::string::npos); 00062 bool detail = (msg.find("detail") != std::string::npos); 00063 if (detail) 00064 mc = pull = flag = true; 00065 00066 if (detail || (msg.find("layer") != std::string::npos)) { 00067 if (! _updated) update(); 00068 } 00069 if (detail || (msg.find("hits") != std::string::npos)) { 00070 Dump(_links, msg, pre); 00071 } 00072 }
|
|
|
|
00087 {
00088 return _dz;
00089 }
|
|
set error matrix
|
|
returns error matrix
|
|
set error matrix
00197 { 00198 _Ea = tEa; 00199 return(_Ea); 00200 }
|
|
returns error matrix
00116 {
00117 return(_Ea);
00118 }
|
|
false Fit
|
|
false Fit
00227 { 00228 _fitted = false; 00229 _fittedWithCathode = false; 00230 }
|
|
fits itself by a default fitter. Error was happened if return value is not zero.
|
|
fits itself by a default fitter. Error was happened if return value is not zero.
|
|
returns true if fitted.
|
|
returns true if fitted.
00220 {
00221 return _fitted;
00222 }
|
|
returns true if fitted with cathode hits(TEMPORARY).
|
|
returns true if fitted with cathode hits(TEMPORARY).
00241 {
00242 return _fittedWithCathode;
00243 }
|
|
sets a default fitter.
|
|
returns a pointer to a default fitter.
|
|
sets a default fitter.
|
|
returns a pointer to a default fitter.
00253 {
00254 return _fitter;
00255 }
|
|
approximated helix class
|
|
approximated helix class
00120 { 00121 HepVector a(5); 00122 a[0]=_dr;a[1]=_phi0;a[2]=1e-10;a[3]=_dz;a[4]=_tanl; 00123 Helix _helix(_pivot,a); 00124 return _helix; 00125 }
|
|
returns TTrackHEP.
|
|
returns TTrackHEP.
00380 { 00381 unsigned n = _links.length(); 00382 CAList<TTrackHEP> hepList; 00383 CList<unsigned> hepCounter; 00384 for (unsigned i = 0; i < n; i++) { 00385 const TTrackHEP * hep = _links[i]->hit()->mc()->hep(); 00386 unsigned nH = hepList.length(); 00387 bool found = false; 00388 for (unsigned j = 0; j < nH; j++) { 00389 if (hepList[j] == hep) { 00390 found = true; 00391 ++(* hepCounter[j]); 00392 } 00393 } 00394 00395 if (! found) { 00396 hepList.append(hep); 00397 unsigned c = 0; 00398 hepCounter.append(c); 00399 } 00400 } 00401 00402 _nHeps = hepList.length(); 00403 _hep = 0; 00404 unsigned max = 0; 00405 for (unsigned i = 0; i < _nHeps; i++) { 00406 if ((* hepCounter[i]) > max) { 00407 max = (* hepCounter[i]); 00408 _hep = hepList[i]; 00409 } 00410 } 00411 00412 return _hep; 00413 }
|
|
|
|
00158 { 00159 HepPoint3D p(-_sin_phi0,_cos_phi0,_tanl); 00160 return p; 00161 }
|
|
returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0.
|
|
returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0.
00270 { 00271 if (mask == 0) return _links; 00272 00273 std::cout << "TTrackBase::links !!! mask is not supportted yet" << std::endl; 00274 return _links; 00275 }
|
|
returns a pointer to TTrackMC.
|
|
returns a pointer to TTrackMC.
00247 {
00248 return _mc;
00249 }
|
|
returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
|
|
returns # of masked TMLinks for fit. 'mask' will be applied if mask is not 0.
00298 { 00299 if (mask) 00300 std::cout << "TTrackBase::nCores !!! mask is not supported" << std::endl; 00301 if (! _updated) update(); 00302 return _cores.length(); 00303 }
|
|
returns NDF
|
|
returns NDF
00127 {
00128 return _ndf;
00129 }
|
|
returns # of contributed TTrackHEP tracks.
|
|
returns # of contributed TTrackHEP tracks.
00416 { 00417 hep(); 00418 return _nHeps; 00419 }
|
|
returns # of masked TMLinks assigned to this track object.
|
|
returns # of masked TMLinks assigned to this track object.
00278 { 00279 unsigned n = _links.length(); 00280 if (mask == 0) return n; 00281 unsigned nn = 0; 00282 for (unsigned i = 0; i < n; i++) { 00283 const TMDCWireHit & h = * _links[i]->hit(); 00284 if (h.state() & mask) ++nn; 00285 } 00286 return nn; 00287 }
|
|
returns object type
Reimplemented from TTrackBase. |
|
returns object type
Reimplemented from TTrackBase. 00150 {
00151 return Line3D;
00152 }
|
|
|
|
00235 { 00236 return _links[i]; 00237 }
|
|
|
|
00083 {
00084 return _phi0;
00085 }
|
|
set new pivot
|
|
pivot position
|
|
set new pivot
00163 { 00164 double dr=(_pivot.x()-newpivot.x())*_cos_phi0 00165 +(_pivot.y()-newpivot.y())*_sin_phi0 + _dr; 00166 double dz=_pivot.z()-newpivot.z()+_dz 00167 +_tanl*((_pivot.x()-newpivot.x())*_sin_phi0 00168 +(newpivot.y()-_pivot.y())*_cos_phi0); 00169 _dr=dr; 00170 _dz=dz; 00171 _pivot=newpivot; 00172 return _pivot; 00173 }
|
|
pivot position
00103 {
00104 return _pivot;
00105 }
|
|
returns reduced-chi2
|
|
returns reduced-chi2
00135 { 00136 if(_ndf==0){ 00137 std::cout<<"error at T3DLine::reducedchi2 ndf=0"<<std::endl; 00138 return 0; 00139 } 00140 return (_chi2/_ndf); 00141 }
|
|
removes bad points by pull. The bad points are masked not to be used in fit.
|
|
removes bad points by pull. The bad points are removed from the track, and are returned in 'list'.
|
|
removes bad points by pull. The bad points are masked not to be used in fit.
00194 { 00195 AList<TMLink> bad = refineMain(sigma); 00196 // for (unsigned i = 0; i < bad.length(); i++) { 00197 // const TMDCWireHit * hit = bad[i]->hit(); 00198 // hit->state(hit->state() | WireHitInvalidForFit); 00199 // } 00200 00201 #ifdef TRKRECO_DEBUG_DETAIL 00202 std::cout << " refine ... sigma=" << sigma << std::endl; 00203 Dump(bad, "detail sort", " "); 00204 #endif 00205 00206 if (bad.length()) { 00207 _fitted = false; 00208 _updated = false; 00209 } 00210 }
|
|
removes bad points by pull. The bad points are removed from the track, and are returned in 'list'.
00170 { 00171 AList<TMLink> bad = refineMain(sigma); 00172 #ifdef TRKRECO_DEBUG 00173 std::cout << " refine ... sigma=" << sigma << ", # of rejected hits="; 00174 std::cout << bad.length() << std::endl; 00175 #endif 00176 #ifdef TRKRECO_DEBUG 00177 Dump(bad, "sort pull mc", " "); 00178 #endif 00179 00180 if (bad.length()) { 00181 _links.remove(bad); 00182 list.append(bad); 00183 _fitted = false; 00184 _updated = false; 00185 } 00186 }
|
|
removes TMLinks.
|
|
removes a TMLink.
|
|
removes TMLinks.
00211 { 00212 _links.remove(a); 00213 _updated = false; 00214 _fitted = false; 00215 _fittedWithCathode = false; // mod. by matsu ( 1999/05/24 ) 00216 }
|
|
removes a TMLink.
00202 { 00203 _links.remove(a); 00204 _updated = false; 00205 _fitted = false; 00206 _fittedWithCathode = false; // mod. by matsu ( 1999/05/24 ) 00207 }
|
|
|
|
00189 { 00190 _links.removeAll(); 00191 }
|
|
set track parameters,pivot
|
|
set track parameters,pivot
00176 { 00177 00178 _pivot = t_pivot; 00179 _dr = t_dr; 00180 _phi0 = t_phi0; 00181 _dz = t_dz; 00182 _tanl = t_tanl; 00183 _cos_phi0 = cos(_phi0); 00184 _sin_phi0 = sin(_phi0); 00185 }
|
|
|
|
00099 {
00100 return _sin_phi0;
00101 }
|
|
|
|
00091 {
00092 return _tanl;
00093 }
|
|
|
|
returns # of good hits to be appended.
|
|
00213 { 00214 #ifdef TRKRECO_DEBUG_DETAIL 00215 std::cout << " TTrackBase::testByApproach ... sigma=" << maxSigma << std::endl; 00216 #endif 00217 00218 unsigned nOK = 0; 00219 unsigned n = list.length(); 00220 for (unsigned i = 0; i < n; i++) { 00221 TMLink & l = * list[i]; 00222 nOK += testByApproach(l, maxSigma); 00223 } 00224 return nOK; 00225 }
|
|
returns # of good hits to be appended.
00228 { 00229 #ifdef TRKRECO_DEBUG_DETAIL 00230 std::cout << " TTrackBase::testByApproach ... sigma=" << maxSigma << std::endl; 00231 #endif 00232 TMLink l = link; 00233 00234 //...Calculate closest approach... 00235 int err = approach(l); 00236 if (err < 0) return 0; 00237 //...Calculate sigma... 00238 float distance = l.distance(); 00239 float diff = fabs(distance - l.hit()->drift()); 00240 float sigma = diff / l.hit()->dDrift(); 00241 l.pull(sigma * sigma); 00242 00243 //...For debug... 00244 #ifdef TRKRECO_DEBUG_DETAIL 00245 std::cout << " sigma=" << sigma; 00246 std::cout << ",dist=" << distance; 00247 std::cout << ",diff=" << diff << ","; 00248 if (sigma < maxSigma) std::cout << "ok,"; 00249 else std::cout << "X,"; 00250 l.dump("mc"); 00251 #endif 00252 00253 //...Make sigma cut... 00254 if (sigma < maxSigma) return 1; 00255 00256 return 0; 00257 }
|
|
returns type. Definition is depending on an object class.
|
|
returns type. Definition is depending on an object class.
Reimplemented in TTrack, and TTrack. 00272 {
00273 return 0;
00274 }
|
|
update cache.
Reimplemented in TSegment, TSegment0, TSegment, and TSegment0. |
|
update cache.
Reimplemented in TSegment, TSegment0, TSegment, and TSegment0. 00075 { 00076 _cores.removeAll(); 00077 unsigned n = _links.length(); 00078 for (unsigned i = 0; i < n; i++) { 00079 TMLink * l = _links[i]; 00080 const TMDCWireHit & h = * l->hit(); 00081 if (h.state() & WireHitInvalidForFit) continue; 00082 if (! (h.state() & WireHitFittingValid)) continue; 00083 _cores.append(l); 00084 } 00085 _updated = true; 00086 }
|
|
returns position on 3D line
|
|
returns position on 3D line
00143 { 00144 double tx= _pivot.x() + _dr * _cos_phi0 - t * _sin_phi0; 00145 double ty= _pivot.y() + _dr * _sin_phi0 + t * _cos_phi0; 00146 double tz= _pivot.z() + _dz + t * _tanl; 00147 HepPoint3D p(tx,ty,tz); 00148 return p; 00149 }
|
|
returns 3D line component x(t)=x0 + t * k
|
|
returns 3D line component x(t)=x0 + t * k
00151 { 00152 double tx= _pivot.x() + _dr * _cos_phi0; 00153 double ty= _pivot.y() + _dr * _sin_phi0; 00154 double tz= _pivot.z() + _dz; 00155 HepPoint3D p(tx,ty,tz); 00156 return p; 00157 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from TTrackBase. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|