Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleHPFissionBaseFS Class Reference

#include <G4ParticleHPFissionBaseFS.hh>

+ Inheritance diagram for G4ParticleHPFissionBaseFS:

Public Member Functions

 G4ParticleHPFissionBaseFS ()
 
virtual ~G4ParticleHPFissionBaseFS ()
 
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &bit, G4ParticleDefinition *)
 
G4DynamicParticleVectorApplyYourself (G4int Prompt)
 
virtual G4double GetXsec (G4double anEnergy)
 
virtual G4ParticleHPVectorGetXsec ()
 
void SetNeutronRP (const G4ReactionProduct &aNeutron)
 
void SetTarget (const G4ReactionProduct &aTarget)
 
- Public Member Functions inherited from G4ParticleHPFinalState
 G4ParticleHPFinalState ()
 
virtual ~G4ParticleHPFinalState ()
 
void Init (G4double A, G4double Z, G4String &dirName, G4String &aFSType, G4ParticleDefinition *projectile)
 
virtual void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)=0
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &)
 
virtual G4ParticleHPFinalStateNew ()=0
 
G4bool HasXsec ()
 
G4bool HasFSData ()
 
G4bool HasAnyData ()
 
virtual G4double GetXsec (G4double)
 
virtual G4ParticleHPVectorGetXsec ()
 
void SetA_Z (G4double anA, G4double aZ, G4int aM=0)
 
G4double GetZ ()
 
G4double GetN ()
 
G4double GetA ()
 
G4int GetM ()
 
void SetAZMs (G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
 
void SetProjectile (G4ParticleDefinition *projectile)
 

Additional Inherited Members

- Protected Member Functions inherited from G4ParticleHPFinalState
void adjust_final_state (G4LorentzVector)
 
G4bool DoNotAdjustFinalState ()
 
- Protected Attributes inherited from G4ParticleHPFinalState
G4bool hasXsec
 
G4bool hasFSData
 
G4bool hasAnyData
 
G4ParticleHPNames theNames
 
G4Cache< G4HadFinalState * > theResult
 
G4ParticleDefinitiontheProjectile
 
G4double theBaseA
 
G4double theBaseZ
 
G4int theBaseM
 
G4int theNDLDataZ
 
G4int theNDLDataA
 
G4int theNDLDataM
 

Detailed Description

Definition at line 42 of file G4ParticleHPFissionBaseFS.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPFissionBaseFS()

G4ParticleHPFissionBaseFS::G4ParticleHPFissionBaseFS ( )
inline

Definition at line 53 of file G4ParticleHPFissionBaseFS.hh.

54 {
55 hasXsec = true;
56 theXsection = new G4ParticleHPVector;
57 }

◆ ~G4ParticleHPFissionBaseFS()

virtual G4ParticleHPFissionBaseFS::~G4ParticleHPFissionBaseFS ( )
inlinevirtual

Definition at line 59 of file G4ParticleHPFissionBaseFS.hh.

60 {
61 delete theXsection;
62 }

Member Function Documentation

◆ ApplyYourself()

G4DynamicParticleVector * G4ParticleHPFissionBaseFS::ApplyYourself ( G4int  Prompt)

Definition at line 96 of file G4ParticleHPFissionBaseFS.cc.

97 {
98// if therere were no data for this isotope, break out.
99 if(!HasFSData()) { return 0; }
100
101 G4int i;
103 G4ReactionProduct boosted;
104 boosted.Lorentz( *(fCache.Get().theNeutronRP) , *(fCache.Get().theTarget) );
105 G4double eKinetic = boosted.GetKineticEnergy();
106
107// Build neutrons
108 G4ReactionProduct * theNeutrons = new G4ReactionProduct[nPrompt];
109 for(i=0; i<nPrompt; i++)
110 {
111 theNeutrons[i].SetDefinition(G4Neutron::Neutron());
112 }
113
114// sample energies
115 G4int dummy;
116 for(i=0; i<nPrompt; i++)
117 {
118 // always in the lab system (if file-5)
119 theNeutrons[i].SetKineticEnergy(theEnergyDistribution.Sample(eKinetic, dummy));
120 }
121
122// sample neutron angular distribution
123 for(i=0; i<nPrompt; i++)
124 {
125 theAngularDistribution.SampleAndUpdate(theNeutrons[i]);
126 }
127
128// already in lab. Add neutrons to dynamic particle vector
129 for(i=0; i<nPrompt; i++)
130 {
132 it->SetDefinition(theNeutrons[i].GetDefinition());
133 it->SetMomentum(theNeutrons[i].GetMomentum());
134 aResult->push_back(it);
135 }
136 delete [] theNeutrons;
137
138// return the result
139 return aResult;
140 }
std::vector< G4DynamicParticle * > G4DynamicParticleVector
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
value_type & Get() const
Definition: G4Cache.hh:315
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
void SampleAndUpdate(G4ReactionProduct &anIncidentParticle)
G4double Sample(G4double anEnergy, G4int &it)
G4double GetKineticEnergy() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)

Referenced by G4ParticleHPFCFissionFS::ApplyYourself(), G4ParticleHPFFFissionFS::ApplyYourself(), G4ParticleHPLCFissionFS::ApplyYourself(), G4ParticleHPSCFissionFS::ApplyYourself(), and G4ParticleHPTCFissionFS::ApplyYourself().

◆ GetXsec() [1/2]

virtual G4ParticleHPVector * G4ParticleHPFissionBaseFS::GetXsec ( )
inlinevirtual

Reimplemented from G4ParticleHPFinalState.

Definition at line 74 of file G4ParticleHPFissionBaseFS.hh.

75 {
76 return theXsection;
77 }

◆ GetXsec() [2/2]

virtual G4double G4ParticleHPFissionBaseFS::GetXsec ( G4double  anEnergy)
inlinevirtual

Reimplemented from G4ParticleHPFinalState.

Definition at line 69 of file G4ParticleHPFissionBaseFS.hh.

70 {
71 return std::max(0., theXsection->GetY(anEnergy));
72 }
G4double GetY(G4double x)

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ Init()

void G4ParticleHPFissionBaseFS::Init ( G4double  A,
G4double  Z,
G4int  M,
G4String dirName,
G4String bit,
G4ParticleDefinition  
)
virtual

Implements G4ParticleHPFinalState.

Reimplemented in G4ParticleHPLCFissionFS, G4ParticleHPSCFissionFS, and G4ParticleHPTCFissionFS.

Definition at line 45 of file G4ParticleHPFissionBaseFS.cc.

46 {
47 G4String tString = dirName;
48 G4bool dbool;
49 G4ParticleHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, tString, bit, dbool);
50 G4String filename = aFile.GetName();
51 SetAZMs( A, Z, M, aFile );
52 //theBaseA = aFile.GetA();
53 //theBaseZ = aFile.GetZ();
54 //if(!dbool || ( Z<2.5 && ( std::abs(theBaseZ - Z)>0.0001 || std::abs(theBaseA - A)>0.0001) ) )
55 if ( !dbool || ( Z<2.5 && ( std::abs(theNDLDataZ - Z)>0.0001 || std::abs(theNDLDataA - A)>0.0001)) )
56 {
57 hasAnyData = false;
58 hasFSData = false;
59 hasXsec = false;
60 return; // no data for exactly this isotope.
61 }
62
63 //std::ifstream theData(filename, std::ios::in);
64 std::istringstream theData(std::ios::in);
66 G4int dummy;
67 if(!(theData))
68 {
69 //theData.close();
70 hasFSData = false;
71 hasXsec = false;
72 hasAnyData = false;
73 return; // no data for this FS for this isotope
74 }
75 theData >> dummy>>dummy;
77 theData >> total;
78 theXsection->Init(theData, total, eV);
79 if (!(theData >> dummy))
80 {
81 hasFSData = false;
82 //theData.close();
83 return;
84 }
85 theData >> dummy;
86
87 theAngularDistribution.Init(theData);
88
89 theData >> dummy >> dummy;
90
91 theEnergyDistribution.Init(theData);
92 //theData.close();
93
94 }
bool G4bool
Definition: G4Types.hh:86
void Init(std::istream &aDataFile)
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
static G4ParticleHPManager * GetInstance()
void GetDataStream(G4String, std::istringstream &iss)
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
G4double total(Particle const *const p1, Particle const *const p2)

Referenced by G4ParticleHPFCFissionFS::Init(), G4ParticleHPLCFissionFS::Init(), G4ParticleHPSCFissionFS::Init(), and G4ParticleHPTCFissionFS::Init().

◆ SetNeutronRP()

void G4ParticleHPFissionBaseFS::SetNeutronRP ( const G4ReactionProduct aNeutron)
inline

Definition at line 79 of file G4ParticleHPFissionBaseFS.hh.

80 {
81 fCache.Get().theNeutronRP = &aNeutron;
82 theAngularDistribution.SetProjectileRP(aNeutron);
83 }
void SetProjectileRP(const G4ReactionProduct &anIncidentParticleRP)

Referenced by G4ParticleHPFissionFS::ApplyYourself().

◆ SetTarget()

void G4ParticleHPFissionBaseFS::SetTarget ( const G4ReactionProduct aTarget)
inline

Definition at line 85 of file G4ParticleHPFissionBaseFS.hh.

86 {
87 fCache.Get().theTarget = &aTarget;
88 theAngularDistribution.SetTarget(aTarget);
89 }
void SetTarget(const G4ReactionProduct &aTarget)

Referenced by G4ParticleHPFissionFS::ApplyYourself().


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