Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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,v 1.4 2006-06-29 15:30:12 gunter Exp $
27 // $Name: not supported by cvs2svn $
28 // ====================================================================
29 // MedicalBeam.hh
30 //
31 // 2005 Q
32 // ====================================================================
33 #ifndef MEDICAL_BEAM_H
34 #define MEDICAL_BEAM_H
35 
36 #include "globals.hh"
37 #include "G4ThreeVector.hh"
39 
41 
42 // ====================================================================
43 //
44 // class definition
45 //
46 // ====================================================================
48 public:
49  enum FieldShape{ SQUARE=0, CIRCLE };
50 
51 protected:
55 
56  G4double SSD; // (SSD= Source Skin Depth)
60 
61  // local methods...
63 
64 public:
65  MedicalBeam();
66  ~MedicalBeam();
67 
68  // set/get functions...
71 
72  void SetKineticE(G4double e);
73  G4double GetKineticE() const;
74 
75  void SetSourcePosition(const G4ThreeVector& pos);
77 
78  void SetFieldShape(FieldShape shape);
79  FieldShape GetFieldShape() const;
80 
81  void SetSSD(G4double ssd);
82  G4double GetSSD() const;
83 
84  void SetFieldXY(G4double fx, G4double fy);
85  G4double GetFieldX() const;
86  G4double GetFieldY() const;
87 
88  void SetFieldR(G4double r);
89  G4double GetFieldR() const;
90 
91  // methods...
92  virtual void GeneratePrimaries(G4Event* anEvent);
93 
94 };
95 
96 // ====================================================================
97 // inline functions
98 // ====================================================================
100 { particle= pd; }
101 
103 { return particle; }
104 
106 { kineticE= e; }
107 
109 { return kineticE; }
110 
112 { sourcePosition= pos; }
113 
115 { return sourcePosition; }
116 
118 { fieldShape= shape; }
119 
121 { return fieldShape; }
122 
124 { SSD= ssd; }
125 
127 { return SSD; }
128 
130 { fieldXY[0]= fx; fieldXY[1]= fy; }
131 
133 { return fieldXY[0]; }
134 
136 { return fieldXY[1]; }
137 
139 { fieldR= r; }
140 
142 { return fieldR; }
143 
144 #endif
145