ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MedicalBeam.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MedicalBeam.hh
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 //
29 
30 #ifndef MEDICAL_BEAM_H
31 #define MEDICAL_BEAM_H
32 
33 #include "globals.hh"
34 #include "G4ThreeVector.hh"
36 
38 
40 public:
42 
43  MedicalBeam();
44  ~MedicalBeam();
45 
46  // set/get functions...
49 
50  void SetKineticE(G4double e);
51  G4double GetKineticE() const;
52 
53  void SetSourcePosition(const G4ThreeVector& pos);
55 
56  void SetFieldShape(FieldShape shape);
57  FieldShape GetFieldShape() const;
58 
59  void SetSSD(G4double ssd);
60  G4double GetSSD() const;
61 
62  void SetFieldXY(G4double fx, G4double fy);
63  G4double GetFieldX() const;
64  G4double GetFieldY() const;
65 
66  void SetFieldR(G4double r);
67  G4double GetFieldR() const;
68 
69  // methods...
70  virtual void GeneratePrimaries(G4Event* anEvent);
71 
72 private:
73  // local methods...
75 
79 
80  G4double fSSD; // (SSD= Source Skin Depth)
84 
85 };
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 {
90  fparticle = pd;
91 }
92 
94 {
95  return fparticle;
96 }
97 
99 {
100  fkineticE = e;
101 }
102 
103 inline G4double MedicalBeam::GetKineticE() const
104 {
105  return fkineticE;
106 }
107 
109 {
111 }
112 
114 {
115  return fsourcePosition;
116 }
117 
119 {
120  ffieldShape = shape;
121 }
122 
124 {
125  return ffieldShape;
126 }
127 
128 inline void MedicalBeam::SetSSD(G4double ssd)
129 {
130  fSSD = ssd;
131 }
132 
133 inline G4double MedicalBeam::GetSSD() const
134 {
135  return fSSD;
136 }
137 
138 inline void MedicalBeam::SetFieldXY(G4double fx, G4double fy)
139 {
140  ffieldXY[0] = fx;
141  ffieldXY[1] = fy;
142 }
143 
144 inline G4double MedicalBeam::GetFieldX() const
145 {
146  return ffieldXY[0];
147 }
148 
149 inline G4double MedicalBeam::GetFieldY() const
150 {
151  return ffieldXY[1];
152 }
153 
154 inline void MedicalBeam::SetFieldR(G4double r)
155 {
156  ffieldR = r;
157 }
158 
159 inline G4double MedicalBeam::GetFieldR() const
160 {
161  return ffieldR;
162 }
163 
164 #endif