Geant4  10.01
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: G4StoppingPhysics.cc 71041 2013-06-10 09:27:06Z gcosmo $
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"
51 #include "G4ParticleDefinition.hh"
52 #include "G4ProcessManager.hh"
53 #include "G4LeptonConstructor.hh"
54 #include "G4MesonConstructor.hh"
55 #include "G4BaryonConstructor.hh"
56 #include "G4MuonMinus.hh"
57 #include "G4PionMinus.hh"
58 
59 // factory
61 //
63 
65 
68  G4VPhysicsConstructor( "stopping" ),
69 //muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
70  verbose( ver ),
71  useMuonMinusCapture( true )
72 {
73  if ( verbose > 1 ) G4cout << "### G4StoppingPhysics" << G4endl;
74 }
75 
76 
79  G4bool UseMuonMinusCapture ) :
80  G4VPhysicsConstructor( name ),
81  // muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
82  verbose( ver ),
83  useMuonMinusCapture( UseMuonMinusCapture )
84 {
85  if ( verbose > 1 ) G4cout << "### G4StoppingPhysics" << G4endl;
86 }
87 
88 
90 
91 
93  // G4cout << "G4StoppingPhysics::ConstructParticle" << G4endl;
94  G4LeptonConstructor pLeptonConstructor;
95  pLeptonConstructor.ConstructParticle();
96 
97  G4MesonConstructor pMesonConstructor;
98  pMesonConstructor.ConstructParticle();
99 
100  G4BaryonConstructor pBaryonConstructor;
101  pBaryonConstructor.ConstructParticle();
102 }
103 
104 
106  if ( verbose > 1 ) G4cout << "### G4StoppingPhysics::ConstructProcess "
107  << wasActivated << G4endl;
108  if ( wasActivated ) return;
109  wasActivated = true;
110 
111  G4MuonMinusCapture* muProcess;
112  G4HadronicAbsorptionBertini* hBertiniProcess;
113  G4HadronicAbsorptionFritiof* hFritiofProcess;
114 
115  if ( useMuonMinusCapture ) {
116  muProcess = new G4MuonMinusCapture();
117  } else {
118  muProcess = 0;
119  }
120 
121  hBertiniProcess = new G4HadronicAbsorptionBertini();
122  hFritiofProcess = new G4HadronicAbsorptionFritiof();
123 
124  G4double mThreshold = 130.0*MeV;
125 
126  // Add Stopping Process
127  G4ParticleDefinition* particle = 0;
128  G4ProcessManager* pmanager = 0;
129 
130  aParticleIterator->reset();
131 
132  while ( (*aParticleIterator)() ) {
133 
134  particle = aParticleIterator->value();
135  pmanager = particle->GetProcessManager();
136 
137  if ( particle == G4MuonMinus::MuonMinus() ) {
138  if ( useMuonMinusCapture ) {
139  pmanager->AddRestProcess( muProcess );
140  if ( verbose > 1 ) {
141  G4cout << "### G4StoppingPhysics added G4MuonMinusCapture for "
142  << particle->GetParticleName() << G4endl;
143  }
144  }
145  }
146 
147  if ( particle->GetPDGCharge() < 0.0 &&
148  particle->GetPDGMass() > mThreshold &&
149  ! particle->IsShortLived() ) {
150 
151  // Use Fritiof/Precompound for: anti-protons, anti-sigma+, and
152  // anti-nuclei.
153  if ( particle == G4AntiProton::AntiProton() ||
154  particle == G4AntiSigmaPlus::AntiSigmaPlus() ||
155  particle->GetBaryonNumber() < -1 ) { // Anti-nuclei
156  if ( hFritiofProcess->IsApplicable( *particle ) ) {
157  pmanager->AddRestProcess( hFritiofProcess );
158  if ( verbose > 1 ) {
159  G4cout << "### G4HadronicAbsorptionFritiof added for "
160  << particle->GetParticleName() << G4endl;
161  }
162  }
163 
164  // Use Bertini/Precompound for pi-, K-, Sigma-, Xi-, and Omega-
165  } else if ( particle == G4PionMinus::PionMinus() ||
166  particle == G4KaonMinus::KaonMinus() ||
167  particle == G4SigmaMinus::SigmaMinus() ||
168  particle == G4XiMinus::XiMinus() ||
169  particle == G4OmegaMinus::OmegaMinus() ) {
170  if ( hBertiniProcess->IsApplicable( *particle ) ) {
171  pmanager->AddRestProcess( hBertiniProcess );
172  if ( verbose > 1 ) {
173  G4cout << "### G4HadronicAbsorptionBertini added for "
174  << particle->GetParticleName() << G4endl;
175  }
176  }
177 
178  } else {
179  if ( verbose > 1 ) {
180  G4cout << "WARNING in G4StoppingPhysics::ConstructProcess: \
181  not able to deal with nuclear stopping of "
182  << particle->GetParticleName() << G4endl;
183  }
184  }
185  }
186 
187  } // end of while loop
188 }
static G4ThreadLocal G4bool wasActivated
static const double MeV
Definition: G4SIunits.hh:193
virtual void ConstructProcess()
G4bool IsApplicable(const G4ParticleDefinition &)
G4String name
Definition: TRTMaterials.hh:40
static G4OmegaMinus * OmegaMinus()
virtual void ConstructParticle()
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:84
static G4AntiSigmaPlus * AntiSigmaPlus()
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
G4GLOB_DLL std::ostream G4cout
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
bool G4bool
Definition: G4Types.hh:79
#define aParticleIterator
static G4XiMinus * XiMinus()
Definition: G4XiMinus.cc:106
static void ConstructParticle()
static G4SigmaMinus * SigmaMinus()
G4double GetPDGMass() const
virtual ~G4StoppingPhysics()
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
#define G4endl
Definition: G4ios.hh:61
G4int AddRestProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4bool IsApplicable(const G4ParticleDefinition &)
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
G4_DECLARE_PHYSCONSTR_FACTORY(G4StoppingPhysics)
G4StoppingPhysics(G4int ver=1)