Geant4
10.00.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
G4EmExtraPhysics.cc
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: G4EmExtraPhysics.cc 66704 2013-01-10 18:20:17Z gunter $
27
//
28
//---------------------------------------------------------------------------
29
//
30
// ClassName: G4EmExtraPhysics
31
//
32
// Author: 2002 J.P. Wellisch
33
//
34
// Modified:
35
// 10.11.2005 V.Ivanchenko edit to provide a standard
36
// 19.06.2006 V.Ivanchenko add mu-nuclear process
37
// 16.10.2012 A.Ribon: renamed G4EmExtraBertiniPhysics as G4EmExtraPhysics
38
//
39
//----------------------------------------------------------------------------
40
//
41
42
#include "
G4EmExtraPhysics.hh
"
43
44
#include "
G4SystemOfUnits.hh
"
45
#include "
G4SynchrotronRadiation.hh
"
46
47
#include "
G4ParticleDefinition.hh
"
48
#include "
G4ParticleTable.hh
"
49
#include "
G4Gamma.hh
"
50
#include "
G4Electron.hh
"
51
#include "
G4Positron.hh
"
52
#include "
G4MuonPlus.hh
"
53
#include "
G4MuonMinus.hh
"
54
#include "
G4ProcessManager.hh
"
55
#include "
G4BuilderType.hh
"
56
57
// factory
58
#include "
G4PhysicsConstructorFactory.hh
"
59
//
60
G4_DECLARE_PHYSCONSTR_FACTORY
(
G4EmExtraPhysics
);
61
62
G4ThreadLocal
G4bool
G4EmExtraPhysics::wasBuilt
=
false
;
63
G4ThreadLocal
G4bool
G4EmExtraPhysics::munActivated
=
false
;
64
G4ThreadLocal
G4bool
G4EmExtraPhysics::gnActivated
=
false
;
65
G4ThreadLocal
G4bool
G4EmExtraPhysics::synActivated
=
false
;
66
G4ThreadLocal
G4bool
G4EmExtraPhysics::synchOn
=
false
;
67
G4ThreadLocal
G4bool
G4EmExtraPhysics::gammNucOn
=
true
;
68
G4ThreadLocal
G4bool
G4EmExtraPhysics::muNucOn
=
false
;
69
70
71
G4EmExtraPhysics::G4EmExtraPhysics
(
G4int
ver):
72
G4VPhysicsConstructor
(
"G4GammaLeptoNuclearPhys"
),
73
verbose(ver)
74
{
75
theMessenger
=
new
G4EmMessenger
(
this
);
76
SetPhysicsType
(
bEmExtra
);
77
if
(
verbose
> 1)
G4cout
<<
"### G4EmExtraPhysics"
<<
G4endl
;
78
}
79
80
G4EmExtraPhysics::G4EmExtraPhysics
(
const
G4String
&):
81
G4VPhysicsConstructor
(
"G4GammaLeptoNuclearPhys"
),
82
verbose(1)
83
{
84
theMessenger
=
new
G4EmMessenger
(
this
);
85
SetPhysicsType
(
bEmExtra
);
86
if
(
verbose
> 1)
G4cout
<<
"### G4EmExtraPhysics"
<<
G4endl
;
87
}
88
89
G4EmExtraPhysics::~G4EmExtraPhysics
()
90
{
91
delete
theMessenger
;
92
}
93
94
void
G4EmExtraPhysics::Synch
(
G4String
& newState)
95
{
96
if
(newState ==
"on"
|| newState ==
"ON"
) {
97
synchOn
=
true
;
98
if
(
wasBuilt
)
BuildSynch
();
99
}
else
synchOn
=
false
;
100
}
101
102
void
G4EmExtraPhysics::GammaNuclear
(
G4String
& newState)
103
{
104
if
(newState ==
"on"
|| newState ==
"ON"
) {
105
gammNucOn
=
true
;
106
if
(
wasBuilt
)
BuildGammaNuclear
();
107
}
else
gammNucOn
=
false
;
108
}
109
110
void
G4EmExtraPhysics::MuonNuclear
(
G4String
& newState)
111
{
112
if
(newState ==
"on"
|| newState ==
"ON"
) {
113
muNucOn
=
true
;
114
if
(
wasBuilt
)
BuildMuonNuclear
();
115
}
else
muNucOn
=
false
;
116
}
117
118
void
G4EmExtraPhysics::ConstructParticle
()
119
{
120
G4Gamma::Gamma
();
121
G4Electron::Electron
();
122
G4Positron::Positron
();
123
G4MuonPlus::MuonPlus
();
124
G4MuonMinus::MuonMinus
();
125
}
126
127
void
G4EmExtraPhysics::ConstructProcess
()
128
{
129
if
(
wasBuilt
)
return
;
130
wasBuilt
=
true
;
131
132
if
(
synchOn
)
BuildSynch
();
133
if
(
gammNucOn
)
BuildGammaNuclear
();
134
if
(
muNucOn
)
BuildMuonNuclear
();
135
}
136
137
void
G4EmExtraPhysics::BuildMuonNuclear
()
138
{
139
if
(
munActivated
)
return
;
140
munActivated
=
true
;
141
G4ProcessManager
* pManager = 0;
142
143
G4MuonNuclearProcess
* muNucProcess =
new
G4MuonNuclearProcess
();
144
G4MuonVDNuclearModel
* muNucModel =
new
G4MuonVDNuclearModel
();
145
muNucProcess->
RegisterMe
(muNucModel);
146
147
pManager =
G4MuonPlus::MuonPlus
()->
GetProcessManager
();
148
pManager->
AddDiscreteProcess
(muNucProcess);
149
150
pManager =
G4MuonMinus::MuonMinus
()->
GetProcessManager
();
151
pManager->
AddDiscreteProcess
(muNucProcess);
152
}
153
154
void
G4EmExtraPhysics::BuildGammaNuclear
()
155
{
156
if
(
gnActivated
)
return
;
157
gnActivated
=
true
;
158
159
G4BertiniElectroNuclearBuilder
* theGNPhysics =
new
G4BertiniElectroNuclearBuilder
();
160
theGNPhysics->
Build
();
161
}
162
163
void
G4EmExtraPhysics::BuildSynch
()
164
{
165
if
(
synActivated
)
return
;
166
synActivated
=
true
;
167
G4ProcessManager
* pManager = 0;
168
169
pManager =
G4Electron::Electron
()->
GetProcessManager
();
170
G4SynchrotronRadiation
* theElectronSynch =
new
G4SynchrotronRadiation
();
171
pManager->
AddDiscreteProcess
(theElectronSynch);
172
173
pManager =
G4Positron::Positron
()->
GetProcessManager
();
174
G4SynchrotronRadiation
* thePositronSynch =
new
G4SynchrotronRadiation
();
175
pManager->
AddDiscreteProcess
(thePositronSynch);
176
}
G4EmExtraPhysics::~G4EmExtraPhysics
virtual ~G4EmExtraPhysics()
Definition:
G4EmExtraPhysics.cc:89
G4MuonPlus::MuonPlus
static G4MuonPlus * MuonPlus()
Definition:
G4MuonPlus.cc:99
G4BertiniElectroNuclearBuilder::Build
virtual void Build()
Definition:
G4BertiniElectroNuclearBuilder.cc:79
G4EmExtraPhysics::verbose
G4int verbose
Definition:
G4EmExtraPhysics.hh:88
G4EmExtraPhysics
Definition:
G4EmExtraPhysics.hh:55
G4EmMessenger
Definition:
G4EmMessenger.hh:50
G4SynchrotronRadiation
Definition:
G4SynchrotronRadiation.hh:64
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4BuilderType.hh
G4ThreadLocal
#define G4ThreadLocal
Definition:
tls.hh:52
G4EmExtraPhysics::synchOn
static G4ThreadLocal G4bool synchOn
Definition:
G4EmExtraPhysics.hh:83
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
G4int
int G4int
Definition:
G4Types.hh:78
G4HadronicProcess::RegisterMe
void RegisterMe(G4HadronicInteraction *a)
Definition:
G4HadronicProcess.cc:142
bEmExtra
Definition:
G4BuilderType.hh:49
G4BertiniElectroNuclearBuilder
Definition:
G4BertiniElectroNuclearBuilder.hh:49
G4EmExtraPhysics::BuildSynch
void BuildSynch()
Definition:
G4EmExtraPhysics.cc:163
G4EmExtraPhysics::munActivated
static G4ThreadLocal G4bool munActivated
Definition:
G4EmExtraPhysics.hh:81
G4cout
G4GLOB_DLL std::ostream G4cout
G4ParticleTable.hh
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4Positron.hh
G4EmExtraPhysics::muNucOn
static G4ThreadLocal G4bool muNucOn
Definition:
G4EmExtraPhysics.hh:85
G4ProcessManager.hh
G4ParticleDefinition.hh
G4EmExtraPhysics::G4EmExtraPhysics
G4EmExtraPhysics(G4int ver=1)
Definition:
G4EmExtraPhysics.cc:71
G4Gamma::Gamma
static G4Gamma * Gamma()
Definition:
G4Gamma.cc:86
G4EmExtraPhysics::gnActivated
static G4ThreadLocal G4bool gnActivated
Definition:
G4EmExtraPhysics.hh:80
G4EmExtraPhysics::GammaNuclear
void GammaNuclear(G4String &aState)
Definition:
G4EmExtraPhysics.cc:102
G4EmExtraPhysics::synActivated
static G4ThreadLocal G4bool synActivated
Definition:
G4EmExtraPhysics.hh:82
G4EmExtraPhysics.hh
G4Positron::Positron
static G4Positron * Positron()
Definition:
G4Positron.cc:94
G4Electron.hh
G4EmExtraPhysics::gammNucOn
static G4ThreadLocal G4bool gammNucOn
Definition:
G4EmExtraPhysics.hh:84
G4EmExtraPhysics::Synch
void Synch(G4String &aState)
Definition:
G4EmExtraPhysics.cc:94
G4PhysicsConstructorFactory.hh
G4MuonMinus.hh
G4EmExtraPhysics::MuonNuclear
void MuonNuclear(G4String &aState)
Definition:
G4EmExtraPhysics.cc:110
G4EmExtraPhysics::BuildMuonNuclear
void BuildMuonNuclear()
Definition:
G4EmExtraPhysics.cc:137
G4SynchrotronRadiation.hh
G4MuonMinus::MuonMinus
static G4MuonMinus * MuonMinus()
Definition:
G4MuonMinus.cc:100
G4Electron::Electron
static G4Electron * Electron()
Definition:
G4Electron.cc:94
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4MuonPlus.hh
G4EmExtraPhysics::BuildGammaNuclear
void BuildGammaNuclear()
Definition:
G4EmExtraPhysics.cc:154
G4EmExtraPhysics::ConstructProcess
void ConstructProcess()
Definition:
G4EmExtraPhysics.cc:127
G4SystemOfUnits.hh
G4MuonVDNuclearModel
Definition:
G4MuonVDNuclearModel.hh:54
G4VPhysicsConstructor::SetPhysicsType
void SetPhysicsType(G4int)
Definition:
G4VPhysicsConstructor.hh:199
G4VPhysicsConstructor
Definition:
G4VPhysicsConstructor.hh:121
G4EmExtraPhysics::theMessenger
G4EmMessenger * theMessenger
Definition:
G4EmExtraPhysics.hh:87
G4EmExtraPhysics::wasBuilt
static G4ThreadLocal G4bool wasBuilt
Definition:
G4EmExtraPhysics.hh:79
G4Gamma.hh
G4_DECLARE_PHYSCONSTR_FACTORY
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmExtraPhysics)
G4String
Definition:
G4String.hh:45
G4MuonNuclearProcess
Definition:
G4MuonNuclearProcess.hh:41
G4EmExtraPhysics::ConstructParticle
void ConstructParticle()
Definition:
G4EmExtraPhysics.cc:118
geant4.10.00.p02
source
physics_lists
constructors
gamma_lepto_nuclear
src
G4EmExtraPhysics.cc
Generated on Thu Dec 31 2015 10:40:25 for Geant4 by
1.8.8