Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
field
field05
src
F05PhysicsList.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
//
28
//
29
//
30
//
31
//
32
33
#include "
F05PhysicsList.hh
"
34
35
#include "
F05ExtraPhysics.hh
"
36
37
#include "
G4ProcessManager.hh
"
38
#include "
G4ParticleTypes.hh
"
39
#include "
G4ParticleTable.hh
"
40
41
#include "
G4DecayPhysics.hh
"
42
#include "
G4ProcessTable.hh
"
43
44
#include "
G4PionDecayMakeSpin.hh
"
45
#include "
G4DecayWithSpin.hh
"
46
47
#include "
G4DecayTable.hh
"
48
#include "
G4MuonDecayChannelWithSpin.hh
"
49
#include "
G4MuonRadiativeDecayChannelWithSpin.hh
"
50
51
F05PhysicsList::F05PhysicsList
() :
G4VModularPhysicsList
()
52
{
53
RegisterPhysics
(
new
G4DecayPhysics
());
54
RegisterPhysics
(
new
F05ExtraPhysics
());
55
}
56
57
F05PhysicsList::~F05PhysicsList
()
58
{;}
59
60
void
F05PhysicsList::ConstructParticle
()
61
{
62
G4VModularPhysicsList::ConstructParticle
();
63
64
G4DecayTable
* MuonPlusDecayTable =
new
G4DecayTable
();
65
MuonPlusDecayTable ->
Insert
(
new
66
G4MuonDecayChannelWithSpin
(
"mu+"
,0.986));
67
MuonPlusDecayTable ->
Insert
(
new
68
G4MuonRadiativeDecayChannelWithSpin
(
"mu+"
,0.014));
69
G4MuonPlus::MuonPlusDefinition
() -> SetDecayTable(MuonPlusDecayTable);
70
71
G4DecayTable
* MuonMinusDecayTable =
new
G4DecayTable
();
72
MuonMinusDecayTable ->
Insert
(
new
73
G4MuonDecayChannelWithSpin
(
"mu-"
,0.986));
74
MuonMinusDecayTable ->
Insert
(
new
75
G4MuonRadiativeDecayChannelWithSpin
(
"mu-"
,0.014));
76
G4MuonMinus::MuonMinusDefinition
() -> SetDecayTable(MuonMinusDecayTable);
77
}
78
79
void
F05PhysicsList::ConstructProcess
()
80
{
81
G4VModularPhysicsList::ConstructProcess
();
82
83
G4DecayWithSpin
* decayWithSpin =
new
G4DecayWithSpin
();
84
85
G4ProcessTable
* processTable =
G4ProcessTable::GetProcessTable
();
86
87
G4VProcess
* decay;
88
decay = processTable->
FindProcess
(
"Decay"
,
G4MuonPlus::MuonPlus
());
89
90
G4ProcessManager
* fManager;
91
fManager =
G4MuonPlus::MuonPlus
()->
GetProcessManager
();
92
93
if
(fManager) {
94
if
(decay) fManager->
RemoveProcess
(decay);
95
fManager->
AddProcess
(decayWithSpin);
96
// set ordering for PostStepDoIt and AtRestDoIt
97
fManager ->
SetProcessOrdering
(decayWithSpin,
idxPostStep
);
98
fManager ->
SetProcessOrdering
(decayWithSpin,
idxAtRest
);
99
}
100
101
decay = processTable->
FindProcess
(
"Decay"
,
G4MuonMinus::MuonMinus
());
102
103
fManager =
G4MuonMinus::MuonMinus
()->
GetProcessManager
();
104
105
if
(fManager) {
106
if
(decay) fManager->
RemoveProcess
(decay);
107
fManager->
AddProcess
(decayWithSpin);
108
// set ordering for PostStepDoIt and AtRestDoIt
109
fManager ->
SetProcessOrdering
(decayWithSpin,
idxPostStep
);
110
fManager ->
SetProcessOrdering
(decayWithSpin,
idxAtRest
);
111
}
112
113
G4PionDecayMakeSpin
* poldecay =
new
G4PionDecayMakeSpin
();
114
115
decay = processTable->
FindProcess
(
"Decay"
,
G4PionPlus::PionPlus
());
116
117
fManager =
G4PionPlus::PionPlus
()->
GetProcessManager
();
118
119
if
(fManager) {
120
if
(decay) fManager->
RemoveProcess
(decay);
121
fManager->
AddProcess
(poldecay);
122
// set ordering for PostStepDoIt and AtRestDoIt
123
fManager ->
SetProcessOrdering
(poldecay,
idxPostStep
);
124
fManager ->
SetProcessOrdering
(poldecay,
idxAtRest
);
125
}
126
127
decay = processTable->
FindProcess
(
"Decay"
,
G4PionMinus::PionMinus
());
128
129
fManager =
G4PionMinus::PionMinus
()->
GetProcessManager
();
130
131
if
(fManager) {
132
if
(decay) fManager->
RemoveProcess
(decay);
133
fManager->
AddProcess
(poldecay);
134
// set ordering for PostStepDoIt and AtRestDoIt
135
fManager ->
SetProcessOrdering
(poldecay,
idxPostStep
);
136
fManager ->
SetProcessOrdering
(poldecay,
idxAtRest
);
137
}
138
139
}
140
141
void
F05PhysicsList::SetCuts
()
142
{
143
SetCutsWithDefault
();
144
}
Generated on Sat May 25 2013 14:32:26 for Geant4 by
1.8.4