#include "MedicalBeam.hh"
Definition at line 46 of file MedicalBeam.hh.
MedicalBeam::MedicalBeam |
( |
| ) |
|
Definition at line 49 of file MedicalBeam.cc.
References fieldXY.
G4ParticleDefinition * particle
G4ThreeVector sourcePosition
MedicalBeam::~MedicalBeam |
( |
| ) |
|
G4ThreeVector MedicalBeam::GenerateBeamDirection |
( |
| ) |
const |
|
protected |
Definition at line 70 of file MedicalBeam.cc.
References fieldR, fieldShape, fieldXY, geo::sqr(), SQUARE, SSD, x, y, and z.
Referenced by GeneratePrimaries().
81 G4double sin0= dr/
SSD;
82 G4double cos0= std::sqrt(1.-
sqr(sin0));
84 G4double dcos, dsin, dphi,
z;
94 xmax= ymax= DBL_MAX-1.;
97 while(! (std::abs(x)< xmax && std::abs(y)< ymax) ) {
98 dcos= RandFlat::shoot(cos0, 1.);
99 dsin= std::sqrt(1.-
sqr(dcos));
100 dphi= RandFlat::shoot(0., twopi);
102 x= std::cos(dphi)*dsin*dcos;
103 y= std::sin(dphi)*dsin*dcos;
107 return G4ThreeVector(x,y,z);
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.03.p03/environments/g4py/site-modules/primaries/MedicalBeam/MedicalBeam.hh
- geant4.10.03.p03/environments/g4py/site-modules/primaries/MedicalBeam/MedicalBeam.cc