Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPIsotropic Class Reference

#include <G4ParticleHPIsotropic.hh>

Inheritance diagram for G4ParticleHPIsotropic:
Collaboration diagram for G4ParticleHPIsotropic:

Public Member Functions

 G4ParticleHPIsotropic ()
 
 ~G4ParticleHPIsotropic ()
 
void Init (std::istream &aDataFile)
 
G4ReactionProductSample (G4double anEnergy, G4double massCode, G4double mass)
 
G4double MeanEnergyOfThisInteraction ()
 
- Public Member Functions inherited from G4VParticleHPEnergyAngular
 G4VParticleHPEnergyAngular ()
 
virtual ~G4VParticleHPEnergyAngular ()
 
void SetProjectileRP (G4ReactionProduct *aIncidentParticleRP)
 
void SetTarget (G4ReactionProduct *aTarget)
 
G4ReactionProductGetTarget ()
 
G4ReactionProductGetProjectileRP ()
 
G4ReactionProductGetCMS ()
 
void SetQValue (G4double aValue)
 
virtual void ClearHistories ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VParticleHPEnergyAngular
G4double GetQValue ()
 

Detailed Description

Definition at line 38 of file G4ParticleHPIsotropic.hh.

Constructor & Destructor Documentation

G4ParticleHPIsotropic::G4ParticleHPIsotropic ( )
inline

Definition at line 42 of file G4ParticleHPIsotropic.hh.

42 {}
G4ParticleHPIsotropic::~G4ParticleHPIsotropic ( )
inline

Definition at line 44 of file G4ParticleHPIsotropic.hh.

44 {}

Member Function Documentation

void G4ParticleHPIsotropic::Init ( std::istream &  aDataFile)
virtual

Implements G4VParticleHPEnergyAngular.

Definition at line 48 of file G4ParticleHPIsotropic.cc.

49 {
50 }
G4double G4ParticleHPIsotropic::MeanEnergyOfThisInteraction ( )
inlinevirtual

Implements G4VParticleHPEnergyAngular.

Definition at line 50 of file G4ParticleHPIsotropic.hh.

51  {
52  return -1.;
53  }
G4ReactionProduct * G4ParticleHPIsotropic::Sample ( G4double  anEnergy,
G4double  massCode,
G4double  mass 
)
virtual

Implements G4VParticleHPEnergyAngular.

Definition at line 52 of file G4ParticleHPIsotropic.cc.

53 {
55  G4int Z = static_cast<G4int>(massCode/1000);
56  G4int A = static_cast<G4int>(massCode-1000*Z);
57 
58  if(massCode==0)
59  {
60  result->SetDefinition(G4Gamma::Gamma());
61  }
62  else if(A==0)
63  {
65  if(Z==1) result->SetDefinition(G4Positron::Positron());
66  }
67  else if(A==1)
68  {
70  if(Z==1) result->SetDefinition(G4Proton::Proton());
71  }
72  else if(A==2)
73  {
75  }
76  else if(A==3)
77  {
78  result->SetDefinition(G4Triton::Triton());
79  if(Z==2) result->SetDefinition(G4He3::He3());
80  }
81  else if(A==4)
82  {
83  result->SetDefinition(G4Alpha::Alpha());
84  //110607 TK modified following parts for migration to G4NDL3.15 (ENDF VII.r0)
85  //if(Z!=2) throw G4HadronicException(__FILE__, __LINE__, "Unknown ion case 1");
86  if(Z!=2)
87  {
88  result->SetDefinition( G4IonTable::GetIonTable()->GetIon ( Z , A , 0.0 ) );
89  }
90  }
91  else
92  {
93  //110607 TK modified following parts for migration to G4NDL3.15 (ENDF VII.r0)
94  result->SetDefinition( G4IonTable::GetIonTable()->GetIon ( Z , A , 0.0 ) );
95  //throw G4HadronicException(__FILE__, __LINE__, "G4ParticleHPIsotropic: Unknown ion case 2");
96  }
97 
98  G4double cosTh = G4UniformRand();
100  G4double theta = std::acos(cosTh);
101  G4double sinth = std::sin(theta);
102 
103 // we need the the Q value of the reaction
104  result->SetKineticEnergy(std::max(0.001*MeV, anEnergy+GetQValue()));
105  G4double mtot = result->GetTotalMomentum();
106  G4ThreeVector tempVector(mtot*sinth*std::cos(phi), mtot*sinth*std::sin(phi), mtot*std::cos(theta) );
107  result->SetMomentum(tempVector);
108 
109  return result;
110 }
G4double G4ParticleHPJENDLHEData::G4double result
G4double GetTotalMomentum() const
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
int G4int
Definition: G4Types.hh:78
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
static constexpr double twopi
Definition: G4SIunits.hh:76
#define G4UniformRand()
Definition: Randomize.hh:97
double A(double temperature)
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
static G4IonTable * GetIonTable()
Definition: G4IonTable.hh:78
static G4Positron * Positron()
Definition: G4Positron.cc:94
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4Electron * Electron()
Definition: G4Electron.cc:94
static constexpr double MeV
Definition: G4SIunits.hh:214
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
double G4double
Definition: G4Types.hh:76
static G4He3 * He3()
Definition: G4He3.cc:94

Here is the call graph for this function:


The documentation for this class was generated from the following files: