CbmRoot
CbmBeam.h
Go to the documentation of this file.
1 
6 #ifndef CBMBEAM_H
7 #define CBMBEAM_H 1
8 
9 
10 #include "Rtypes.h"
11 #include "TVector3.h"
12 #include <string>
13 
14 
25 class CbmBeam {
26 
27 public:
35  CbmBeam(Double_t x = 0.,
36  Double_t y = 0.,
37  Double_t z = 0.,
38  Double_t thetaX = 0.,
39  Double_t thetaY = 0.);
40 
41 
43  virtual ~CbmBeam() {};
44 
45 
55  TVector3 ExtrapolateToPlane(const TVector3& point,
56  const TVector3& normal) const;
57 
58 
62  TVector3 GetDirection() const { return fDirection; }
63 
64 
68  TVector3 GetPosition() const { return fPosition; }
69 
70 
74  Double_t GetThetaX() const { return TMath::ATan(fDirection.X()); }
75 
76 
80  Double_t GetThetaY() const { return TMath::ATan(fDirection.Y()); }
81 
82 
84  std::string ToString() const;
85 
86 
87 private:
88  TVector3 fPosition;
89  TVector3 fDirection;
90 };
91 
92 #endif /* CBMBEAM_H */
CbmBeam::GetPosition
TVector3 GetPosition() const
Beam position vector in the focal plane.
Definition: CbmBeam.h:68
CbmBeam::ExtrapolateToPlane
TVector3 ExtrapolateToPlane(const TVector3 &point, const TVector3 &normal) const
Extrapolation of the beam to a plane.
Definition: CbmBeam.cxx:24
CbmBeam::CbmBeam
CbmBeam(Double_t x=0., Double_t y=0., Double_t z=0., Double_t thetaX=0., Double_t thetaY=0.)
Default constructor.
Definition: CbmBeam.cxx:13
CbmBeam::GetThetaX
Double_t GetThetaX() const
Beam angle in the x-z plane.
Definition: CbmBeam.h:74
CbmBeam::GetThetaY
Double_t GetThetaY() const
Beam angle in the y-z plane.
Definition: CbmBeam.h:80
CbmBeam::GetDirection
TVector3 GetDirection() const
Beam direction vector return Direction vector (tx, ty, 1.)
Definition: CbmBeam.h:62
CbmBeam
Definition: CbmBeam.h:25
CbmBeam::fDirection
TVector3 fDirection
Direction vector (dx/dz, dy/dz, 1.)
Definition: CbmBeam.h:89
CbmBeam::~CbmBeam
virtual ~CbmBeam()
Destructor
Definition: CbmBeam.h:43
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmBeam::fPosition
TVector3 fPosition
Position vector.
Definition: CbmBeam.h:88
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmBeam::ToString
std::string ToString() const
Info on current beam trajectory.
Definition: CbmBeam.cxx:39