Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4AblaInterface.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 // ABLAXX statistical de-excitation model
27 // Jose Luis Rodriguez, GSI (translation from ABLA07 and contact person)
28 // Pekka Kaitaniemi, HIP (initial translation of ablav3p)
29 // Aleksandra Kelic, GSI (ABLA07 code)
30 // Davide Mancusi, CEA (contact person INCL)
31 // Aatos Heikkinen, HIP (project coordination)
32 //
33 
34 #define ABLAXX_IN_GEANT4_MODE 1
35 
36 #include "globals.hh"
37 
38 #ifdef ABLAXX_IN_GEANT4_MODE
39 
40 #include "G4AblaInterface.hh"
41 #include "G4ParticleDefinition.hh"
43 #include "G4ReactionProduct.hh"
44 #include "G4DynamicParticle.hh"
45 #include "G4IonTable.hh"
46 #include "G4SystemOfUnits.hh"
47 #include "G4PhysicalConstants.hh"
48 #include <iostream>
49 #include <cmath>
50 
52  G4VPreCompoundModel(NULL, "ABLA"),
53  ablaResult(new G4VarNtp),
54  volant(new G4Volant),
55  theABLAModel(new G4Abla(volant, ablaResult)),
56  eventNumber(0)
57 {
60 }
61 
63  delete volant;
64  delete ablaResult;
65  delete theABLAModel;
66 }
67 
69  volant->clear();
70  ablaResult->clear();
71 
72  const G4int ARem = aFragment.GetA_asInt();
73  const G4int ZRem = aFragment.GetZ_asInt();
74  const G4double eStarRem = aFragment.GetExcitationEnergy() / MeV;
75  const G4double jRem = aFragment.GetAngularMomentum().mag() / hbar_Planck;
76  const G4LorentzVector &pRem = aFragment.GetMomentum();
77  const G4double pxRem = pRem.x() / MeV;
78  const G4double pyRem = pRem.y() / MeV;
79  const G4double pzRem = pRem.z() / MeV;
80 
81  eventNumber++;
82 
83  theABLAModel->DeexcitationAblaxx(ARem, ZRem,
84  eStarRem,
85  jRem,
86  pxRem,
87  pyRem,
88  pzRem,
89  eventNumber);
90 
92 
93  for(int j = 0; j < ablaResult->ntrack; ++j) { // Copy ABLA result to the EventInfo
95  ablaResult->zvv[j],
96  ablaResult->enerj[j],
97  ablaResult->plab[j]*std::sin(ablaResult->tetlab[j]*pi/180.0)*std::cos(ablaResult->philab[j]*pi/180.0),
98  ablaResult->plab[j]*std::sin(ablaResult->tetlab[j]*pi/180.0)*std::sin(ablaResult->philab[j]*pi/180.0),
99  ablaResult->plab[j]*std::cos(ablaResult->tetlab[j]*pi/180.0));
100  if(product)
101  result->push_back(product);
102  }
103  return result;
104 }
105 
107  if (A == 1 && Z == 1) return G4Proton::Proton();
108  else if(A == 1 && Z == 0) return G4Neutron::Neutron();
109  else if(A == -1 && Z == 1) return G4PionPlus::PionPlus();
110  else if(A == -1 && Z == -1) return G4PionMinus::PionMinus();
111  else if(A == -1 && Z == 0) return G4PionZero::PionZero();
112  else if(A == 0 && Z == 0) return G4Gamma::Gamma();
113  else if(A == 2 && Z == 1) return G4Deuteron::Deuteron();
114  else if(A == 3 && Z == 1) return G4Triton::Triton();
115  else if(A == 3 && Z == 2) return G4He3::He3();
116  else if(A == 4 && Z == 2) return G4Alpha::Alpha();
117  else if(A > 0 && Z > 0 && A > Z) { // Returns ground state ion definition. No hyper-nucleus allows in Geant4
118  return G4IonTable::GetIonTable()->GetIon(Z, A, 0);
119  } else { // Error, unrecognized particle
120  return 0;
121  }
122 }
123 
125  G4double kinE,
126  G4double px,
127  G4double py, G4double pz) const {
128  const G4ParticleDefinition *def = toG4ParticleDefinition(A, Z);
129  if(def == 0) { // Check if we have a valid particle definition
130  return 0;
131  }
132  const G4double energy = kinE * MeV;
133  const G4ThreeVector momentum(px, py, pz);
134  const G4ThreeVector momentumDirection = momentum.unit();
135  G4DynamicParticle p(def, momentumDirection, energy);
136  G4ReactionProduct *r = new G4ReactionProduct(def);
137  (*r) = p;
138  return r;
139 }
140 
141 void G4AblaInterface::ModelDescription(std::ostream& outFile) const {
142  outFile << "ABLA++ does not provide an implementation of the ApplyYourself method!\n\n";
143 }
144 
145 void G4AblaInterface::DeExciteModelDescription(std::ostream& outFile) const {
146  outFile
147  << "ABLA++ is a statistical model for nuclear de-excitation. It simulates\n"
148  << "evaporation of neutrons, protons and alpha particles, as well as fission\n"
149  << "where applicable. The code included in Geant4 is a C++ translation of the\n"
150  << "original Fortran code. More details about the physics are available in the\n"
151  << "the Geant4 Physics Reference Manual and in the reference articles.\n\n"
152  << "Reference:\n"
153  << "A. Kelic, M. V. Ricciardi, and K. H. Schmidt, in Proceedings of Joint\n"
154  << "ICTP-IAEA Advanced Workshop on Model Codes for Spallation Reactions,\n"
155  << "ICTP Trieste, Italy, 4–8 February 2008, edited by D. Filges, S. Leray, Y. Yariv,\n"
156  << "A. Mengoni, A. Stanculescu, and G. Mank (IAEA INDC(NDS)-530, Vienna, 2008), pp. 181–221.\n\n";
157 }
158 
159 #endif // ABLAXX_IN_GEANT4_MODE
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
static G4He3 * He3()
Definition: G4He3.cc:94
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:300
static constexpr double hbar_Planck
static constexpr double MeV
Definition: G4SIunits.hh:214
static G4IonTable * GetIonTable()
Definition: G4IonTable.hh:78
const char * p
Definition: xmltok.h:285
void DeexcitationAblaxx(G4int nucleusA, G4int nucleusZ, G4double excitationEnergy, G4double angularMomentum, G4double momX, G4double momY, G4double momZ, G4int eventnumber)
Definition: G4Abla.cc:95
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
G4int GetA_asInt() const
Definition: G4Fragment.hh:259
G4double philab[VARNTPSIZE]
static G4Proton * Proton()
Definition: G4Proton.cc:93
G4int avv[VARNTPSIZE]
G4double plab[VARNTPSIZE]
G4double tetlab[VARNTPSIZE]
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
void clear()
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
Float_t Z
double G4double
Definition: G4Types.hh:76
G4VarNtp * ablaResult
G4double enerj[VARNTPSIZE]
virtual ~G4AblaInterface()
G4ParticleDefinition * toG4ParticleDefinition(G4int A, G4int Z) const
Convert A and Z to a G4ParticleDefinition.
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)
double energy
Definition: plottest35.C:25
double A(double temperature)
virtual void ModelDescription(std::ostream &outFile) const
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4int GetZ_asInt() const
Definition: G4Fragment.hh:264
Definition: G4Abla.hh:54
Hep3Vector unit() const
G4double G4ParticleHPJENDLHEData::G4double result
double mag() const
int G4int
Definition: G4Types.hh:78
static G4Triton * Triton()
Definition: G4Triton.cc:95
G4ReactionProduct * toG4Particle(G4int A, G4int Z, G4double kinE, G4double px, G4double py, G4double pz) const
Convert an Abla particle to a G4DynamicParticle.
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
void clear()
static G4PionZero * PionZero()
Definition: G4PionZero.cc:108
G4int zvv[VARNTPSIZE]
static constexpr double pi
Definition: G4SIunits.hh:75
void SetParameters()
Definition: G4Abla.cc:2195
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:504
void initEvapora()
Definition: G4Abla.cc:2006
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:276
virtual void DeExciteModelDescription(std::ostream &outFile) const
G4ThreeVector GetAngularMomentum() const
Definition: G4Fragment.cc:255