Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4IonQMDPhysics.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 // $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 G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
static G4He3 * He3()
Definition: G4He3.cc:94
const XML_Char * name
Definition: expat.h:151
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static constexpr double MeV
Definition: G4SIunits.hh:214
static G4ThreadLocal G4BinaryLightIonReaction * theIonBC
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4ThreadLocal std::vector< G4HadronInelasticProcess * > * p_list
void RegisterMe(G4HadronicInteraction *a)
#define G4endl
Definition: G4ios.hh:61
const char * p
Definition: xmltok.h:285
static void ConstructParticle()
const G4String & GetParticleName() const
static G4ThreadLocal G4HadronicInteraction * theFTFP
G4HadronicInteraction * GetModel()
#define G4ThreadLocal
Definition: tls.hh:69
virtual ~G4IonQMDPhysics()
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
static G4ThreadLocal std::vector< G4HadronicInteraction * > * model_list
static constexpr double TeV
Definition: G4SIunits.hh:218
bool G4bool
Definition: G4Types.hh:79
virtual void ConstructParticle()
static G4ThreadLocal G4QMDReaction * theQMD
static G4HadronicInteractionRegistry * Instance()
const G4String & GetProcessName() const
Definition: G4VProcess.hh:411
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4ThreadLocal G4VComponentCrossSection * theGGNuclNuclXS
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
int G4int
Definition: G4Types.hh:78
static G4Triton * Triton()
Definition: G4Triton.cc:95
virtual void ConstructProcess()
G4ProcessManager * GetProcessManager() const
static G4ThreadLocal G4FTFBuilder * theBuilder
G4IonQMDPhysics(G4int verb=0)
G4GLOB_DLL std::ostream G4cout
void AddProcess(const G4String &, G4ParticleDefinition *, G4BinaryLightIonReaction *, G4QMDReaction *, G4HadronicInteraction *)
Char_t n[5]
G4HadronicInteraction * FindModel(const G4String &name)
static constexpr double GeV
Definition: G4SIunits.hh:217
static G4ThreadLocal G4bool wasActivated