CbmRoot
LxCATriplets.cxx
Go to the documentation of this file.
1 #include "LxCATriplets.h"
3 #include "kdtree++/kdtree.hpp"
5 #include <iostream>
6 
7 using namespace std;
8 
9 static Double_t errCoeffTripletRXs[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
10 static Double_t errCoeffTripletRYs[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
11 static Double_t errCoeffTripletRLXs[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
12 static Double_t errCoeffTripletRLYs[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
13 static Double_t errCoeffInterTripletXs[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
14 static Double_t errCoeffInterTripletYs[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
15 static Double_t errCoeffInterTripletTxs[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
16 static Double_t errCoeffInterTripletTys[] = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0};
17 
19 // LxPoint
21 
23  for (list<LxTriplet*>::iterator i = triplets.begin(); i != triplets.end();
24  ++i)
25  delete *i;
26 
27 #ifdef USE_SEGMENTS
28  for (list<LxSegment*>::iterator i = segments.begin(); i != segments.end();
29  ++i)
30  delete *i;
31 #endif //USE_SEGMENTS
32 }
33 
35 // LxLayer
37 
38 struct KDTPointWrap {
40  Double_t data[2];
41 
42  explicit KDTPointWrap(LxPoint* p) : point(p) {
43  data[0] = p->x;
44  data[1] = p->y;
45  }
46 
47  KDTPointWrap(Double_t x, Double_t y)
48  : point(0) // This constructor is used when setting search-range bounds.
49  {
50  data[0] = x;
51  data[1] = y;
52  }
53 
54  // Stuff required by libkdtree++
55  typedef Double_t value_type;
56 
57  value_type operator[](size_t n) const { return data[n]; }
58 };
59 
60 typedef KDTree::KDTree<2, KDTPointWrap> KDTPointsStorageType;
61 
62 LxLayer::LxLayer(LxStation* Station, int LayerNumber)
63  : points_handle(0), zCoord(0), station(Station), layerNumber(LayerNumber) {
64  points_handle = new KDTPointsStorageType;
65 }
66 
69  static_cast<KDTPointsStorageType*>(points_handle);
70  Clear();
71  delete points;
72 }
73 
74 void LxLayer::Clear() {
76  static_cast<KDTPointsStorageType*>(points_handle);
77 
78  for (KDTPointsStorageType::iterator i = points->begin(); i != points->end();
79  ++i) {
80  KDTPointWrap& wrap = const_cast<KDTPointWrap&>(*i);
81  LxPoint* point = wrap.point;
82  delete point;
83  }
84 
85  points->clear();
86 }
87 
89 // LxStation
91 
93  : space(sp)
94  , stationNumber(stN)
95  , zCoord(0)
96  , xDispLeft(0)
97  , yDispLeft(0)
98  , xDispRight(0)
99  , yDispRight(0)
100  , xDispLeft2(0)
101  , yDispLeft2(0)
102  , xDispRight2(0)
103  , yDispRight2(0)
104  , xDispRL(0)
105  , yDispRL(0)
106  , xDispRL2(0)
107  , yDispRL2(0)
108  ,
109 #ifdef OUT_DISP_BY_TRIPLET_DIR
110  xOutDispTriplet(0)
111  , yOutDispTriplet(0)
112  , xOutDispTriplet2(0)
113  , yOutDispTriplet2(0)
114  ,
115 #else //OUT_DISP_BY_TRIPLET_DIR
116  xOutDispVertex(0)
117  , yOutDispVertex(0)
118  , xOutDispVertex2(0)
119  , yOutDispVertex2(0)
120  ,
121 #endif //OUT_DISP_BY_TRIPLET_DIR
122 #ifdef USE_SEGMENTS
123  txBreakLeft(0)
124  , tyBreakLeft(0)
125  , txBreakRight(0)
126  , tyBreakRight(0)
127  , txBreakLeft2(0)
128  , tyBreakLeft2(0)
129  , txBreakRight2(0)
130  , tyBreakRight2(0)
131  , txInterStationBreak(0)
132  , tyInterStationBreak(0)
133  , txInterStationBreak2(0)
134  , tyInterStationBreak2(0)
135  ,
136 #else //USE_SEGMENTS
137  txInterTripletBreak(0)
138  , tyInterTripletBreak(0)
139  , txInterTripletBreak2(0)
140  , tyInterTripletBreak2(0)
141  ,
142 #endif //USE_SEGMENTS
143  errCoeffTripletRX(errCoeffTripletRXs[stN])
144  , errCoeffTripletRX2(errCoeffTripletRX * errCoeffTripletRX)
145  , errCoeffTripletRY(errCoeffTripletRYs[stN])
146  , errCoeffTripletRY2(errCoeffTripletRY * errCoeffTripletRY)
147  , errCoeffTripletRLX(errCoeffTripletRLXs[stN])
148  , errCoeffTripletRLX2(errCoeffTripletRLX * errCoeffTripletRLX)
149  , errCoeffTripletRLY(errCoeffTripletRLYs[stN])
150  , errCoeffTripletRLY2(errCoeffTripletRLY * errCoeffTripletRLY)
151  , errCoeffInterTripletX(errCoeffInterTripletXs[stN])
152  , errCoeffInterTripletX2(errCoeffInterTripletX * errCoeffInterTripletX)
153  , errCoeffInterTripletY(errCoeffInterTripletYs[stN])
154  , errCoeffInterTripletY2(errCoeffInterTripletY * errCoeffInterTripletY)
155  , errCoeffInterTripletTx(errCoeffInterTripletTxs[stN])
156  , errCoeffInterTripletTx2(errCoeffInterTripletTx * errCoeffInterTripletTx)
157  , errCoeffInterTripletTy(errCoeffInterTripletTys[stN])
158  , errCoeffInterTripletTy2(errCoeffInterTripletTy * errCoeffInterTripletTy) {
159  for (Int_t i = 0; i < LXLAYERS; ++i)
160  layers[i] = new LxLayer(this, i);
161 }
162 
164  for (Int_t i = 0; i < LXLAYERS; ++i)
165  delete layers[i];
166 }
167 
168 void LxStation::Clear() {
169  for (Int_t i = 0; i < LXLAYERS; ++i)
170  layers[i]->Clear();
171 }
172 
174  LxLayer* lLayer = layers[0];
175  LxLayer* cLayer = layers[1];
176  LxLayer* rLayer = layers[2];
177 
178  KDTPointsStorageType* lPoints =
179  static_cast<KDTPointsStorageType*>(lLayer->points_handle);
180  KDTPointsStorageType* cPoints =
181  static_cast<KDTPointsStorageType*>(cLayer->points_handle);
182  KDTPointsStorageType* rPoints =
183  static_cast<KDTPointsStorageType*>(rLayer->points_handle);
184 
185  //cout << "[" << stationNumber << "] LxStation::BuildTriplets() hit count: " << lPoints->size() << " : " <<
186  //cPoints->size() << " : " << rPoints->size() << endl;
187 
188  Double_t lZCoord = lLayer->zCoord;
189  Double_t rZCoord = rLayer->zCoord;
190 
191  UInt_t tripletCount = 0;
192 
193  for (KDTPointsStorageType::iterator i = cPoints->begin(); i != cPoints->end();
194  ++i) {
195  KDTPointWrap& cWrap = const_cast<KDTPointWrap&>(*i);
196  LxPoint* cPoint = cWrap.point;
197  Double_t deltaZc = rZCoord - cPoint->z;
198  Double_t cTx = cPoint->x / cPoint->z;
199  Double_t cTy = cPoint->y / cPoint->z;
200  Double_t rX = cPoint->x + cTx * deltaZc;
201  Double_t rY = cPoint->y + cTy * deltaZc;
202 
203  // Search corresponding points at right layer.
204  Double_t rXLimit = errCoeffTripletRX * sqrt(xDispRight2 + 2 * cPoint->dx2);
205  Double_t rYLimit = errCoeffTripletRY * sqrt(yDispRight2 + 2 * cPoint->dy2);
206  KDTPointWrap rBoundsWrap(rX - rXLimit, rY - rYLimit);
207  KDTree::_Region<
208  2,
209  KDTPointWrap,
210  Double_t,
211  KDTree::_Bracket_accessor<KDTPointWrap>,
212  std::less<KDTree::_Bracket_accessor<KDTPointWrap>::result_type>>
213  rRange(rBoundsWrap);
214  rRange.set_low_bound(rBoundsWrap, 0);
215  rRange.set_low_bound(rBoundsWrap, 1);
216  rBoundsWrap.data[0] = rX + rXLimit;
217  rBoundsWrap.data[1] = rY + rYLimit;
218  rRange.set_high_bound(rBoundsWrap, 0);
219  rRange.set_high_bound(rBoundsWrap, 1);
220  list<KDTPointWrap> rNeighbours;
221  rPoints->find_within_range(
222  rRange, back_insert_iterator<list<KDTPointWrap>>(rNeighbours));
223 
224  for (list<KDTPointWrap>::iterator j = rNeighbours.begin();
225  j != rNeighbours.end();
226  ++j) {
227  KDTPointWrap& rWrap = *j;
228  LxPoint* rPoint = rWrap.point;
229  Double_t rDeltaX = rPoint->x - rX;
230  Double_t rDeltaY = rPoint->y - rY;
231  Double_t chi2R =
232  rDeltaX * rDeltaX / (xDispRight2 + cPoint->dx2 + rPoint->dx2)
233  + rDeltaY * rDeltaY / (yDispRight2 + cPoint->dy2 + rPoint->dy2);
234 
235  // Search a point on left layer which corresponds to this pair of points: central and right.
236  Double_t deltaZr = rPoint->z - cPoint->z;
237  Double_t tx = (rPoint->x - cPoint->x) / deltaZr;
238  Double_t ty = (rPoint->y - cPoint->y) / deltaZr;
239  deltaZr = lZCoord - cPoint->z;
240  Double_t lX = cPoint->x + tx * deltaZr;
241  Double_t lY = cPoint->y + ty * deltaZr;
242  Double_t lXLimit =
243  errCoeffTripletRLX * sqrt(xDispRL2 + 2 * cPoint->dx2 + rPoint->dx2);
244  Double_t lYLimit =
245  errCoeffTripletRLY * sqrt(yDispRL2 + 2 * cPoint->dy2 + rPoint->dy2);
246  KDTPointWrap lBoundsWrap(lX - lXLimit, lY - lYLimit);
247  KDTree::_Region<
248  2,
249  KDTPointWrap,
250  Double_t,
251  KDTree::_Bracket_accessor<KDTPointWrap>,
252  std::less<KDTree::_Bracket_accessor<KDTPointWrap>::result_type>>
253  lRange(lBoundsWrap);
254  lRange.set_low_bound(lBoundsWrap, 0);
255  lRange.set_low_bound(lBoundsWrap, 1);
256  lBoundsWrap.data[0] = lX + lXLimit;
257  lBoundsWrap.data[1] = lY + lYLimit;
258  lRange.set_high_bound(lBoundsWrap, 0);
259  lRange.set_high_bound(lBoundsWrap, 1);
260  list<KDTPointWrap> lNeighbours;
261  lPoints->find_within_range(
262  lRange, back_insert_iterator<list<KDTPointWrap>>(lNeighbours));
263 
264  for (list<KDTPointWrap>::iterator k = lNeighbours.begin();
265  k != lNeighbours.end();
266  ++k) {
267  KDTPointWrap& lWrap = *k;
268  LxPoint* lPoint = lWrap.point;
269  Double_t lDeltaX = lPoint->x - lX;
270  Double_t lDeltaY = lPoint->y - lY;
271  Double_t chi2 =
272  chi2R
273  + lDeltaX * lDeltaX
274  / (xDispRL2 + lPoint->dx2 + cPoint->dx2 + rPoint->dx2)
275  + lDeltaY * lDeltaY
276  / (yDispRL2 + lPoint->dy2 + cPoint->dy2 + rPoint->dy2);
277  LxTriplet* triplet = new LxTriplet(lPoint, cPoint, rPoint, chi2);
278  cPoint->triplets.push_back(triplet);
279  ++tripletCount;
280  }
281  }
282  }
283 
284  //cout << "[" << stationNumber << "] LxStation::BuildTriplets() triplet count: " << tripletCount << endl;
285 }
286 
287 #ifdef USE_SEGMENTS
288 
289 void LxStation::BuildSegments() {
290  LxStation* lStation = space->stations[stationNumber - 1];
291  Double_t lZCoord = lStation->zCoord;
292  KDTPointsStorageType* rPoints =
293  static_cast<KDTPointsStorageType*>(layers[1]->points_handle);
294  KDTPointsStorageType* lPoints =
295  static_cast<KDTPointsStorageType*>(lStation->layers[1]->points_handle);
296 
297  UInt_t segmentCount = 0;
298 
299  for (KDTPointsStorageType::iterator i = rPoints->begin(); i != rPoints->end();
300  ++i) {
301  KDTPointWrap& rWrap = const_cast<KDTPointWrap&>(*i);
302  LxPoint* rPoint = rWrap.point;
303 
304  if (rPoint->triplets.empty()) continue;
305 
306  // Search corresponding points at the left station.
307  Double_t txVertex = rPoint->x / rPoint->z;
308  Double_t tyVertex = rPoint->y / rPoint->z;
309  Double_t deltaZ = lZCoord - rPoint->z;
310  Double_t lX = rPoint->x + txVertex * deltaZ;
311  Double_t lY = rPoint->y + tyVertex * deltaZ;
312  Double_t lXLimit = errorXcoeff * sqrt(xOutDispVertex2 + 2 * rPoint->dx2);
313  Double_t lYLimit = errorYcoeff * sqrt(yOutDispVertex2 + 2 * rPoint->dy2);
314  KDTPointWrap lBoundsWrap(lX - lXLimit, lY - lYLimit);
315  KDTree::_Region<
316  2,
317  KDTPointWrap,
318  Double_t,
319  KDTree::_Bracket_accessor<KDTPointWrap>,
320  std::less<KDTree::_Bracket_accessor<KDTPointWrap>::result_type>>
321  lRange(lBoundsWrap);
322  lRange.set_low_bound(lBoundsWrap, 0);
323  lRange.set_low_bound(lBoundsWrap, 1);
324  lBoundsWrap.data[0] = lX + lXLimit;
325  lBoundsWrap.data[1] = lY + lYLimit;
326  lRange.set_high_bound(lBoundsWrap, 0);
327  lRange.set_high_bound(lBoundsWrap, 1);
328  list<KDTPointWrap> lNeighbours;
329  lPoints->find_within_range(
330  lRange, back_insert_iterator<list<KDTPointWrap>>(lNeighbours));
331 
332  for (list<KDTPointWrap>::iterator k = lNeighbours.begin();
333  k != lNeighbours.end();
334  ++k) {
335  KDTPointWrap& lWrap = *k;
336  LxPoint* lPoint = lWrap.point;
337 
338  if (lPoint->triplets.empty()) continue;
339 
340  deltaZ = lPoint->z - rPoint->z;
341  Double_t deltaZ2 = deltaZ * deltaZ;
342  Double_t tx = (lPoint->x - rPoint->x) / deltaZ;
343  Double_t ty = (lPoint->y - rPoint->y) / deltaZ;
344  Double_t dtx2 = (lPoint->dx2 + rPoint->dx2) / deltaZ2;
345  Double_t dty2 = (lPoint->dy2 + rPoint->dy2) / deltaZ2;
346  LxSegment* segment = 0;
347 
348  for (list<LxTriplet*>::iterator l = rPoint->triplets.begin();
349  l != rPoint->triplets.end();
350  ++l) {
351  LxTriplet* rTriplet = *l;
352  Double_t rDeltaTx = rTriplet->tx - tx;
353  Double_t rDeltaTx2 = rDeltaTx * rDeltaTx;
354 
355  if (rDeltaTx2 > errorTXcoeff2 * (txBreakLeft2 + dtx2 + rTriplet->dtx2))
356  continue;
357 
358  Double_t rDeltaTy = rTriplet->ty - ty;
359  Double_t rDeltaTy2 = rDeltaTy * rDeltaTy;
360 
361  if (rDeltaTy2 > errorTYcoeff2 * (tyBreakLeft2 + dty2 + rTriplet->dty2))
362  continue;
363 
364  for (list<LxTriplet*>::iterator m = lPoint->triplets.begin();
365  m != lPoint->triplets.end();
366  ++m) {
367  LxTriplet* lTriplet = *m;
368  Double_t lDeltaTx = lTriplet->tx - tx;
369  Double_t lDeltaTx2 = lDeltaTx * rDeltaTx;
370 
371  if (lDeltaTx2
372  > errorTXcoeff2 * (txBreakRight2 + dtx2 + lTriplet->dtx2))
373  continue;
374 
375  Double_t lDeltaTy = lTriplet->ty - ty;
376  Double_t lDeltaTy2 = lDeltaTy * rDeltaTy;
377 
378  if (lDeltaTy2
379  > errorTYcoeff2 * (tyBreakRight2 + dty2 + lTriplet->dty2))
380  continue;
381 
382  if (0 == segment) {
383  Double_t lDeltaX = lPoint->x - lX;
384  Double_t lDeltaY = lPoint->y - lY;
385  Double_t chi2 =
386  lDeltaX * lDeltaX / (xOutDispVertex2 + lPoint->dx2 + rPoint->dx2)
387  + lDeltaY * lDeltaY
388  / (yOutDispVertex2 + lPoint->dy2 + rPoint->dy2);
389  segment = new LxSegment(rPoint, lPoint, tx, ty, dtx2, dty2, chi2);
390  rPoint->segments.push_back(segment);
391  ++segmentCount;
392  }
393 
394  segment->neighbours.push_back(lTriplet);
395  rTriplet->neighbours.push_back(segment);
396  }
397  }
398  }
399  }
400 
401  //cout << "[" << stationNumber << "] LxStation::BuildSegments() segment count: " << segmentCount << endl;
402 }
403 
404 #else //USE_SEGMENTS
405 
406 #ifdef OUT_DISP_BY_TRIPLET_DIR
407 
409  LxStation* lStation = space->stations[stationNumber - 1];
410  Double_t lZCoord = lStation->zCoord;
411  KDTPointsStorageType* rPoints =
412  static_cast<KDTPointsStorageType*>(layers[1]->points_handle);
413  KDTPointsStorageType* lPoints =
414  static_cast<KDTPointsStorageType*>(lStation->layers[1]->points_handle);
415 
416  for (KDTPointsStorageType::iterator i = rPoints->begin(); i != rPoints->end();
417  ++i) {
418  KDTPointWrap& rWrap = const_cast<KDTPointWrap&>(*i);
419  LxPoint* rPoint = rWrap.point;
420 
421  for (list<LxTriplet*>::iterator j = rPoint->triplets.begin();
422  j != rPoint->triplets.end();
423  ++j) {
424  LxTriplet* rTriplet = *j;
425  Double_t deltaZ = lZCoord - rPoint->z;
426  Double_t lX = rPoint->x + rTriplet->tx * deltaZ;
427  Double_t lY = rPoint->y + rTriplet->ty * deltaZ;
428  Double_t lXLimit = errorXcoeff * sqrt(xOutDispTriplet2 + 2 * rPoint->dx2);
429  Double_t lYLimit = errorYcoeff * sqrt(yOutDispTriplet2 + 2 * rPoint->dy2);
430  KDTPointWrap lBoundsWrap(lX - lXLimit, lY - lYLimit);
431  KDTree::_Region<
432  2,
433  KDTPointWrap,
434  Double_t,
435  KDTree::_Bracket_accessor<KDTPointWrap>,
436  std::less<KDTree::_Bracket_accessor<KDTPointWrap>::result_type>>
437  lRange(lBoundsWrap);
438  lRange.set_low_bound(lBoundsWrap, 0);
439  lRange.set_low_bound(lBoundsWrap, 1);
440  lBoundsWrap.data[0] = lX + lXLimit;
441  lBoundsWrap.data[1] = lY + lYLimit;
442  lRange.set_high_bound(lBoundsWrap, 0);
443  lRange.set_high_bound(lBoundsWrap, 1);
444  list<KDTPointWrap> lNeighbours;
445  lPoints->find_within_range(
446  lRange, back_insert_iterator<list<KDTPointWrap>>(lNeighbours));
447 
448  for (list<KDTPointWrap>::iterator k = lNeighbours.begin();
449  k != lNeighbours.end();
450  ++k) {
451  KDTPointWrap& lWrap = *k;
452  LxPoint* lPoint = lWrap.point;
453 
454  for (list<LxTriplet*>::iterator l = lPoint->triplets.begin();
455  l != lPoint->triplets.end();
456  ++l) {
457  LxTriplet* lTriplet = *l;
458  Double_t txBreak = lTriplet->tx - rTriplet->tx;
459  Double_t txBreak2 = txBreak * txBreak;
460 
461  if (txBreak2
462  > errorTXcoeff2
463  * (txInterTripletBreak2 + lTriplet->dtx2 + rTriplet->dtx2))
464  continue;
465 
466  Double_t tyBreak = lTriplet->ty - rTriplet->ty;
467  Double_t tyBreak2 = tyBreak * tyBreak;
468 
469  if (tyBreak2
470  > errorTYcoeff2
471  * (tyInterTripletBreak2 + lTriplet->dty2 + rTriplet->dty2))
472  continue;
473 
474  Double_t lDeltaX = lPoint->x - lX;
475  Double_t lDeltaX2 = lDeltaX * lDeltaX;
476  Double_t lDeltaY = lPoint->y - lY;
477  Double_t lDeltaY2 = lDeltaY * lDeltaY;
478  Double_t chi2 =
479  lDeltaX2 / (xOutDispTriplet2 + lPoint->dx2 + rPoint->dx2)
480  + lDeltaY2 / (yOutDispTriplet2 + lPoint->dy2 + rPoint->dy2)
481  + txBreak2
482  / (txInterTripletBreak2 + lTriplet->dtx2 + rTriplet->dtx2)
483  + tyBreak2
484  / (tyInterTripletBreak2 + lTriplet->dty2 + rTriplet->dty2);
485  rTriplet->neighbours.push_back(make_pair(lTriplet, chi2));
486  }
487  }
488  }
489  }
490 }
491 
492 #else //OUT_DISP_BY_TRIPLET_DIR
493 
495  LxStation* lStation = space->stations[stationNumber - 1];
496  Double_t lZCoord = lStation->zCoord;
497  KDTPointsStorageType* rPoints =
498  static_cast<KDTPointsStorageType*>(layers[1]->points_handle);
499  KDTPointsStorageType* lPoints =
500  static_cast<KDTPointsStorageType*>(lStation->layers[1]->points_handle);
501 
502  for (KDTPointsStorageType::iterator i = rPoints->begin(); i != rPoints->end();
503  ++i) {
504  KDTPointWrap& rWrap = const_cast<KDTPointWrap&>(*i);
505  LxPoint* rPoint = rWrap.point;
506 
507  if (rPoint->triplets.empty()) continue;
508 
509  // Search corresponding points at the left station.
510  Double_t txVertex = rPoint->x / rPoint->z;
511  Double_t tyVertex = rPoint->y / rPoint->z;
512  Double_t deltaZ = lZCoord - rPoint->z;
513  Double_t lX = rPoint->x + txVertex * deltaZ;
514  Double_t lY = rPoint->y + tyVertex * deltaZ;
515  //Double_t scatCoeff2 = 1 + txVertex * txVertex + tyVertex * tyVertex;
516  Double_t lXLimit =
518  * sqrt(/*scatCoeff2 * */ xOutDispVertex2 + 2 * rPoint->dx2);
519  Double_t lYLimit =
521  * sqrt(/*scatCoeff2 * */ yOutDispVertex2 + 2 * rPoint->dy2);
522  KDTPointWrap lBoundsWrap(lX - lXLimit, lY - lYLimit);
523  KDTree::_Region<
524  2,
525  KDTPointWrap,
526  Double_t,
527  KDTree::_Bracket_accessor<KDTPointWrap>,
528  std::less<KDTree::_Bracket_accessor<KDTPointWrap>::result_type>>
529  lRange(lBoundsWrap);
530  lRange.set_low_bound(lBoundsWrap, 0);
531  lRange.set_low_bound(lBoundsWrap, 1);
532  lBoundsWrap.data[0] = lX + lXLimit;
533  lBoundsWrap.data[1] = lY + lYLimit;
534  lRange.set_high_bound(lBoundsWrap, 0);
535  lRange.set_high_bound(lBoundsWrap, 1);
536  list<KDTPointWrap> lNeighbours;
537  lPoints->find_within_range(
538  lRange, back_insert_iterator<list<KDTPointWrap>>(lNeighbours));
539 
540  for (list<KDTPointWrap>::iterator k = lNeighbours.begin();
541  k != lNeighbours.end();
542  ++k) {
543  KDTPointWrap& lWrap = *k;
544  LxPoint* lPoint = lWrap.point;
545 
546  if (lPoint->triplets.empty()) continue;
547 
548  for (list<LxTriplet*>::iterator l = rPoint->triplets.begin();
549  l != rPoint->triplets.end();
550  ++l) {
551  LxTriplet* rTriplet = *l;
552 
553  for (list<LxTriplet*>::iterator m = lPoint->triplets.begin();
554  m != lPoint->triplets.end();
555  ++m) {
556  LxTriplet* lTriplet = *m;
557  Double_t txBreak = lTriplet->tx - rTriplet->tx;
558  Double_t txBreak2 = txBreak * txBreak;
559 
560  if (txBreak2
562  * (txInterTripletBreak2 + lTriplet->dtx2 + rTriplet->dtx2))
563  continue;
564 
565  Double_t tyBreak = lTriplet->ty - rTriplet->ty;
566  Double_t tyBreak2 = tyBreak * tyBreak;
567 
568  if (tyBreak2
570  * (tyInterTripletBreak2 + lTriplet->dty2 + rTriplet->dty2))
571  continue;
572 
573  Double_t lDeltaX = lPoint->x - lX;
574  Double_t lDeltaX2 = lDeltaX * lDeltaX;
575  Double_t lDeltaY = lPoint->y - lY;
576  Double_t lDeltaY2 = lDeltaY * lDeltaY;
577  Double_t chi2 =
578  lDeltaX2
579  / (/*scatCoeff2 * */ xOutDispVertex2 + lPoint->dx2 + rPoint->dx2)
580  + // Comment to improve suppression ration.
581  lDeltaY2
582  / (/*scatCoeff2 * */ yOutDispVertex2 + lPoint->dy2 + rPoint->dy2)
583  + // Comment to improve suppression ration.
584  txBreak2 / (txInterTripletBreak2 + lTriplet->dtx2 + rTriplet->dtx2)
585  + tyBreak2
586  / (tyInterTripletBreak2 + lTriplet->dty2 + rTriplet->dty2);
587  rTriplet->neighbours.push_back(make_pair(lTriplet, chi2));
588  }
589  }
590  }
591  }
592 }
593 
594 #endif //OUT_DISP_BY_TRIPLET_DIR
595 
596 #endif //USE_SEGMENTS
597 
599 // LxTrack
601 
603  externalTrack = 0;
604 
605  for (list<pair<LxExtTrack*, Double_t>>::iterator i =
606  extTrackCandidates.begin();
607  i != extTrackCandidates.end();
608  ++i) {
609  LxExtTrack* extTrack = i->first;
610  Double_t aChi2 = i->second;
611 
612  if (0 == extTrack->recoTrack.first) {
613  extTrack->recoTrack.first = this;
614  extTrack->recoTrack.second = aChi2;
615  externalTrack = extTrack;
616  break;
617  } else if (aChi2 < extTrack->recoTrack.second) {
618  LxTrack* anotherTrack = extTrack->recoTrack.first;
619  extTrack->recoTrack.first = this;
620  extTrack->recoTrack.second = aChi2;
621  externalTrack = extTrack;
622  anotherTrack->Rebind();
623  break;
624  }
625  }
626 }
627 
629 // LxSpace
631 
632 LxSpace::LxSpace() : stationsInAlgo(LXSTATIONS) {
633  for (Int_t i = 0; i < LXSTATIONS; ++i)
634  stations[i] = new LxStation(this, i);
635 }
636 
638  Clear();
639 
640  for (Int_t i = 0; i < LXSTATIONS; ++i)
641  delete stations[i];
642 }
643 
644 void LxSpace::Clear() {
645  for (Int_t i = 0; i < LXSTATIONS; ++i)
646  stations[i]->Clear();
647 
648  for (list<LxTrack*>::iterator i = tracks.begin(); i != tracks.end(); ++i)
649  delete *i;
650 
651  tracks.clear();
652  extTracks.clear();
653 }
654 
656  for (Int_t i = 0; i < LXSTATIONS; ++i)
658 }
659 
660 #ifdef USE_SEGMENTS
661 
662 void LxSpace::BuildSegments() {
663  for (Int_t i = 1; i < LXSTATIONS; ++i)
664  stations[i]->BuildSegments();
665 }
666 
667 #else //USE_SEGMENTS
668 
670  for (Int_t i = 1; i < LXSTATIONS; ++i)
672 }
673 
674 #endif //USE_SEGMENTS
675 
676 #ifdef USE_SEGMENTS
678  LxTriplet* triplet,
679  pair<LxSegment*, LxTriplet*>* branches,
680  list<LxTrackCandidate*>& candidates,
681  Int_t level,
682  Double_t chi2) {
683  for (list<LxSegment*>::iterator i = triplet->neighbours.begin();
684  i != triplet->neighbours.end();
685  ++i) {
686  LxSegment* segment = *i;
687  LxStation* lStation = stations[level - 1];
688  LxStation* rStation = stations[level];
689  Double_t dtx_1 = segment->tx - triplet->tx;
690  Double_t dty_1 = segment->ty - triplet->ty;
691  Double_t chi2_1 =
692  chi2 + segment->chi2
693  + dtx_1 * dtx_1 / (rStation->txBreakLeft2 + triplet->dtx2 + segment->dtx2)
694  + dty_1 * dty_1
695  / (rStation->tyBreakLeft2 + triplet->dty2 + segment->dty2);
696 
697  if (false && level < LXSTATIONS - 1) {
698  LxSegment* rSegment = branches[level].first;
699  Double_t dtx_1_s = abs(segment->tx - rSegment->tx);
700  Double_t slopeCoeff2 =
701  1 + rSegment->tx * rSegment->tx + rSegment->ty * rSegment->ty;
702  Double_t segTxSigma2 = rStation->txInterStationBreak2 * slopeCoeff2
703  + segment->dtx2 + rSegment->dtx2;
704 
705  if (dtx_1_s > errorTXcoeff * sqrt(segTxSigma2)) continue;
706 
707  Double_t dty_1_s = abs(segment->ty - rSegment->ty);
708  Double_t segTySigma2 = rStation->tyInterStationBreak2 * slopeCoeff2
709  + segment->dty2 + rSegment->dty2;
710 
711  if (dty_1_s > errorTYcoeff * sqrt(segTySigma2)) continue;
712 
713  chi2_1 +=
714  dtx_1_s * dtx_1_s / segTxSigma2 + dty_1_s * dty_1_s / segTySigma2;
715  }
716 
717  for (list<LxTriplet*>::iterator j = segment->neighbours.begin();
718  j != segment->neighbours.end();
719  ++j) {
720  LxTriplet* triplet2 = *j;
721 
722  if (triplet2->left->used || triplet2->center->used
723  || triplet2->right->used)
724  continue;
725 
726  Double_t dtx_2 = triplet2->tx - segment->tx;
727  Double_t dty_2 = triplet2->ty - segment->ty;
728  Double_t chi2_2 =
729  chi2_1 + triplet2->chi2
730  + dtx_2 * dtx_2
731  / (lStation->txBreakRight2 + segment->dtx2 + triplet2->dtx2)
732  + dty_2 * dty_2
733  / (lStation->tyBreakRight2 + segment->dty2 + triplet2->dty2);
734  branches[level - 1] = make_pair(segment, triplet2);
735 
736  if (1 == level) {
737  LxTrackCandidate* trackCandidate =
738  new LxTrackCandidate(begin, branches, chi2_2);
739  candidates.push_back(trackCandidate);
740  } else
742  begin, triplet2, branches, candidates, level - 1, chi2_2);
743  }
744  }
745 }
746 #else //USE_SEGMENTS
747 void LxSpace::BuildCandidates(Int_t endStNum,
748  LxTriplet* triplet,
749  LxTriplet** branches,
750  list<LxTrackCandidate*>& candidates,
751  Int_t level,
752  Double_t chi2) {
753  for (list<pair<LxTriplet*, Double_t>>::iterator i =
754  triplet->neighbours.begin();
755  i != triplet->neighbours.end();
756  ++i) {
757  pair<LxTriplet*, Double_t>& tc2 = *i;
758  LxTriplet* triplet2 = tc2.first;
759 
760  if (triplet2->left->used || triplet2->center->used || triplet2->right->used)
761  continue;
762 
763  branches[level - 1] = triplet2;
764 
765  if (1 == level) {
766  LxTrackCandidate* trackCandidate = new LxTrackCandidate(
767  endStNum, branches, chi2 + tc2.second + triplet2->chi2);
768  candidates.push_back(trackCandidate);
769  } else
770  BuildCandidates(endStNum,
771  triplet2,
772  branches,
773  candidates,
774  level - 1,
775  chi2 + tc2.second + triplet2->chi2);
776  }
777 }
778 #endif //USE_SEGMENTS
779 
780 void LxSpace::Reconstruct() {
781  BuildTriplets();
782 #ifdef USE_SEGMENTS
783  BuildSegments();
784 #else //USE_SEGMENTS
785  ConnectTriplets();
786 #endif //USE_SEGMENTS
787 
788  for (int endStNum = LXSTATIONS - 1; endStNum >= stationsInAlgo - 1;
789  --endStNum) {
790  LxStation* startStation = stations[endStNum];
792  startStation->layers[1]->points_handle);
793 
794  for (KDTPointsStorageType::iterator i = points->begin(); i != points->end();
795  ++i) {
796  KDTPointWrap& wrap = const_cast<KDTPointWrap&>(*i);
797  LxPoint* point = wrap.point;
798  list<LxTrackCandidate*> candidates;
799  //cout << "LxSpace::Reconstruct(): track candidate maximum size: " << candidates.max_size() << endl;
800 
801  for (list<LxTriplet*>::iterator j = point->triplets.begin();
802  j != point->triplets.end();
803  ++j) {
804  LxTriplet* triplet = *j;
805 
806  if (triplet->left->used || triplet->center->used
807  || triplet->right->used)
808  continue;
809 
810  Double_t chi2 = triplet->chi2;
811 #ifdef USE_SEGMENTS
812  pair<LxSegment*, LxTriplet*> branches[LXSTATIONS - 1];
814  triplet, triplet, branches, candidates, LXSTATIONS - 1, chi2);
815 #else //USE_SEGMENTS
816  LxTriplet* branches[endStNum + 1];
817  branches[endStNum] = triplet;
819  endStNum, triplet, branches, candidates, endStNum, chi2);
820 #endif //USE_SEGMENTS
821  }
822 
823  cout << "LxSpace::Reconstruct(): track candidate number: "
824  << candidates.size() << endl;
825 
826  LxTrackCandidate* bestCandidate = 0;
827 
828  for (list<LxTrackCandidate*>::iterator j = candidates.begin();
829  j != candidates.end();
830  ++j) {
831  LxTrackCandidate* candidate = *j;
832 
833  if (0 == bestCandidate || candidate->chi2 < bestCandidate->chi2)
834  bestCandidate = candidate;
835  }
836 
837  if (0 != bestCandidate) {
838  LxTrack* track = new LxTrack(bestCandidate);
839  tracks.push_back(track);
840  }
841 
842  for (list<LxTrackCandidate*>::iterator j = candidates.begin();
843  j != candidates.end();
844  ++j)
845  delete *j;
846  } // for (KDTPointsStorageType::iterator i = points->begin(); i != points->end(); ++i)
847  } // for (int endStNum = LXSTATIONS - 1; endStNum >= stationsInAlgo - 1; --endStNum)
848 
849  RemoveClones();
850 }
851 
852 void LxSpace::RemoveClones() {
853  for (list<LxTrack*>::iterator i = tracks.begin(); i != tracks.end(); ++i) {
854  LxTrack* firstTrack = *i;
855  list<LxTrack*>::iterator i2 = i;
856  ++i2;
857 
858  for (; i2 != tracks.end(); ++i2) {
859  LxTrack* secondTrack = *i2;
860  Int_t neighbourPoints = 0;
861  Int_t minLen = firstTrack->length < secondTrack->length
862  ? firstTrack->length
863  : secondTrack->length;
864  Int_t minPoints = minLen * LXLAYERS;
865 
866  for (Int_t j = 0; j < LXSTATIONS * LXLAYERS; ++j) {
867  if (j >= minPoints) continue;
868 
869  LxPoint* point1 = firstTrack->points[j];
870  LxPoint* point2 = secondTrack->points[j];
871 
872  Double_t dx = point1->dx > point2->dx ? point1->dx : point2->dx;
873  Double_t dy = point1->dy > point2->dy ? point1->dy : point2->dy;
874 
875  if (abs(point2->x - point1->x) < 5.0 * dx
876  && abs(point2->y - point1->y) < 5.0 * dy)
877  ++neighbourPoints;
878  }
879 
880  if (neighbourPoints < minPoints / 2) continue;
881 
882  if (firstTrack->length > secondTrack->length)
883  secondTrack->clone = true;
884  else if (secondTrack->length > firstTrack->length)
885  firstTrack->clone = true;
886  else if (firstTrack->chi2 < secondTrack->chi2)
887  secondTrack->clone = true;
888  else
889  firstTrack->clone = true;
890  } // for (; i2 != tracks.end(); ++i2)
891  } // for (list<LxTrack*>::iterator i = tracks.begin(); i != tracks.end(); ++i)
892 }
893 
894 void LxSpace::JoinExtTracks() {
895  Double_t cutCoeff = 5.0;
896 
899 
900  for (list<LxTrack*>::iterator i = tracks.begin(); i != tracks.end(); ++i) {
901  LxTrack* track = *i;
902 
903  if (track->clone) continue;
904 
905  LxTriplet* leftTriplet = track->branches[0];
906  LxPoint* muchPoint = leftTriplet->center;
907 
908  for (list<LxExtTrack>::iterator j = extTracks.begin(); j != extTracks.end();
909  ++j) {
910  LxExtTrack* extTrack = &(*j);
911  const FairTrackParam* lastL1Param = extTrack->track->GetParamLast();
912  CbmLitTrackParam lastParam;
914  lastL1Param, &lastParam);
915 
916  if (kLITERROR
917  == fPropagator->Propagate(&lastParam, stations[0]->zCoord, 13))
918  continue;
919 
920  Double_t deltaX = abs(lastParam.GetX() - muchPoint->x);
921  Double_t deltaY = abs(lastParam.GetY() - muchPoint->y);
922  Double_t deltaTx = abs(lastParam.GetTx() - leftTriplet->tx);
923  Double_t deltaTy = abs(lastParam.GetTy() - leftTriplet->ty);
924  Double_t sigmaX2 = muchPoint->dx2 + lastParam.GetCovariance(0);
925  Double_t sigmaX = sqrt(sigmaX2);
926  Double_t sigmaY2 = muchPoint->dy2 + lastParam.GetCovariance(6);
927  Double_t sigmaY = sqrt(sigmaY2);
928  Double_t sigmaTx2 = leftTriplet->dtx2 + lastParam.GetCovariance(11);
929  Double_t sigmaTx = sqrt(sigmaTx2);
930  Double_t sigmaTy2 = leftTriplet->dty2 + lastParam.GetCovariance(15);
931  Double_t sigmaTy = sqrt(sigmaTy2);
932 
933  if (deltaX > cutCoeff * sigmaX || deltaY > cutCoeff * sigmaY
934  || deltaTx > cutCoeff * sigmaTx || deltaTy > cutCoeff * sigmaTy) {
935  continue;
936  }
937 
938  Double_t chi2 = deltaX * deltaX / sigmaX2 + deltaY * deltaY / sigmaY2
939  + deltaTx * deltaTx / sigmaTx2
940  + deltaTy * deltaTy / sigmaTy2;
941 
942  list<pair<LxExtTrack*, Double_t>>::iterator k =
943  track->extTrackCandidates.begin();
944 
945  for (; k != track->extTrackCandidates.end() && chi2 >= k->second; ++k)
946  ;
947 
948  pair<LxExtTrack*, Double_t> linkDesc(extTrack, chi2);
949  track->extTrackCandidates.insert(k, linkDesc);
950  } // for (list<LxExtTrack>::iterator j = extTracks.begin(); j != extTracks.end(); ++j)
951 
952  for (list<pair<LxExtTrack*, Double_t>>::iterator j =
953  track->extTrackCandidates.begin();
954  j != track->extTrackCandidates.end();
955  ++j) {
956  LxExtTrack* extTrack = j->first;
957  Double_t chi2 = j->second;
958 
959  if (0 == extTrack->recoTrack.first) {
960  extTrack->recoTrack.first = track;
961  extTrack->recoTrack.second = chi2;
962  track->externalTrack = extTrack;
963  break;
964  } else if (chi2 < extTrack->recoTrack.second) {
965  LxTrack* anotherTrack = extTrack->recoTrack.first;
966  extTrack->recoTrack.first = track;
967  extTrack->recoTrack.second = chi2;
968  track->externalTrack = extTrack;
969  anotherTrack->Rebind();
970  break;
971  }
972  }
973  }
974 }
975 
976 void LxSpace::FitTracks() {}
977 
978 LxPoint* LxSpace::AddPoint(Int_t stationNumber,
979  Int_t layerNumber,
980  Int_t hitId,
981  Double_t x,
982  Double_t y,
983  Double_t z,
984  Double_t dx,
985  Double_t dy,
986  Double_t dz) {
987  LxLayer* layer = stations[stationNumber]->layers[layerNumber];
988  LxPoint* point = new LxPoint(x, y, z, dx, dy, dz, layer, hitId);
990  static_cast<KDTPointsStorageType*>(layer->points_handle);
991  KDTPointWrap pointWrap(point);
992  points->insert(pointWrap);
993  return point;
994 }
LxPoint::dy2
Double_t dy2
Definition: LxCATriplets.h:22
CbmLitToolFactory::CreateTrackPropagator
static TrackPropagatorPtr CreateTrackPropagator(const string &name)
Create track propagation tool by name.
Definition: CbmLitToolFactory.cxx:58
LxTrack
Definition: LxCA.h:268
LxStation::layers
std::vector< LxLayer * > layers
Definition: LxCA.h:190
CbmTrack::GetParamLast
const FairTrackParam * GetParamLast() const
Definition: CbmTrack.h:62
fPropagator
TrackPropagatorPtr fPropagator
Definition: CbmGlobalTrackingTof.cxx:19
KDTPointsStorageType
KDTree::KDTree< 2, KDTPointWrap > KDTPointsStorageType
Definition: LxCATriplets.cxx:60
LxSpace::stationsInAlgo
Int_t stationsInAlgo
Definition: LxCA.h:333
LxSpace::BuildCandidates
void BuildCandidates(int endStNum, LxRay *ray, LxRay **rays, std::list< LxTrackCandidate * > &candidates, scaltype chi2)
LxSpace::BuildTriplets
void BuildTriplets()
Definition: LxCATriplets.cxx:655
LxStation::Clear
void Clear()
Definition: LxCA.cxx:1036
LxTriplet::neighbours
std::list< std::pair< LxTriplet *, Double_t > > neighbours
Definition: LxCATriplets.h:75
LxStation::errCoeffInterTripletTx2
Double_t errCoeffInterTripletTx2
Definition: LxCATriplets.h:207
CbmLitTrackParam::GetX
litfloat GetX() const
Definition: CbmLitTrackParam.h:53
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
KDTPointWrap::operator[]
value_type operator[](size_t n) const
Definition: LxCATriplets.cxx:57
LxStation::~LxStation
~LxStation()
Definition: LxCA.cxx:1025
LxSpace::ConnectTriplets
void ConnectTriplets()
Definition: LxCATriplets.cxx:669
TrackPropagatorPtr
boost::shared_ptr< CbmLitTrackPropagator > TrackPropagatorPtr
Definition: CbmTofPtrTypes.h:23
LxTrack::branches
LxTriplet * branches[LXSTATIONS]
Definition: LxCATriplets.h:263
LxTrack::length
int length
Definition: LxCA.h:280
LxLayer::Clear
void Clear()
Definition: LxCA.cxx:826
CbmLitTrackParam
Data class for track parameters.
Definition: CbmLitTrackParam.h:29
LxLayer::~LxLayer
~LxLayer()
Definition: LxCA.cxx:824
errorXcoeff
static scaltype errorXcoeff
Definition: LxCA.cxx:410
LxSpace::tracks
std::list< LxTrack * > tracks
Definition: LxCA.h:326
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
LxStation::yOutDispVertex2
Double_t yOutDispVertex2
Definition: LxCATriplets.h:170
CbmLitTrackParam::GetY
litfloat GetY() const
Definition: CbmLitTrackParam.h:54
LxSpace::~LxSpace
~LxSpace()
Definition: LxCA.cxx:1824
LxTrackCandidate
Definition: LxCA.cxx:429
CbmLitToolFactory.h
Tool factory for creation of littrack algorithms.
errCoeffTripletRYs
static Double_t errCoeffTripletRYs[]
Definition: LxCATriplets.cxx:10
errCoeffInterTripletTxs
static Double_t errCoeffInterTripletTxs[]
Definition: LxCATriplets.cxx:15
LxSpace::extTracks
std::list< LxExtTrack > extTracks
Definition: LxCA.h:327
LxTriplet::dty2
Double_t dty2
Definition: LxCATriplets.h:68
CbmLitTrackParam::GetCovariance
litfloat GetCovariance(int index) const
Definition: CbmLitTrackParam.h:60
LxStation::errCoeffInterTripletX
Double_t errCoeffInterTripletX
Definition: LxCATriplets.h:202
LxExtTrack::recoTrack
std::pair< LxTrack *, Double_t > recoTrack
Definition: LxCATriplets.h:253
LxSpace::RemoveClones
void RemoveClones()
Definition: LxCA.cxx:2186
LXLAYERS
#define LXLAYERS
Definition: Simple/LxSettings.h:8
errCoeffTripletRLXs
static Double_t errCoeffTripletRLXs[]
Definition: LxCATriplets.cxx:11
LxPoint::y
scaltype y
Definition: LxCA.h:53
LxSpace
Definition: LxCA.h:309
LxTrack::chi2
scaltype chi2
Definition: LxCA.h:283
LxStation::ConnectTriplets
void ConnectTriplets()
Definition: LxCATriplets.cxx:494
LxStation::BuildTriplets
void BuildTriplets()
Definition: LxCATriplets.cxx:173
LxStation::stationNumber
int stationNumber
Definition: LxCA.h:206
KDTPointWrap
Definition: LxCATriplets.cxx:38
LxPoint
Definition: LxCA.h:52
LxStation::tyInterTripletBreak2
Double_t tyInterTripletBreak2
Definition: LxCATriplets.h:191
LxPoint::dx2
Double_t dx2
Definition: LxCATriplets.h:22
LxPoint::dx
scaltype dx
Definition: LxCA.h:54
errCoeffInterTripletXs
static Double_t errCoeffInterTripletXs[]
Definition: LxCATriplets.cxx:13
LxExtTrack
Definition: LxCA.h:249
KDTPointWrap::value_type
Double_t value_type
Definition: LxCATriplets.cxx:55
KDTPointWrap::data
Double_t data[2]
Definition: LxCATriplets.cxx:40
LxPoint::used
bool used
Definition: LxCA.h:55
LxStation::errCoeffInterTripletY
Double_t errCoeffInterTripletY
Definition: LxCATriplets.h:204
LxStation::LxStation
LxStation(LxSpace *sp, int stNum)
Definition: LxCA.cxx:985
LxLayer::points
std::list< LxPoint * > points
Definition: LxCA.h:153
LxStation::errCoeffTripletRLY
Double_t errCoeffTripletRLY
Definition: LxCATriplets.h:200
LxStation::txInterTripletBreak2
Double_t txInterTripletBreak2
Definition: LxCATriplets.h:190
LxTrack::Rebind
void Rebind()
Definition: LxCATriplets.cxx:602
LxLayer::zCoord
scaltype zCoord
Definition: LxCA.h:156
LxPoint::z
scaltype z
Definition: LxCA.h:53
CbmLitConverterFairTrackParam.h
LxStation::yDispRight2
Double_t yDispRight2
Definition: LxCATriplets.h:154
KDTPointWrap::KDTPointWrap
KDTPointWrap(LxPoint *p)
Definition: LxCATriplets.cxx:42
LxTriplet::tx
Double_t tx
Definition: LxCATriplets.h:65
LxSpace::stations
std::vector< LxStation * > stations
Definition: LxCA.h:325
kLITERROR
@ kLITERROR
Definition: CbmLitEnums.h:25
LxSpace::AddPoint
LxPoint * AddPoint(int stationNumber, int layerNumber, int hitId, scaltype x, scaltype y, scaltype z, scaltype dx, scaltype dy, scaltype dz)
Definition: LxCA.h:339
LxTrack::extTrackCandidates
std::list< std::pair< LxExtTrack *, Double_t > > extTrackCandidates
Definition: LxCATriplets.h:267
LxSpace::Reconstruct
void Reconstruct()
Definition: LxCA.cxx:2107
LxTriplet::right
LxPoint * right
Definition: LxCATriplets.h:62
cutCoeff
Double_t cutCoeff
Definition: riplet/Lx.cxx:60
LxStation::xDispRight2
Double_t xDispRight2
Definition: LxCATriplets.h:153
LxStation::errCoeffTripletRY
Double_t errCoeffTripletRY
Definition: LxCATriplets.h:196
errorYcoeff
static scaltype errorYcoeff
Definition: LxCA.cxx:411
LxExtTrack::track
CbmStsTrack * track
Definition: LxCA.h:250
LxLayer::points_handle
kdt_points_handle points_handle
Definition: LxCATriplets.h:130
LxStation::xOutDispVertex2
Double_t xOutDispVertex2
Definition: LxCATriplets.h:169
LxSpace::FitTracks
void FitTracks()
Definition: LxCA.cxx:2227
LxSpace::JoinExtTracks
void JoinExtTracks()
Definition: LxCA.cxx:2232
LxTriplet::center
LxPoint * center
Definition: LxCATriplets.h:61
points
TClonesArray * points
Definition: Analyze_matching.h:18
LxStation::zCoord
scaltype zCoord
Definition: LxCA.h:207
LxTrack::points
LxPoint * points[LXSTATIONS *LXLAYERS]
Definition: LxCA.h:282
LxStation
Definition: LxCA.h:189
LxPoint::~LxPoint
~LxPoint()
Definition: LxCA.cxx:731
LxTrack::clone
bool clone
Definition: LxCA.h:292
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
LxTrackCandidate::chi2
scaltype chi2
Definition: LxCA.cxx:432
LxTriplet
Definition: LxCATriplets.h:59
LxStation::xDispRL2
Double_t xDispRL2
Definition: LxCATriplets.h:158
LxTriplet::left
LxPoint * left
Definition: LxCATriplets.h:60
m
__m128 m
Definition: L1/vectors/P4_F32vec4.h:26
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
LxTriplet::ty
Double_t ty
Definition: LxCATriplets.h:66
LxCATriplets.h
LxStation::yDispRL2
Double_t yDispRL2
Definition: LxCATriplets.h:159
LxPoint::triplets
std::list< LxTriplet * > triplets
Definition: LxCATriplets.h:27
KDTPointWrap::KDTPointWrap
KDTPointWrap(Double_t x, Double_t y)
Definition: LxCATriplets.cxx:47
KDTPointWrap::point
LxPoint * point
Definition: LxCATriplets.cxx:39
LxStation::errCoeffTripletRLX
Double_t errCoeffTripletRLX
Definition: LxCATriplets.h:198
CbmLitTrackParam::GetTy
litfloat GetTy() const
Definition: CbmLitTrackParam.h:57
LxTriplet::dtx2
Double_t dtx2
Definition: LxCATriplets.h:67
LxStation::space
LxSpace * space
Definition: LxCA.h:205
LxStation::errCoeffTripletRX
Double_t errCoeffTripletRX
Definition: LxCATriplets.h:194
errCoeffInterTripletYs
static Double_t errCoeffInterTripletYs[]
Definition: LxCATriplets.cxx:14
errCoeffTripletRLYs
static Double_t errCoeffTripletRLYs[]
Definition: LxCATriplets.cxx:12
LxSpace::LxSpace
LxSpace()
Definition: LxCA.cxx:1799
LxSpace::Clear
void Clear()
Definition: LxCA.cxx:1834
LXSTATIONS
#define LXSTATIONS
Definition: Simple/LxSettings.h:9
LxPoint::dy
scaltype dy
Definition: LxCA.h:54
LxLayer
Definition: LxCA.h:152
LxStation::errCoeffInterTripletTy2
Double_t errCoeffInterTripletTy2
Definition: LxCATriplets.h:209
CbmLitTrackParam::GetTx
litfloat GetTx() const
Definition: CbmLitTrackParam.h:56
LxLayer::LxLayer
LxLayer(LxStation *st, int lNum)
Definition: LxCA.cxx:821
errCoeffInterTripletTys
static Double_t errCoeffInterTripletTys[]
Definition: LxCATriplets.cxx:16
LxPoint::x
scaltype x
Definition: LxCA.h:53
LxTriplet::chi2
Double_t chi2
Definition: LxCATriplets.h:71
CbmLitConverterFairTrackParam::FairTrackParamToCbmLitTrackParam
static void FairTrackParamToCbmLitTrackParam(const FairTrackParam *par, CbmLitTrackParam *litPar)
Definition: CbmLitConverterFairTrackParam.h:40
errCoeffTripletRXs
static Double_t errCoeffTripletRXs[]
Definition: LxCATriplets.cxx:9
LxTrack::externalTrack
LxExtTrack * externalTrack
Definition: LxCA.h:269