Geant4  10.02.p01
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 // $Id: MedicalBeam.hh 76431 2013-11-10 20:28:49Z kmura $
27 //
30 
31 #ifndef MEDICAL_BEAM_H
32 #define MEDICAL_BEAM_H
33 
34 #include "globals.hh"
35 #include "G4ThreeVector.hh"
37 
39 
41 public:
43 
44  MedicalBeam();
45  ~MedicalBeam();
46 
47  // set/get functions...
50 
51  void SetKineticE(G4double e);
52  G4double GetKineticE() const;
53 
54  void SetSourcePosition(const G4ThreeVector& pos);
56 
57  void SetFieldShape(FieldShape shape);
58  FieldShape GetFieldShape() const;
59 
60  void SetSSD(G4double ssd);
61  G4double GetSSD() const;
62 
63  void SetFieldXY(G4double fx, G4double fy);
64  G4double GetFieldX() const;
65  G4double GetFieldY() const;
66 
67  void SetFieldR(G4double r);
68  G4double GetFieldR() const;
69 
70  // methods...
71  virtual void GeneratePrimaries(G4Event* anEvent);
72 
73 private:
74  // local methods...
76 
80 
81  G4double fSSD; // (SSD= Source Skin Depth)
83  G4double ffieldXY[2];
85 
86 };
87 
88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90 {
91  fparticle = pd;
92 }
93 
95 {
96  return fparticle;
97 }
98 
100 {
101  fkineticE = e;
102 }
103 
104 inline G4double MedicalBeam::GetKineticE() const
105 {
106  return fkineticE;
107 }
108 
110 {
112 }
113 
115 {
116  return fsourcePosition;
117 }
118 
120 {
121  ffieldShape = shape;
122 }
123 
125 {
126  return ffieldShape;
127 }
128 
129 inline void MedicalBeam::SetSSD(G4double ssd)
130 {
131  fSSD = ssd;
132 }
133 
134 inline G4double MedicalBeam::GetSSD() const
135 {
136  return fSSD;
137 }
138 
139 inline void MedicalBeam::SetFieldXY(G4double fx, G4double fy)
140 {
141  ffieldXY[0] = fx;
142  ffieldXY[1] = fy;
143 }
144 
145 inline G4double MedicalBeam::GetFieldX() const
146 {
147  return ffieldXY[0];
148 }
149 
150 inline G4double MedicalBeam::GetFieldY() const
151 {
152  return ffieldXY[1];
153 }
154 
155 inline void MedicalBeam::SetFieldR(G4double r)
156 {
157  ffieldR = r;
158 }
159 
160 inline G4double MedicalBeam::GetFieldR() const
161 {
162  return ffieldR;
163 }
164 
165 #endif
G4double GetFieldR() const
Definition: MedicalBeam.hh:140
CLHEP::Hep3Vector G4ThreeVector
void SetParticleDefinition(G4ParticleDefinition *pd)
Definition: MedicalBeam.hh:98
G4double ffieldXY[2]
Definition: MedicalBeam.hh:83
G4ThreeVector GenerateBeamDirection() const
Definition: MedicalBeam.cc:70
void SetSSD(G4double ssd)
Definition: MedicalBeam.hh:122
G4double GetKineticE() const
Definition: MedicalBeam.hh:107
FieldShape GetFieldShape() const
Definition: MedicalBeam.hh:119
G4double GetFieldY() const
Definition: MedicalBeam.hh:134
void SetFieldR(G4double r)
Definition: MedicalBeam.hh:137
void SetSourcePosition(const G4ThreeVector &pos)
Definition: MedicalBeam.hh:110
G4ThreeVector GetSourcePosition() const
Definition: MedicalBeam.hh:113
G4double ffieldR
Definition: MedicalBeam.hh:84
G4double fSSD
Definition: MedicalBeam.hh:81
G4double GetSSD() const
Definition: MedicalBeam.hh:125
void SetFieldShape(FieldShape shape)
Definition: MedicalBeam.hh:116
G4double fkineticE
Definition: MedicalBeam.hh:78
const G4ParticleDefinition * GetParticleDefinition() const
Definition: MedicalBeam.hh:101
void SetKineticE(G4double e)
Definition: MedicalBeam.hh:104
G4ThreeVector fsourcePosition
Definition: MedicalBeam.hh:79
G4ParticleDefinition * fparticle
Definition: MedicalBeam.hh:77
double G4double
Definition: G4Types.hh:76
G4double GetFieldX() const
Definition: MedicalBeam.hh:131
void SetFieldXY(G4double fx, G4double fy)
Definition: MedicalBeam.hh:128
virtual void GeneratePrimaries(G4Event *anEvent)
Definition: MedicalBeam.cc:112
FieldShape ffieldShape
Definition: MedicalBeam.hh:82
static const G4double pos