Geant4-11
MedicalBeam.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// ====================================================================
27// MedicalBeam.hh
28//
29// 2005 Q
30// ====================================================================
31#ifndef MEDICAL_BEAM_H
32#define MEDICAL_BEAM_H
33
34#include "globals.hh"
35#include "G4ThreeVector.hh"
37
39
40// ====================================================================
41//
42// class definition
43//
44// ====================================================================
46public:
48
49protected:
53
54 G4double SSD; // (SSD= Source Skin Depth)
58
59 // local methods...
61
62public:
65
66 // set/get functions...
69
70 void SetKineticE(G4double e);
71 G4double GetKineticE() const;
72
75
76 void SetFieldShape(FieldShape shape);
78
79 void SetSSD(G4double ssd);
80 G4double GetSSD() const;
81
82 void SetFieldXY(G4double fx, G4double fy);
83 G4double GetFieldX() const;
84 G4double GetFieldY() const;
85
86 void SetFieldR(G4double r);
87 G4double GetFieldR() const;
88
89 // methods...
90 virtual void GeneratePrimaries(G4Event* anEvent);
91
92};
93
94// ====================================================================
95// inline functions
96// ====================================================================
98{ particle= pd; }
99
101{ return particle; }
102
104{ kineticE= e; }
105
107{ return kineticE; }
108
111
113{ return sourcePosition; }
114
116{ fieldShape= shape; }
117
119{ return fieldShape; }
120
122{ SSD= ssd; }
123
125{ return SSD; }
126
128{ fieldXY[0]= fx; fieldXY[1]= fy; }
129
131{ return fieldXY[0]; }
132
134{ return fieldXY[1]; }
135
137{ fieldR= r; }
138
140{ return fieldR; }
141
142#endif
143
static const G4double pos
double G4double
Definition: G4Types.hh:83
G4double kineticE
Definition: MedicalBeam.hh:51
G4double fieldXY[2]
Definition: MedicalBeam.hh:56
const G4ParticleDefinition * GetParticleDefinition() const
Definition: MedicalBeam.hh:100
void SetFieldR(G4double r)
Definition: MedicalBeam.hh:136
G4double GetSSD() const
Definition: MedicalBeam.hh:124
G4double GetKineticE() const
Definition: MedicalBeam.hh:106
G4double SSD
Definition: MedicalBeam.hh:54
void SetSSD(G4double ssd)
Definition: MedicalBeam.hh:121
void SetKineticE(G4double e)
Definition: MedicalBeam.hh:103
void SetFieldXY(G4double fx, G4double fy)
Definition: MedicalBeam.hh:127
G4ThreeVector sourcePosition
Definition: MedicalBeam.hh:52
G4ParticleDefinition * particle
Definition: MedicalBeam.hh:50
G4double GetFieldR() const
Definition: MedicalBeam.hh:139
G4double GetFieldX() const
Definition: MedicalBeam.hh:130
void SetFieldShape(FieldShape shape)
Definition: MedicalBeam.hh:115
G4double fieldR
Definition: MedicalBeam.hh:57
G4double GetFieldY() const
Definition: MedicalBeam.hh:133
virtual void GeneratePrimaries(G4Event *anEvent)
Definition: MedicalBeam.cc:114
void SetParticleDefinition(G4ParticleDefinition *pd)
Definition: MedicalBeam.hh:97
FieldShape GetFieldShape() const
Definition: MedicalBeam.hh:118
void SetSourcePosition(const G4ThreeVector &pos)
Definition: MedicalBeam.hh:109
G4ThreeVector GetSourcePosition() const
Definition: MedicalBeam.hh:112
G4ThreeVector GenerateBeamDirection() const
Definition: MedicalBeam.cc:69
FieldShape fieldShape
Definition: MedicalBeam.hh:55