Geant4  10.02
G4IonQMDPhysics.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: G4IonQMDPhysics.cc 80671 2014-05-06 13:59:16Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4IonQMDPhysics
31 // Created from G4IonBinaryCascadePhysics
32 //
33 // Author: G.Folger
34 //
35 // Modified:
36 //
37 //----------------------------------------------------------------------------
38 //
39 
40 #include "G4IonQMDPhysics.hh"
41 
42 #include "G4SystemOfUnits.hh"
43 
44 #include "G4Deuteron.hh"
45 #include "G4Triton.hh"
46 #include "G4He3.hh"
47 #include "G4Alpha.hh"
48 #include "G4GenericIon.hh"
49 #include "G4IonConstructor.hh"
50 
53 #include "G4QMDReaction.hh"
54 
55 #include "G4PreCompoundModel.hh"
56 #include "G4ExcitationHandler.hh"
57 #include "G4FTFBuilder.hh"
58 #include "G4HadronicInteraction.hh"
59 #include "G4BuilderType.hh"
60 
63 
64 #include "G4ParticleDefinition.hh"
65 #include "G4ParticleTable.hh"
66 #include "G4ProcessManager.hh"
67 
68 // Nuclei
69 #include "G4IonConstructor.hh"
70 #include "G4BuilderType.hh"
72 
73 // factory
75 //
77 
78 G4ThreadLocal std::vector<G4HadronInelasticProcess*>* G4IonQMDPhysics::p_list = 0;
79 G4ThreadLocal std::vector<G4HadronicInteraction*>* G4IonQMDPhysics::model_list = 0;
80 
83 
89 
91  : G4VPhysicsConstructor("IonQMD"), verbose(ver)
92 {
93  eminBIC = 0.*MeV;
94  eminQMD = 100.*MeV;
95  emaxQMD = 10.*GeV;
96  emaxFTFP = 1.*TeV;
97  overlap = 10*MeV;
99  if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
100 }
101 
103  G4int ver)
104  : G4VPhysicsConstructor(name), verbose(ver)
105 {
106  eminBIC = 0.*MeV;
107  eminQMD = 100.*MeV;
108  emaxQMD = 10.*GeV;
109  emaxFTFP = 1.*TeV;
110  overlap = 10*MeV;
112  if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
113 }
114 
116 {
117  if(wasActivated) {
118  delete theBuilder; theBuilder = 0;
119  delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
120  delete theNuclNuclData; theNuclNuclData = 0;
121  G4int i;
122  if ( p_list ) {
123  G4int n = p_list->size();
124  for(i=0; i<n; i++) {delete (*p_list)[i];}
125  delete p_list; p_list = 0;
126  }
127  if ( model_list ) {
128  G4int n = model_list->size();
129  for(i=0; i<n; i++) {delete (*model_list)[i];}
130  delete model_list; model_list = 0;
131  }
132  }
133 }
134 
136 {
137  if(wasActivated) return;
138  wasActivated = true;
139 
142  G4PreCompoundModel* thePreCompound = static_cast<G4PreCompoundModel*>(p);
143  if(!thePreCompound) { thePreCompound = new G4PreCompoundModel; }
144 
145  theIonBC = new G4BinaryLightIonReaction(thePreCompound);
146  if ( model_list == 0 ) model_list = new std::vector<G4HadronicInteraction*>;
147  model_list->push_back(theIonBC);
148 
149  theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
151  model_list->push_back(theFTFP);
152 
153  theQMD= new G4QMDReaction();
154  model_list->push_back(theQMD);
155 
157 
159  AddProcess("tInelastic", G4Triton::Triton(), theIonBC, theQMD, theFTFP);
160  AddProcess("He3Inelastic", G4He3::He3(), theIonBC, theQMD, theFTFP);
161  AddProcess("alphaInelastic", G4Alpha::Alpha(), theIonBC, theQMD, theFTFP);
163 
164 }
165 
169  G4QMDReaction* QMD,
170  G4HadronicInteraction* FTFP)
171 {
173  if ( p_list == 0 ) p_list = new std::vector<G4HadronInelasticProcess*>;
174  p_list->push_back(hadi);
175  G4ProcessManager* pManager = p->GetProcessManager();
176  pManager->AddDiscreteProcess(hadi);
177 
179 
180  BIC->SetMinEnergy(eminBIC);
181  BIC->SetMaxEnergy(emaxQMD); //reset when QMD is present
182  hadi->RegisterMe(BIC);
183 
184  if(QMD) {
185  QMD->SetMinEnergy(eminQMD);
187  QMD->SetMaxEnergy(emaxQMD);
188  hadi->RegisterMe(QMD);
189  }
190 
191  if(FTFP) {
192  FTFP->SetMinEnergy(emaxQMD - overlap);
193  FTFP->SetMaxEnergy(emaxFTFP);
194  hadi->RegisterMe(FTFP);
195  }
196 
197  if(verbose > 1) {
198  G4cout << "Register " << hadi->GetProcessName()
199  << " for " << p->GetParticleName() << G4endl
200  << " Binary Cascade for E(MeV)= " << eminBIC << " - "
201  << (QMD==0 ? emaxQMD : (eminQMD-overlap)) ;
202  if(QMD) {
203  G4cout << G4endl <<" QMD for E(MeV)= " << eminQMD << " - " << emaxQMD;
204  }
205  if(FTFP) {
206  G4cout << G4endl<< " FTFP for E(MeV)= " << emaxQMD-overlap << " - " << emaxFTFP;
207  }
208  G4cout << G4endl;
209  }
210 }
211 
213 {
214  // Construct light ions
215  G4IonConstructor pConstructor;
216  pConstructor.ConstructParticle();
217 }
static const double MeV
Definition: G4SIunits.hh:211
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData
static G4ThreadLocal std::vector< G4HadronicInteraction * > * model_list
G4IonQMDPhysics(G4int verb=0)
G4String name
Definition: TRTMaterials.hh:40
virtual void ConstructParticle()
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonQMDPhysics)
#define G4ThreadLocal
Definition: tls.hh:89
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4HadronicInteraction * GetModel()
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
static G4ThreadLocal G4bool wasActivated
static G4ThreadLocal G4BinaryLightIonReaction * theIonBC
bool G4bool
Definition: G4Types.hh:79
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4ThreadLocal G4VComponentCrossSection * theGGNuclNuclXS
static const double GeV
Definition: G4SIunits.hh:214
const G4int n
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
G4HadronicInteraction * FindModel(const G4String &name)
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
static G4ThreadLocal std::vector< G4HadronInelasticProcess * > * p_list
static G4HadronicInteractionRegistry * Instance()
static G4ThreadLocal G4FTFBuilder * theBuilder
void SetMaxEnergy(const G4double anEnergy)
virtual void ConstructProcess()
#define G4endl
Definition: G4ios.hh:61
static const double TeV
Definition: G4SIunits.hh:215
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
void AddProcess(const G4String &, G4ParticleDefinition *, G4BinaryLightIonReaction *, G4QMDReaction *, G4HadronicInteraction *)
static G4He3 * He3()
Definition: G4He3.cc:94
static G4ThreadLocal G4QMDReaction * theQMD
virtual ~G4IonQMDPhysics()
static G4ThreadLocal G4HadronicInteraction * theFTFP