FairRoot/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  }
40  return TMath::Abs(TMath::ASin(getDir()[2]/getDir().Mag())*TMath::RadToDeg());
41  }
42  Int_t getRating(){return fRating;}
43  void incrementRating(){fRating++;}
44  void setRating(Int_t r){fRating = r;}
45  //PndLine approx(PndLine &l2);
46  TVector3 getPerpendicular(PndLine l2); //the point on this line
47  Double_t getDistTo(TVector3 p);
48 private:
49  TVector3 fP1;
50  TVector3 fP2;
51  Int_t fRating;
52 };
53 
54 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDLINE_H_ */
static T ASin(const T &x)
MechFsc Print()
Double_t getZAngle()
Definition: PndLine.h:39
double r
Definition: RiemannTest.C:14
PndLine()
Definition: PndLine.h:25
TVector3 getP2()
Definition: PndLine.h:33
TVector3 getDir()
Definition: PndLine.h:34
Double_t p
Definition: anasim.C:58
TVector3 fP1
Definition: PndLine.h:49
TVector3 fP2
Definition: PndLine.h:50
static T Abs(const T &x)
Definition: PndCAMath.h:39
void incrementRating()
Definition: PndLine.h:43
Double_t
void setRating(Int_t r)
Definition: PndLine.h:44
Int_t fRating
Definition: PndLine.h:51
Int_t getRating()
Definition: PndLine.h:42
TVector3 getP1()
Definition: PndLine.h:32
friend F32vec4 operator<(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:75