#include "MedicalBeam.hh"
Definition at line 45 of file MedicalBeam.hh.
MedicalBeam::MedicalBeam |
( |
| ) |
|
Definition at line 48 of file MedicalBeam.cc.
References fieldXY.
G4ParticleDefinition * particle
G4ThreeVector sourcePosition
MedicalBeam::~MedicalBeam |
( |
| ) |
|
G4ThreeVector MedicalBeam::GenerateBeamDirection |
( |
| ) |
const |
|
protected |
Definition at line 69 of file MedicalBeam.cc.
References util::abs(), fieldR, fieldShape, fieldXY, sqr(), SQUARE, SSD, x, y, and z.
Referenced by GeneratePrimaries().
80 G4double sin0= dr/
SSD;
81 G4double cos0= std::sqrt(1.-
sqr(sin0));
83 G4double dcos, dsin, dphi,
z;
93 xmax= ymax= DBL_MAX-1.;
97 dcos= RandFlat::shoot(cos0, 1.);
98 dsin= std::sqrt(1.-
sqr(dcos));
99 dphi= RandFlat::shoot(0., twopi);
101 x= std::cos(dphi)*dsin*dcos;
102 y= std::sin(dphi)*dsin*dcos;
106 return G4ThreeVector(x,y,z);
constexpr auto abs(T v)
Returns the absolute value of the argument.
void MedicalBeam::GeneratePrimaries |
( |
G4Event * |
anEvent | ) |
|
|
virtual |
G4double MedicalBeam::GetFieldR |
( |
| ) |
const |
|
inline |
G4double MedicalBeam::GetFieldX |
( |
| ) |
const |
|
inline |
G4double MedicalBeam::GetFieldY |
( |
| ) |
const |
|
inline |
G4double MedicalBeam::GetKineticE |
( |
| ) |
const |
|
inline |
const G4ParticleDefinition * MedicalBeam::GetParticleDefinition |
( |
| ) |
const |
|
inline |
G4ThreeVector MedicalBeam::GetSourcePosition |
( |
| ) |
const |
|
inline |
G4double MedicalBeam::GetSSD |
( |
| ) |
const |
|
inline |
void MedicalBeam::SetFieldR |
( |
G4double |
r | ) |
|
|
inline |
void MedicalBeam::SetFieldXY |
( |
G4double |
fx, |
|
|
G4double |
fy |
|
) |
| |
|
inline |
void MedicalBeam::SetKineticE |
( |
G4double |
e | ) |
|
|
inline |
void MedicalBeam::SetParticleDefinition |
( |
G4ParticleDefinition * |
pd | ) |
|
|
inline |
void MedicalBeam::SetSourcePosition |
( |
const G4ThreeVector & |
pos | ) |
|
|
inline |
void MedicalBeam::SetSSD |
( |
G4double |
ssd | ) |
|
|
inline |
G4double MedicalBeam::fieldR |
|
protected |
G4double MedicalBeam::fieldXY[2] |
|
protected |
G4double MedicalBeam::kineticE |
|
protected |
G4ParticleDefinition* MedicalBeam::particle |
|
protected |
G4ThreeVector MedicalBeam::sourcePosition |
|
protected |
G4double MedicalBeam::SSD |
|
protected |
The documentation for this class was generated from the following files:
- geant4.10.06.p01/environments/g4py/site-modules/primaries/MedicalBeam/MedicalBeam.hh
- geant4.10.06.p01/environments/g4py/site-modules/primaries/MedicalBeam/MedicalBeam.cc