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

#include <G4ParticleHPFSFissionFS.hh>

Inheritance diagram for G4ParticleHPFSFissionFS:
Collaboration diagram for G4ParticleHPFSFissionFS:

Public Member Functions

 G4ParticleHPFSFissionFS ()
 
 ~G4ParticleHPFSFissionFS ()
 
void Init (G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)
 
G4DynamicParticleVectorApplyYourself (G4int Prompt, G4int delayed, G4double *decayconst)
 
G4ParticleHPFinalStateNew ()
 
G4double GetMass ()
 
void SampleNeutronMult (G4int &all, G4int &Prompt, G4int &delayed, G4double energy, G4int off)
 
void SetNeutronRP (const G4ReactionProduct &aNeutron)
 
void SetTarget (const G4ReactionProduct &aTarget)
 
G4DynamicParticleVectorGetPhotons ()
 
G4ParticleHPFissionEReleaseGetEnergyRelease ()
 
- Public Member Functions inherited from G4ParticleHPFinalState
 G4ParticleHPFinalState ()
 
virtual ~G4ParticleHPFinalState ()
 
void Init (G4double A, G4double Z, G4String &dirName, G4String &aFSType, G4ParticleDefinition *projectile)
 
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
 
G4double theBaseA
 
G4double theBaseZ
 
G4int theBaseM
 
G4int theNDLDataZ
 
G4int theNDLDataA
 
G4int theNDLDataM
 
G4ParticleDefinitiontheProjectile
 

Detailed Description

Definition at line 45 of file G4ParticleHPFSFissionFS.hh.

Constructor & Destructor Documentation

G4ParticleHPFSFissionFS::G4ParticleHPFSFissionFS ( )
inline

Definition at line 55 of file G4ParticleHPFSFissionFS.hh.

55 { hasXsec = true; }

Here is the caller graph for this function:

G4ParticleHPFSFissionFS::~G4ParticleHPFSFissionFS ( )
inline

Definition at line 56 of file G4ParticleHPFSFissionFS.hh.

56 {}

Member Function Documentation

G4DynamicParticleVector * G4ParticleHPFSFissionFS::ApplyYourself ( G4int  Prompt,
G4int  delayed,
G4double decayconst 
)

Definition at line 103 of file G4ParticleHPFSFissionFS.cc.

105  {
106  G4int i;
108  G4ReactionProduct boosted;
109  boosted.Lorentz( *(fCache.Get().theNeutronRP) , *(fCache.Get().theTarget) );
110  G4double eKinetic = boosted.GetKineticEnergy();
111 
112 // Build neutrons
113  G4ReactionProduct * theNeutrons = new G4ReactionProduct[nPrompt+nDelayed];
114  for(i=0; i<nPrompt+nDelayed; i++)
115  {
116  theNeutrons[i].SetDefinition(G4Neutron::Neutron());
117  }
118 
119 // sample energies
120  G4int it, dummy;
121  G4double tempE;
122  for(i=0; i<nPrompt; i++)
123  {
124  tempE = thePromptNeutronEnDis.Sample(eKinetic, dummy); // energy distribution (file5) always in lab
125  theNeutrons[i].SetKineticEnergy(tempE);
126  }
127  for(i=nPrompt; i<nPrompt+nDelayed; i++)
128  {
129  theNeutrons[i].SetKineticEnergy(theDelayedNeutronEnDis.Sample(eKinetic, it)); // dito
130  if(it==0) theNeutrons[i].SetKineticEnergy(thePromptNeutronEnDis.Sample(eKinetic, dummy));
131  theDecayConst[i-nPrompt] = theFinalStateNeutrons.GetDecayConstant(it); // this is returned
132  }
133 
134 // sample neutron angular distribution
135  for(i=0; i<nPrompt+nDelayed; i++)
136  {
137  theNeutronAngularDis.SampleAndUpdate(theNeutrons[i]); // angular comes back in lab automatically
138  }
139 
140 // already in lab. Add neutrons to dynamic particle vector
141  for(i=0; i<nPrompt+nDelayed; i++)
142  {
144  dp->SetDefinition(theNeutrons[i].GetDefinition());
145  dp->SetMomentum(theNeutrons[i].GetMomentum());
146  aResult->push_back(dp);
147  }
148  delete [] theNeutrons;
149 // return the result
150  return aResult;
151  }
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:

G4ParticleHPFissionERelease* G4ParticleHPFSFissionFS::GetEnergyRelease ( )
inline

Definition at line 90 of file G4ParticleHPFSFissionFS.hh.

91  {
92  return &theEnergyRelease;
93  }

Here is the caller graph for this function:

G4double G4ParticleHPFSFissionFS::GetMass ( )
inline

Definition at line 68 of file G4ParticleHPFSFissionFS.hh.

68 { return theFinalStateNeutrons.GetTargetMass(); }

Here is the call graph for this function:

Here is the caller graph for this function:

G4DynamicParticleVector * G4ParticleHPFSFissionFS::GetPhotons ( )

Definition at line 177 of file G4ParticleHPFSFissionFS.cc.

178 {
179 // sample photons
181  G4ReactionProduct boosted;
182 // the photon distributions are in the Nucleus rest frame.
183  boosted.Lorentz( *(fCache.Get().theNeutronRP) , *(fCache.Get().theTarget) );
184  G4double anEnergy = boosted.GetKineticEnergy();
185  temp = theFinalStatePhotons.GetPhotons(anEnergy);
186  if(temp == 0) { return 0; }
187 
188 // lorentz transform, and add photons to final state
189  unsigned int i;
191  for(i=0; i<temp->size(); i++)
192  {
193  // back to lab
194  temp->operator[](i)->Lorentz(*(temp->operator[](i)), -1.* (*(fCache.Get().theTarget)) );
195  G4DynamicParticle * theOne = new G4DynamicParticle;
196  theOne->SetDefinition(temp->operator[](i)->GetDefinition());
197  theOne->SetMomentum(temp->operator[](i)->GetMomentum());
198  result->push_back(theOne);
199  delete temp->operator[](i);
200  }
201  delete temp;
202  return result;
203 }
G4double G4ParticleHPJENDLHEData::G4double result
void SetMomentum(const G4ThreeVector &momentum)
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
value_type & Get() const
Definition: G4Cache.hh:282
std::vector< G4ReactionProduct * > G4ReactionProductVector
std::vector< G4DynamicParticle * > G4DynamicParticleVector
G4double GetKineticEnergy() const
G4ReactionProductVector * GetPhotons(G4double anEnergy)
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:

void G4ParticleHPFSFissionFS::Init ( G4double  A,
G4double  Z,
G4int  M,
G4String dirName,
G4String aFSType,
G4ParticleDefinition  
)
virtual

Implements G4ParticleHPFinalState.

Definition at line 45 of file G4ParticleHPFSFissionFS.cc.

46  {
47  G4String tString = "/FS/";
48  G4bool dbool;
49  G4ParticleHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), M, dirName, tString, dbool);
50  G4String filename = aFile.GetName();
51  SetAZMs( A, Z, M, aFile );
52  if(!dbool)
53  {
54  hasAnyData = false;
55  hasFSData = false;
56  hasXsec = false;
57  return;
58  }
59  //std::ifstream theData(filename, std::ios::in);
60  std::istringstream theData(std::ios::in);
62 
63  // here it comes
64  G4int infoType, dataType;
65  hasFSData = false;
66  while (theData >> infoType) // Loop checking, 11.05.2015, T. Koi
67  {
68  hasFSData = true;
69  theData >> dataType;
70  switch(infoType)
71  {
72  case 1:
73  if(dataType==4) theNeutronAngularDis.Init(theData);
74  if(dataType==5) thePromptNeutronEnDis.Init(theData);
75  if(dataType==12) theFinalStatePhotons.InitMean(theData);
76  if(dataType==14) theFinalStatePhotons.InitAngular(theData);
77  if(dataType==15) theFinalStatePhotons.InitEnergies(theData);
78  break;
79  case 2:
80  if(dataType==1) theFinalStateNeutrons.InitMean(theData);
81  break;
82  case 3:
83  if(dataType==1) theFinalStateNeutrons.InitDelayed(theData);
84  if(dataType==5) theDelayedNeutronEnDis.Init(theData);
85  break;
86  case 4:
87  if(dataType==1) theFinalStateNeutrons.InitPrompt(theData);
88  break;
89  case 5:
90  if(dataType==1) theEnergyRelease.Init(theData);
91  break;
92  default:
93  G4cout << "G4ParticleHPFSFissionFS::Init: unknown data type"<<dataType<<G4endl;
94  throw G4HadronicException(__FILE__, __LINE__, "G4ParticleHPFSFissionFS::Init: unknown data type");
95  break;
96  }
97  }
98  //targetMass = theFinalStateNeutrons.GetTargetMass();
99  //theData.close();
100  }
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
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4bool InitMean(std::istream &aDataFile)
bool G4bool
Definition: G4Types.hh:79
void InitDelayed(std::istream &aDataFile)
void Init(std::istream &aDataFile)
void InitMean(std::istream &aDataFile)
#define G4endl
Definition: G4ios.hh:61
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void InitEnergies(std::istream &aDataFile)
void Init(std::istream &aDataFile)
void InitAngular(std::istream &aDataFile)
void InitPrompt(std::istream &aDataFile)

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleHPFinalState* G4ParticleHPFSFissionFS::New ( )
inlinevirtual

Implements G4ParticleHPFinalState.

Definition at line 62 of file G4ParticleHPFSFissionFS.hh.

Here is the call graph for this function:

void G4ParticleHPFSFissionFS::SampleNeutronMult ( G4int all,
G4int Prompt,
G4int delayed,
G4double  energy,
G4int  off 
)

Definition at line 153 of file G4ParticleHPFSFissionFS.cc.

154 {
155  G4double promptNeutronMulti = 0;
156  promptNeutronMulti = theFinalStateNeutrons.GetPrompt(eKinetic);
157  G4double delayedNeutronMulti = 0;
158  delayedNeutronMulti = theFinalStateNeutrons.GetDelayed(eKinetic);
159 
160  if(delayedNeutronMulti==0&&promptNeutronMulti==0)
161  {
162  Prompt = 0;
163  delayed = 0;
164  G4double totalNeutronMulti = theFinalStateNeutrons.GetMean(eKinetic);
165  all = G4Poisson(totalNeutronMulti-off);
166  all += off;
167  }
168  else
169  {
170  Prompt = G4Poisson(promptNeutronMulti-off);
171  Prompt += off;
172  delayed = G4Poisson(delayedNeutronMulti);
173  all = Prompt+delayed;
174  }
175 }
G4long G4Poisson(G4double mean)
Definition: G4Poisson.hh:51
G4double GetPrompt(G4double anEnergy)
double G4double
Definition: G4Types.hh:76
G4double GetDelayed(G4double anEnergy)
G4double GetMean(G4double anEnergy)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParticleHPFSFissionFS::SetNeutronRP ( const G4ReactionProduct aNeutron)
inline

Definition at line 76 of file G4ParticleHPFSFissionFS.hh.

77  {
78  fCache.Get().theNeutronRP = &aNeutron;
79  theNeutronAngularDis.SetProjectileRP(aNeutron);
80  }
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 G4ParticleHPFSFissionFS::SetTarget ( const G4ReactionProduct aTarget)
inline

Definition at line 82 of file G4ParticleHPFSFissionFS.hh.

83  {
84  fCache.Get().theTarget = &aTarget;
85  theNeutronAngularDis.SetTarget(aTarget);
86  }
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: