CbmRoot
Loading...
Searching...
No Matches
CbmBeam.h
Go to the documentation of this file.
1/* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMBEAM_H
11#define CBMBEAM_H 1
12
13
14#include "Rtypes.h"
15#include "TVector3.h"
16
17#include <string>
18
19
30class CbmBeam {
31
32public:
40 CbmBeam(Double_t x = 0., Double_t y = 0., Double_t z = 0., Double_t thetaX = 0., Double_t thetaY = 0.);
41
42
44 virtual ~CbmBeam() {};
45
46
56 TVector3 ExtrapolateToPlane(const TVector3& point, 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
87private:
88 TVector3 fPosition;
89 TVector3 fDirection;
90};
91
92#endif /* CBMBEAM_H */
TVector3 fPosition
Position vector.
Definition CbmBeam.h:88
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:17
TVector3 GetPosition() const
Beam position vector in the focal plane.
Definition CbmBeam.h:68
virtual ~CbmBeam()
Destructor
Definition CbmBeam.h:44
Double_t GetThetaY() const
Beam angle in the y-z plane.
Definition CbmBeam.h:80
TVector3 ExtrapolateToPlane(const TVector3 &point, const TVector3 &normal) const
Extrapolation of the beam to a plane.
Definition CbmBeam.cxx:26
TVector3 GetDirection() const
Beam direction vector return Direction vector (tx, ty, 1.)
Definition CbmBeam.h:62
TVector3 fDirection
Direction vector (dx/dz, dy/dz, 1.)
Definition CbmBeam.h:89
std::string ToString() const
Info on current beam trajectory.
Definition CbmBeam.cxx:41
Double_t GetThetaX() const
Beam angle in the x-z plane.
Definition CbmBeam.h:74