ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4StoppingPhysicsFritiofWithBinaryCascade.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4StoppingPhysicsFritiofWithBinaryCascade.cc
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 // ClassName: G4StoppingPhysicsFritiofWithBinaryCascade
29 //
30 // Author: Alberto Ribon
31 //
32 // Date: July 2019
33 //
34 // Modified:
35 //
36 //----------------------------------------------------------------------------
37 
39 #include "G4SystemOfUnits.hh"
43 #include "G4MuonMinusCapture.hh"
44 #include "G4ParticleDefinition.hh"
45 #include "G4ProcessManager.hh"
46 #include "G4LeptonConstructor.hh"
47 #include "G4MesonConstructor.hh"
48 #include "G4BaryonConstructor.hh"
49 #include "G4MuonMinus.hh"
50 #include "G4PionMinus.hh"
51 
52 // factory
54 //
56 
58 
59 
62  G4VPhysicsConstructor( "stopping" ), verbose( ver ), useMuonMinusCapture( true ) {
63  if ( verbose > 1 ) G4cout << "### G4StoppingPhysicsFritiofWithBinaryCascade" << G4endl;
64 }
65 
66 
69  G4bool UseMuonMinusCapture ) :
70  G4VPhysicsConstructor( name ), verbose( ver ), useMuonMinusCapture( UseMuonMinusCapture ) {
71  if ( verbose > 1 ) G4cout << "### G4StoppingPhysicsFritiofWithBinaryCascade" << G4endl;
72 }
73 
74 
76 
77 
79  // G4cout << "G4StoppingPhysicsFritiofWithBinaryCascade::ConstructParticle" << G4endl;
80  G4LeptonConstructor pLeptonConstructor;
81  pLeptonConstructor.ConstructParticle();
82 
83  G4MesonConstructor pMesonConstructor;
84  pMesonConstructor.ConstructParticle();
85 
86  G4BaryonConstructor pBaryonConstructor;
87  pBaryonConstructor.ConstructParticle();
88 }
89 
90 
92  if ( verbose > 1 ) G4cout << "### G4StoppingPhysicsFritiofWithBinaryCascade::ConstructProcess "
93  << wasActivated << G4endl;
94  if ( wasActivated ) return;
95  wasActivated = true;
96 
97  G4MuonMinusCapture* muProcess = 0;
98  if ( useMuonMinusCapture ) {
99  muProcess = new G4MuonMinusCapture();
100  }
101 
104  G4HadronicAbsorptionFritiofWithBinaryCascade* hFritiofWithBinaryCascadeProcess =
106 
107  G4double mThreshold = 130.0*MeV;
108 
109  // Add Stopping Process
111  G4ProcessManager* pmanager = 0;
112 
113  auto myParticleIterator=GetParticleIterator();
114  myParticleIterator->reset();
115 
116  while ( (*myParticleIterator)() ) {
117 
118  particle = myParticleIterator->value();
119  pmanager = particle->GetProcessManager();
120 
121  if ( particle == G4MuonMinus::MuonMinus() ) {
122  if ( useMuonMinusCapture ) {
123  pmanager->AddRestProcess( muProcess );
124  if ( verbose > 1 ) {
125  G4cout << "### G4MuonMinusCapture added for " << particle->GetParticleName() << G4endl;
126  }
127  }
128  }
129 
130  if ( particle->GetPDGCharge() <= 0.0 &&
131  particle->GetPDGMass() > mThreshold &&
132  ( ! particle->IsShortLived() ) ) {
133 
134  // Use Fritiof/BinaryCascade for: anti-proton and anti-neutron
135  if ( particle == G4AntiProton::Definition() || particle == G4AntiNeutron::Definition() ) {
136  if ( hFritiofWithBinaryCascadeProcess->IsApplicable( *particle ) ) {
137  pmanager->AddRestProcess( hFritiofWithBinaryCascadeProcess );
138  if ( verbose > 1 ) {
139  G4cout << "### G4HadronicAbsorptionFritiofWithBinaryCascade added for "
140  << particle->GetParticleName() << G4endl;
141  }
142  }
143 
144  // Use Fritiof/Precompound for: anti-lambda, anti-sigma0, anti-sigma+, anti-xi0 and anti-nuclei
145  } else if ( particle == G4AntiLambda::Definition() ||
146  particle == G4AntiSigmaZero::Definition() ||
147  particle == G4AntiSigmaPlus::Definition() ||
148  particle == G4AntiXiZero::Definition() ||
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 for pi-, K-, Sigma-, Xi-, and Omega-
159  } else if ( particle == G4PionMinus::Definition() ||
160  particle == G4KaonMinus::Definition() ||
161  particle == G4SigmaMinus::Definition() ||
162  particle == G4XiMinus::Definition() ||
163  particle == G4OmegaMinus::Definition() ) {
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 G4StoppingPhysicsFritiofWithBinaryCascade::ConstructProcess: \
175  not able to deal with nuclear stopping of "
176  << particle->GetParticleName() << G4endl;
177  }
178  }
179  }
180 
181  } // end of while loop
182 }