Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4INCLXXInterface.hh
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// INCL++ intra-nuclear cascade model
27// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28// Davide Mancusi, CEA
29// Alain Boudard, CEA
30// Sylvie Leray, CEA
31// Joseph Cugnon, University of Liege
32//
33// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
39#ifndef G4INCLXXInterface_hh
40#define G4INCLXXInterface_hh 1
41
42#include "G4Nucleon.hh"
43#include "G4Nucleus.hh"
47#include "G4FragmentVector.hh"
48#include "G4ParticleChange.hh"
50#include "G4ReactionProduct.hh"
51#include "globals.hh"
52
53// INCL++
54#include "G4INCLCascade.hh"
55
56// Geant4 de-excitation
58
59// Binary cascade
61
62#include <fstream>
63#include <iostream>
64
65using namespace std;
66
68
69/** \brief INCL++ intra-nuclear cascade with G4ExcitationHandler for de-excitation
70 *
71 * Interface for INCL++. This interface handles basic hadron bullet particles
72 * (protons, neutrons, pions), as well as light ions.
73 *
74 * Example usage in case of protons:
75 * @code
76 * G4INCLXXInterface* inclModel = new G4INCLXXInterface;
77 * inclModel -> SetMinEnergy(0.0 * MeV); // Set the energy limits
78 * inclModel -> SetMaxEnergy(3.0 * GeV);
79 *
80 * G4ProtonInelasticProcess* protonInelasticProcess = new G4ProtonInelasticProcess();
81 * G4ProtonInelasticCrossSection* protonInelasticCrossSection = new G4ProtonInelasticCrossSection();
82 *
83 * protonInelasticProcess -> RegisterMe(inclModel);
84 * protonInelasticProcess -> AddDataSet(protonInelasticCrossSection);
85 *
86 * particle = G4Proton::Proton();
87 * processManager = particle -> GetProcessManager();
88 * processManager -> AddDiscreteProcess(protonInelasticProcess);
89 * @endcode
90 * The same setup procedure is needed for neutron, pion and generic-ion
91 * inelastic processes as well.
92 */
94public:
95 G4INCLXXInterface(const G4String& name = "INCL++ cascade with G4ExcitationHandler");
96 ~G4INCLXXInterface(); // Destructor
97
99 return (this == &right);
100 }
101
103 return (this != &right);
104 }
105
106 G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
107
108 /**
109 * Main method to apply the INCL physics model.
110 * @param aTrack the projectile particle
111 * @param theNucleus target nucleus
112 * @return the output of the INCL physics model
113 */
114 G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
115
116 void DeleteModel() {
117 delete theINCLModel;
118 theINCLModel = NULL;
119 }
120
121private:
122 G4bool AccurateProjectile(const G4HadProjectile &aTrack, const G4Nucleus &theTargetNucleus) const;
123
124 /// \brief Dummy copy constructor to shut up Coverity warnings
126
127 /// \brief Dummy assignment operator to shut up Coverity warnings
128 G4INCLXXInterface &operator=(G4INCLXXInterface const &rhs);
129
130 /// \brief Convert G4ParticleDefinition to corresponding INCL particle type
131 G4INCL::ParticleType toINCLParticleType(G4ParticleDefinition const * const) const;
132
133 /// \brief Convert G4HadProjectile to corresponding INCL particle species
134 G4INCL::ParticleSpecies toINCLParticleSpecies(G4HadProjectile const &) const;
135
136 /// \brief Convert G4HadProjectile to corresponding INCL particle kinetic energy
137 G4double toINCLKineticEnergy(G4HadProjectile const &) const;
138
139 /// \brief Convert an INCL particle to a G4DynamicParticle
140 G4DynamicParticle *toG4Particle(G4int A, G4int Z , G4double kinE, G4double px, G4double py, G4double pz) const;
141
142 /// \brief Convert A and Z to a G4ParticleDefinition
143 G4ParticleDefinition *toG4ParticleDefinition (G4int A, G4int Z) const;
144
145 /// \brief Rescale remnant momentum if necessary
146 G4double remnant4MomentumScaling(G4double mass,
147 G4double kineticE,
148 G4double px, G4double py, G4double pz) const;
149
150 G4INCL::INCL *theINCLModel;
151 G4HadFinalState theResult;
152
153 G4ExcitationHandler *theExcitationHandler;
154
155 G4HadronicInteraction *theBackupModel;
156
157 G4INCLXXInterfaceStore * const theInterfaceStore;
158
159 G4bool complainedAboutBackupModel;
160
161};
162
163#endif
std::vector< G4ReactionProduct * > G4ReactionProductVector
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
Singleton class for configuring the INCL++ Geant4 interface.
INCL++ intra-nuclear cascade with G4ExcitationHandler for de-excitation.
G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)
G4int operator==(G4INCLXXInterface &right)
G4int operator!=(G4INCLXXInterface &right)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)