Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FTTrack Class Reference

#include <FTTrack.h>

List of all members.

Public Member Functions

void append_stereo (FTSegment *, float s, float z)
 append stereo segment to the stereo segment list
void append_stereo (FTSegment *, float s, float z)
 append stereo segment to the stereo segment list
void append_stereo_cache (FTSegment *)
 append stereo segment to the cache
void append_stereo_cache (FTSegment *)
 append stereo segment to the cache
FTList< FTSegment * > & axial_segments (void) const
 returns axial segments
FTList< FTSegment * > & axial_segments (void) const
 returns axial segments
float chi2_kappa_tmp (void) const
 returns sigmaKappa at linking
float chi2_kappa_tmp (void) const
 returns sigmaKappa at linking
float d_z (float s, float z) const
float d_z (float s, float z) const
 FTTrack (FTList< FTSegment * > &axial_segments, float kappa, float chi2_kappa)
 constructor
 FTTrack (FTList< FTSegment * > &axial_segments, float kappa, float chi2_kappa)
 constructor
int get_nhits (void)
 calculate the wire hits number
int get_nhits (void)
 calculate the wire hits number
Helixhelix (void) const
 returns helix parameters
Helixhelix (void) const
 returns helix parameters
float kappa_tmp (void) const
 returns kappa at linking
float kappa_tmp (void) const
 returns kappa at linking
int linkStereoSegments (void)
 link stereo segments by tanLambda
int linkStereoSegments (void)
 link stereo segments by tanLambda
const Lpavlpav (void) const
 returns lpav
const Lpavlpav (void) const
 returns lpav
void printout ()
void printout ()
int r_phi2Fit (float vx, float xy, int vtx_flag)
int r_phi2Fit (float vx, float xy, int vtx_flag)
int r_phi3Fit (int l, float vx, float xy, int vtx_flag)
int r_phi3Fit (int l, float vx, float xy, int vtx_flag)
int r_phi4Fit (float vx, float xy, int vtx_flag)
int r_phi4Fit (float vx, float xy, int vtx_flag)
int r_phiFit (void)
 do r-phi circle fit
int r_phiFit (void)
 do r-phi circle fit
int r_phiReFit (float vx, float xy, int vtx_flag)
 do r-phi refit
int r_phiReFit (float vx, float xy, int vtx_flag)
 do r-phi refit
int s_zFit (void)
 do s-z linear fit
int s_zFit (void)
 do s-z linear fit
void setFTFinder (FTFinder *)
void setFTFinder (FTFinder *)
float SigmaS (float s)
 add s for culculation of tanLambda
float SigmaS (float s)
 add s for culculation of tanLambda
float SigmaSS (float ss)
 add s for culculation of dz, tanLambda
float SigmaSS (float ss)
 add s for culculation of dz, tanLambda
float SigmaSZ (float sz)
 add s for culculation of dz, tanLambda
float SigmaSZ (float sz)
 add s for culculation of dz, tanLambda
float SigmaZ (float z)
 add z for culculation of tanLambda
float SigmaZ (float z)
 add z for culculation of tanLambda
FTList< FTSegment * > & stereo_segments (void) const
 returns stereo_segments
FTList< FTSegment * > & stereo_segments (void) const
 returns stereo_segments
void updateSZ (void)
 update s and z information for linking
void updateSZ (void)
 update s and z information for linking
const zavZav (void) const
 returns zav
const zavZav (void) const
 returns zav
 ~FTTrack ()
 destructor
 ~FTTrack ()
 destructor

Public Attributes

FTList< FTSegment * > & _axial_segments
FTList< FTSegment * > & _axial_segments
Helix_helix
Helix_helix
Lpav_la
Lpav_la
float _SigmaSZ
float _SigmaZ
FTList< FTSegment * > * _stereo_segments
FTList< FTSegment * > * _stereo_segments
FTList< FTList< FTSegment * > * > * _stereo_segments_by_superLayer
FTList< FTList< FTSegment * > * > * _stereo_segments_by_superLayer
FTList< FTSegment * > * _stereo_segments_cache
FTList< FTSegment * > * _stereo_segments_cache
zav_za
zav_za
float minDr
float minPt
float Testime
float xtCoEff
float _chi2_kappa
float _kappa
float _SigmaS
float _SigmaSS

Static Public Attributes

MdcParameterparam
MdcParameterparam = MdcParameter::instance()

Private Attributes

FTFinderm_ftFinder
FTFinderm_ftFinder


Constructor & Destructor Documentation

FTTrack::FTTrack FTList< FTSegment * > &  axial_segments,
float  kappa,
float  chi2_kappa
[inline]
 

constructor

00159   : _la(NULL),
00160     _za(NULL),
00161     _helix(NULL),
00162     _axial_segments(axial_segments),
00163     _stereo_segments(NULL),
00164     _stereo_segments_cache(NULL),
00165     _stereo_segments_by_superLayer(NULL),
00166     //_wireHits(*(new FTList<FTWire *>(50))),
00167     _kappa(kappa),
00168     _chi2_kappa(chi2_kappa)
00169 {
00170 }

FTTrack::~FTTrack  )  [inline]
 

destructor

00174 {
00175   delete &_axial_segments;
00176   delete _la;
00177   delete _za;
00178   delete _stereo_segments;
00179   delete _helix;
00180 }

FTTrack::FTTrack FTList< FTSegment * > &  axial_segments,
float  kappa,
float  chi2_kappa
 

constructor

FTTrack::~FTTrack  ) 
 

destructor


Member Function Documentation

void FTTrack::append_stereo FTSegment ,
float  s,
float  z
 

append stereo segment to the stereo segment list

void FTTrack::append_stereo FTSegment ,
float  s,
float  z
[inline]
 

append stereo segment to the stereo segment list

00206 {
00207   _stereo_segments->append(src);
00208   _SigmaS += s;
00209   _SigmaZ += z;
00210   _SigmaSZ += s*z;
00211   _SigmaSS += s*s;
00212 }

void FTTrack::append_stereo_cache FTSegment  ) 
 

append stereo segment to the cache

void FTTrack::append_stereo_cache FTSegment  )  [inline]
 

append stereo segment to the cache

00199 {
00200   _stereo_segments_cache->append(src);
00201 }

FTList<FTSegment *>& FTTrack::axial_segments void   )  const
 

returns axial segments

FTList< FTSegment * > & FTTrack::axial_segments void   )  const [inline]
 

returns axial segments

00185 {
00186   return _axial_segments;
00187 }

float FTTrack::chi2_kappa_tmp void   )  const
 

returns sigmaKappa at linking

float FTTrack::chi2_kappa_tmp void   )  const [inline]
 

returns sigmaKappa at linking

00224 {
00225   return _chi2_kappa;
00226 }

float FTTrack::d_z float  s,
float  z
const
 

returns difference between z and estimated z at stereo segment linking if its valid

float FTTrack::d_z float  s,
float  z
const [inline]
 

returns difference between z and estimated z at stereo segment linking if its valid

00280 {
00281   int n = _stereo_segments->length();
00282   if (!n) return 0;
00283   float Dz = (n==1)
00284     ? z - s*_SigmaZ/_SigmaS
00285     : z - (s*(_SigmaSZ-_SigmaS*_SigmaZ)+_SigmaSS*_SigmaZ-_SigmaS*_SigmaSZ)
00286       / (_SigmaSS - _SigmaS*_SigmaS);
00287   return (Dz < 10*(7-n)) ? Dz : 9999.;
00288 }

int FTTrack::get_nhits void   ) 
 

calculate the wire hits number

int FTTrack::get_nhits void   ) 
 

calculate the wire hits number

00485 {
00486   int nhits = 0;
00487   int n = _axial_segments.length();
00488   for (int i = 0; i^n; i++) {
00489     nhits += _axial_segments[i]->wireHits().length();
00490   }
00491   n = _stereo_segments->length();
00492   for (int j = 0; j^n; j++) {
00493     nhits += (*_stereo_segments)[j]->wireHits().length();
00494   }
00495   return nhits;
00496 }

Helix* FTTrack::helix void   )  const
 

returns helix parameters

Helix * FTTrack::helix void   )  const [inline]
 

returns helix parameters

00245 {
00246   return _helix;
00247 }

float FTTrack::kappa_tmp void   )  const
 

returns kappa at linking

float FTTrack::kappa_tmp void   )  const [inline]
 

returns kappa at linking

00217 {
00218   return _kappa;
00219 }

int FTTrack::linkStereoSegments void   ) 
 

link stereo segments by tanLambda

int FTTrack::linkStereoSegments void   ) 
 

link stereo segments by tanLambda

00342                                {
00343   delete _stereo_segments_cache;
00344   int n = _stereo_segments_by_superLayer->length();
00345   for (int i = 0; i^n; i++){
00346     FTList<FTSegment *> & segments = *(*_stereo_segments_by_superLayer)[i];
00347     int m = segments.length();
00348     float min_D_z = 9998.;
00349     float S = 0.;
00350     float Z = 0.;
00351     FTSegment * selected = NULL;
00352     for (int j = 0; j^m; j++){
00353       FTSegment * s = segments[j];
00354       float s_tmp = s->s();
00355       float z_tmp = s->z();
00356       double D_z = fabs(d_z(s_tmp,z_tmp));
00357       if (D_z < min_D_z){
00358         selected = s;
00359         min_D_z = D_z;
00360         S = s_tmp;
00361         Z = z_tmp;
00362       }
00363     }
00364     if (selected){
00365       _stereo_segments->append(selected);
00366       _SigmaS += S;
00367       _SigmaZ += Z;
00368       _SigmaSZ += S*Z;
00369       _SigmaSS += S*S;
00370     }
00371   }
00372   _stereo_segments_by_superLayer->deleteAll();
00373   delete _stereo_segments_by_superLayer;
00374   return 0;
00375 }

const Lpav& FTTrack::lpav void   )  const
 

returns lpav

const Lpav & FTTrack::lpav void   )  const [inline]
 

returns lpav

00231 {
00232   return *_la;
00233 }

void FTTrack::printout  ) 
 

printout _tracks infomation added by X.-R. Lu

void FTTrack::printout  ) 
 

printout _tracks infomation added by X.-R. Lu

00499                       {
00500   int n = axial_segments().length();
00501   for (int i = 0; i^n; i++) axial_segments()[i]->printout();
00502   n = stereo_segments().length();
00503   for (int i = 0; i^n; i++) stereo_segments()[i]->printout();  
00504 }

int FTTrack::r_phi2Fit float  vx,
float  xy,
int  vtx_flag
 

int FTTrack::r_phi2Fit float  vx,
float  xy,
int  vtx_flag
 

00192 {
00193   if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
00194   int n = _axial_segments.length();
00195   _la->clear();
00196   int k=0,l=0;
00197   float temp=0;
00198   for (int i = 0; i^n; i++){
00199     FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
00200      int m = hits.length();
00201      for (int j = 0; j^m; j++){
00202       k++;
00203       FTWire & h = * hits[j];
00204       const float x = h.x();
00205       const float y = h.y();
00206       double d0 = _la->d((double)x,(double)y);
00207       float cellsize = h.layer().csize();
00208       if (m_ftFinder->evtTiming){
00209         float time = h.time() + m_ftFinder->evtTiming ;
00210         if(time<-100) continue;
00211         h.distance(m_ftFinder->t2x(h.layer(),time));
00212         //      h.distance(time*40*0.0001);
00213       }
00214       float delta = h.distance()/h.layer().r();
00215       if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
00216       if (h.distance()<0.1 || h.distance()>0.6) continue;
00217       if (d0>0){                        // left or right
00218         h.stateOR(FTWireHitRight);
00219         d0 = -d0;
00220       }else{
00221         h.stateOR(FTWireHitLeft);
00222         delta = -delta;
00223       }
00224 #ifndef OnlineMode
00225       //fill histogram 
00226        //g_sigmaxy->fill(h.distance()+d0, 1.0);
00227 #endif
00228       _la->add_point(x - delta*y, y + delta*x, 1);
00229       if(temp<fabs(h.distance()+d0)){
00230         temp=fabs(h.distance()+d0);
00231         l=k;
00232       }
00233     }
00234   }
00235   HepVector b = _la->Hpar(m_ftFinder->pivot);
00236   double  chi2 = _la->fit();            // refit using drift distance
00237 #ifndef OnlineMode
00238   // g_chi2xy->fill(chi2/_la->nc(), 1.0);
00239 #endif
00240   if(k>5){        
00241     return  l;
00242   }
00243   else{
00244     return -99;
00245   }
00246 }

int FTTrack::r_phi3Fit int  l,
float  vx,
float  xy,
int  vtx_flag
 

int FTTrack::r_phi3Fit int  l,
float  vx,
float  xy,
int  vtx_flag
 

00250 {
00251   if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
00252   int n = _axial_segments.length();
00253   _la->clear();
00254   int k=0;
00255   for (int i = 0; i^n; i++){
00256     FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
00257     int m = hits.length();
00258     for (int j = 0; j^m; j++){
00259       k++;
00260       FTWire & h = * hits[j];
00261       const float x = h.x();
00262       const float y = h.y();
00263       double d0 = _la->d((double)x,(double)y);
00264       float cellsize = h.layer().csize();
00265       if (m_ftFinder->evtTiming){
00266         float time = h.time() + m_ftFinder->evtTiming ;
00267         if(time<-100) continue;
00268         h.distance(m_ftFinder->t2x(h.layer(),time));
00269         //h.distance(time*40*0.0001);
00270       }
00271       float delta = h.distance()/h.layer().r();
00272       if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
00273       if (d0>0){                        // left or right
00274         h.stateOR(FTWireHitRight);
00275         d0 = -d0;
00276       }else{
00277         h.stateOR(FTWireHitLeft);
00278         delta = -delta;
00279       }
00280       if (k==l){
00281         //delete hits[j];
00282         m=hits.remove(j);
00283         continue;
00284       }
00285       _la->add_point(x - delta*y, y + delta*x, 1);
00286       // h.setChi2(h.distance()+d0);
00287     }
00288   }
00289   HepVector b = _la->Hpar(m_ftFinder->pivot);
00290   double chi2 = _la->fit();            // refit using drift distance
00291   return 1;
00292 }

int FTTrack::r_phi4Fit float  vx,
float  xy,
int  vtx_flag
 

int FTTrack::r_phi4Fit float  vx,
float  xy,
int  vtx_flag
 

00296 {
00297   if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
00298   int n = _axial_segments.length();
00299   _la->clear();
00300   for (int i = 0; i^n; i++){
00301     FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
00302     int m = hits.length();
00303     for (int j = 0; j^m; j++){
00304       FTWire & h = * hits[j];
00305       const float x = h.x();
00306       const float y = h.y();
00307       double d0 = _la->d((double)x,(double)y);
00308       float cellsize = h.layer().csize();
00309       if (m_ftFinder->evtTiming){
00310         float time = h.time() + m_ftFinder->evtTiming ;
00311         if(time<-100) continue;
00312         h.distance(m_ftFinder->t2x(h.layer(),time));
00313         //h.distance(time*40*0.0001);
00314       }
00315       float delta = h.distance()/h.layer().r();
00316       if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
00317       if (d0>0){                        // left or right
00318         h.stateOR(FTWireHitRight);
00319         d0 = -d0;
00320       }else{
00321         h.stateOR(FTWireHitLeft);
00322         delta = -delta;
00323       }
00324     
00325       _la->add_point(x - delta*y, y + delta*x, 1);
00326       h.setChi2(h.distance()+d0);
00327 #ifndef OnlineMode
00328       //fill histogram 
00329       // g_sigmaxy->fill(h.distance()+d0, 1.0);
00330 #endif
00331     }
00332   }
00333   HepVector b = _la->Hpar(m_ftFinder->pivot);
00334   double chi2 = _la->fit();            // refit using drift distance
00335 #ifndef OnlineMode
00336  // g_chi2xy->fill(chi2/_la->nc(), 1.0);
00337 #endif
00338   return 1;
00339 }

int FTTrack::r_phiFit void   ) 
 

do r-phi circle fit

int FTTrack::r_phiFit void   ) 
 

do r-phi circle fit

00038 {
00039   IMessageSvc *msgSvc;
00040   Gaudi::svcLocator()->service("MessageSvc", msgSvc);
00041 
00042   MsgStream log(msgSvc, "FTFinder");
00043 
00044   // static const float alpha(333.564095);
00045   if (fabs(_kappa) > 1.2/param->_minPt) return 0;
00046 
00047   _la = new Lpav;
00048   int n = _axial_segments.length();
00049   for (int i = 0; i^n; i++){
00050     FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
00051     int m = hits.length();
00052     for (int j = 0; j^m; j++){
00053       FTWire & h = * hits[j];
00054       if (h.stateAND(FTWireFittingInvalid)){
00055         hits.remove(j);
00056         continue;
00057       }
00058       //      log << MSG::DEBUG << "layer: "<< h.layer().layerId() << " phi: " << h.phi() << " df_distance: "<< h.distance() << endreq;
00059       double par = h.distance()/(0.25*h.layer().csize());
00060       _la->add_point((double)h.x(),(double)h.y(),exp(-par*par));
00061     }
00062   }
00063 
00064   double chi2 = _la->fit();
00065   HepVector a = _la->Hpar(m_ftFinder->pivot);
00066   log << MSG::DEBUG << " chi2/_la cut(1): " << chi2 << " / " << _la->nc() 
00067       <<" a1(" << param->_minDr << "): " << a(1) 
00068       <<" a3(" << 1.05/param->_minPt << "):" << a(3) <<endreq;
00069   if (chi2/_la->nc() > 1.) return 0;
00070   if (fabs(a(3))>(1.05/param->_minPt)) return 0; 
00071   if (fabs(a(1))>param->_minDr) return 0;
00072   _la->clear();
00073   log << MSG::DEBUG << " passed chi2/_la, a(3) and a(1) cut" <<endreq;
00074   int layer0 = 0;
00075   for (int i = 0; i^n; i++){
00076     FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
00077     if (!_axial_segments[i]->superLayer().superLayerId()) layer0 = 1;
00078     int m = hits.length();
00079     for (int j = 0; j^m; j++){
00080       FTWire & h = * hits[j];
00081       const float x = h.x();
00082       const float y = h.y();
00083       double d0 = _la->d((double)x,(double)y);
00084       float delta = h.distance()/h.layer().r();
00085       if (fabs(d0) > 0.7*h.layer().csize()) continue; // remove bad hits
00086       if (d0>0){                        // left or right
00087         d0 = -d0;
00088       }else{
00089         delta = -delta;
00090       }
00091       _la->add_point(x - delta*y, y + delta*x, 1);
00092     }
00093   }
00094   if (!layer0){          // salvage hits from complecated segments in layer0
00095     FTList<FTSegment *> & salvage = 
00096       m_ftFinder->superLayer(0)->complecated_segments();
00097     HepVector center = _la->center();
00098     const float xc = center(1);
00099     const float yc = center(2);
00100     const float rc = a(1)+(param->_alpha)/a(3); // rho+drho(signed)
00101     int nn = salvage.length();
00102     for (int i = 0; i^nn; i++){
00103       int salvaged = 0;
00104       FTList<FTWire *> & hits = salvage[i]->wireHits();
00105       int m = hits.length();
00106       for (int j = 0; j^m; j++){
00107         FTWire & h = * hits[j];
00108         float x = h.x();
00109         float y = h.y();
00110         float r = h.layer().r();
00111         if ((y*xc-x*yc)/(r*rc)<0.707) break;
00112         double d0 = _la->d((double)x,(double)y);
00113         float delta = h.distance()/r;
00114         if (fabs(d0) > 0.7*h.layer().csize()) continue; // remove bad hits
00115         if (d0>0){                      // left or right
00116           h.stateOR(FTWireHitRight);
00117           d0 = -d0;
00118         }else{
00119           h.stateOR(FTWireHitLeft);
00120           delta = -delta;
00121         }
00122         _la->add_point(x - delta*y, y + delta*x, 1);
00123         salvaged = 1;
00124       }
00125       if (salvaged){
00126         _axial_segments.append(salvage[i]);
00127         break;
00128       }
00129     }
00130   }
00131   chi2 = _la->fit();            // refit using drift distance
00132   _stereo_segments = new FTList<FTSegment *>(6);  
00133   _stereo_segments_cache = new FTList<FTSegment *>(3);
00134   _stereo_segments_by_superLayer = new FTList<FTList<FTSegment *> *>(6);
00135   _za = new zav;
00136   _SigmaS = 0.;
00137   _SigmaZ = 0.;
00138   _SigmaSS = 0.;
00139   _SigmaSZ = 0.;
00140   return 1;
00141 }

int FTTrack::r_phiReFit float  vx,
float  xy,
int  vtx_flag
 

do r-phi refit

int FTTrack::r_phiReFit float  vx,
float  xy,
int  vtx_flag
 

do r-phi refit

00145 {
00146   if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
00147   int n = _axial_segments.length();
00148   _la->clear();
00149   for (int i = 0; i^n; i++){
00150     FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
00151     int m = hits.length();
00152     for (int j = 0; j^m; j++){
00153       FTWire & h = * hits[j];
00154       const float x = h.x();
00155       const float y = h.y();
00156       double d0 = _la->d((double)x,(double)y);
00157       float cellsize = h.layer().csize();
00158       if (m_ftFinder->evtTiming){
00159         float time = h.time() + m_ftFinder->evtTiming;
00160         if(time<-100) continue; // discard the bad TDC time
00161         h.distance(m_ftFinder->t2x(h.layer(),time));
00162         //h.distance(time*40*0.0001);
00163       }
00164       float delta = h.distance()/h.layer().r();
00165       if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
00166       if (d0>0){                        // left or right
00167         h.stateOR(FTWireHitRight);
00168         d0 = -d0;
00169       }else{
00170         h.stateOR(FTWireHitLeft);
00171         delta = -delta;
00172       }
00173       h.setChi2(h.distance()+d0);
00174 #ifndef OnlineMode
00175       //fill histogram 
00176       g_sigmaxy->fill(h.distance()+d0, 1.0);
00177 #endif
00178       _la->add_point(x - delta*y, y + delta*x, 1);
00179     }
00180   }
00181   HepVector b = _la->Hpar(m_ftFinder->pivot);
00182   double  chi2 = _la->fit();            // refit using drift distance
00183 #ifndef OnlineMode
00184   g_chi2xy->fill(chi2/_la->nc(), 1.0);
00185 #endif
00186           
00187   return 1;
00188 } 

int FTTrack::s_zFit void   ) 
 

do s-z linear fit

int FTTrack::s_zFit void   ) 
 

do s-z linear fit

00378                    {
00379   IMessageSvc *msgSvc;
00380   Gaudi::svcLocator()->service("MessageSvc", msgSvc);
00381 
00382   MsgStream log(msgSvc, "FTFinder");
00383 
00384   HepVector a = _la->Hpar(m_ftFinder->pivot);
00385   int n = _stereo_segments->length();
00386   log<<MSG::DEBUG<<"number of stereo segments: "<< n << endreq;
00387   if (n < (param->_nseg)){
00388     a(4) = -9999.;
00389     a(5) = -9999.;
00390     _helix = new Helix(m_ftFinder->pivot,a);
00391     log<<MSG::DEBUG<<"cut by _nseg" << param->_nseg << endreq;
00392     return 0;
00393   }
00394   FTList<double> zList(50);
00395   FTList<double> sList(50);
00396   FTList<FTWire *> hList(50);
00397   for (int i = 0; i^n; i++){
00398     FTList<FTWire *> & hits = (*_stereo_segments)[i]->wireHits();
00399     int m = hits.length();
00400     for (int j = 0; j^m; j++){
00401       FTWire & h = * hits[j];
00402       double z;
00403       if (!(h.z(*_la,z))) continue;
00404       double s = _la->s(h.layer().r());
00405       float cellsize = h.layer().csize();
00406       log<<MSG::DEBUG<<"cellsize: " << cellsize << endreq;
00407 
00408       if (m_ftFinder->evtTiming){
00409         float time = h.time() + m_ftFinder->evtTiming;
00410         if(time<-100) continue; //discard the bad TDC time
00411         double distance = m_ftFinder->t2x(h.layer(),time);
00412         h.distance(distance);
00413         log<<MSG::DEBUG<<"m_ftFinder->evtTiming: "<< m_ftFinder->evtTiming << " TDC time: " << h.time() << " distance: "<< distance << endreq;
00414       }
00415 
00416       double par = h.distance()/(0.25*cellsize);
00417       _za->add(s,z,exp(-par*par));
00418       sList.append(s);
00419       zList.append(z);
00420       hList.append(&h);
00421     }
00422   }
00423   if (hList.length() < (param->_nlength)){
00424     a(4) = -9999.;
00425     a(5) = -9999.;
00426     _helix = new Helix(m_ftFinder->pivot,a);
00427     log << MSG::DEBUG << "cut by _nlength: " << param->_nlength << endreq;
00428     return 0;
00429   }   
00430   double chi2 = _za->calculate();
00431   _za->clear();
00432   n = hList.length();
00433   for (int i = 0; i^n; i++){
00434     double d = _za->d(sList[i],zList[i]);
00435     float z_distance = hList[i]->distance_z();
00436     if (fabs(fabs(d)-z_distance) > (param->_z_cut1)){ 
00437       log<<MSG::DEBUG<<"cut by _z_cut1: "<< param->_z_cut1 << endreq;
00438       zList.remove2(i);
00439       sList.remove2(i);
00440       n = hList.remove(i);
00441       continue;
00442     }
00443     _za->add(sList[i], (d>0) ? zList[i]-z_distance : zList[i]+z_distance, 1.);
00444   }
00445 
00446   if (_za->nc() < (param->_nc)){
00447     a(4) = -9999.;
00448     a(5) = -9999.;
00449     _helix = new Helix(m_ftFinder->pivot,a);
00450     log<<MSG::DEBUG<<"cut by _nc: " << param->_nc << endreq;
00451     return 0;
00452   }    
00453   chi2 = _za->calculate();
00454   _za->clear();
00455   for (int i = 0; i^n; i++){
00456     double d = _za->d(sList[i],zList[i]);
00457     float z_distance = hList[i]->distance_z();
00458     hList[i]->setChi2(fabs(d)-z_distance);
00459  #ifndef OnlineMode
00460     //fill ntuple
00461     g_sigmaz->fill(fabs(d)-z_distance, 1.0);
00462 #endif
00463     if (fabs(fabs(d)-z_distance) > (param->_z_cut2)) continue; 
00464     _za->add(sList[i], (d>0) ? zList[i]-z_distance : zList[i]+z_distance, 1.);
00465   }
00466 
00467   if (_za->nc() < (param->_nc)){
00468     a(4) = -9999.;
00469     a(5) = -9999.;
00470     _helix = new Helix(m_ftFinder->pivot,a);
00471     log<<MSG::DEBUG<<"cut by _nc" << param->_nc << endreq;
00472     return 0;
00473   }    
00474   chi2 = _za->calculate();
00475 #ifndef OnlineMode
00476   g_chi2sz->fill(chi2/_za->nc(), 1.0);
00477 #endif
00478   a(4) = _za->b();              // dz
00479   a(5) = _za->a();              // tanLambda
00480   _helix = new Helix(m_ftFinder->pivot,a);
00481   return 1;
00482 }

void FTTrack::setFTFinder FTFinder  ) 
 

void FTTrack::setFTFinder FTFinder  )  [inline]
 

00317 {
00318   m_ftFinder = finder;
00319 }

float FTTrack::SigmaS float  s  ) 
 

add s for culculation of tanLambda

float FTTrack::SigmaS float  s  )  [inline]
 

add s for culculation of tanLambda

00259 {
00260   return _SigmaS += s;
00261 }

float FTTrack::SigmaSS float  ss  ) 
 

add s for culculation of dz, tanLambda

float FTTrack::SigmaSS float  ss  )  [inline]
 

add s for culculation of dz, tanLambda

00273 {
00274   return _SigmaSS += ss;
00275 }

float FTTrack::SigmaSZ float  sz  ) 
 

add s for culculation of dz, tanLambda

float FTTrack::SigmaSZ float  sz  )  [inline]
 

add s for culculation of dz, tanLambda

00266 {
00267   return _SigmaSZ += sz;
00268 }

float FTTrack::SigmaZ float  z  ) 
 

add z for culculation of tanLambda

float FTTrack::SigmaZ float  z  )  [inline]
 

add z for culculation of tanLambda

00252 {
00253   return _SigmaZ += z;
00254 }

FTList<FTSegment *>& FTTrack::stereo_segments void   )  const
 

returns stereo_segments

FTList< FTSegment * > & FTTrack::stereo_segments void   )  const [inline]
 

returns stereo_segments

00192 {
00193   return *_stereo_segments;
00194 }

void FTTrack::updateSZ void   ) 
 

update s and z information for linking

void FTTrack::updateSZ void   )  [inline]
 

update s and z information for linking

00294 {
00295   int n = _stereo_segments_cache->length();
00296   if (n==1){
00297     FTSegment * s = _stereo_segments_cache->first();
00298     float s_tmp = s->s();
00299     float z_tmp = s->z();
00300     if (d_z(s_tmp,z_tmp) < 9998.){
00301       _SigmaS += s_tmp;
00302       _SigmaZ += z_tmp;
00303       _SigmaSS += s_tmp*s_tmp;
00304       _SigmaSZ += s_tmp*z_tmp;
00305       _stereo_segments->append(s);
00306     }
00307     _stereo_segments_cache->clear();
00308   }else if(n){
00309     _stereo_segments_by_superLayer->append(_stereo_segments_cache);
00310     _stereo_segments_cache = new FTList<FTSegment *>(3);
00311   }
00312 }

const zav& FTTrack::Zav void   )  const
 

returns zav

const zav & FTTrack::Zav void   )  const [inline]
 

returns zav

00238 {
00239   return *_za;
00240 }


Member Data Documentation

FTList<FTSegment *>& FTTrack::_axial_segments
 

FTList<FTSegment *>& FTTrack::_axial_segments
 

float FTTrack::_chi2_kappa
 

Helix* FTTrack::_helix
 

Helix* FTTrack::_helix
 

float FTTrack::_kappa
 

Lpav* FTTrack::_la
 

Lpav* FTTrack::_la
 

float FTTrack::_SigmaS
 

float FTTrack::_SigmaSS
 

float FTTrack::_SigmaSZ
 

float FTTrack::_SigmaZ
 

FTList<FTSegment *>* FTTrack::_stereo_segments
 

FTList<FTSegment *>* FTTrack::_stereo_segments
 

FTList<FTList<FTSegment *> *>* FTTrack::_stereo_segments_by_superLayer
 

FTList<FTList<FTSegment *> *>* FTTrack::_stereo_segments_by_superLayer
 

FTList<FTSegment *>* FTTrack::_stereo_segments_cache
 

FTList<FTSegment *>* FTTrack::_stereo_segments_cache
 

zav* FTTrack::_za
 

zav* FTTrack::_za
 

FTFinder* FTTrack::m_ftFinder [private]
 

FTFinder* FTTrack::m_ftFinder [private]
 

float FTTrack::minDr
 

float FTTrack::minPt
 

MdcParameter* FTTrack::param [static]
 

MdcParameter * FTTrack::param = MdcParameter::instance() [static]
 

float FTTrack::Testime
 

float FTTrack::xtCoEff
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:15:35 2011 for BOSS6.5.5 by  doxygen 1.3.9.1