CbmRoot
|
#include <CbmBeamProfile.h>
Public Member Functions | |
CbmBeamProfile () | |
Default constructor | |
virtual | ~CbmBeamProfile () |
Destructor | |
Bool_t | CheckWithTarget (const CbmTarget &target) const |
Check consistency with a target. | |
TVector3 | ExtrapolateToPlane (const TVector3 &point, const TVector3 &norm) const |
Extrapolate the average beam to a plane. | |
std::unique_ptr< CbmBeam > | GenerateBeam () |
Generate a beam trajectory. | |
void | SetAngle (Double_t x0, Double_t y0, Double_t sigmaX=-1., Double_t sigmaY=-1.) |
Set the parameters for the beam angle distribution. | |
void | SetPosition (Double_t x0, Double_t y0, Double_t sigmaX=-1., Double_t sigmaY=-1., Double_t zF=0.) |
Set the parameters for the beam position distribution. | |
std::string | ToString () const |
Info to string. | |
Private Attributes | |
Double_t | fFocalZ |
z coordinate of focal plane [cm] | |
Double_t | fMeanPosX |
Mean position in x [cm]. | |
Double_t | fMeanPosY |
Mean position in y [cm]. | |
Double_t | fSigmaPosX |
RMS of position in x [cm]. | |
Double_t | fSigmaPosY |
RMS of position in y [cm]. | |
Double_t | fMeanThetaX |
Mean angle in x-z plane [rad]. | |
Double_t | fMeanThetaY |
Mean angle in y-z plane [rad]. | |
Double_t | fSigmaThetaX |
RMS of angle in x-z plane [rad]. | |
Double_t | fSigmaThetaY |
RMS of angle in y-z plane [rad]. | |
Class defining beam properties (position, width, angle, emittance) in CBM. All parameters are defined w.r.t. the global coordinate system in the focal plane of the beam, which is by default at z = 0.
The beam profile is assumed to be Gaussian in x and y. The distribution of beam angles is also assumed to be Gaussian. Negative widths mean fixed position and / or angle.
Definition at line 37 of file CbmBeamProfile.h.
CbmBeamProfile::CbmBeamProfile | ( | ) |
Default constructor
Definition at line 18 of file CbmBeamProfile.cxx.
|
inlinevirtual |
Destructor
Definition at line 45 of file CbmBeamProfile.h.
Bool_t CbmBeamProfile::CheckWithTarget | ( | const CbmTarget & | target | ) | const |
Check consistency with a target.
target | Pointer to target class |
Definition at line 34 of file CbmBeamProfile.cxx.
References ExtrapolateToPlane(), CbmTarget::GetDiameter(), CbmTarget::GetNormal(), CbmTarget::GetSurfaceCentreDown(), and CbmTarget::GetSurfaceCentreUp().
Referenced by CbmTransport::InitEventGenerator().
TVector3 CbmBeamProfile::ExtrapolateToPlane | ( | const TVector3 & | point, |
const TVector3 & | norm ) const |
Extrapolate the average beam to a plane.
point | Coordinates of a point in the plane |
norm | A vector perpendicular to the plane |
The method returns the intersection point of the average beam with a plane, specified by the point and a vector perpendicular to the plane. The latter need not be normalised.
Definition at line 69 of file CbmBeamProfile.cxx.
References CbmBeam::ExtrapolateToPlane(), fFocalZ, fMeanPosX, fMeanPosY, fMeanThetaX, and fMeanThetaY.
Referenced by CheckWithTarget().
std::unique_ptr< CbmBeam > CbmBeamProfile::GenerateBeam | ( | ) |
Generate a beam trajectory.
The beam parameters x, y, tx and ty in the focal plane are sampled from the specified distributions.
Definition at line 82 of file CbmBeamProfile.cxx.
References fFocalZ, fMeanPosX, fMeanPosY, fMeanThetaX, fMeanThetaY, fSigmaPosX, fSigmaPosY, fSigmaThetaX, fSigmaThetaY, x, and y.
Referenced by CbmEventGenerator::MakeVertexAtZ(), CbmEventGenerator::MakeVertexInFocalPlane(), and CbmEventGenerator::MakeVertexInTarget().
void CbmBeamProfile::SetAngle | ( | Double_t | x0, |
Double_t | y0, | ||
Double_t | sigmaX = -1., | ||
Double_t | sigmaY = -1. ) |
Set the parameters for the beam angle distribution.
x0 | Mean angle in x-z [rad] |
y0 | Mean angle in y-z [rad] |
sigmaX | Gauss RMS of angle distribution in x-z [rad] |
sigmaY | Gauss RMS of angle distribution in y-z [rad] |
A non-positive value for sigma means a fixed angle (no sampling).
Definition at line 110 of file CbmBeamProfile.cxx.
References fMeanThetaX, fMeanThetaY, fSigmaThetaX, and fSigmaThetaY.
Referenced by CbmEventGenerator::SetBeamAngle().
void CbmBeamProfile::SetPosition | ( | Double_t | x0, |
Double_t | y0, | ||
Double_t | sigmaX = -1., | ||
Double_t | sigmaY = -1., | ||
Double_t | zF = 0. ) |
Set the parameters for the beam position distribution.
x0 | Mean x position [cm] |
y0 | Mean y position [cm] |
sigmaX | Gauss RMS of x position distribution [cm] |
sigmaY | Gauss RMS of y position distribution [cm] |
zF | z position of focal plane [cm] |
A non-positive value for sigma means a fixed position (no sampling).
Definition at line 121 of file CbmBeamProfile.cxx.
References fFocalZ, fMeanPosX, fMeanPosY, fSigmaPosX, and fSigmaPosY.
Referenced by CbmEventGenerator::SetBeamPosition().
std::string CbmBeamProfile::ToString | ( | ) | const |
Info to string.
Definition at line 133 of file CbmBeamProfile.cxx.
References fFocalZ, fMeanPosX, fMeanPosY, fMeanThetaX, fMeanThetaY, fSigmaPosX, fSigmaPosY, fSigmaThetaX, and fSigmaThetaY.
Referenced by CbmEventGenerator::Print().
|
private |
z coordinate of focal plane [cm]
Definition at line 103 of file CbmBeamProfile.h.
Referenced by ExtrapolateToPlane(), GenerateBeam(), SetPosition(), and ToString().
|
private |
Mean position in x [cm].
Definition at line 104 of file CbmBeamProfile.h.
Referenced by ExtrapolateToPlane(), GenerateBeam(), SetPosition(), and ToString().
|
private |
Mean position in y [cm].
Definition at line 105 of file CbmBeamProfile.h.
Referenced by ExtrapolateToPlane(), GenerateBeam(), SetPosition(), and ToString().
|
private |
Mean angle in x-z plane [rad].
Definition at line 108 of file CbmBeamProfile.h.
Referenced by ExtrapolateToPlane(), GenerateBeam(), SetAngle(), and ToString().
|
private |
Mean angle in y-z plane [rad].
Definition at line 109 of file CbmBeamProfile.h.
Referenced by ExtrapolateToPlane(), GenerateBeam(), SetAngle(), and ToString().
|
private |
RMS of position in x [cm].
Definition at line 106 of file CbmBeamProfile.h.
Referenced by GenerateBeam(), SetPosition(), and ToString().
|
private |
RMS of position in y [cm].
Definition at line 107 of file CbmBeamProfile.h.
Referenced by GenerateBeam(), SetPosition(), and ToString().
|
private |
RMS of angle in x-z plane [rad].
Definition at line 110 of file CbmBeamProfile.h.
Referenced by GenerateBeam(), SetAngle(), and ToString().
|
private |
RMS of angle in y-z plane [rad].
Definition at line 111 of file CbmBeamProfile.h.
Referenced by GenerateBeam(), SetAngle(), and ToString().