Import Geant4 3.1.0 source tree
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DalitzDecayChannel.cc,v 1.4 1999/12/15 14:51:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DecayProducts.cc,v 1.6 2000/10/20 11:35:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DecayTable.cc,v 1.6 2000/02/25 07:36:23 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DecayTableMessenger.cc,v 1.3 1999/12/15 14:51:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DynamicParticle.cc,v 1.7 2000/10/20 11:35:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4DynamicParticle.cc,v 1.9 2001/03/05 08:32:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -35,6 +35,8 @@
|
||||
// modify DumpInfo()
|
||||
// revised by Hisaya Kurashige, 5 June 1998
|
||||
// remove theKillProcess
|
||||
// revised by Hisaya Kurashige, 5 Mar 2001
|
||||
// fixed SetDefinition()
|
||||
//--------------------------------------------------------------
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4DecayProducts.hh"
|
||||
@@ -54,6 +56,7 @@ G4DynamicParticle::G4DynamicParticle():
|
||||
theKineticEnergy(0.0),
|
||||
theProperTime(0.0),
|
||||
thePreAssignedDecayProducts(0),
|
||||
thePreAssignedDecayTime(-1.0),
|
||||
verboseLevel(1)
|
||||
{
|
||||
theDynamicalMass = 0.0;
|
||||
@@ -72,6 +75,7 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
|
||||
theKineticEnergy(aKineticEnergy),
|
||||
theProperTime(0.0),
|
||||
thePreAssignedDecayProducts(0),
|
||||
thePreAssignedDecayTime(-1.0),
|
||||
verboseLevel(1)
|
||||
{
|
||||
// set dynamic charge/mass
|
||||
@@ -86,6 +90,7 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
|
||||
theParticleDefinition(aParticleDefinition),
|
||||
theProperTime(0.0),
|
||||
thePreAssignedDecayProducts(0),
|
||||
thePreAssignedDecayTime(-1.0),
|
||||
verboseLevel(1)
|
||||
{
|
||||
// set dynamic charge/mass
|
||||
@@ -113,6 +118,7 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
|
||||
const G4LorentzVector &aParticleMomentum):
|
||||
theParticleDefinition(aParticleDefinition),
|
||||
theProperTime(0.0),
|
||||
thePreAssignedDecayTime(-1.0),
|
||||
thePreAssignedDecayProducts(0),
|
||||
verboseLevel(1)
|
||||
{
|
||||
@@ -151,6 +157,7 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
|
||||
theParticleDefinition(aParticleDefinition),
|
||||
thePreAssignedDecayProducts(0),
|
||||
theProperTime(0.0),
|
||||
thePreAssignedDecayTime(-1.0),
|
||||
verboseLevel(1)
|
||||
{
|
||||
// set dynamic charge/mass
|
||||
@@ -200,8 +207,9 @@ G4DynamicParticle::G4DynamicParticle(const G4DynamicParticle &right)
|
||||
// proper time is set to zero
|
||||
theProperTime = 0.0;
|
||||
|
||||
// thePreAssignedDecayProducts must not be copied.
|
||||
// thePreAssignedDecayProducts/Time must not be copied.
|
||||
thePreAssignedDecayProducts = 0;
|
||||
thePreAssignedDecayTime = -1.0;
|
||||
|
||||
}
|
||||
|
||||
@@ -243,10 +251,38 @@ G4DynamicParticle & G4DynamicParticle::operator=(const G4DynamicParticle &right)
|
||||
|
||||
// thePreAssignedDecayProducts must not be copied.
|
||||
thePreAssignedDecayProducts = 0;
|
||||
thePreAssignedDecayTime = -1.0;
|
||||
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
void G4DynamicParticle::SetDefinition(G4ParticleDefinition * aParticleDefinition)
|
||||
{
|
||||
// remove preassigned decay
|
||||
if (thePreAssignedDecayProducts != 0) {
|
||||
G4cout << " G4DynamicParticle::SetDefinition()::";
|
||||
G4cout << "!!! Pre-assigned decay products is attached !!!! " << G4endl;
|
||||
DumpInfo(0);
|
||||
G4cout << "!!! New Definition is " << aParticleDefinition->GetParticleName() << " !!! " << G4endl;
|
||||
G4cout << "!!! Pre-assigned decay products will be deleted !!!! " << G4endl;
|
||||
delete thePreAssignedDecayProducts;
|
||||
}
|
||||
thePreAssignedDecayProducts = 0;
|
||||
|
||||
theParticleDefinition = aParticleDefinition;
|
||||
// set Dynamic mass/chrge
|
||||
theDynamicalMass = theParticleDefinition->GetPDGMass();
|
||||
theDynamicalCharge = theParticleDefinition->GetPDGCharge();
|
||||
|
||||
// Set electron orbits
|
||||
if (theElectronOccupancy != 0) delete theElectronOccupancy;
|
||||
theElectronOccupancy =0;
|
||||
AllocateElectronOccupancy();
|
||||
|
||||
}
|
||||
|
||||
////////////////////
|
||||
G4int G4DynamicParticle::operator==(const G4DynamicParticle &right) const
|
||||
{
|
||||
@@ -350,11 +386,6 @@ void G4DynamicParticle::DumpInfo(G4int mode) const
|
||||
theElectronOccupancy->DumpInfo();
|
||||
}
|
||||
}
|
||||
if (mode>1) {
|
||||
if( theElectronOccupancy != 0) {
|
||||
theElectronOccupancy->DumpInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ElectronOccupancy.cc,v 1.5 1999/12/15 14:51:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonTable.cc,v 1.26 2000/09/14 10:00:22 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Ions.cc,v 1.4 1999/12/15 14:51:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IsotopeProperty.cc,v 1.2 1999/12/15 14:51:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4KL3DecayChannel.cc,v 1.4 1999/12/15 14:51:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuonDecayChannel.cc,v 1.6 2000/02/25 07:36:24 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4MuonDecayChannel.cc,v 1.7 2001/02/28 07:29:28 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -16,7 +16,8 @@
|
||||
// CERN, CN Division, ASD group
|
||||
// History: first implementation, based on object model of
|
||||
// 30 May 1997 H.Kurashige
|
||||
// 10 June 1997 H.Kurashige
|
||||
//
|
||||
// Fix bug in calcuration of electron energy in DecayIt 28 Feb. 01 H.Kurashige
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
@@ -104,7 +105,7 @@ G4DecayProducts *G4MuonDecayChannel::DecayIt(G4double)
|
||||
do {
|
||||
r = G4UniformRand();
|
||||
x = xmax*G4UniformRand();
|
||||
} while (r < (3.0 - 2.0*x)*x*x);
|
||||
} while (r > (3.0 - 2.0*x)*x*x);
|
||||
energy = x*parentmass/2.0 - daughtermass[0];
|
||||
} while (energy <0.0);
|
||||
//create daughter G4DynamicParticle
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NucleiProperties.cc,v 1.6 1999/12/15 14:51:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NucleiPropertiesTableA.cc,v 1.5 1999/12/15 14:51:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class file --- Copyright CERN 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NucleiPropertiesTableB.cc,v 1.4 1999/12/15 14:51:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class file --- Copyright CERN 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PDGCodeChecker.cc,v 1.3 1999/12/15 14:51:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleDefinition.cc,v 1.10 2000/10/20 11:35:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleMessenger.cc,v 1.4 1999/12/15 14:51:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticlePropertyMessenger.cc,v 1.3 1999/12/15 14:51:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleTable.cc,v 1.17 2000/10/20 11:35:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// class G4ParticleTable
|
||||
//
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleWithCuts.cc,v 1.6 1999/12/15 14:51:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4ParticleWithCuts.cc,v 1.8 2001/03/12 05:58:22 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -24,6 +24,7 @@
|
||||
// remove BuildPhysicTabel() 06 June 1998 H.Kurashige
|
||||
// bug in CalcEnergyCuts is corrected , 22 June 1998 L.Urban
|
||||
// modify CalcEnergyCuts 09 Nov. 1998, L.Urban
|
||||
// added RestoreCuts H.Kurashige 09 Mar. 2001
|
||||
// ------------------------------------------------------------
|
||||
#include "globals.hh"
|
||||
#include "G4ParticleWithCuts.hh"
|
||||
@@ -174,8 +175,9 @@ void G4ParticleWithCuts::BuildLossTable()
|
||||
if (NumberOfElements ==0)
|
||||
{
|
||||
NumberOfElements = G4Element::GetNumberOfElements();
|
||||
theLossTable = new
|
||||
G4LossTable(G4Element::GetNumberOfElements());
|
||||
theLossTable = new G4LossTable();
|
||||
theLossTable->reserve(G4Element::GetNumberOfElements());
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>2) {
|
||||
G4cout << "G4ParticleWithCuts::BuildLossTable() ";
|
||||
@@ -274,6 +276,27 @@ G4double G4ParticleWithCuts::ConvertCutToKineticEnergy(G4RangeVector* rangeVecto
|
||||
}
|
||||
}
|
||||
|
||||
// **********************************************************************
|
||||
// **************************** RestoreCuts *********************************
|
||||
// **********************************************************************
|
||||
|
||||
void G4ParticleWithCuts::RestoreCuts(G4double cutInLength,
|
||||
const G4double* cutInEnergy )
|
||||
{
|
||||
// Set cut in stopping range
|
||||
theCutInMaxInteractionLength = cutInLength;
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
|
||||
// Restore the vector of cuts in energy corresponding to the range cut
|
||||
if(theKineticEnergyCuts) delete [] theKineticEnergyCuts;
|
||||
theKineticEnergyCuts = new G4double [materialTable->length()];
|
||||
for (G4int j=0; j<materialTable->length(); j +=1) {
|
||||
theKineticEnergyCuts[j] = cutInEnergy[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// **********************************************************************
|
||||
// **************************** SetCuts *********************************
|
||||
// **********************************************************************
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PhaseSpaceDecayChannel.cc,v 1.4 1999/12/15 14:51:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ShortLivedTable.cc,v 1.9 2000/02/25 07:36:24 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VDecayChannel.cc,v 1.8 2000/05/29 01:30:52 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user