PandaRoot
PndLine.h
Go to the documentation of this file.
1 /*
2  * PndLine.h
3  *
4  * Created on: Jun 14, 2016
5  * Author: kibellus
6  */
7 
8 #ifndef PNDTOOLS_PNDFORWARDTRACKFINDER_PNDLINE_H_
9 #define PNDTOOLS_PNDFORWARDTRACKFINDER_PNDLINE_H_
10 
11 #include "TVector3.h"
12 #include "TMath.h"
13 
14 #include "FairHit.h"
15 #include "PndFtsHit.h"
16 #include "PndPlane.h"
17 #include "FairTrackParP.h"
18 #include <iostream>
19 #include <vector>
20 
21 using namespace std;
22 
23 class PndLine {
24  public:
25  PndLine() : fP1(), fP2(), fRating(1) {}
26  PndLine(FairHit *h1, FairHit *h2);
27  PndLine(TVector3 &base, TVector3 &dir);
28  PndLine(TVector3 h1, Int_t layer);
29  virtual ~PndLine();
30  void Print(Bool_t withDirVec = kFALSE);
31  FairTrackParP plot(Double_t zVal1, Double_t zVal2);
32  TVector3 getP1() { return fP1; }
33  TVector3 getP2() { return fP2; }
34  TVector3 getDir() { return fP1 - fP2; }
35  bool operator<(const PndLine &) const // rhs //[R.K.03/2017] unused variable(s)
36  {
37  return kTRUE; // dummy sorting operator for map
38  }
39  Double_t getZAngle() { return TMath::Abs(TMath::ASin(getDir()[2] / getDir().Mag()) * TMath::RadToDeg()); }
40  Int_t getRating() { return fRating; }
41  void incrementRating() { fRating++; }
42  void setRating(Int_t r) { fRating = r; }
43  // PndLine approx(PndLine &l2);
44  TVector3 getPerpendicular(PndLine l2); // the point on this line
45  Double_t getDistTo(TVector3 p);
46 
47  private:
48  TVector3 fP1;
49  TVector3 fP2;
50  Int_t fRating;
51 };
52 
53 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDLINE_H_ */
static T ASin(const T &x)
Double_t getZAngle()
Definition: PndLine.h:39
STL namespace.
PndLine()
Definition: PndLine.h:25
TVector3 getP2()
Definition: PndLine.h:33
TVector3 getDir()
Definition: PndLine.h:34
static T Abs(const T &x)
Definition: PndCAMath.h:56
void incrementRating()
Definition: PndLine.h:41
bool operator<(const PndLine &) const
Definition: PndLine.h:35
void setRating(Int_t r)
Definition: PndLine.h:42
Int_t getRating()
Definition: PndLine.h:40
TVector3 getP1()
Definition: PndLine.h:32