Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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"
50 
52 {
55 }
56 
58 {;}
59 
61 {
63 
64  G4DecayTable* MuonPlusDecayTable = new G4DecayTable();
65  MuonPlusDecayTable -> Insert(new
66  G4MuonDecayChannelWithSpin("mu+",0.986));
67  MuonPlusDecayTable -> Insert(new
69  G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable);
70 
71  G4DecayTable* MuonMinusDecayTable = new G4DecayTable();
72  MuonMinusDecayTable -> Insert(new
73  G4MuonDecayChannelWithSpin("mu-",0.986));
74  MuonMinusDecayTable -> Insert(new
76  G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(MuonMinusDecayTable);
77 }
78 
80 {
82 
83  G4DecayWithSpin* decayWithSpin = new G4DecayWithSpin();
84 
86 
87  G4VProcess* decay;
88  decay = processTable->FindProcess("Decay",G4MuonPlus::MuonPlus());
89 
90  G4ProcessManager* fManager;
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 
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 
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 
142 {
144 }