Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#ifndef G4DecayStrongResonances_h
|
||||
#define G4DecayStrongResonances_h 1
|
||||
|
||||
#include "G4Fancy3DNucleus.hh"
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
#include "G4DynamicParticleVector.hh"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
class G4DecayStrongResonances
|
||||
{
|
||||
public:
|
||||
G4DecayStrongResonances(){}
|
||||
~G4DecayStrongResonances(){}
|
||||
|
||||
private:
|
||||
G4int operator==(G4DecayStrongResonances& right) {return (this == &right);}
|
||||
G4int operator!=(G4DecayStrongResonances& right) {return (this != &right);}
|
||||
|
||||
G4double theEnergy;
|
||||
|
||||
public:
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
|
||||
{
|
||||
// decay the strong resonances
|
||||
G4ReactionProductVector * theResult = new G4ReactionProductVector;
|
||||
G4KineticTrackVector *result1, *secondaries, *result;
|
||||
result1=theSecondaries;
|
||||
result=new G4KineticTrackVector();
|
||||
|
||||
G4ThreeVector theCurrentVelocity;
|
||||
theCurrentVelocity.setX(0);
|
||||
theCurrentVelocity.setY(0);
|
||||
G4double vz = theEnergy/(sqrt(theEnergy*theEnergy +
|
||||
G4Proton::Proton()->GetPDGMass()*G4Proton::Proton()->GetPDGMass())
|
||||
+ G4Proton::Proton()->GetPDGMass());
|
||||
theCurrentVelocity.setZ(vz);
|
||||
|
||||
size_t aResult=0;
|
||||
for (aResult=0; aResult < result1->size(); aResult++)
|
||||
{
|
||||
G4ParticleDefinition * pdef;
|
||||
pdef=result1->operator[](aResult)->GetDefinition();
|
||||
secondaries=NULL;
|
||||
if ( pdef->GetPDGWidth() > 0 && pdef->GetPDGLifeTime() < 5E-17*s )
|
||||
{
|
||||
secondaries = result1->operator[](aResult)->Decay();
|
||||
}
|
||||
if ( secondaries == NULL )
|
||||
{
|
||||
result->push_back(result1->operator[](aResult));
|
||||
result1->operator[](aResult)=NULL; //protect for clearAndDestroy
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
|
||||
{
|
||||
result1->push_back(secondaries->operator[](aSecondary));
|
||||
}
|
||||
delete secondaries;
|
||||
}
|
||||
}
|
||||
G4std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
|
||||
delete result1;
|
||||
|
||||
// translate to ReactionProducts
|
||||
G4ReactionProduct * it = NULL;
|
||||
for(aResult=0; aResult < result->size(); aResult++)
|
||||
{
|
||||
it = new G4ReactionProduct();
|
||||
it->SetDefinition((*result)[aResult]->GetDefinition());
|
||||
it->SetMass((*result)[aResult]->GetDefinition()->GetPDGMass());
|
||||
it->SetTotalEnergy((*result)[aResult]->Get4Momentum().t());
|
||||
it->SetMomentum((*result)[aResult]->Get4Momentum().vect());
|
||||
|
||||
theResult->push_back(it);
|
||||
}
|
||||
G4std::for_each(result->begin(), result->end(), DeleteKineticTrack());
|
||||
delete result;
|
||||
return theResult;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // G4DecayStrongResonances_h
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ExcitedString.hh,v 1.9 2001/10/06 08:17:01 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#ifndef G4ExcitedString_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ExcitedStringVector.hh,v 1.6 2001/10/04 20:00:32 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef G4ExcitedStringVector_h
|
||||
#define G4ExcitedStringVector_h 1
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Fancy3DNucleus.hh,v 1.9 2001/10/04 20:00:32 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Fancy3DNucleus.hh,v 1.10 2002/04/24 13:10:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef G4Fancy3DNucleus_h
|
||||
#define G4Fancy3DNucleus_h 1
|
||||
@@ -81,6 +81,7 @@ class G4Fancy3DNucleus : public G4V3DNucleus
|
||||
void DoLorentzContraction(const G4ThreeVector & theBeta);
|
||||
void CenterNucleons();
|
||||
void DoTranslation(const G4ThreeVector & theShift);
|
||||
const G4VNuclearDensity * GetNuclearDensity() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FermiMomentum.hh,v 1.5 2001/08/01 17:09:17 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef G4FermiMomentum_h
|
||||
#define G4FermiMomentum_h 1
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Fragment.hh,v 1.11 2001/10/04 20:00:32 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Fragment.hh,v 1.13 2002/06/07 15:30:55 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (May 1998)
|
||||
@@ -51,6 +51,8 @@ class G4ParticleDefinition;
|
||||
class G4Fragment; // Forward deckaration
|
||||
typedef G4std::vector<G4Fragment*> G4FragmentVector;
|
||||
|
||||
//#define pctest
|
||||
|
||||
|
||||
class G4Fragment
|
||||
{
|
||||
@@ -126,6 +128,12 @@ public:
|
||||
|
||||
inline G4double GetBindingEnergy(void) const;
|
||||
|
||||
#ifdef pctest
|
||||
G4String GetCreatorModel() const { return theCreatorModel; }
|
||||
void SetCreatorModel(const G4String & aModel)
|
||||
{ theCreatorModel = aModel; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
G4double CalculateExcitationEnergy(const G4LorentzVector value) const;
|
||||
@@ -157,6 +165,10 @@ private:
|
||||
G4ParticleDefinition * theParticleDefinition;
|
||||
|
||||
G4double theCreationTime;
|
||||
|
||||
#ifdef pctest
|
||||
G4String theCreatorModel;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Class G4Fragment
|
||||
@@ -280,7 +292,7 @@ inline G4double G4Fragment::GetGroundStateMass(void) const
|
||||
{
|
||||
if (theA == 0) return 0.0; // photon
|
||||
else return G4ParticleTable::GetParticleTable()->
|
||||
GetIonTable()->GetIonMass(theZ,theA);
|
||||
GetIonTable()->GetIonMass(static_cast<G4int>(theZ),static_cast<G4int>(theA));
|
||||
}
|
||||
|
||||
inline G4double G4Fragment::GetBindingEnergy(void) const
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FragmentVector.hh,v 1.4 2001/08/01 17:09:18 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (May 1998)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeneralPhaseSpaceDecay.hh,v 1.5 2001/08/01 17:09:18 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//$Id: G4GeneralPhaseSpaceDecay.hh,v 1.1 1997/05/21
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4KineticTrackVector.hh,v 1.6 2001/10/04 20:00:33 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
|
||||
// Modified at 8-Oct-1998 by Maxim Komogorov. Methods BoostBeam,Boost,Shift
|
||||
// were added.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NuclearFermiDensity.hh,v 1.5 2001/08/01 17:09:19 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4NuclearFermiDensity.hh,v 1.6 2002/04/24 13:10:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef G4NuclearFermiDensity_h
|
||||
#define G4NuclearFermiDensity_h 1
|
||||
@@ -41,9 +41,9 @@ class G4NuclearFermiDensity : public G4VNuclearDensity
|
||||
G4NuclearFermiDensity(G4double anA, G4double aZ);
|
||||
~G4NuclearFermiDensity();
|
||||
|
||||
G4double GetRelativeDensity(G4ThreeVector aPosition);
|
||||
G4double GetRadius(const G4double maxRelativeDenisty);
|
||||
G4double GetDeriv(const G4ThreeVector & aPosition);
|
||||
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const;
|
||||
G4double GetRadius(const G4double maxRelativeDenisty) const;
|
||||
G4double GetDeriv(const G4ThreeVector & aPosition) const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
+5
-5
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NuclearShellModelDensity.hh,v 1.5 2001/08/01 17:09:19 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4NuclearShellModelDensity.hh,v 1.6 2002/04/24 13:10:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef G4NuclearShellModelDensity_h
|
||||
#define G4NuclearShellModelDensity_h 1
|
||||
@@ -41,9 +41,9 @@ class G4NuclearShellModelDensity : public G4VNuclearDensity
|
||||
G4NuclearShellModelDensity(G4double anA, G4double aZ);
|
||||
~G4NuclearShellModelDensity();
|
||||
|
||||
G4double GetRelativeDensity(G4ThreeVector aPosition);
|
||||
G4double GetRadius(const G4double maxRelativeDenisty);
|
||||
G4double GetDeriv(const G4ThreeVector & aPosition);
|
||||
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const;
|
||||
G4double GetRadius(const G4double maxRelativeDenisty) const;
|
||||
G4double GetDeriv(const G4ThreeVector & aPosition) const;
|
||||
|
||||
private:
|
||||
G4int theA;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Nucleon.hh,v 1.5 2001/08/01 17:09:20 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef G4Nucleon_h
|
||||
#define G4Nucleon_h 1
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Parton.hh,v 1.13 2001/08/01 17:09:21 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#ifndef G4Parton_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PartonVector.hh,v 1.6 2001/10/04 20:00:33 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#ifndef G4PartonVector_h
|
||||
#define G4PartonVector_h 1
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SampleResonance.hh,v 1.4 2001/10/04 20:00:33 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#ifndef G4SampleResonance_h
|
||||
|
||||
Reference in New Issue
Block a user