Geant4  10.00.p02
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 71042 2013-06-10 09:28:44Z 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"
71 
72 // factory
74 //
76 
77 G4ThreadLocal std::vector<G4HadronInelasticProcess*>* G4IonQMDPhysics::p_list = 0;
78 G4ThreadLocal std::vector<G4HadronicInteraction*>* G4IonQMDPhysics::model_list = 0;
79 
82 
88 
90  : G4VPhysicsConstructor("IonQMD"), verbose(ver)
91 {
92  eminBIC = 0.*MeV;
93  eminQMD = 100.*MeV;
94  emaxQMD = 10.*GeV;
95  emaxFTFP = 1.*TeV;
96  overlap = 10*MeV;
98  if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
99 }
100 
102  G4int ver)
103  : G4VPhysicsConstructor(name), verbose(ver)
104 {
105  eminBIC = 0.*MeV;
106  eminQMD = 100.*MeV;
107  emaxQMD = 10.*GeV;
108  emaxFTFP = 1.*TeV;
109  overlap = 10*MeV;
111  if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
112 }
113 
115 {
116  if(wasActivated) {
117  delete theBuilder; theBuilder = 0;
118  delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
119  delete theNuclNuclData; theNuclNuclData = 0;
120  G4int i;
121  if ( p_list ) {
122  G4int n = p_list->size();
123  for(i=0; i<n; i++) {delete (*p_list)[i];}
124  delete p_list; p_list = 0;
125  }
126  if ( model_list ) {
127  G4int n = model_list->size();
128  for(i=0; i<n; i++) {delete (*model_list)[i];}
129  delete model_list; model_list = 0;
130  }
131  }
132 }
133 
135 {
136  if(wasActivated) return;
137  wasActivated = true;
138 
139  G4ExcitationHandler* handler = new G4ExcitationHandler();
140  G4PreCompoundModel* thePreCompound = new G4PreCompoundModel(handler);
141 
142  theIonBC = new G4BinaryLightIonReaction(thePreCompound);
143  if ( model_list == 0 ) model_list = new std::vector<G4HadronicInteraction*>;
144  model_list->push_back(theIonBC);
145 
146  theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
148  model_list->push_back(theFTFP);
149 
150  theQMD= new G4QMDReaction();
151  model_list->push_back(theQMD);
152 
154 
156  AddProcess("tInelastic", G4Triton::Triton(), theIonBC, theQMD, theFTFP);
157  AddProcess("He3Inelastic", G4He3::He3(), theIonBC, theQMD, theFTFP);
158  AddProcess("alphaInelastic", G4Alpha::Alpha(), theIonBC, theQMD, theFTFP);
160 
161 }
162 
166  G4QMDReaction* QMD,
167  G4HadronicInteraction* FTFP)
168 {
170  if ( p_list == 0 ) p_list = new std::vector<G4HadronInelasticProcess*>;
171  p_list->push_back(hadi);
172  G4ProcessManager* pManager = p->GetProcessManager();
173  pManager->AddDiscreteProcess(hadi);
174 
176 
177  BIC->SetMinEnergy(eminBIC);
178  BIC->SetMaxEnergy(emaxQMD); //reset when QMD is present
179  hadi->RegisterMe(BIC);
180 
181  if(QMD) {
182  QMD->SetMinEnergy(eminQMD);
184  QMD->SetMaxEnergy(emaxQMD);
185  hadi->RegisterMe(QMD);
186  }
187 
188  if(FTFP) {
189  FTFP->SetMinEnergy(emaxQMD - overlap);
190  FTFP->SetMaxEnergy(emaxFTFP);
191  hadi->RegisterMe(FTFP);
192  }
193 
194  if(verbose > 1) {
195  G4cout << "Register " << hadi->GetProcessName()
196  << " for " << p->GetParticleName() << G4endl
197  << " Binary Cascade for E(MeV)= " << eminBIC << " - "
198  << (QMD==0 ? emaxQMD : (eminQMD-overlap)) ;
199  if(QMD) {
200  G4cout << G4endl <<" QMD for E(MeV)= " << eminQMD << " - " << emaxQMD;
201  }
202  if(FTFP) {
203  G4cout << G4endl<< " FTFP for E(MeV)= " << emaxQMD-overlap << " - " << emaxFTFP;
204  }
205  G4cout << G4endl;
206  }
207 }
208 
210 {
211  // Construct light ions
212  G4IonConstructor pConstructor;
213  pConstructor.ConstructParticle();
214 }
static const double MeV
Definition: G4SIunits.hh:193
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:52
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:196
const G4int n
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
static G4ThreadLocal std::vector< G4HadronInelasticProcess * > * p_list
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:197
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