Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4IonPhysicsPHP.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 // Header: G4IonPhysicsPHP
31 //
32 // Author: A.Ribon 24-May-2016
33 //
34 // Modified:
35 //
36 //---------------------------------------------------------------------------
37 //
38 
39 #include "G4IonPhysicsPHP.hh"
40 #include "G4SystemOfUnits.hh"
41 #include "G4ParticleDefinition.hh"
42 #include "G4ProcessManager.hh"
43 #include "G4Deuteron.hh"
44 #include "G4Triton.hh"
45 #include "G4He3.hh"
46 #include "G4Alpha.hh"
47 #include "G4GenericIon.hh"
48 #include "G4IonConstructor.hh"
49 
54 
55 #include "G4PreCompoundModel.hh"
56 #include "G4ExcitationHandler.hh"
57 #include "G4FTFBuilder.hh"
58 #include "G4HadronicInteraction.hh"
59 #include "G4BuilderType.hh"
61 
62 #include "G4ParticleHPInelastic.hh"
64 
65 using namespace std;
66 
67 // factory
69 
71 
72 G4ThreadLocal G4VCrossSectionDataSet* G4IonPhysicsPHP::theNuclNuclData = 0;
73 G4ThreadLocal G4VComponentCrossSection* G4IonPhysicsPHP::theGGNuclNuclXS = 0;
74 G4ThreadLocal G4ParticleHPInelasticData* G4IonPhysicsPHP::theDeuteronHPInelasticData = 0;
75 G4ThreadLocal G4ParticleHPInelasticData* G4IonPhysicsPHP::theTritonHPInelasticData = 0;
76 G4ThreadLocal G4ParticleHPInelasticData* G4IonPhysicsPHP::theHe3HPInelasticData = 0;
77 G4ThreadLocal G4ParticleHPInelasticData* G4IonPhysicsPHP::theAlphaHPInelasticData = 0;
78 G4ThreadLocal G4BinaryLightIonReaction* G4IonPhysicsPHP::theIonBC1 = 0;
79 G4ThreadLocal G4BinaryLightIonReaction* G4IonPhysicsPHP::theIonBC2 = 0;
80 G4ThreadLocal G4HadronicInteraction* G4IonPhysicsPHP::theFTFP = 0;
81 G4ThreadLocal G4FTFBuilder* G4IonPhysicsPHP::theBuilder = 0;
82 G4ThreadLocal G4HadronicInteraction* G4IonPhysicsPHP::modelDeuteronPHP = 0;
83 G4ThreadLocal G4HadronicInteraction* G4IonPhysicsPHP::modelTritonPHP = 0;
84 G4ThreadLocal G4HadronicInteraction* G4IonPhysicsPHP::modelHe3PHP = 0;
85 G4ThreadLocal G4HadronicInteraction* G4IonPhysicsPHP::modelAlphaPHP = 0;
86 G4ThreadLocal G4bool G4IonPhysicsPHP::wasActivated = false;
87 
88 
90  : G4VPhysicsConstructor( "ionInelasticFTFP_BIC" ), verbose( ver ) {
92  if ( verbose > 1 ) G4cout << "### G4IonPhysicsPHP" << G4endl;
93 }
94 
95 
97  : G4VPhysicsConstructor( nname ), verbose( 1 ) {
99  if ( verbose > 1 ) G4cout << "### G4IonPhysicsPHP" << G4endl;
100 }
101 
102 
104  //Explictly setting pointers to zero is actually needed.
105  //These are static variables, in case we restart threads we need to re-create objects
106  delete modelAlphaPHP; modelAlphaPHP = 0;
107  delete modelHe3PHP; modelHe3PHP = 0;
108  delete modelTritonPHP; modelTritonPHP = 0;
109  delete modelDeuteronPHP; modelDeuteronPHP = 0;
110  delete theBuilder; theBuilder = 0;
111  delete theFTFP; theFTFP = 0;
112  delete theIonBC2; theIonBC2 = 0;
113  delete theIonBC1; theIonBC1 = 0;
114  delete theAlphaHPInelasticData; theAlphaHPInelasticData = 0;
115  delete theHe3HPInelasticData; theHe3HPInelasticData = 0;
116  delete theTritonHPInelasticData; theTritonHPInelasticData = 0;
117  delete theDeuteronHPInelasticData; theDeuteronHPInelasticData = 0;
118  delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
119  delete theNuclNuclData; theNuclNuclData = 0;
120 }
121 
122 
124  // Construct ions
125  G4IonConstructor pConstructor;
126  pConstructor.ConstructParticle();
127 }
128 
129 
131  if ( wasActivated ) return;
132  wasActivated = true;
133 
134  const G4double maxPHP = 200.0*MeV;
135  const G4double overlapPHP_BIC = 10.0*MeV;
136  const G4double maxBIC = 4.0*GeV;
137  const G4double minFTF = 2.0* GeV;
138  const G4double maxFTF = 100.0*TeV;
139 
142  G4PreCompoundModel* thePreCompound = static_cast< G4PreCompoundModel* >(p);
143  if ( ! thePreCompound ) thePreCompound = new G4PreCompoundModel;
144 
145  // Binary Cascade
146  theIonBC1 = new G4BinaryLightIonReaction( thePreCompound );
147  theIonBC1->SetMinEnergy( 0.0 ); // Used for generic ions
148  theIonBC1->SetMaxEnergy( maxBIC );
149 
150  theIonBC2 = new G4BinaryLightIonReaction( thePreCompound );
151  theIonBC2->SetMinEnergy( maxPHP - overlapPHP_BIC ); // Used for d, t, He3, alpha
152  theIonBC2->SetMaxEnergy( maxBIC );
153 
154  // FTFP
155  theBuilder = new G4FTFBuilder( "FTFP", thePreCompound );
156  theFTFP = theBuilder->GetModel();
157  theFTFP->SetMinEnergy( minFTF );
158  theFTFP->SetMaxEnergy( maxFTF );
159 
160  theNuclNuclData =
161  new G4CrossSectionInelastic( theGGNuclNuclXS = new G4ComponentGGNuclNuclXsc() );
162 
163  // ParticleHP : deuteron
164  modelDeuteronPHP = new G4ParticleHPInelastic( G4Deuteron::Deuteron(), "ParticleHPInelastic" );
165  modelDeuteronPHP->SetMinEnergy( 0.0 );
166  modelDeuteronPHP->SetMaxEnergy( maxPHP );
167  theDeuteronHPInelasticData = new G4ParticleHPInelasticData( G4Deuteron::Deuteron() );
168  theDeuteronHPInelasticData->SetMinKinEnergy( 0.0 );
169  theDeuteronHPInelasticData->SetMaxKinEnergy( maxPHP );
170 
171  // ParticleHP : triton
172  modelTritonPHP = new G4ParticleHPInelastic( G4Triton::Triton(), "ParticleHPInelastic" );
173  modelTritonPHP->SetMinEnergy( 0.0 );
174  modelTritonPHP->SetMaxEnergy( maxPHP );
175  theTritonHPInelasticData = new G4ParticleHPInelasticData( G4Triton::Triton() );
176  theTritonHPInelasticData->SetMinKinEnergy( 0.0 );
177  theTritonHPInelasticData->SetMaxKinEnergy( maxPHP );
178 
179  // ParticleHP : 3He
180  modelHe3PHP = new G4ParticleHPInelastic( G4He3::He3(), "ParticleHPInelastic" );
181  modelHe3PHP->SetMinEnergy( 0.0 );
182  modelHe3PHP->SetMaxEnergy( maxPHP );
183  theHe3HPInelasticData = new G4ParticleHPInelasticData( G4He3::He3() );
184  theHe3HPInelasticData->SetMinKinEnergy( 0.0 );
185  theHe3HPInelasticData->SetMaxKinEnergy( maxPHP );
186 
187  // ParticleHP : alpha
188  modelAlphaPHP = new G4ParticleHPInelastic( G4Alpha::Alpha(), "ParticleHPInelastic" );
189  modelAlphaPHP->SetMinEnergy( 0.0 );
190  modelAlphaPHP->SetMaxEnergy( maxPHP );
191  theAlphaHPInelasticData = new G4ParticleHPInelasticData( G4Alpha::Alpha() );
192  theAlphaHPInelasticData->SetMinKinEnergy( 0.0 );
193  theAlphaHPInelasticData->SetMaxKinEnergy( maxPHP );
194 
195  AddProcess( "dInelastic", G4Deuteron::Deuteron(), theDeuteronHPInelasticData, modelDeuteronPHP, theIonBC2, theFTFP );
196  AddProcess( "tInelastic", G4Triton::Triton(), theTritonHPInelasticData, modelTritonPHP, theIonBC2, theFTFP );
197  AddProcess( "He3Inelastic", G4He3::He3(), theHe3HPInelasticData, modelHe3PHP, theIonBC2, theFTFP );
198  AddProcess( "alphaInelastic", G4Alpha::Alpha(), theAlphaHPInelasticData, modelAlphaPHP, theIonBC2, theFTFP );
199  AddProcess( "ionInelastic", G4GenericIon::GenericIon(), 0, 0, theIonBC1, theFTFP );
200 
201  if ( verbose > 1 ) G4cout << "G4IonPhysicsPHP::ConstructProcess done! " << G4endl;
202 }
203 
204 
205 void G4IonPhysicsPHP::AddProcess( const G4String& name, G4ParticleDefinition* part,
208  G4HadronicInteraction* aFTFP ) {
209  G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess( name, part );
210  G4ProcessManager* pManager = part->GetProcessManager();
211  pManager->AddDiscreteProcess( hadi );
212  hadi->AddDataSet( theNuclNuclData );
213  if ( aPHP ) {
214  hadi->RegisterMe( aPHP );
215  if ( xsecPHP ) {
216  hadi->AddDataSet( xsecPHP );
217  }
218  }
219  hadi->RegisterMe( aBIC );
220  hadi->RegisterMe( aFTFP );
221 }
222 
const XML_Char * name
Definition: expat.h:151
G4IonPhysicsPHP(G4int ver=0)
const char * p
Definition: xmltok.h:285
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
G4HadronicInteraction * GetModel()
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static constexpr double TeV
Definition: G4SIunits.hh:218
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
virtual ~G4IonPhysicsPHP()
void SetMinKinEnergy(G4double value)
bool G4bool
Definition: G4Types.hh:79
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
G4HadronicInteraction * FindModel(const G4String &name)
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
void SetMaxKinEnergy(G4double value)
G4ProcessManager * GetProcessManager() const
static G4HadronicInteractionRegistry * Instance()
static constexpr double GeV
Definition: G4SIunits.hh:217
void SetMaxEnergy(const G4double anEnergy)
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
double G4double
Definition: G4Types.hh:76
static G4He3 * He3()
Definition: G4He3.cc:94
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)