Geant4  10.01.p01
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 //
26 // $Id: F05PhysicsList.cc 75672 2013-11-05 08:47:41Z gcosmo $
27 //
30 //
31 //
32 #include "F05PhysicsList.hh"
33 
34 #include "F05ExtraPhysics.hh"
35 
36 #include "G4ProcessManager.hh"
37 #include "G4ParticleTypes.hh"
38 #include "G4ParticleTable.hh"
39 
40 #include "G4DecayPhysics.hh"
41 #include "G4ProcessTable.hh"
42 
43 #include "G4PionDecayMakeSpin.hh"
44 #include "G4DecayWithSpin.hh"
45 
46 #include "G4DecayTable.hh"
49 
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51 
53 {
56 }
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59 
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 {
67 
69 
70  G4DecayTable* MuonPlusDecayTable = new G4DecayTable();
71  MuonPlusDecayTable -> Insert(new
72  G4MuonDecayChannelWithSpin("mu+",0.986));
73  MuonPlusDecayTable -> Insert(new
75  G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable);
76 
77  G4DecayTable* MuonMinusDecayTable = new G4DecayTable();
78  MuonMinusDecayTable -> Insert(new
79  G4MuonDecayChannelWithSpin("mu-",0.986));
80  MuonMinusDecayTable -> Insert(new
82  G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(MuonMinusDecayTable);
83 }
84 
85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86 
88 {
90 
91  G4DecayWithSpin* decayWithSpin = new G4DecayWithSpin();
92 
94 
96  decay = processTable->FindProcess("Decay",G4MuonPlus::MuonPlus());
97 
98  G4ProcessManager* fManager;
100 
101  if (fManager) {
102  if (decay) fManager->RemoveProcess(decay);
103  fManager->AddProcess(decayWithSpin);
104  // set ordering for PostStepDoIt and AtRestDoIt
105  fManager ->SetProcessOrdering(decayWithSpin, idxPostStep);
106  fManager ->SetProcessOrdering(decayWithSpin, idxAtRest);
107  }
108 
109  decay = processTable->FindProcess("Decay",G4MuonMinus::MuonMinus());
110 
112 
113  if (fManager) {
114  if (decay) fManager->RemoveProcess(decay);
115  fManager->AddProcess(decayWithSpin);
116  // set ordering for PostStepDoIt and AtRestDoIt
117  fManager ->SetProcessOrdering(decayWithSpin, idxPostStep);
118  fManager ->SetProcessOrdering(decayWithSpin, idxAtRest);
119  }
120 
121  G4PionDecayMakeSpin* poldecay = new G4PionDecayMakeSpin();
122 
123  decay = processTable->FindProcess("Decay",G4PionPlus::PionPlus());
124 
125  fManager = G4PionPlus::PionPlus()->GetProcessManager();
126 
127  if (fManager) {
128  if (decay) fManager->RemoveProcess(decay);
129  fManager->AddProcess(poldecay);
130  // set ordering for PostStepDoIt and AtRestDoIt
131  fManager ->SetProcessOrdering(poldecay, idxPostStep);
132  fManager ->SetProcessOrdering(poldecay, idxAtRest);
133  }
134 
135  decay = processTable->FindProcess("Decay",G4PionMinus::PionMinus());
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 }
148 
149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150 
152 {
154 }
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:88
static G4MuonPlus * MuonPlus()
Definition: G4MuonPlus.cc:99
void RegisterPhysics(G4VPhysicsConstructor *)
static G4MuonPlus * MuonPlusDefinition()
Definition: G4MuonPlus.cc:94
Definition of the F05PhysicsList class.
virtual void ConstructParticle()
G4ProcessManager * GetProcessManager() const
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
void Insert(const PVNodeID *pvPath, size_t pathLength, G4int index, Node *node)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
virtual ~F05PhysicsList()
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
virtual void ConstructProcess()
static G4MuonMinus * MuonMinusDefinition()
Definition: G4MuonMinus.cc:95
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
Definition of the F05ExtraPhysics class.
G4VProcess * RemoveProcess(G4VProcess *aProcess)
static G4ProcessTable * GetProcessTable()
G4VProcess * FindProcess(const G4String &processName, const G4String &particleName) const