BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
FTTrack Class Reference

#include <FTTrack.h>

Public Member Functions

 FTTrack (FTList< FTSegment * > &axial_segments, float kappa, float chi2_kappa)
 constructor
 
 ~FTTrack ()
 destructor
 
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_phi2Fit (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 s_zFit (void)
 do s-z linear fit
 
void updateSZ (void)
 update s and z information for linking
 
int linkStereoSegments (void)
 link stereo segments by tanLambda
 
Helixhelix (void) const
 returns helix parameters
 
const Lpavlpav (void) const
 returns lpav
 
const zavZav (void) const
 returns zav
 
FTList< FTSegment * > & axial_segments (void) const
 returns axial segments
 
FTList< FTSegment * > & stereo_segments (void) const
 returns stereo_segments
 
float kappa_tmp (void) const
 returns kappa at linking
 
float chi2_kappa_tmp (void) const
 returns sigmaKappa at linking
 
float d_z (float s, float z) const
 
void printout ()
 
float SigmaZ (float z)
 add z 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 SigmaSZ (float sz)
 add s for culculation of dz, tanLambda
 
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
 
int get_nhits (void)
 calculate the wire hits number
 
void setFTFinder (FTFinder *)
 

Public Attributes

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

Static Public Attributes

static MdcParameterparam = MdcParameter::instance()
 

Detailed Description

Definition at line 27 of file FTTrack.h.

Constructor & Destructor Documentation

◆ FTTrack()

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

constructor

Definition at line 160 of file FTTrack.h.

162 : _la(NULL),
163 _za(NULL),
164 _helix(NULL),
169 //_wireHits(*(new FTList<FTWire *>(50))),
170 _kappa(kappa),
171 _chi2_kappa(chi2_kappa)
172{
173 StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF);
174 if(scmgn!=StatusCode::SUCCESS) {
175 std::cout<< "Unable to open Magnetic field service"<<std::endl;
176 }
177}
#define NULL
Helix * _helix
Definition: FTTrack.h:129
float _kappa
Definition: FTTrack.h:137
float _chi2_kappa
Definition: FTTrack.h:141
FTList< FTList< FTSegment * > * > * _stereo_segments_by_superLayer
Definition: FTTrack.h:133
FTList< FTSegment * > & axial_segments(void) const
returns axial segments
Definition: FTTrack.h:191
zav * _za
Definition: FTTrack.h:128
FTList< FTSegment * > & _axial_segments
Definition: FTTrack.h:130
FTList< FTSegment * > * _stereo_segments
Definition: FTTrack.h:131
Lpav * _la
Definition: FTTrack.h:127
FTList< FTSegment * > * _stereo_segments_cache
Definition: FTTrack.h:132

◆ ~FTTrack()

FTTrack::~FTTrack ( )
inline

destructor

Definition at line 180 of file FTTrack.h.

181{
182 delete &_axial_segments;
183 delete _la;
184 delete _za;
185 delete _stereo_segments;
186 delete _helix;
187}

Member Function Documentation

◆ append_stereo()

void FTTrack::append_stereo ( FTSegment src,
float  s = 0,
float  z = 0 
)
inline

append stereo segment to the stereo segment list

Definition at line 212 of file FTTrack.h.

213{
215 _SigmaS += s;
216 _SigmaZ += z;
217 _SigmaSZ += s*z;
218 _SigmaSS += s*s;
219}
XmlRpcServer s
Definition: HelloServer.cpp:11
int append(const T &x)
append an object into the end of the list
Definition: FTList.h:127
float _SigmaSZ
Definition: FTTrack.h:145
float _SigmaS
Definition: FTTrack.h:138
float _SigmaZ
Definition: FTTrack.h:144
float _SigmaSS
Definition: FTTrack.h:142

◆ append_stereo_cache()

void FTTrack::append_stereo_cache ( FTSegment src)
inline

append stereo segment to the cache

Definition at line 205 of file FTTrack.h.

206{
208}

◆ axial_segments()

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

returns axial segments

Definition at line 191 of file FTTrack.h.

192{
193 return _axial_segments;
194}

Referenced by printout().

◆ chi2_kappa_tmp()

float FTTrack::chi2_kappa_tmp ( void  ) const
inline

returns sigmaKappa at linking

Definition at line 230 of file FTTrack.h.

231{
232 return _chi2_kappa;
233}

◆ d_z()

float FTTrack::d_z ( float  s,
float  z 
) const
inline

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

Definition at line 286 of file FTTrack.h.

287{
288 int n = _stereo_segments->length();
289 if (!n) return 0;
290 float Dz = (n==1)
291 ? z - s*_SigmaZ/_SigmaS
294 return (Dz < 10*(7-n)) ? Dz : 9999.;
295}
const Int_t n
int length(void) const
returns the length of the list
Definition: FTList.h:245

Referenced by linkStereoSegments(), and updateSZ().

◆ get_nhits()

int FTTrack::get_nhits ( void  )

calculate the wire hits number

Definition at line 484 of file FTTrack.cxx.

485{
486 int nhits = 0;
487 int n = _axial_segments.length();
488 for (int i = 0; i^n; i++) {
489 nhits += _axial_segments[i]->wireHits().length();
490 }
492 for (int j = 0; j^n; j++) {
493 nhits += (*_stereo_segments)[j]->wireHits().length();
494 }
495 return nhits;
496}
int nhits

◆ helix()

Helix * FTTrack::helix ( void  ) const
inline

returns helix parameters

Definition at line 251 of file FTTrack.h.

252{
253 return _helix;
254}

◆ kappa_tmp()

float FTTrack::kappa_tmp ( void  ) const
inline

returns kappa at linking

Definition at line 223 of file FTTrack.h.

224{
225 return _kappa;
226}

◆ linkStereoSegments()

int FTTrack::linkStereoSegments ( void  )

link stereo segments by tanLambda

Definition at line 342 of file FTTrack.cxx.

342 {
345 for (int i = 0; i^n; i++){
346 FTList<FTSegment *> & segments = *(*_stereo_segments_by_superLayer)[i];
347 int m = segments.length();
348 float min_D_z = 9998.;
349 float S = 0.;
350 float Z = 0.;
352 for (int j = 0; j^m; j++){
353 FTSegment * s = segments[j];
354 float s_tmp = s->s();
355 float z_tmp = s->z();
356 double D_z = fabs(d_z(s_tmp,z_tmp));
357 if (D_z < min_D_z){
358 selected = s;
359 min_D_z = D_z;
360 S = s_tmp;
361 Z = z_tmp;
362 }
363 }
364 if (selected){
366 _SigmaS += S;
367 _SigmaZ += Z;
368 _SigmaSZ += S*Z;
369 _SigmaSS += S*S;
370 }
371 }
374 return 0;
375}
int selected
Definition: FTList.h:16
void deleteAll(void)
delete all object and clear(allocated memory remains same)
Definition: FTList.h:266
float d_z(float s, float z) const
Definition: FTTrack.h:286

◆ lpav()

const Lpav & FTTrack::lpav ( void  ) const
inline

returns lpav

Definition at line 237 of file FTTrack.h.

238{
239 return *_la;
240}

Referenced by FTSegment::update3D().

◆ printout()

void FTTrack::printout ( )

printout _tracks infomation added by X.-R. Lu

Definition at line 499 of file FTTrack.cxx.

499 {
500 int n = axial_segments().length();
501 for (int i = 0; i^n; i++) axial_segments()[i]->printout();
503 for (int i = 0; i^n; i++) stereo_segments()[i]->printout();
504}
FTList< FTSegment * > & stereo_segments(void) const
returns stereo_segments
Definition: FTTrack.h:198

◆ r_phi2Fit()

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

Definition at line 191 of file FTTrack.cxx.

192{
193 if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
194 int n = _axial_segments.length();
195 _la->clear();
196 int k=0,l=0;
197 float temp=0;
198 for (int i = 0; i^n; i++){
199 FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
200 int m = hits.length();
201 for (int j = 0; j^m; j++){
202 k++;
203 FTWire & h = * hits[j];
204 const float x = h.x();
205 const float y = h.y();
206 double d0 = _la->d((double)x,(double)y);
207 float cellsize = h.layer().csize();
208 if (m_ftFinder->evtTiming){
209 float time = h.time() + m_ftFinder->evtTiming ;
210 if(time<-100) continue;
211 h.distance(m_ftFinder->t2x(h.layer(),time));
212 // h.distance(time*40*0.0001);
213 }
214 float delta = h.distance()/h.layer().r();
215 if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
216 if (h.distance()<0.1 || h.distance()>0.6) continue;
217 if (d0>0){ // left or right
219 d0 = -d0;
220 }else{
222 delta = -delta;
223 }
224#ifndef OnlineMode
225 //fill histogram
226 //g_sigmaxy->fill(h.distance()+d0, 1.0);
227#endif
228 _la->add_point(x - delta*y, y + delta*x, 1);
229 if(temp<fabs(h.distance()+d0)){
230 temp=fabs(h.distance()+d0);
231 l=k;
232 }
233 }
234 }
235 HepVector b = _la->Hpar(m_ftFinder->pivot);
236 double chi2 = _la->fit(); // refit using drift distance
237#ifndef OnlineMode
238 // g_chi2xy->fill(chi2/_la->nc(), 1.0);
239#endif
240 if(k>5){
241 return l;
242 }
243 else{
244 return -99;
245 }
246}
const double delta
Double_t x[10]
Double_t time
#define FTWireHitRight
Definition: FTWire.h:24
#define FTWireHitLeft
Definition: FTWire.h:25
float evtTiming
Definition: FTFinder.h:163
float t2x(const FTLayer &l, const float t) const
convert t to x
Definition: FTFinder.h:221
const HepPoint3D pivot
Definition: FTFinder.h:164
const float r(void) const
returns r form origin
Definition: FTLayer.h:141
double csize(void) const
returns cell size
Definition: FTLayer.h:190
Definition: FTWire.h:43
const float y(void) const
returns position y
Definition: FTWire.h:373
float distance(void) const
returns drift distance
Definition: FTWire.h:401
const FTLayer & layer(void) const
returns layer
Definition: FTWire.h:359
const float x(void) const
returns position x
Definition: FTWire.h:366
void stateOR(const unsigned mask)
set state bit
Definition: FTWire.h:501
float time(void) const
rerurns TDC time(after t0 subtraction)
Definition: FTWire.h:457
double d(double x, double y) const
HepVector Hpar(const HepPoint3D &pivot) const
void add_point(double x, double y, double w=1)
double y[1000]
const double b
Definition: slope.cxx:9

◆ r_phi3Fit()

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

Definition at line 249 of file FTTrack.cxx.

250{
251 if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
252 int n = _axial_segments.length();
253 _la->clear();
254 int k=0;
255 for (int i = 0; i^n; i++){
256 FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
257 int m = hits.length();
258 for (int j = 0; j^m; j++){
259 k++;
260 FTWire & h = * hits[j];
261 const float x = h.x();
262 const float y = h.y();
263 double d0 = _la->d((double)x,(double)y);
264 float cellsize = h.layer().csize();
265 if (m_ftFinder->evtTiming){
266 float time = h.time() + m_ftFinder->evtTiming ;
267 if(time<-100) continue;
268 h.distance(m_ftFinder->t2x(h.layer(),time));
269 //h.distance(time*40*0.0001);
270 }
271 float delta = h.distance()/h.layer().r();
272 if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
273 if (d0>0){ // left or right
275 d0 = -d0;
276 }else{
278 delta = -delta;
279 }
280 if (k==l){
281 //delete hits[j];
282 m=hits.remove(j);
283 continue;
284 }
285 _la->add_point(x - delta*y, y + delta*x, 1);
286 // h.setChi2(h.distance()+d0);
287 }
288 }
289 HepVector b = _la->Hpar(m_ftFinder->pivot);
290 double chi2 = _la->fit(); // refit using drift distance
291 return 1;
292}
int remove(int &)
remove objects by index and returns decremented index and length
Definition: FTList.h:140

◆ r_phi4Fit()

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

Definition at line 295 of file FTTrack.cxx.

296{
297 if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
298 int n = _axial_segments.length();
299 _la->clear();
300 for (int i = 0; i^n; i++){
301 FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
302 int m = hits.length();
303 for (int j = 0; j^m; j++){
304 FTWire & h = * hits[j];
305 const float x = h.x();
306 const float y = h.y();
307 double d0 = _la->d((double)x,(double)y);
308 float cellsize = h.layer().csize();
309 if (m_ftFinder->evtTiming){
310 float time = h.time() + m_ftFinder->evtTiming ;
311 if(time<-100) continue;
312 h.distance(m_ftFinder->t2x(h.layer(),time));
313 //h.distance(time*40*0.0001);
314 }
315 float delta = h.distance()/h.layer().r();
316 if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
317 if (d0>0){ // left or right
319 d0 = -d0;
320 }else{
322 delta = -delta;
323 }
324
325 _la->add_point(x - delta*y, y + delta*x, 1);
326 h.setChi2(h.distance()+d0);
327#ifndef OnlineMode
328 //fill histogram
329 // g_sigmaxy->fill(h.distance()+d0, 1.0);
330#endif
331 }
332 }
333 HepVector b = _la->Hpar(m_ftFinder->pivot);
334 double chi2 = _la->fit(); // refit using drift distance
335#ifndef OnlineMode
336 // g_chi2xy->fill(chi2/_la->nc(), 1.0);
337#endif
338 return 1;
339}
void setChi2(float chi2)
set residual fit chi2
Definition: FTWire.h:604

◆ r_phiFit()

int FTTrack::r_phiFit ( void  )

do r-phi circle fit

Definition at line 37 of file FTTrack.cxx.

38{
39 IMessageSvc *msgSvc;
40 Gaudi::svcLocator()->service("MessageSvc", msgSvc);
41
42 MsgStream log(msgSvc, "FTFinder");
43
44 // static const float alpha(333.564095);
45 if (fabs(_kappa) > 1.2/param->_minPt) return 0;
46
47 _la = new Lpav;
48 int n = _axial_segments.length();
49 for (int i = 0; i^n; i++){
50 FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
51 int m = hits.length();
52 for (int j = 0; j^m; j++){
53 FTWire & h = * hits[j];
55 hits.remove(j);
56 continue;
57 }
58 // log << MSG::DEBUG << "layer: "<< h.layer().layerId() << " phi: " << h.phi() << " df_distance: "<< h.distance() << endreq;
59 double par = h.distance()/(0.25*h.layer().csize());
60 _la->add_point((double)h.x(),(double)h.y(),exp(-par*par));
61 }
62 }
63
64 double chi2 = _la->fit();
65 HepVector a = _la->Hpar(m_ftFinder->pivot);
66 log << MSG::DEBUG << " chi2/_la cut(1): " << chi2 << " / " << _la->nc()
67 <<" a1(" << param->_minDr << "): " << a(1)
68 <<" a3(" << 1.05/param->_minPt << "):" << a(3) <<endreq;
69 if (chi2/_la->nc() > 1.) return 0;
70 if (fabs(a(3))>(1.05/param->_minPt)) return 0;
71 if (fabs(a(1))>param->_minDr) return 0;
72 _la->clear();
73 log << MSG::DEBUG << " passed chi2/_la, a(3) and a(1) cut" <<endreq;
74 int layer0 = 0;
75 for (int i = 0; i^n; i++){
76 FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
77 if (!_axial_segments[i]->superLayer().superLayerId()) layer0 = 1;
78 int m = hits.length();
79 for (int j = 0; j^m; j++){
80 FTWire & h = * hits[j];
81 const float x = h.x();
82 const float y = h.y();
83 double d0 = _la->d((double)x,(double)y);
84 float delta = h.distance()/h.layer().r();
85 if (fabs(d0) > 0.7*h.layer().csize()) continue; // remove bad hits
86 if (d0>0){ // left or right
87 d0 = -d0;
88 }else{
89 delta = -delta;
90 }
91 _la->add_point(x - delta*y, y + delta*x, 1);
92 }
93 }
94 if (!layer0){ // salvage hits from complecated segments in layer0
95 FTList<FTSegment *> & salvage =
96 m_ftFinder->superLayer(0)->complecated_segments();
97 HepVector center = _la->center();
98 const float xc = center(1);
99 const float yc = center(2);
100 const float rc = a(1)+(-1. / 2.99792458 /m_pmgnIMF->getReferField())/a(3); // rho+drho(signed)
101 int nn = salvage.length();
102 for (int i = 0; i^nn; i++){
103 int salvaged = 0;
104 FTList<FTWire *> & hits = salvage[i]->wireHits();
105 int m = hits.length();
106 for (int j = 0; j^m; j++){
107 FTWire & h = * hits[j];
108 float x = h.x();
109 float y = h.y();
110 float r = h.layer().r();
111 if ((y*xc-x*yc)/(r*rc)<0.707) break;
112 double d0 = _la->d((double)x,(double)y);
113 float delta = h.distance()/r;
114 if (fabs(d0) > 0.7*h.layer().csize()) continue; // remove bad hits
115 if (d0>0){ // left or right
117 d0 = -d0;
118 }else{
120 delta = -delta;
121 }
122 _la->add_point(x - delta*y, y + delta*x, 1);
123 salvaged = 1;
124 }
125 if (salvaged){
126 _axial_segments.append(salvage[i]);
127 break;
128 }
129 }
130 }
131 chi2 = _la->fit(); // refit using drift distance
135 _za = new zav;
136 _SigmaS = 0.;
137 _SigmaZ = 0.;
138 _SigmaSS = 0.;
139 _SigmaSZ = 0.;
140 return 1;
141}
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252
#define FTWireFittingInvalid
Definition: FTWire.h:27
IMessageSvc * msgSvc()
FTSuperLayer * superLayer(int id) const
returns superlayer
Definition: FTFinder.h:196
FTList< FTSegment * > & complecated_segments(void)
returns complecated segments
Definition: FTSuperLayer.h:227
static MdcParameter * param
Definition: FTTrack.h:134
unsigned stateAND(const unsigned mask) const
returns state bit
Definition: FTWire.h:494
virtual double getReferField()=0
const double _minPt
Definition: MdcParameter.h:39
const double _minDr
Definition: MdcParameter.h:41

◆ r_phiReFit()

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

do r-phi refit

Definition at line 144 of file FTTrack.cxx.

145{
146 if (vtx_flag) _la->fit(vx, vy, 20*_la->chisq()/_la->nc());
147 int n = _axial_segments.length();
148 _la->clear();
149 for (int i = 0; i^n; i++){
150 FTList<FTWire *> & hits = _axial_segments[i]->wireHits();
151 int m = hits.length();
152 for (int j = 0; j^m; j++){
153 FTWire & h = * hits[j];
154 const float x = h.x();
155 const float y = h.y();
156 double d0 = _la->d((double)x,(double)y);
157 float cellsize = h.layer().csize();
158 if (m_ftFinder->evtTiming){
159 float time = h.time() + m_ftFinder->evtTiming;
160 if(time<-100) continue; // discard the bad TDC time
161 h.distance(m_ftFinder->t2x(h.layer(),time));
162 //h.distance(time*40*0.0001);
163 }
164 float delta = h.distance()/h.layer().r();
165 if (fabs(d0) > 0.5*cellsize) continue; // remove bad hits
166 if (d0>0){ // left or right
168 d0 = -d0;
169 }else{
171 delta = -delta;
172 }
173 h.setChi2(h.distance()+d0);
174#ifndef OnlineMode
175 //fill histogram
176 g_sigmaxy->fill(h.distance()+d0, 1.0);
177#endif
178 _la->add_point(x - delta*y, y + delta*x, 1);
179 }
180 }
181 HepVector b = _la->Hpar(m_ftFinder->pivot);
182 double chi2 = _la->fit(); // refit using drift distance
183#ifndef OnlineMode
184 g_chi2xy->fill(chi2/_la->nc(), 1.0);
185#endif
186
187 return 1;
188}
IHistogram1D * g_chi2xy
Definition: ntupleItem.h:38
IHistogram1D * g_sigmaxy
Definition: ntupleItem.h:36

◆ s_zFit()

int FTTrack::s_zFit ( void  )

do s-z linear fit

Definition at line 378 of file FTTrack.cxx.

378 {
379 IMessageSvc *msgSvc;
380 Gaudi::svcLocator()->service("MessageSvc", msgSvc);
381
382 MsgStream log(msgSvc, "FTFinder");
383
384 HepVector a = _la->Hpar(m_ftFinder->pivot);
385 int n = _stereo_segments->length();
386 log<<MSG::DEBUG<<"number of stereo segments: "<< n << endreq;
387 if (n < (param->_nseg)){
388 a(4) = -9999.;
389 a(5) = -9999.;
390 _helix = new Helix(m_ftFinder->pivot,a);
391 log<<MSG::DEBUG<<"cut by _nseg" << param->_nseg << endreq;
392 return 0;
393 }
394 FTList<double> zList(50);
395 FTList<double> sList(50);
396 FTList<FTWire *> hList(50);
397 for (int i = 0; i^n; i++){
398 FTList<FTWire *> & hits = (*_stereo_segments)[i]->wireHits();
399 int m = hits.length();
400 for (int j = 0; j^m; j++){
401 FTWire & h = * hits[j];
402 double z;
403 if (!(h.z(*_la,z))) continue;
404 double s = _la->s(h.layer().r());
405 float cellsize = h.layer().csize();
406 log<<MSG::DEBUG<<"cellsize: " << cellsize << endreq;
407
408 if (m_ftFinder->evtTiming){
409 float time = h.time() + m_ftFinder->evtTiming;
410 if(time<-100) continue; //discard the bad TDC time
411 double distance = m_ftFinder->t2x(h.layer(),time);
412 h.distance(distance);
413 log<<MSG::DEBUG<<"m_ftFinder->evtTiming: "<< m_ftFinder->evtTiming << " TDC time: " << h.time() << " distance: "<< distance << endreq;
414 }
415
416 double par = h.distance()/(0.25*cellsize);
417 _za->add(s,z,exp(-par*par));
418 sList.append(s);
419 zList.append(z);
420 hList.append(&h);
421 }
422 }
423 if (hList.length() < (param->_nlength)){
424 a(4) = -9999.;
425 a(5) = -9999.;
426 _helix = new Helix(m_ftFinder->pivot,a);
427 log << MSG::DEBUG << "cut by _nlength: " << param->_nlength << endreq;
428 return 0;
429 }
430 double chi2 = _za->calculate();
431 _za->clear();
432 n = hList.length();
433 for (int i = 0; i^n; i++){
434 double d = _za->d(sList[i],zList[i]);
435 float z_distance = hList[i]->distance_z();
436 if (fabs(fabs(d)-z_distance) > (param->_z_cut1)){
437 log<<MSG::DEBUG<<"cut by _z_cut1: "<< param->_z_cut1 << endreq;
438 zList.remove2(i);
439 sList.remove2(i);
440 n = hList.remove(i);
441 continue;
442 }
443 _za->add(sList[i], (d>0) ? zList[i]-z_distance : zList[i]+z_distance, 1.);
444 }
445
446 if (_za->nc() < (param->_nc)){
447 a(4) = -9999.;
448 a(5) = -9999.;
449 _helix = new Helix(m_ftFinder->pivot,a);
450 log<<MSG::DEBUG<<"cut by _nc: " << param->_nc << endreq;
451 return 0;
452 }
453 chi2 = _za->calculate();
454 _za->clear();
455 for (int i = 0; i^n; i++){
456 double d = _za->d(sList[i],zList[i]);
457 float z_distance = hList[i]->distance_z();
458 hList[i]->setChi2(fabs(d)-z_distance);
459 #ifndef OnlineMode
460 //fill ntuple
461 g_sigmaz->fill(fabs(d)-z_distance, 1.0);
462#endif
463 if (fabs(fabs(d)-z_distance) > (param->_z_cut2)) continue;
464 _za->add(sList[i], (d>0) ? zList[i]-z_distance : zList[i]+z_distance, 1.);
465 }
466
467 if (_za->nc() < (param->_nc)){
468 a(4) = -9999.;
469 a(5) = -9999.;
470 _helix = new Helix(m_ftFinder->pivot,a);
471 log<<MSG::DEBUG<<"cut by _nc" << param->_nc << endreq;
472 return 0;
473 }
474 chi2 = _za->calculate();
475#ifndef OnlineMode
476 g_chi2sz->fill(chi2/_za->nc(), 1.0);
477#endif
478 a(4) = _za->b(); // dz
479 a(5) = _za->a(); // tanLambda
480 _helix = new Helix(m_ftFinder->pivot,a);
481 return 1;
482}
int z(const Lpav &la, double &z) const
returns z for track la
Definition: FTWire.h:522
double s(double x, double y) const
const int _nseg
Definition: MdcParameter.h:69
const float _z_cut2
Definition: MdcParameter.h:75
const float _z_cut1
Definition: MdcParameter.h:75
const int _nc
Definition: MdcParameter.h:73
const int _nlength
Definition: MdcParameter.h:71
void add(double, double, double)
double d(double s, double z) const
IHistogram1D * g_chi2sz
Definition: ntupleItem.h:39
IHistogram1D * g_sigmaz
Definition: ntupleItem.h:37

◆ setFTFinder()

void FTTrack::setFTFinder ( FTFinder finder)
inline

Definition at line 323 of file FTTrack.h.

324{
325 m_ftFinder = finder;
326}

◆ SigmaS()

float FTTrack::SigmaS ( float  s)
inline

add s for culculation of tanLambda

Definition at line 265 of file FTTrack.h.

266{
267 return _SigmaS += s;
268}

◆ SigmaSS()

float FTTrack::SigmaSS ( float  ss)
inline

add s for culculation of dz, tanLambda

Definition at line 279 of file FTTrack.h.

280{
281 return _SigmaSS += ss;
282}

◆ SigmaSZ()

float FTTrack::SigmaSZ ( float  sz)
inline

add s for culculation of dz, tanLambda

Definition at line 272 of file FTTrack.h.

273{
274 return _SigmaSZ += sz;
275}

◆ SigmaZ()

float FTTrack::SigmaZ ( float  z)
inline

add z for culculation of tanLambda

Definition at line 258 of file FTTrack.h.

259{
260 return _SigmaZ += z;
261}

◆ stereo_segments()

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

returns stereo_segments

Definition at line 198 of file FTTrack.h.

199{
200 return *_stereo_segments;
201}

Referenced by printout().

◆ updateSZ()

void FTTrack::updateSZ ( void  )
inline

update s and z information for linking

Definition at line 300 of file FTTrack.h.

301{
303 if (n==1){
305 float s_tmp = s->s();
306 float z_tmp = s->z();
307 if (d_z(s_tmp,z_tmp) < 9998.){
308 _SigmaS += s_tmp;
309 _SigmaZ += z_tmp;
310 _SigmaSS += s_tmp*s_tmp;
311 _SigmaSZ += s_tmp*z_tmp;
313 }
315 }else if(n){
318 }
319}
T & first(void) const
returns the first object in the list
Definition: FTList.h:224
void clear(void)
clear lists but the allocated memory remains same
Definition: FTList.h:182

◆ Zav()

const zav & FTTrack::Zav ( void  ) const
inline

returns zav

Definition at line 244 of file FTTrack.h.

245{
246 return *_za;
247}

Member Data Documentation

◆ 

union { ... } FTTrack::@38

◆ 

union { ... } FTTrack::@40

◆ _axial_segments

FTList<FTSegment *>& FTTrack::_axial_segments

◆ _chi2_kappa

float FTTrack::_chi2_kappa

Definition at line 141 of file FTTrack.h.

Referenced by chi2_kappa_tmp().

◆ _helix

Helix* FTTrack::_helix

Definition at line 129 of file FTTrack.h.

Referenced by helix(), s_zFit(), and ~FTTrack().

◆ _kappa

float FTTrack::_kappa

Definition at line 137 of file FTTrack.h.

Referenced by kappa_tmp(), and r_phiFit().

◆ _la

Lpav* FTTrack::_la

Definition at line 127 of file FTTrack.h.

Referenced by lpav(), r_phi2Fit(), r_phi3Fit(), r_phi4Fit(), r_phiFit(), r_phiReFit(), s_zFit(), and ~FTTrack().

◆ _SigmaS

float FTTrack::_SigmaS

Definition at line 138 of file FTTrack.h.

Referenced by append_stereo(), d_z(), linkStereoSegments(), r_phiFit(), SigmaS(), and updateSZ().

◆ _SigmaSS

float FTTrack::_SigmaSS

Definition at line 142 of file FTTrack.h.

Referenced by append_stereo(), d_z(), linkStereoSegments(), r_phiFit(), SigmaSS(), and updateSZ().

◆ _SigmaSZ

float FTTrack::_SigmaSZ

Definition at line 145 of file FTTrack.h.

Referenced by append_stereo(), d_z(), linkStereoSegments(), r_phiFit(), SigmaSZ(), and updateSZ().

◆ _SigmaZ

float FTTrack::_SigmaZ

Definition at line 144 of file FTTrack.h.

Referenced by append_stereo(), d_z(), linkStereoSegments(), r_phiFit(), SigmaZ(), and updateSZ().

◆ _stereo_segments

FTList<FTSegment *>* FTTrack::_stereo_segments

◆ _stereo_segments_by_superLayer

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

Definition at line 133 of file FTTrack.h.

Referenced by linkStereoSegments(), r_phiFit(), and updateSZ().

◆ _stereo_segments_cache

FTList<FTSegment *>* FTTrack::_stereo_segments_cache

Definition at line 132 of file FTTrack.h.

Referenced by append_stereo_cache(), linkStereoSegments(), r_phiFit(), and updateSZ().

◆ _za

zav* FTTrack::_za

Definition at line 128 of file FTTrack.h.

Referenced by r_phiFit(), s_zFit(), Zav(), and ~FTTrack().

◆ minDr

float FTTrack::minDr

Definition at line 113 of file FTTrack.h.

◆ minPt

float FTTrack::minPt

Definition at line 112 of file FTTrack.h.

◆ param

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

Definition at line 134 of file FTTrack.h.

Referenced by r_phiFit(), and s_zFit().

◆ Testime

float FTTrack::Testime

Definition at line 117 of file FTTrack.h.

◆ xtCoEff

float FTTrack::xtCoEff

Definition at line 116 of file FTTrack.h.


The documentation for this class was generated from the following files: