Geant4_10
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 66892 2013-01-17 10:57:59Z gunter $
27 // ====================================================================
28 // MedicalBeam.hh
29 //
30 // 2005 Q
31 // ====================================================================
32 #ifndef MEDICAL_BEAM_H
33 #define MEDICAL_BEAM_H
34 
35 #include "globals.hh"
36 #include "G4ThreeVector.hh"
38 
40 
41 // ====================================================================
42 //
43 // class definition
44 //
45 // ====================================================================
47 public:
48  enum FieldShape{ SQUARE=0, CIRCLE };
49 
50 protected:
54 
55  G4double SSD; // (SSD= Source Skin Depth)
59 
60  // local methods...
62 
63 public:
64  MedicalBeam();
65  ~MedicalBeam();
66 
67  // set/get functions...
70 
71  void SetKineticE(G4double e);
72  G4double GetKineticE() const;
73 
74  void SetSourcePosition(const G4ThreeVector& pos);
76 
77  void SetFieldShape(FieldShape shape);
78  FieldShape GetFieldShape() const;
79 
80  void SetSSD(G4double ssd);
81  G4double GetSSD() const;
82 
83  void SetFieldXY(G4double fx, G4double fy);
84  G4double GetFieldX() const;
85  G4double GetFieldY() const;
86 
87  void SetFieldR(G4double r);
88  G4double GetFieldR() const;
89 
90  // methods...
91  virtual void GeneratePrimaries(G4Event* anEvent);
92 
93 };
94 
95 // ====================================================================
96 // inline functions
97 // ====================================================================
99 { particle= pd; }
100 
102 { return particle; }
103 
105 { kineticE= e; }
106 
108 { return kineticE; }
109 
111 { sourcePosition= pos; }
112 
114 { return sourcePosition; }
115 
117 { fieldShape= shape; }
118 
120 { return fieldShape; }
121 
123 { SSD= ssd; }
124 
126 { return SSD; }
127 
129 { fieldXY[0]= fx; fieldXY[1]= fy; }
130 
132 { return fieldXY[0]; }
133 
135 { return fieldXY[1]; }
136 
138 { fieldR= r; }
139 
141 { return fieldR; }
142 
143 #endif
144 
virtual void GeneratePrimaries(G4Event *anEvent)
G4ThreeVector sourcePosition
Definition: MedicalBeam.hh:53
G4double GetFieldR() const
Definition: MedicalBeam.hh:140
FieldShape fieldShape
Definition: MedicalBeam.hh:56
void SetParticleDefinition(G4ParticleDefinition *pd)
Definition: MedicalBeam.hh:98
G4ThreeVector GenerateBeamDirection() const
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 fieldXY[2]
Definition: MedicalBeam.hh:57
G4double GetSSD() const
Definition: MedicalBeam.hh:125
jump r
Definition: plot.C:36
void SetFieldShape(FieldShape shape)
Definition: MedicalBeam.hh:116
const G4ParticleDefinition * GetParticleDefinition() const
Definition: MedicalBeam.hh:101
G4double kineticE
Definition: MedicalBeam.hh:52
void SetKineticE(G4double e)
Definition: MedicalBeam.hh:104
G4double SSD
Definition: MedicalBeam.hh:55
double G4double
Definition: G4Types.hh:76
G4double GetFieldX() const
Definition: MedicalBeam.hh:131
void SetFieldXY(G4double fx, G4double fy)
Definition: MedicalBeam.hh:128
G4ParticleDefinition * particle
Definition: MedicalBeam.hh:51
G4double fieldR
Definition: MedicalBeam.hh:58