Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParticleHPFissionBaseFS Class Reference

#include <G4ParticleHPFissionBaseFS.hh>

Inheritance diagram for G4ParticleHPFissionBaseFS:
Collaboration 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 G4ParticleHPFinalStateNew ()=0
 
G4bool HasXsec ()
 
G4bool HasFSData ()
 
G4bool HasAnyData ()
 
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
 
G4double theBaseA
 
G4double theBaseZ
 
G4int theBaseM
 
G4int theNDLDataZ
 
G4int theNDLDataA
 
G4int theNDLDataM
 
G4ParticleDefinitiontheProjectile
 

Detailed Description

Definition at line 42 of file G4ParticleHPFissionBaseFS.hh.

Constructor & Destructor Documentation

G4ParticleHPFissionBaseFS::G4ParticleHPFissionBaseFS ( )
inline

Definition at line 53 of file G4ParticleHPFissionBaseFS.hh.

54  {
55  hasXsec = true;
56  theXsection = new G4ParticleHPVector;
57  }
virtual G4ParticleHPFissionBaseFS::~G4ParticleHPFissionBaseFS ( )
inlinevirtual

Definition at line 58 of file G4ParticleHPFissionBaseFS.hh.

59  {
60  delete theXsection;
61  }

Member Function Documentation

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  }
void SetMomentum(const G4ThreeVector &momentum)
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetKineticEnergy(const G4double en)
value_type & Get() const
Definition: G4Cache.hh:282
int G4int
Definition: G4Types.hh:78
G4double Sample(G4double anEnergy, G4int &it)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SampleAndUpdate(G4ReactionProduct &anIncidentParticle)
std::vector< G4DynamicParticle * > G4DynamicParticleVector
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4double GetKineticEnergy() const
double G4double
Definition: G4Types.hh:76
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)

Here is the call graph for this function:

Here is the caller graph for this function:

virtual G4double G4ParticleHPFissionBaseFS::GetXsec ( G4double  anEnergy)
inlinevirtual

Reimplemented from G4ParticleHPFinalState.

Definition at line 67 of file G4ParticleHPFissionBaseFS.hh.

68  {
69  return std::max(0., theXsection->GetY(anEnergy));
70  }
G4double GetY(G4double x)
T max(const T t1, const T t2)
brief Return the largest of the two arguments

Here is the call graph for this function:

Here is the caller graph for this function:

virtual G4ParticleHPVector* G4ParticleHPFissionBaseFS::GetXsec ( )
inlinevirtual

Reimplemented from G4ParticleHPFinalState.

Definition at line 71 of file G4ParticleHPFissionBaseFS.hh.

71 { return theXsection; }
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;
76  G4int total;
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  }
static G4ParticleHPManager * GetInstance()
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
void GetDataStream(G4String, std::istringstream &iss)
int G4int
Definition: G4Types.hh:78
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
double A(double temperature)
bool G4bool
Definition: G4Types.hh:79
static constexpr double eV
Definition: G4SIunits.hh:215
G4double total(Particle const *const p1, Particle const *const p2)
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void Init(std::istream &aDataFile)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParticleHPFissionBaseFS::SetNeutronRP ( const G4ReactionProduct aNeutron)
inline

Definition at line 73 of file G4ParticleHPFissionBaseFS.hh.

74  {
75  fCache.Get().theNeutronRP = &aNeutron;
76  theAngularDistribution.SetProjectileRP(aNeutron);
77  }
value_type & Get() const
Definition: G4Cache.hh:282
void SetProjectileRP(const G4ReactionProduct &anIncidentParticleRP)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParticleHPFissionBaseFS::SetTarget ( const G4ReactionProduct aTarget)
inline

Definition at line 79 of file G4ParticleHPFissionBaseFS.hh.

80  {
81  fCache.Get().theTarget = &aTarget;
82  theAngularDistribution.SetTarget(aTarget);
83  }
value_type & Get() const
Definition: G4Cache.hh:282
void SetTarget(const G4ReactionProduct &aTarget)

Here is the call graph for this function:

Here is the caller graph for this function:


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