Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4StoppingPhysics.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$
27//
28//---------------------------------------------------------------------------
29//
30// ClassName: G4StoppingPhysics
31//
32// Author: Alberto Ribon
33//
34// Date: 27 July 2012
35//
36// Modified:
37// 20120921 M. Kelsey -- Move MuonMinusCapture.hh here; replace G4MMCAtRest
38// with new G4MuonMinusCapture.
39// 16-Oct-2012 A. Ribon: renamed G4BertiniAndFritiofStoppingPhysics as
40// G4StoppingPhysics.
41// 17-Oct-2012 A. Ribon: added nuclear capture at rest of anti-nuclei with
42// Fritof/Precompound.
43//
44//----------------------------------------------------------------------------
45
46#include "G4StoppingPhysics.hh"
47#include "G4SystemOfUnits.hh"
50#include "G4MuonMinusCapture.hh"
52#include "G4ProcessManager.hh"
54#include "G4MesonConstructor.hh"
56#include "G4MuonMinus.hh"
57#include "G4PionMinus.hh"
58
59// factory
61//
63
66 G4VPhysicsConstructor( "stopping" ),
67 muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
68 verbose( ver ), wasActivated( false ) ,
69 useMuonMinusCapture( true )
70{
71 if ( verbose > 1 ) G4cout << "### G4StoppingPhysics" << G4endl;
72}
73
74
76G4StoppingPhysics( const G4String& name, G4int ver,
77 G4bool UseMuonMinusCapture ) :
79 muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
80 verbose( ver ), wasActivated( false ) ,
81 useMuonMinusCapture( UseMuonMinusCapture )
82{
83 if ( verbose > 1 ) G4cout << "### G4StoppingPhysics" << G4endl;
84}
85
86
88
89
91 // G4cout << "G4StoppingPhysics::ConstructParticle" << G4endl;
92 G4LeptonConstructor pLeptonConstructor;
93 pLeptonConstructor.ConstructParticle();
94
95 G4MesonConstructor pMesonConstructor;
96 pMesonConstructor.ConstructParticle();
97
98 G4BaryonConstructor pBaryonConstructor;
99 pBaryonConstructor.ConstructParticle();
100}
101
102
104 if ( verbose > 1 ) G4cout << "### G4StoppingPhysics::ConstructProcess "
105 << wasActivated << G4endl;
106 if ( wasActivated ) return;
107 wasActivated = true;
108
109 if ( useMuonMinusCapture ) {
110 muProcess = new G4MuonMinusCapture();
111 } else {
112 muProcess = 0;
113 }
114
115 hBertiniProcess = new G4HadronicAbsorptionBertini();
116 hFritiofProcess = new G4HadronicAbsorptionFritiof();
117
118 G4double mThreshold = 130.0*MeV;
119
120 // Add Stopping Process
121 G4ParticleDefinition* particle = 0;
122 G4ProcessManager* pmanager = 0;
123
125
126 while ( (*theParticleIterator)() ) {
127
128 particle = theParticleIterator->value();
129 pmanager = particle->GetProcessManager();
130
131 if ( particle == G4MuonMinus::MuonMinus() ) {
132 if ( useMuonMinusCapture ) {
133 pmanager->AddRestProcess( muProcess );
134 if ( verbose > 1 ) {
135 G4cout << "### G4StoppingPhysics added G4MuonMinusCapture for "
136 << particle->GetParticleName() << G4endl;
137 }
138 }
139 }
140
141 if ( particle->GetPDGCharge() < 0.0 &&
142 particle->GetPDGMass() > mThreshold &&
143 ! particle->IsShortLived() ) {
144
145 // Use Fritiof/Precompound for: anti-protons, anti-sigma+, and
146 // anti-nuclei.
147 if ( particle == G4AntiProton::AntiProton() ||
148 particle == G4AntiSigmaPlus::AntiSigmaPlus() ||
149 particle->GetBaryonNumber() < -1 ) { // Anti-nuclei
150 if ( hFritiofProcess->IsApplicable( *particle ) ) {
151 pmanager->AddRestProcess( hFritiofProcess );
152 if ( verbose > 1 ) {
153 G4cout << "### G4HadronicAbsorptionFritiof added for "
154 << particle->GetParticleName() << G4endl;
155 }
156 }
157
158 // Use Bertini/Precompound for pi-, K-, Sigma-, Xi-, and Omega-
159 } else if ( particle == G4PionMinus::PionMinus() ||
160 particle == G4KaonMinus::KaonMinus() ||
161 particle == G4SigmaMinus::SigmaMinus() ||
162 particle == G4XiMinus::XiMinus() ||
163 particle == G4OmegaMinus::OmegaMinus() ) {
164 if ( hBertiniProcess->IsApplicable( *particle ) ) {
165 pmanager->AddRestProcess( hBertiniProcess );
166 if ( verbose > 1 ) {
167 G4cout << "### G4HadronicAbsorptionBertini added for "
168 << particle->GetParticleName() << G4endl;
169 }
170 }
171
172 } else {
173 if ( verbose > 1 ) {
174 G4cout << "WARNING in G4StoppingPhysics::ConstructProcess: \
175 not able to deal with nuclear stopping of "
176 << particle->GetParticleName() << G4endl;
177 }
178 }
179 }
180
181 } // end of while loop
182}
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
static G4AntiSigmaPlus * AntiSigmaPlus()
static void ConstructParticle()
G4bool IsApplicable(const G4ParticleDefinition &)
G4bool IsApplicable(const G4ParticleDefinition &)
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static void ConstructParticle()
static void ConstructParticle()
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
static G4OmegaMinus * OmegaMinus()
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
G4int AddRestProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4SigmaMinus * SigmaMinus()
virtual void ConstructProcess()
G4StoppingPhysics(G4int ver=1)
virtual void ConstructParticle()
virtual ~G4StoppingPhysics()
G4ParticleTable::G4PTblDicIterator * theParticleIterator
static G4XiMinus * XiMinus()
Definition: G4XiMinus.cc:106