PandaRoot
PndTrackCombiner.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * PndTrackCombiner.h
15  *
16  * Created on: Jun 7, 2016
17  * Author: kibellus
18  */
19 
20 #ifndef PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOMBINER_H_
21 #define PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOMBINER_H_
22 
23 #include <map>
24 #include <vector>
25 #include <iostream>
26 
28 #include "PndLineApproximation.h"
29 #include "PndFtsLineComparator.h"
30 #include "PndPlane.h"
31 #include "PndTrack.h"
32 #include "FairTrackParP.h"
33 #include "PndTrackCand.h"
34 #include "PndLineCombination.h"
35 
36 #include "TLine.h"
37 #include "TMath.h"
38 #include "TClonesArray.h"
39 
40 using namespace std;
41 
43  public:
44  static Double_t compDist;
45  static Double_t compAngle;
46  static Double_t compQuali;
47 
48  PndTrackCombiner(TClonesArray *a, TClonesArray *b) : fComparator(compDist, compAngle), planes(a), corrHits(b), firstRun(0), angleLimit(20) {}
49  virtual ~PndTrackCombiner();
50  void init(map<Int_t, vector<PndFtsExpandedTrackCand>> c)
51  {
52  fExpandedTrackCands = c;
53  trackNum = 0;
54  firstRun = 0;
55  ftsPos[0] = fts1ZPos;
56  ftsPos[1] = fts2ZPos;
57  ftsPos[2] = fts3ZPos;
58  ftsPos[3] = fts4ZPos;
59  ftsPos[4] = fts5ZPos;
60  ftsPos[5] = fts6ZPos;
61  }
62  vector<PndLineApproximation> combine(Int_t bigLayer);
63  vector<PndLineApproximation> combine(vector<PndFtsExpandedTrackCand> cands1, vector<PndFtsExpandedTrackCand> cands2, Int_t layer1, Int_t layer2);
64  vector<PndLineApproximation> combine(PndFtsExpandedTrackCand c1, PndFtsExpandedTrackCand c2, Int_t layer1, Int_t layer2);
65 
66  private:
67  map<Int_t, vector<PndFtsExpandedTrackCand>> fExpandedTrackCands;
68  PndFtsLineComparator fComparator;
69  void addLine(vector<PndLineCombination> &lines, PndLineApproximation &l, Int_t max);
70  void addLineOld(vector<PndLineApproximation> &lines, PndLineApproximation &l, Int_t end);
71  void refitLines(vector<PndLineCombination> &lines);
72  vector<PndFtsExpandedTrackCand> compareAndRefit(Int_t layer1, Int_t layer2);
73  vector<PndLineApproximation> compareAndRefit(vector<PndLineApproximation> l1, vector<PndLineApproximation> l2);
74  TClonesArray *planes;
75  TClonesArray *corrHits;
76  Int_t firstRun = 0;
77  Int_t trackNum;
78  Double_t angleLimit;
79 
80  Double_t fts1ZPos = 295.4;
81  Double_t fts2ZPos = 327.4;
82  Double_t fts3ZPos = 394.5;
83  Double_t fts4ZPos = 438.5;
84  Double_t fts5ZPos = 607.5;
85  Double_t fts6ZPos = 747.5;
86  Double_t ftsPos[6];
87 };
88 
89 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOMBINER_H_ */
STL namespace.
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:37
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