Geant4
10.03
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
// 10.04.2014 A.Dotti: Add MT functionality for messenger
39
// 24.04.2014 A.Ribon: switched on muon-nuclear by default
40
//
41
//----------------------------------------------------------------------------
42
//
43
44
#include "
G4EmExtraPhysics.hh
"
45
46
#include "
G4SystemOfUnits.hh
"
47
48
#include "
G4ParticleDefinition.hh
"
49
#include "
G4ParticleTable.hh
"
50
#include "
G4Gamma.hh
"
51
#include "
G4Electron.hh
"
52
#include "
G4Positron.hh
"
53
#include "
G4MuonPlus.hh
"
54
#include "
G4MuonMinus.hh
"
55
56
#include "
G4SynchrotronRadiation.hh
"
57
#include "
G4BertiniElectroNuclearBuilder.hh
"
58
#include "
G4MuonNuclearProcess.hh
"
59
#include "
G4MuonVDNuclearModel.hh
"
60
61
#include "
G4GammaConversionToMuons.hh
"
62
#include "
G4AnnihiToMuPair.hh
"
63
#include "
G4eeToHadrons.hh
"
64
65
#include "
G4PhysicsListHelper.hh
"
66
#include "
G4BuilderType.hh
"
67
#include "
G4AutoDelete.hh
"
68
69
// factory
70
#include "
G4PhysicsConstructorFactory.hh
"
71
//
72
G4_DECLARE_PHYSCONSTR_FACTORY
(
G4EmExtraPhysics
);
73
74
G4bool
G4EmExtraPhysics::gnActivated
=
true
;
75
G4bool
G4EmExtraPhysics::munActivated
=
true
;
76
G4bool
G4EmExtraPhysics::synActivated
=
false
;
77
G4bool
G4EmExtraPhysics::synActivatedForAll
=
false
;
78
G4bool
G4EmExtraPhysics::gmumuActivated
=
false
;
79
G4bool
G4EmExtraPhysics::pmumuActivated
=
false
;
80
G4bool
G4EmExtraPhysics::phadActivated
=
false
;
81
82
G4ThreadLocal
G4BertiniElectroNuclearBuilder
*
G4EmExtraPhysics::theGNPhysics
=
nullptr
;
83
G4ThreadLocal
G4SynchrotronRadiation
*
G4EmExtraPhysics::theSynchRad
=
nullptr
;
84
G4ThreadLocal
G4GammaConversionToMuons
*
G4EmExtraPhysics::theGammaToMuMu
=
nullptr
;
85
G4ThreadLocal
G4AnnihiToMuPair
*
G4EmExtraPhysics::thePosiToMuMu
=
nullptr
;
86
G4ThreadLocal
G4eeToHadrons
*
G4EmExtraPhysics::thePosiToHadrons
=
nullptr
;
87
88
G4EmExtraPhysics::G4EmExtraPhysics
(
G4int
ver):
89
G4VPhysicsConstructor
(
"G4GammaLeptoNuclearPhys"
),
90
verbose(ver)
91
{
92
theMessenger
=
new
G4EmMessenger
(
this
);
93
SetPhysicsType
(
bEmExtra
);
94
if
(
verbose
> 1)
G4cout
<<
"### G4EmExtraPhysics"
<<
G4endl
;
95
}
96
97
G4EmExtraPhysics::G4EmExtraPhysics
(
const
G4String
&)
98
:
G4EmExtraPhysics
(1)
99
{}
100
101
G4EmExtraPhysics::~G4EmExtraPhysics
()
102
{
103
delete
theMessenger
;
104
theMessenger
=
nullptr
;
105
}
106
107
void
G4EmExtraPhysics::Synch
(
G4bool
val)
108
{
109
synActivated
= val;
110
}
111
112
void
G4EmExtraPhysics::SynchAll
(
G4bool
val)
113
{
114
synActivatedForAll
= val;
115
if
(
synActivatedForAll
) {
synActivated
=
true
; }
116
}
117
118
void
G4EmExtraPhysics::GammaNuclear
(
G4bool
val)
119
{
120
gnActivated
= val;
121
}
122
123
void
G4EmExtraPhysics::MuonNuclear
(
G4bool
val)
124
{
125
munActivated
= val;
126
}
127
128
void
G4EmExtraPhysics::GammaToMuMu
(
G4bool
val)
129
{
130
gmumuActivated
= val;
131
}
132
133
void
G4EmExtraPhysics::PositronToMuMu
(
G4bool
val)
134
{
135
pmumuActivated
= val;
136
}
137
138
void
G4EmExtraPhysics::PositronToHadrons
(
G4bool
val)
139
{
140
phadActivated
= val;
141
}
142
143
void
G4EmExtraPhysics::ConstructParticle
()
144
{
145
G4Gamma::Gamma
();
146
G4Electron::Electron
();
147
G4Positron::Positron
();
148
G4MuonPlus::MuonPlus
();
149
G4MuonMinus::MuonMinus
();
150
}
151
152
void
G4EmExtraPhysics::ConstructProcess
()
153
{
154
G4ParticleDefinition
* gamma =
G4Gamma::Gamma
();
155
G4ParticleDefinition
*
electron
=
G4Electron::Electron
();
156
G4ParticleDefinition
*
positron
=
G4Positron::Positron
();
157
G4ParticleDefinition
* muonplus =
G4MuonPlus::MuonPlus
();
158
G4ParticleDefinition
* muonminus =
G4MuonMinus::MuonMinus
();
159
160
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
161
if
(
gnActivated
) {
162
theGNPhysics
=
new
G4BertiniElectroNuclearBuilder
();
163
theGNPhysics
->
Build
();
164
//G4AutoDelete::Register(theGNPhysics);
165
}
166
if
(
munActivated
) {
167
G4MuonNuclearProcess
* muNucProcess =
new
G4MuonNuclearProcess
();
168
G4MuonVDNuclearModel
* muNucModel =
new
G4MuonVDNuclearModel
();
169
muNucProcess->
RegisterMe
(muNucModel);
170
ph->
RegisterProcess
( muNucProcess, muonplus);
171
ph->
RegisterProcess
( muNucProcess, muonminus);
172
}
173
if
(
gmumuActivated
) {
174
theGammaToMuMu
=
new
G4GammaConversionToMuons
();
175
ph->
RegisterProcess
(
theGammaToMuMu
, gamma);
176
}
177
if
(
pmumuActivated
) {
178
thePosiToMuMu
=
new
G4AnnihiToMuPair
();
179
ph->
RegisterProcess
(
thePosiToMuMu
, positron);
180
}
181
if
(
phadActivated
) {
182
thePosiToHadrons
=
new
G4eeToHadrons
();
183
ph->
RegisterProcess
(
thePosiToHadrons
, positron);
184
}
185
if
(
synActivated
) {
186
theSynchRad
=
new
G4SynchrotronRadiation
();
187
ph->
RegisterProcess
(
theSynchRad
, electron);
188
ph->
RegisterProcess
(
theSynchRad
, positron);
189
//G4AutoDelete::Register(theSynchRad);
190
if
(
synActivatedForAll
) {
191
auto
myParticleIterator=
GetParticleIterator
();
192
myParticleIterator->reset();
193
G4ParticleDefinition
* particle =
nullptr
;
194
195
while
( (*myParticleIterator)() ) {
196
particle = myParticleIterator->value();
197
if
( particle->
GetPDGStable
() && particle->
GetPDGCharge
() != 0.0) {
198
if
(
verbose
> 1) {
199
G4cout
<<
"### G4SynchrotronRadiation for "
200
<< particle->
GetParticleName
() <<
G4endl
;
201
}
202
ph->
RegisterProcess
(
theSynchRad
, particle);
203
}
204
}
205
}
206
}
207
}
208
G4EmExtraPhysics::phadActivated
static G4bool phadActivated
Definition:
G4EmExtraPhysics.hh:86
G4EmExtraPhysics::munActivated
static G4bool munActivated
Definition:
G4EmExtraPhysics.hh:81
G4EmExtraPhysics::~G4EmExtraPhysics
virtual ~G4EmExtraPhysics()
Definition:
G4EmExtraPhysics.cc:101
G4MuonPlus::MuonPlus
static G4MuonPlus * MuonPlus()
Definition:
G4MuonPlus.cc:99
G4InuclParticleNames::electron
Definition:
G4InuclParticleNames.hh:56
G4BertiniElectroNuclearBuilder::Build
virtual void Build()
Definition:
G4BertiniElectroNuclearBuilder.cc:79
G4GammaConversionToMuons.hh
G4eeToHadrons.hh
G4EmExtraPhysics::theSynchRad
static G4ThreadLocal G4SynchrotronRadiation * theSynchRad
Definition:
G4EmExtraPhysics.hh:89
G4AnnihiToMuPair.hh
G4EmExtraPhysics::verbose
G4int verbose
Definition:
G4EmExtraPhysics.hh:95
G4EmExtraPhysics::MuonNuclear
void MuonNuclear(G4bool val)
Definition:
G4EmExtraPhysics.cc:123
G4EmExtraPhysics::thePosiToHadrons
static G4ThreadLocal G4eeToHadrons * thePosiToHadrons
Definition:
G4EmExtraPhysics.hh:92
G4MuonVDNuclearModel.hh
G4EmExtraPhysics
Definition:
G4EmExtraPhysics.hh:56
G4ParticleDefinition::GetPDGStable
G4bool GetPDGStable() const
G4EmMessenger
Definition:
G4EmMessenger.hh:50
G4SynchrotronRadiation
Definition:
G4SynchrotronRadiation.hh:64
G4EmExtraPhysics::synActivated
static G4bool synActivated
Definition:
G4EmExtraPhysics.hh:82
G4EmExtraPhysics::pmumuActivated
static G4bool pmumuActivated
Definition:
G4EmExtraPhysics.hh:85
G4EmExtraPhysics::theGNPhysics
static G4ThreadLocal G4BertiniElectroNuclearBuilder * theGNPhysics
Definition:
G4EmExtraPhysics.hh:88
G4PhysicsListHelper.hh
G4BuilderType.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:72
G4ThreadLocal
#define G4ThreadLocal
Definition:
tls.hh:89
G4AutoDelete.hh
G4int
int G4int
Definition:
G4Types.hh:78
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:120
G4EmExtraPhysics::thePosiToMuMu
static G4ThreadLocal G4AnnihiToMuPair * thePosiToMuMu
Definition:
G4EmExtraPhysics.hh:91
G4HadronicProcess::RegisterMe
void RegisterMe(G4HadronicInteraction *a)
Definition:
G4HadronicProcess.cc:153
bEmExtra
Definition:
G4BuilderType.hh:49
G4VPhysicsConstructor::GetParticleIterator
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
Definition:
G4VPhysicsConstructor.cc:78
G4BertiniElectroNuclearBuilder
Definition:
G4BertiniElectroNuclearBuilder.hh:49
G4InuclParticleNames::positron
Definition:
G4InuclParticleNames.hh:57
G4cout
G4GLOB_DLL std::ostream G4cout
G4MuonNuclearProcess.hh
G4ParticleTable.hh
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4eeToHadrons
Definition:
G4eeToHadrons.hh:59
G4PhysicsListHelper::RegisterProcess
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
Definition:
G4PhysicsListHelper.cc:413
G4EmExtraPhysics::GammaToMuMu
void GammaToMuMu(G4bool val)
Definition:
G4EmExtraPhysics.cc:128
G4Positron.hh
G4EmExtraPhysics::gnActivated
static G4bool gnActivated
Definition:
G4EmExtraPhysics.hh:80
G4ParticleDefinition.hh
G4EmExtraPhysics::G4EmExtraPhysics
G4EmExtraPhysics(G4int ver=1)
Definition:
G4EmExtraPhysics.cc:88
G4Gamma::Gamma
static G4Gamma * Gamma()
Definition:
G4Gamma.cc:86
G4EmExtraPhysics::PositronToMuMu
void PositronToMuMu(G4bool val)
Definition:
G4EmExtraPhysics.cc:133
G4GammaConversionToMuons
Definition:
G4GammaConversionToMuons.hh:61
G4EmExtraPhysics.hh
G4Positron::Positron
static G4Positron * Positron()
Definition:
G4Positron.cc:94
G4Electron.hh
G4BertiniElectroNuclearBuilder.hh
G4PhysicsConstructorFactory.hh
G4MuonMinus.hh
G4PhysicsListHelper::GetPhysicsListHelper
static G4PhysicsListHelper * GetPhysicsListHelper()
Definition:
G4PhysicsListHelper.cc:89
G4EmExtraPhysics::SynchAll
void SynchAll(G4bool val)
Definition:
G4EmExtraPhysics.cc:112
G4AnnihiToMuPair
Definition:
G4AnnihiToMuPair.hh:57
G4SynchrotronRadiation.hh
G4EmExtraPhysics::theGammaToMuMu
static G4ThreadLocal G4GammaConversionToMuons * theGammaToMuMu
Definition:
G4EmExtraPhysics.hh:90
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
G4EmExtraPhysics::PositronToHadrons
void PositronToHadrons(G4bool val)
Definition:
G4EmExtraPhysics.cc:138
G4MuonPlus.hh
G4EmExtraPhysics::gmumuActivated
static G4bool gmumuActivated
Definition:
G4EmExtraPhysics.hh:84
G4EmExtraPhysics::GammaNuclear
void GammaNuclear(G4bool val)
Definition:
G4EmExtraPhysics.cc:118
G4PhysicsListHelper
Definition:
G4PhysicsListHelper.hh:50
G4EmExtraPhysics::ConstructProcess
void ConstructProcess()
Definition:
G4EmExtraPhysics.cc:152
G4SystemOfUnits.hh
G4MuonVDNuclearModel
Definition:
G4MuonVDNuclearModel.hh:50
G4EmExtraPhysics::Synch
void Synch(G4bool val)
Definition:
G4EmExtraPhysics.cc:107
G4ParticleDefinition::GetPDGCharge
G4double GetPDGCharge() const
Definition:
G4ParticleDefinition.hh:124
G4VPhysicsConstructor::SetPhysicsType
void SetPhysicsType(G4int)
Definition:
G4VPhysicsConstructor.hh:200
G4VPhysicsConstructor
Definition:
G4VPhysicsConstructor.hh:121
G4EmExtraPhysics::theMessenger
G4EmMessenger * theMessenger
Definition:
G4EmExtraPhysics.hh:94
G4Gamma.hh
G4EmExtraPhysics::synActivatedForAll
static G4bool synActivatedForAll
Definition:
G4EmExtraPhysics.hh:83
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:143
geant4.10.03
source
physics_lists
constructors
gamma_lepto_nuclear
src
G4EmExtraPhysics.cc
Generated on Thu Feb 14 2002 02:28:32 for Geant4 by
1.8.8