FairRoot/PandaRoot
PndLineApproximation.h
Go to the documentation of this file.
1 /*
2  * PndLineApproximation.h
3  *
4  * Created on: Jun 6, 2016
5  * Author: kibellus
6  */
7 
8 #ifndef PNDTOOLS_PNDFORWARDTRACKFINDER_PNDLINEAPPROXIMATION_H_
9 #define PNDTOOLS_PNDFORWARDTRACKFINDER_PNDLINEAPPROXIMATION_H_
10 
11 #include "PndLine.h"
12 #include "PndFtsHit.h"
13 #include "PndTrack.h"
14 #include "PndTrackCand.h"
15 #include "FairTrackParP.h"
16 #include "TVector2.h"
17 #include "TVector3.h"
18 #include "TClonesArray.h"
19 #include <vector>
20 
21 using namespace std;
22 
24 public:
25  PndLineApproximation(vector<PndFtsHit*> hits) : fLineApprox(linearRegression(hits)), fCorrectedHits(hits), hasYInfo(kTRUE){}
27  PndLineApproximation(PndLine lineApprox, vector<PndFtsHit*> correctedHits)
28  :fLineApprox(lineApprox),fCorrectedHits(correctedHits) {}
29  PndLineApproximation(PndLine lineApprox, vector<PndFtsHit*> ch1, vector<PndFtsHit*> ch2);
30  virtual ~PndLineApproximation();
31  PndLine &getLine(){return fLineApprox;}
32  void setLine(PndLine l){fLineApprox = l;}
33  vector<PndFtsHit*> getHits(){return fCorrectedHits;}
34  void setHits(vector<PndFtsHit*> h){fCorrectedHits = h;}
35  PndLineApproximation newApproximation(PndLineApproximation &approx2);
36  PndLine linearRegression(vector<PndFtsHit*> hits);
37  PndLine linearRegressionXZ(vector<PndFtsHit*> hits);
38  PndLine linearRegressionZX(vector<PndFtsHit*> hits);
39  PndLine linearRegressionYZ(vector<PndFtsHit*> hits);
40  PndLine linearRegressionZY(vector<PndFtsHit*> hits);
41  PndTrack plot(Double_t zVal1, Double_t zVal2, TClonesArray *hitArr);
42  void correctHits3DAndAdd(vector<PndFtsHit*> correctedHits);
43  void setYInfo(Bool_t i){hasYInfo=i;}
44  Bool_t HasYInfo(){return hasYInfo;}
45 private:
46  TVector2 linearRegression(Double_t matrix[2][3]);
48  vector<PndFtsHit*> fCorrectedHits;
49  PndFtsHit* copyHitWithNewPosition(PndFtsHit *h, TVector3 pos);
51 };
52 
53 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDLINEAPPROXIMATION_H_ */
vector< PndFtsHit * > getHits()
TVector3 pos
PndLineApproximation(PndLine lineApprox, vector< PndFtsHit * > correctedHits)
Int_t i
Definition: run_full.C:25
vector< PndFtsHit * > fCorrectedHits
PndLineApproximation(vector< PndFtsHit * > hits)
Double_t
CbmHit * hits[nHits]
Definition: RiemannTest.C:19
void setHits(vector< PndFtsHit * > h)