PandaRoot
PndTrackCombiner.h
Go to the documentation of this file.
1 /*
2  * PndTrackCombiner.h
3  *
4  * Created on: Jun 7, 2016
5  * Author: kibellus
6  */
7 
8 #ifndef PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOMBINER_H_
9 #define PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOMBINER_H_
10 
11 #include <map>
12 #include <vector>
13 #include <iostream>
14 
16 #include "PndLineApproximation.h"
17 #include "PndFtsLineComparator.h"
18 #include "PndPlane.h"
19 #include "PndTrack.h"
20 #include "FairTrackParP.h"
21 #include "PndTrackCand.h"
22 #include "PndLineCombination.h"
23 
24 #include "TLine.h"
25 #include "TMath.h"
26 #include "TClonesArray.h"
27 
28 using namespace std;
29 
31  public:
32  static Double_t compDist;
33  static Double_t compAngle;
34  static Double_t compQuali;
35 
36  PndTrackCombiner(TClonesArray *a, TClonesArray *b) : fComparator(compDist, compAngle), planes(a), corrHits(b), firstRun(0), angleLimit(20) {}
37  virtual ~PndTrackCombiner();
38  void init(map<Int_t, vector<PndFtsExpandedTrackCand>> c)
39  {
40  fExpandedTrackCands = c;
41  trackNum = 0;
42  firstRun = 0;
43  ftsPos[0] = fts1ZPos;
44  ftsPos[1] = fts2ZPos;
45  ftsPos[2] = fts3ZPos;
46  ftsPos[3] = fts4ZPos;
47  ftsPos[4] = fts5ZPos;
48  ftsPos[5] = fts6ZPos;
49  }
50  vector<PndLineApproximation> combine(Int_t bigLayer);
51  vector<PndLineApproximation> combine(vector<PndFtsExpandedTrackCand> cands1, vector<PndFtsExpandedTrackCand> cands2, Int_t layer1, Int_t layer2);
52  vector<PndLineApproximation> combine(PndFtsExpandedTrackCand c1, PndFtsExpandedTrackCand c2, Int_t layer1, Int_t layer2);
53 
54  private:
55  map<Int_t, vector<PndFtsExpandedTrackCand>> fExpandedTrackCands;
56  PndFtsLineComparator fComparator;
57  void addLine(vector<PndLineCombination> &lines, PndLineApproximation &l, Int_t max);
58  void addLineOld(vector<PndLineApproximation> &lines, PndLineApproximation &l, Int_t end);
59  void refitLines(vector<PndLineCombination> &lines);
60  vector<PndFtsExpandedTrackCand> compareAndRefit(Int_t layer1, Int_t layer2);
61  vector<PndLineApproximation> compareAndRefit(vector<PndLineApproximation> l1, vector<PndLineApproximation> l2);
62  TClonesArray *planes;
63  TClonesArray *corrHits;
64  Int_t firstRun = 0;
65  Int_t trackNum;
66  Double_t angleLimit;
67 
68  Double_t fts1ZPos = 295.4;
69  Double_t fts2ZPos = 327.4;
70  Double_t fts3ZPos = 394.5;
71  Double_t fts4ZPos = 438.5;
72  Double_t fts5ZPos = 607.5;
73  Double_t fts6ZPos = 747.5;
74  Double_t ftsPos[6];
75 };
76 
77 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOMBINER_H_ */
STL namespace.
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
static Double_t compDist
PndTrackCombiner(TClonesArray *a, TClonesArray *b)
static Double_t compAngle
void init(map< Int_t, vector< PndFtsExpandedTrackCand >> c)
static Double_t compQuali