Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4IonINCLXXPhysics.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: G4IonINCLXXPhysics.cc 101029 2016-11-04 08:40:51Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4IonINCLXXPhysics
31 //
32 // Author: D. Mancusi
33 //
34 // Modified:
35 //
36 //----------------------------------------------------------------------------
37 //
38 
39 #include "G4IonINCLXXPhysics.hh"
40 
41 #include "G4SystemOfUnits.hh"
42 #include "G4ParticleDefinition.hh"
43 #include "G4ProcessManager.hh"
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 
54 
55 #include "G4INCLXXInterface.hh"
56 #include "G4PreCompoundModel.hh"
57 #include "G4ExcitationHandler.hh"
58 #include "G4FTFBuilder.hh"
59 #include "G4HadronicInteraction.hh"
60 #include "G4BuilderType.hh"
62 
63 // factory
65 //
67 
68 G4ThreadLocal std::vector<G4HadronInelasticProcess*>* G4IonINCLXXPhysics::p_list = 0;
69 G4ThreadLocal std::vector<G4HadronicInteraction*>* G4IonINCLXXPhysics::model_list = 0;
88 
90  G4VPhysicsConstructor("IonINCLXX"),
91  verbose(ver)
92 {
93  // INCLXX light ion maximum energy is 3.0 GeV/nucleon
94  emax_d = 3.0 * GeV;
95  emax_t = 3.0 * GeV;
96  emax_he3 = 3.0 * GeV;
97  emax_alpha = 3.0 * GeV;
98  emax = 3.0 * GeV;
99  emaxFTFP = 1.*TeV;
100  emin = 0.*MeV;
102  if(verbose > 1) G4cout << "### G4IonINCLXXPhysics" << G4endl;
103 }
104 
106  G4int ver)
107  : G4VPhysicsConstructor(name),
108  verbose(ver)
109 {
110  // INCLXX light ion maximum energy is 3.0 GeV/nucleon
111  emax_d = 3.0 * GeV;
112  emax_t = 3.0 * GeV;
113  emax_he3 = 3.0 * GeV;
114  emax_alpha = 3.0 * GeV;
115  emax = 3.0 * GeV;
116  emaxFTFP = 1.*TeV;
117  emin = 0.*MeV;
119  if(verbose > 1) G4cout << "### G4IonINCLXXPhysics" << G4endl;
120 }
121 
123 {
124  //For MT need to explicitly set back pointers to zero:
125  //variables are static and if new threads are created we can have problems
126  //since variable is still pointing old value
127  if(wasActivated) {
135  G4int i;
136  if ( p_list ) {
137  G4int n = p_list->size();
138  for(i=0; i<n; i++) {delete (*p_list)[i];}
139  delete p_list; p_list = 0;
140  }
141  if ( model_list) {
142  G4int n = model_list->size();
143  for(i=0; i<n; i++) { delete (*model_list)[i];}
144  delete model_list; model_list = 0;
145  }
146  }
147 }
148 
150 {
151  if(wasActivated) return;
152  wasActivated = true;
153 
159  if ( model_list == 0 ) model_list = new std::vector<G4HadronicInteraction*>;
160  model_list->push_back(theINCLXXDeuteron);
161  model_list->push_back(theINCLXXTriton);
162  model_list->push_back(theINCLXXHe3);
163  model_list->push_back(theINCLXXAlpha);
164  model_list->push_back(theINCLXXIons);
165 
168  G4PreCompoundModel* thePreCompound = static_cast<G4PreCompoundModel*>(p);
169  if(!thePreCompound) { thePreCompound = new G4PreCompoundModel; }
170 
171  theFTFPBuilderDeuteron = new G4FTFBuilder("FTFP",thePreCompound);
173  theFTFPBuilderTriton = new G4FTFBuilder("FTFP",thePreCompound);
175  theFTFPBuilderHe3 = new G4FTFBuilder("FTFP",thePreCompound);
177  theFTFPBuilderAlpha = new G4FTFBuilder("FTFP",thePreCompound);
179  theFTFPBuilderIons = new G4FTFBuilder("FTFP",thePreCompound);
181  model_list->push_back(theFTFPDeuteron);
182  model_list->push_back(theFTFPTriton);
183  model_list->push_back(theFTFPHe3);
184  model_list->push_back(theFTFPAlpha);
185  model_list->push_back(theFTFPIons);
186 
188 
191  AddProcess("He3Inelastic", G4He3::He3(), theINCLXXHe3, theFTFPHe3, emax_he3);
194 }
195 
198  G4HadronicInteraction* hmodel,
199  G4HadronicInteraction* lmodel,
200  const G4double inclxxEnergyUpperLimit = 3.0 * GeV)
201 {
203  if ( p_list == 0 ) p_list = new std::vector<G4HadronInelasticProcess*>;
204  p_list->push_back(hadi);
205  G4ProcessManager* pManager = p->GetProcessManager();
206  pManager->AddDiscreteProcess(hadi);
207  hadi->AddDataSet(theNuclNuclData);
208  hmodel->SetMinEnergy(emin);
209  hmodel->SetMaxEnergy(inclxxEnergyUpperLimit);
210  hadi->RegisterMe(hmodel);
211  if(lmodel) {
212  lmodel->SetMinEnergy(inclxxEnergyUpperLimit - 100*MeV);
213  lmodel->SetMaxEnergy(emaxFTFP);
214  hadi->RegisterMe(lmodel);
215  }
216  if(verbose > 1) {
217  G4cout << "Register " << hadi->GetProcessName()
218  << " for " << p->GetParticleName()
219  << " INCLXX/G4DeexcitationHandler for E(MeV)= " << emin << " - " << inclxxEnergyUpperLimit;
220  if(lmodel) {
221  G4cout << " FTFP for E(MeV)= " << inclxxEnergyUpperLimit-MeV << " - " << emaxFTFP;
222  }
223  G4cout << G4endl;
224  }
225 }
226 
228 {
229  // Construct light ions
230  G4IonConstructor pConstructor;
231  pConstructor.ConstructParticle();
232 }
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
static G4ThreadLocal G4FTFBuilder * theFTFPBuilderIons
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
static G4He3 * He3()
Definition: G4He3.cc:94
const XML_Char * name
Definition: expat.h:151
static G4ThreadLocal G4INCLXXInterface * theINCLXXDeuteron
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static constexpr double MeV
Definition: G4SIunits.hh:214
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void RegisterMe(G4HadronicInteraction *a)
#define G4endl
Definition: G4ios.hh:61
const char * p
Definition: xmltok.h:285
static G4ThreadLocal G4INCLXXInterface * theINCLXXIons
static void ConstructParticle()
const G4String & GetParticleName() const
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData
G4HadronicInteraction * GetModel()
virtual void ConstructProcess()
static G4ThreadLocal G4INCLXXInterface * theINCLXXTriton
static G4ThreadLocal G4FTFBuilder * theFTFPBuilderHe3
static G4ThreadLocal G4HadronicInteraction * theFTFPHe3
#define G4ThreadLocal
Definition: tls.hh:69
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
static G4ThreadLocal G4FTFBuilder * theFTFPBuilderDeuteron
static constexpr double TeV
Definition: G4SIunits.hh:218
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
static G4ThreadLocal G4FTFBuilder * theFTFPBuilderAlpha
static G4HadronicInteractionRegistry * Instance()
INCL++ intra-nuclear cascade.
const G4String & GetProcessName() const
Definition: G4VProcess.hh:411
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4ThreadLocal std::vector< G4HadronicInteraction * > * model_list
static G4ThreadLocal G4HadronicInteraction * theFTFPAlpha
virtual void ConstructParticle()
static G4ThreadLocal G4bool wasActivated
static G4ThreadLocal std::vector< G4HadronInelasticProcess * > * p_list
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
static G4ThreadLocal G4VComponentCrossSection * theGGNuclNuclXS
int G4int
Definition: G4Types.hh:78
static G4Triton * Triton()
Definition: G4Triton.cc:95
G4ProcessManager * GetProcessManager() const
G4IonINCLXXPhysics(G4int ver=0)
static G4ThreadLocal G4HadronicInteraction * theFTFPIons
G4GLOB_DLL std::ostream G4cout
void AddProcess(const G4String &, G4ParticleDefinition *, G4HadronicInteraction *, G4HadronicInteraction *, const G4double)
Char_t n[5]
static G4ThreadLocal G4INCLXXInterface * theINCLXXAlpha
static G4ThreadLocal G4FTFBuilder * theFTFPBuilderTriton
static G4ThreadLocal G4INCLXXInterface * theINCLXXHe3
G4HadronicInteraction * FindModel(const G4String &name)
static G4ThreadLocal G4HadronicInteraction * theFTFPTriton
static constexpr double GeV
Definition: G4SIunits.hh:217
static G4ThreadLocal G4HadronicInteraction * theFTFPDeuteron