FairRoot/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:
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  fExpandedTrackCands=c;
40  trackNum=0;
41  firstRun=0;
42  ftsPos[0]=fts1ZPos;
43  ftsPos[1]=fts2ZPos;
44  ftsPos[2]=fts3ZPos;
45  ftsPos[3]=fts4ZPos;
46  ftsPos[4]=fts5ZPos;
47  ftsPos[5]=fts6ZPos;
48  }
49  vector<PndLineApproximation> combine(Int_t bigLayer);
50  vector<PndLineApproximation> combine(vector<PndFtsExpandedTrackCand> cands1, vector<PndFtsExpandedTrackCand> cands2, Int_t layer1, Int_t layer2);
51  vector<PndLineApproximation> combine(PndFtsExpandedTrackCand c1, PndFtsExpandedTrackCand c2, Int_t layer1, Int_t layer2);
52 private:
53  map<Int_t, vector<PndFtsExpandedTrackCand>> fExpandedTrackCands;
55  void addLine(vector<PndLineCombination> &lines, PndLineApproximation &l, Int_t max);
56  void addLineOld(vector<PndLineApproximation> &lines, PndLineApproximation &l,Int_t end);
57  void refitLines(vector<PndLineCombination> &lines);
58  vector<PndFtsExpandedTrackCand> compareAndRefit(Int_t layer1, Int_t layer2);
59  vector<PndLineApproximation> compareAndRefit(vector<PndLineApproximation> l1, vector<PndLineApproximation> l2);
60  TClonesArray *planes;
61  TClonesArray *corrHits;
62  Int_t firstRun = 0;
63  Int_t trackNum;
65 
66  Double_t fts1ZPos = 295.4;
67  Double_t fts2ZPos = 327.4;
68  Double_t fts3ZPos = 394.5;
69  Double_t fts4ZPos = 438.5;
70  Double_t fts5ZPos = 607.5;
71  Double_t fts6ZPos = 747.5;
72  Double_t ftsPos[6];
73 };
74 
75 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOMBINER_H_ */
TClonesArray * planes
TClonesArray * corrHits
TTree * b
PndTransMap * map
Definition: sim_emc_apd.C:99
c2
Definition: plot_dirc.C:39
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:26
int combine(CandList &l1, CandList &l2, CandList &out, int matchPdg=0)
static Double_t compDist
PndTrackCombiner(TClonesArray *a, TClonesArray *b)
static Double_t compAngle
Int_t a
Definition: anaLmdDigi.C:126
Double_t
c1
Definition: plot_dirc.C:35
void init(map< Int_t, vector< PndFtsExpandedTrackCand >> c)
static Double_t compQuali
map< Int_t, vector< PndFtsExpandedTrackCand > > fExpandedTrackCands
PndFtsLineComparator fComparator