Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
+30 -4
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Decay.cc,v 1.27 2007/10/06 07:01:09 kurasige Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4Decay.cc,v 1.30 2008/09/19 03:19:53 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// --------------------------------------------------------------
@@ -63,11 +63,15 @@ G4Decay::G4Decay(const G4String& processName)
HighestValue(20.0),
pExtDecayer(0)
{
// set Process Sub Type
SetProcessSubType(static_cast<int>(DECAY));
#ifdef G4VERBOSE
if (GetVerboseLevel()>1) {
G4cout << "G4Decay constructor " << " Name:" << processName << G4endl;
}
#endif
pParticleChange = &fParticleChangeForDecay;
}
@@ -403,9 +407,20 @@ G4double G4Decay::PostStepGetPhysicalInteractionLength(
// reminder proper time
fRemainderLifeTime = pTime - track.GetProperTime();
if (fRemainderLifeTime <= 0.0) fRemainderLifeTime = DBL_MIN;
G4double rvalue=0.0;
// use pre-assigned Decay time to determine PIL
return (fRemainderLifeTime/aLife)*GetMeanFreePath(track, previousStepSize, condition);
if (aLife>0.0) {
// ordinary particle
rvalue = (fRemainderLifeTime/aLife)*GetMeanFreePath(track, previousStepSize, condition);
} else {
// shortlived particle
rvalue = c_light * fRemainderLifeTime;
// by using normalized kinetic energy (= Ekin/mass)
G4double aMass = track.GetDynamicParticle()->GetMass();
rvalue *= track.GetDynamicParticle()->GetTotalMomentum()/aMass;
}
return rvalue;
}
}
@@ -427,3 +442,14 @@ G4double G4Decay::AtRestGetPhysicalInteractionLength(
}
return fRemainderLifeTime;
}
void G4Decay::SetExtDecayer(G4VExtDecayer* val)
{
pExtDecayer = val;
// set Process Sub Type
if ( pExtDecayer !=0 ) {
SetProcessSubType(static_cast<int>(DECAY_External));
}
}
+12 -4
View File
@@ -28,6 +28,7 @@
//
// History:
// 17 August 2004 P. Gumplinger, T. MacPhail
// 11 April 2008 Kamil Sedlak (PSI), Toni Shiroka (PSI)
// ------------------------------------------------------------
//
#include "G4DecayWithSpin.hh"
@@ -46,7 +47,12 @@
#include "G4Transform3D.hh"
G4DecayWithSpin::G4DecayWithSpin(const G4String& processName):G4Decay(processName){}
G4DecayWithSpin::G4DecayWithSpin(const G4String& processName):G4Decay(processName)
{
// set Process Sub Type
SetProcessSubType(static_cast<int>(DECAY_WithSpin));
}
G4DecayWithSpin::~G4DecayWithSpin(){}
@@ -96,7 +102,7 @@ G4VParticleChange* G4DecayWithSpin::DecayIt(const G4Track& aTrack, const G4Step&
const G4Field* field = NULL;
if(fieldMgr)field = fieldMgr->GetDetectorField();
if (field && !(fieldMgr->DoesFieldChangeEnergy())) {
if (field) {
G4double point[4];
point[0] = (aStep.GetPostStepPoint()->GetPosition())[0];
@@ -104,12 +110,14 @@ G4VParticleChange* G4DecayWithSpin::DecayIt(const G4Track& aTrack, const G4Step&
point[2] = (aStep.GetPostStepPoint()->GetPosition())[2];
point[3] = aTrack.GetGlobalTime();
G4double fieldValue[3];
G4double fieldValue[6];
field -> GetFieldValue(point,fieldValue);
G4ThreeVector B(fieldValue[0],fieldValue[1],fieldValue[2]);
parent_polarization = Spin_Precession(aStep,B,fRemainderLifeTime);
// Call the spin precession only for non-zero mag. field
if (B.mag2() > 0.) parent_polarization =
Spin_Precession(aStep,B,fRemainderLifeTime);
}
}
@@ -36,7 +36,12 @@
// constructor
G4PionDecayMakeSpin::G4PionDecayMakeSpin(const G4String& processName)
: G4Decay(processName) { }
: G4Decay(processName)
{
// set Process Sub Type
SetProcessSubType(static_cast<int>(DECAY_PionMakeSpin));
}
G4PionDecayMakeSpin::~G4PionDecayMakeSpin() { }
+7 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4UnknownDecay.cc,v 1.5 2007/10/06 07:01:09 kurasige Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UnknownDecay.cc,v 1.6 2007/12/15 12:29:16 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// --------------------------------------------------------------
@@ -39,6 +39,8 @@
#include "G4DecayProducts.hh"
#include "G4PhysicsLogVector.hh"
#include "G4ParticleChangeForDecay.hh"
#include "G4DecayProcessType.hh"
// constructor
G4UnknownDecay::G4UnknownDecay(const G4String& processName)
@@ -46,6 +48,9 @@ G4UnknownDecay::G4UnknownDecay(const G4String& processName)
verboseLevel(1),
HighestValue(20.0)
{
// set Process Sub Type
SetProcessSubType(static_cast<int>(DECAY_Unknown));
#ifdef G4VERBOSE
if (GetVerboseLevel()>1) {
G4cout << "G4UnknownDecay constructor " << " Name:" << processName << G4endl;