Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4SpinDecayPhysics.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//
27//---------------------------------------------------------------------------
28//
29// ClassName: G4SpinDecayPhysics
30//
31// Author: 2015 P. Gumplinger
32//
33// Modified:
34//
35//----------------------------------------------------------------------------
36//
37#include "G4SpinDecayPhysics.hh"
38
40#include "G4ProcessManager.hh"
41
42#include "G4ParticleTypes.hh"
43#include "G4ParticleTable.hh"
44
45#include "G4ProcessTable.hh"
46
47#include "G4DecayTable.hh"
50
51// factory
53//
55
57 : G4VPhysicsConstructor("SpinDecay")
58{
59}
60
63{
64}
65
67{
68}
69
71{
75
80
83
86
88
89 G4DecayTable* MuonPlusDecayTable = new G4DecayTable();
90 MuonPlusDecayTable -> Insert(new
91 G4MuonDecayChannelWithSpin("mu+",0.986));
92 MuonPlusDecayTable -> Insert(new
94 G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable);
95
96 G4DecayTable* MuonMinusDecayTable = new G4DecayTable();
97 MuonMinusDecayTable -> Insert(new
98 G4MuonDecayChannelWithSpin("mu-",0.986));
99 MuonMinusDecayTable -> Insert(new
101 G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(MuonMinusDecayTable);
102}
103
105{
106 G4DecayWithSpin* decayWithSpin = new G4DecayWithSpin();
107
109
110 G4VProcess* decay;
111 decay = processTable->FindProcess("Decay",G4MuonPlus::MuonPlus());
112
114
115 if (fManager) {
116 if (decay) fManager->RemoveProcess(decay);
117 fManager->AddProcess(decayWithSpin);
118 // set ordering for PostStepDoIt and AtRestDoIt
119 fManager ->SetProcessOrdering(decayWithSpin, idxPostStep);
120 fManager ->SetProcessOrdering(decayWithSpin, idxAtRest);
121 }
122
124
125 if (fManager) {
126 if (decay) fManager->RemoveProcess(decay);
127 fManager->AddProcess(decayWithSpin);
128 // set ordering for PostStepDoIt and AtRestDoIt
129 fManager ->SetProcessOrdering(decayWithSpin, idxPostStep);
130 fManager ->SetProcessOrdering(decayWithSpin, idxAtRest);
131 }
132
134
135 decay = processTable->FindProcess("Decay",G4PionPlus::PionPlus());
136
138
139 if (fManager) {
140 if (decay) fManager->RemoveProcess(decay);
141 fManager->AddProcess(poldecay);
142 // set ordering for PostStepDoIt and AtRestDoIt
143 fManager ->SetProcessOrdering(poldecay, idxPostStep);
144 fManager ->SetProcessOrdering(poldecay, idxAtRest);
145 }
146
147 decay = processTable->FindProcess("Decay",G4PionMinus::PionMinus());
148
150
151 if (fManager) {
152 if (decay) fManager->RemoveProcess(decay);
153 fManager->AddProcess(poldecay);
154 // set ordering for PostStepDoIt and AtRestDoIt
155 fManager ->SetProcessOrdering(poldecay, idxPostStep);
156 fManager ->SetProcessOrdering(poldecay, idxAtRest);
157 }
158}
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
@ idxPostStep
@ idxAtRest
int G4int
Definition: G4Types.hh:85
static G4AntiNeutrinoE * AntiNeutrinoEDefinition()
static G4AntiNeutrinoMu * AntiNeutrinoMuDefinition()
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:88
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:80
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:87
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:99
static G4MuonMinus * MuonMinusDefinition()
Definition: G4MuonMinus.cc:94
static G4MuonPlus * MuonPlusDefinition()
Definition: G4MuonPlus.cc:93
static G4MuonPlus * MuonPlus()
Definition: G4MuonPlus.cc:98
static G4NeutrinoE * NeutrinoEDefinition()
Definition: G4NeutrinoE.cc:79
static G4NeutrinoMu * NeutrinoMuDefinition()
Definition: G4NeutrinoMu.cc:79
G4ProcessManager * GetProcessManager() const
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:88
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
G4VProcess * RemoveProcess(G4VProcess *aProcess)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
static G4ProcessTable * GetProcessTable()
G4VProcess * FindProcess(const G4String &processName, const G4String &particleName) const
~G4SpinDecayPhysics() override
void ConstructParticle() override
G4SpinDecayPhysics(G4int ver=1)
void ConstructProcess() override