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
G4SpinDecayPhysics.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4SpinDecayPhysics.cc
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
//---------------------------------------------------------------------------
28
//
29
// ClassName: G4SpinDecayPhysics
30
//
31
// Author: 2015 P. Gumplinger
32
//
33
// Modified:
34
//
35
//----------------------------------------------------------------------------
36
//
37
#include "
G4SpinDecayPhysics.hh
"
38
39
#include "
G4ParticleDefinition.hh
"
40
#include "
G4ProcessManager.hh
"
41
42
#include "
G4ParticleTypes.hh
"
43
#include "
G4ParticleTable.hh
"
44
45
#include "
G4ProcessTable.hh
"
46
47
#include "
G4DecayTable.hh
"
48
#include "
G4MuonDecayChannelWithSpin.hh
"
49
#include "
G4MuonRadiativeDecayChannelWithSpin.hh
"
50
51
// factory
52
#include "
G4PhysicsConstructorFactory.hh
"
53
//
54
G4_DECLARE_PHYSCONSTR_FACTORY
(
G4SpinDecayPhysics
);
55
56
G4SpinDecayPhysics::G4SpinDecayPhysics
()
57
:
G4VPhysicsConstructor
(
"SpinDecay"
), decayWithSpin(NULL), poldecay(NULL)
58
{
59
}
60
61
G4SpinDecayPhysics::G4SpinDecayPhysics
(
const
G4String
&
name
)
62
:
G4VPhysicsConstructor
(name), decayWithSpin(NULL), poldecay(NULL)
63
{
64
}
65
66
G4SpinDecayPhysics::~G4SpinDecayPhysics
()
67
{
68
if
(
decayWithSpin
)
delete
decayWithSpin
;
69
if
(
poldecay
)
delete
poldecay
;
70
}
71
72
void
G4SpinDecayPhysics::ConstructParticle
()
73
{
74
G4Gamma::GammaDefinition
();
75
G4Electron::ElectronDefinition
();
76
G4Positron::PositronDefinition
();
77
78
G4NeutrinoE::NeutrinoEDefinition
();
79
G4NeutrinoMu::NeutrinoMuDefinition
();
80
G4AntiNeutrinoE::AntiNeutrinoEDefinition
();
81
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition
();
82
83
G4MuonPlus::MuonPlusDefinition
();
84
G4MuonMinus::MuonMinusDefinition
();
85
86
G4PionPlus::PionPlus
();
87
G4PionMinus::PionMinus
();
88
89
G4GenericIon::GenericIonDefinition
();
90
91
G4DecayTable
* MuonPlusDecayTable =
new
G4DecayTable
();
92
MuonPlusDecayTable ->
Insert
(
new
93
G4MuonDecayChannelWithSpin
(
"mu+"
,0.986));
94
MuonPlusDecayTable ->
Insert
(
new
95
G4MuonRadiativeDecayChannelWithSpin
(
"mu+"
,0.014));
96
G4MuonPlus::MuonPlusDefinition
() -> SetDecayTable(MuonPlusDecayTable);
97
98
G4DecayTable
* MuonMinusDecayTable =
new
G4DecayTable
();
99
MuonMinusDecayTable ->
Insert
(
new
100
G4MuonDecayChannelWithSpin
(
"mu-"
,0.986));
101
MuonMinusDecayTable ->
Insert
(
new
102
G4MuonRadiativeDecayChannelWithSpin
(
"mu-"
,0.014));
103
G4MuonMinus::MuonMinusDefinition
() -> SetDecayTable(MuonMinusDecayTable);
104
}
105
106
void
G4SpinDecayPhysics::ConstructProcess
()
107
{
108
decayWithSpin
=
new
G4DecayWithSpin
();
109
110
G4ProcessTable
* processTable =
G4ProcessTable::GetProcessTable
();
111
112
G4VProcess
*
decay
;
113
decay = processTable->
FindProcess
(
"Decay"
,
G4MuonPlus::MuonPlus
());
114
115
G4ProcessManager
* fManager;
116
fManager =
G4MuonPlus::MuonPlus
()->
GetProcessManager
();
117
118
if
(fManager) {
119
if
(decay) fManager->
RemoveProcess
(decay);
120
fManager->
AddProcess
(
decayWithSpin
);
121
// set ordering for PostStepDoIt and AtRestDoIt
122
fManager ->
SetProcessOrdering
(
decayWithSpin
,
idxPostStep
);
123
fManager ->
SetProcessOrdering
(
decayWithSpin
,
idxAtRest
);
124
}
125
126
fManager =
G4MuonMinus::MuonMinus
()->
GetProcessManager
();
127
128
if
(fManager) {
129
if
(decay) fManager->
RemoveProcess
(decay);
130
fManager->
AddProcess
(
decayWithSpin
);
131
// set ordering for PostStepDoIt and AtRestDoIt
132
fManager ->
SetProcessOrdering
(
decayWithSpin
,
idxPostStep
);
133
fManager ->
SetProcessOrdering
(
decayWithSpin
,
idxAtRest
);
134
}
135
136
poldecay
=
new
G4PionDecayMakeSpin
();
137
138
decay = processTable->
FindProcess
(
"Decay"
,
G4PionPlus::PionPlus
());
139
140
fManager =
G4PionPlus::PionPlus
()->
GetProcessManager
();
141
142
if
(fManager) {
143
if
(decay) fManager->
RemoveProcess
(decay);
144
fManager->
AddProcess
(
poldecay
);
145
// set ordering for PostStepDoIt and AtRestDoIt
146
fManager ->
SetProcessOrdering
(
poldecay
,
idxPostStep
);
147
fManager ->
SetProcessOrdering
(
poldecay
,
idxAtRest
);
148
}
149
150
decay = processTable->
FindProcess
(
"Decay"
,
G4PionMinus::PionMinus
());
151
152
fManager =
G4PionMinus::PionMinus
()->
GetProcessManager
();
153
154
if
(fManager) {
155
if
(decay) fManager->
RemoveProcess
(decay);
156
fManager->
AddProcess
(
poldecay
);
157
// set ordering for PostStepDoIt and AtRestDoIt
158
fManager ->
SetProcessOrdering
(
poldecay
,
idxPostStep
);
159
fManager ->
SetProcessOrdering
(
poldecay
,
idxAtRest
);
160
}
161
}
geant4
tree
geant4-10.6-release
source
physics_lists
constructors
decay
src
G4SpinDecayPhysics.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:26
using
1.8.2 with
ECCE GitHub integration