Import Geant4 10.5.0.beta source tree
This commit is contained in:
+4
-33
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PreCompoundFragmentVector.hh 100378 2016-10-19 15:03:27Z gcosmo $
|
||||
// $Id: G4PreCompoundFragmentVector.hh 108685 2018-02-27 07:58:38Z gcosmo $
|
||||
//
|
||||
// Hadronic Process: Nuclear Preequilibrium
|
||||
// by V. Lara
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
explicit G4PreCompoundFragmentVector(pcfvector * avector);
|
||||
|
||||
~G4PreCompoundFragmentVector();
|
||||
~G4PreCompoundFragmentVector() = default;
|
||||
|
||||
void SetVector(pcfvector * avector);
|
||||
|
||||
@@ -63,9 +63,9 @@ public:
|
||||
|
||||
void UseSICB(G4bool);
|
||||
|
||||
inline G4double CalculateProbabilities(const G4Fragment & aFragment);
|
||||
G4double CalculateProbabilities(const G4Fragment & aFragment);
|
||||
|
||||
inline G4VPreCompoundFragment * ChooseFragment();
|
||||
G4VPreCompoundFragment * ChooseFragment();
|
||||
|
||||
private:
|
||||
|
||||
@@ -81,34 +81,5 @@ private:
|
||||
G4int nChannels;
|
||||
};
|
||||
|
||||
inline G4double
|
||||
G4PreCompoundFragmentVector::CalculateProbabilities(const G4Fragment & aFragment)
|
||||
{
|
||||
//G4cout << "## G4PreCompoundFragmentVector::CalculateProbabilities" << G4endl;
|
||||
G4double probtot = 0.0;
|
||||
G4double prob;
|
||||
for (G4int i=0; i< nChannels; ++i) {
|
||||
(*theChannels)[i]->Initialize(aFragment);
|
||||
prob = 0.0;
|
||||
if ((*theChannels)[i]->IsItPossible(aFragment)) {
|
||||
prob = (*theChannels)[i]->CalcEmissionProbability(aFragment);
|
||||
}
|
||||
probtot += prob;
|
||||
probabilities[i] = probtot;
|
||||
//G4cout<<" prob= "<<prob<<" for "<<(*theChannels)[i]->GetName()<<G4endl;
|
||||
}
|
||||
return probtot;
|
||||
}
|
||||
|
||||
inline G4VPreCompoundFragment* G4PreCompoundFragmentVector::ChooseFragment()
|
||||
{
|
||||
G4double x = probabilities[nChannels-1]*G4UniformRand();
|
||||
G4int i=0;
|
||||
for (; i<nChannels; ++i) {
|
||||
if(x <= probabilities[i]) { break; }
|
||||
}
|
||||
return (*theChannels)[i];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user