ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
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
"
36
#include "
G4VUserPrimaryGeneratorAction.hh
"
37
38
class
G4ParticleDefinition
;
39
40
// ====================================================================
41
//
42
// class definition
43
//
44
// ====================================================================
45
class
MedicalBeam
:
public
G4VUserPrimaryGeneratorAction
{
46
public
:
47
enum
FieldShape
{
SQUARE
=0,
CIRCLE
};
48
49
protected
:
50
G4ParticleDefinition
*
particle
;
51
G4double
kineticE
;
52
G4ThreeVector
sourcePosition
;
53
54
G4double
SSD
;
// (SSD= Source Skin Depth)
55
FieldShape
fieldShape
;
56
G4double
fieldXY
[2];
57
G4double
fieldR
;
58
59
// local methods...
60
G4ThreeVector
GenerateBeamDirection
()
const
;
61
62
public
:
63
MedicalBeam
();
64
~MedicalBeam
();
65
66
// set/get functions...
67
void
SetParticleDefinition
(
G4ParticleDefinition
* pd);
68
const
G4ParticleDefinition
*
GetParticleDefinition
()
const
;
69
70
void
SetKineticE
(
G4double
e
);
71
G4double
GetKineticE
()
const
;
72
73
void
SetSourcePosition
(
const
G4ThreeVector
&
pos
);
74
G4ThreeVector
GetSourcePosition
()
const
;
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
// ====================================================================
97
inline
void
MedicalBeam::SetParticleDefinition
(
G4ParticleDefinition
* pd)
98
{
particle
= pd; }
99
100
inline
const
G4ParticleDefinition
*
MedicalBeam::GetParticleDefinition
()
const
101
{
return
particle
; }
102
103
inline
void
MedicalBeam::SetKineticE
(
G4double
e
)
104
{
kineticE
=
e
; }
105
106
inline
G4double
MedicalBeam::GetKineticE
()
const
107
{
return
kineticE
; }
108
109
inline
void
MedicalBeam::SetSourcePosition
(
const
G4ThreeVector
&
pos
)
110
{
sourcePosition
=
pos
; }
111
112
inline
G4ThreeVector
MedicalBeam::GetSourcePosition
()
const
113
{
return
sourcePosition
; }
114
115
inline
void
MedicalBeam::SetFieldShape
(
MedicalBeam::FieldShape
shape)
116
{
fieldShape
= shape; }
117
118
inline
MedicalBeam::FieldShape
MedicalBeam::GetFieldShape
()
const
119
{
return
fieldShape
; }
120
121
inline
void
MedicalBeam::SetSSD
(
G4double
ssd)
122
{
SSD
= ssd; }
123
124
inline
G4double
MedicalBeam::GetSSD
()
const
125
{
return
SSD
; }
126
127
inline
void
MedicalBeam::SetFieldXY
(
G4double
fx,
G4double
fy)
128
{
fieldXY
[0]= fx;
fieldXY
[1]= fy; }
129
130
inline
G4double
MedicalBeam::GetFieldX
()
const
131
{
return
fieldXY
[0]; }
132
133
inline
G4double
MedicalBeam::GetFieldY
()
const
134
{
return
fieldXY
[1]; }
135
136
inline
void
MedicalBeam::SetFieldR
(
G4double
r
)
137
{
fieldR
=
r
; }
138
139
inline
G4double
MedicalBeam::GetFieldR
()
const
140
{
return
fieldR
; }
141
142
#endif
143
geant4
tree
geant4-10.6-release
environments
g4py
tests
g4pytest
MedicalBeam
MedicalBeam.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:53
using
1.8.2 with
ECCE GitHub integration