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 // ====================================================================
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 // ====================================================================
46 public:
47  enum FieldShape{ SQUARE=0, CIRCLE };
48 
49 protected:
53 
54  G4double SSD; // (SSD= Source Skin Depth)
58 
59  // local methods...
61 
62 public:
63  MedicalBeam();
64  ~MedicalBeam();
65 
66  // set/get functions...
69 
70  void SetKineticE(G4double e);
71  G4double GetKineticE() const;
72 
73  void SetSourcePosition(const G4ThreeVector& pos);
75 
76  void SetFieldShape(FieldShape shape);
77  FieldShape GetFieldShape() const;
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 
110 { sourcePosition= pos; }
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