Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4DalitzDecayChannel.cc,v 1.5 2001/07/11 10:01:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4DecayProducts.cc,v 1.9 2001/07/11 10:01:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4DecayTable.cc,v 1.7 2001/07/11 10:01:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4DecayTableMessenger.cc,v 1.4 2001/07/11 10:01:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4DecayTableMessenger.cc,v 1.5 2003/06/16 16:58:24 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
@@ -51,7 +51,7 @@
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ios.hh" // Include from 'system'
#include "g4std/iomanip" // Include from 'system'
#include <iomanip> // Include from 'system'
G4DecayTableMessenger::G4DecayTableMessenger(G4ParticleTable* pTable)
:theParticleTable(pTable)
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4DynamicParticle.cc,v 1.12 2003/03/13 09:59:39 jwellisc Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4DynamicParticle.cc,v 1.15 2003/06/18 16:55:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -51,6 +51,11 @@
// remove theKillProcess
// revised by Hisaya Kurashige, 5 Mar 2001
// fixed SetDefinition()
// revised by V.Ivanchenko, 12 June 2003
// fixed problem of massless particles
// revised by V.Ivanchenko, 18 June 2003
// take into account the case of virtual photons
//
//--------------------------------------------------------------
#include "G4DynamicParticle.hh"
#include "G4DecayProducts.hh"
@@ -91,12 +96,12 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
thePreAssignedDecayProducts(0),
thePreAssignedDecayTime(-1.0),
verboseLevel(1)
{
{
// set dynamic charge/mass
theDynamicalMass = aParticleDefinition->GetPDGMass();
theDynamicalCharge = aParticleDefinition->GetPDGCharge();
AllocateElectronOccupancy();
}
}
////////////////////
G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
@@ -121,7 +126,7 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
SetMomentumDirection(aParticleMomentum.x()/pModule,
aParticleMomentum.y()/pModule,
aParticleMomentum.z()/pModule);
} else {
} else {
SetMomentumDirection(1.0,0.0,0.0);
SetKineticEnergy(0.0);
}
@@ -140,7 +145,7 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
theDynamicalMass = aParticleDefinition->GetPDGMass();
theDynamicalCharge = aParticleDefinition->GetPDGCharge();
AllocateElectronOccupancy();
// 4-momentum vector (Lorentz vecotr) is given
G4double pModule2 = aParticleMomentum.x()*aParticleMomentum.x()
+ aParticleMomentum.y()*aParticleMomentum.y()
@@ -151,22 +156,23 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
aParticleMomentum.y()/pModule,
aParticleMomentum.z()/pModule);
G4double totalenergy = aParticleMomentum.t();
if (totalenergy > pModule) {
G4double mass = sqrt(totalenergy*totalenergy - pModule2);
theDynamicalMass = mass;
SetKineticEnergy(totalenergy-mass);
} else {
G4double mass2 = totalenergy*totalenergy - pModule2;
if(mass2 < 0.0001*MeV*MeV) {
theDynamicalMass = 0.;
SetKineticEnergy(totalenergy);
} else {
theDynamicalMass = sqrt(mass2);
SetKineticEnergy(totalenergy-theDynamicalMass);
}
} else {
} else {
SetMomentumDirection(1.0,0.0,0.0);
SetKineticEnergy(0.0);
}
}
G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
G4double totalEnergy,
G4double totalEnergy,
const G4ThreeVector &aParticleMomentum):
theParticleDefinition(aParticleDefinition),
theProperTime(0.0),
@@ -178,7 +184,7 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
theDynamicalMass = aParticleDefinition->GetPDGMass();
theDynamicalCharge = aParticleDefinition->GetPDGCharge();
AllocateElectronOccupancy();
// total energy and momentum direction are given
G4double pModule2 = aParticleMomentum.mag2();
if (pModule2>0.0) {
@@ -186,13 +192,14 @@ G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
SetMomentumDirection(aParticleMomentum.x()/pModule,
aParticleMomentum.y()/pModule,
aParticleMomentum.z()/pModule);
if (totalEnergy > pModule) {
G4double mass = sqrt(totalEnergy*totalEnergy - pModule2);
theDynamicalMass = mass;
SetKineticEnergy(totalEnergy-mass);
} else {
G4double mass2 = totalEnergy*totalEnergy - pModule2;
if(mass2 < 0.0001*MeV*MeV) {
theDynamicalMass = 0.;
SetKineticEnergy(totalEnergy);
} else {
theDynamicalMass = sqrt(mass2);
SetKineticEnergy(totalEnergy-theDynamicalMass);
}
} else {
SetMomentumDirection(1.0,0.0,0.0);
@@ -206,7 +213,7 @@ G4DynamicParticle::G4DynamicParticle(const G4DynamicParticle &right)
theDynamicalMass = right.theDynamicalMass;
theDynamicalCharge = right.theDynamicalCharge;
if (right.theElectronOccupancy != 0){
theElectronOccupancy =
theElectronOccupancy =
new G4ElectronOccupancy(*right.theElectronOccupancy);
} else {
theElectronOccupancy = 0;
@@ -250,7 +257,7 @@ G4DynamicParticle & G4DynamicParticle::operator=(const G4DynamicParticle &right)
theDynamicalMass = right.theDynamicalMass;
theDynamicalCharge = right.theDynamicalCharge;
if (right.theElectronOccupancy != 0){
theElectronOccupancy =
theElectronOccupancy =
new G4ElectronOccupancy(*right.theElectronOccupancy);
} else {
theElectronOccupancy = 0;
@@ -262,7 +269,7 @@ G4DynamicParticle & G4DynamicParticle::operator=(const G4DynamicParticle &right)
thePolarization = right.thePolarization;
theProperTime = right.theProperTime;
verboseLevel = right.verboseLevel;
// thePreAssignedDecayProducts must not be copied.
thePreAssignedDecayProducts = 0;
thePreAssignedDecayTime = -1.0;
@@ -277,10 +284,10 @@ 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;
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;
@@ -319,7 +326,7 @@ void G4DynamicParticle::AllocateElectronOccupancy()
G4ParticleDefinition* particle = GetDefinition();
if (G4IonTable::IsIon(particle)) {
// Only ions can have ElectronOccupancy
// Only ions can have ElectronOccupancy
theElectronOccupancy = new G4ElectronOccupancy();
} else {
@@ -359,15 +366,16 @@ void G4DynamicParticle::Set4Momentum(const G4LorentzVector &momentum )
momentum.y()/pModule,
momentum.z()/pModule);
G4double totalenergy = momentum.t();
if (totalenergy > pModule) {
G4double mass = sqrt(G4std::max(0., totalenergy*totalenergy - pModule2) );
theDynamicalMass = mass;
SetKineticEnergy(totalenergy-mass);
} else {
G4double mass2 = totalenergy*totalenergy - pModule2;
if(mass2 < 0.0001*MeV*MeV) {
theDynamicalMass = 0.;
SetKineticEnergy(totalenergy);
} else {
theDynamicalMass = sqrt(mass2);
SetKineticEnergy(totalenergy-theDynamicalMass);
}
} else {
} else {
SetMomentumDirection(1.0,0.0,0.0);
SetKineticEnergy(0.0);
}
@@ -380,7 +388,7 @@ void G4DynamicParticle::Set4Momentum(const G4LorentzVector &momentum )
void G4DynamicParticle::DumpInfo(G4int mode) const
{
if (theParticleDefinition == 0) {
G4cout << " G4DynamicParticle::DumpInfo():: !!!Particle type not defined !!!! " << G4endl;
G4cout << " G4DynamicParticle::DumpInfo():: !!!Particle type not defined !!!! " << G4endl;
} else {
G4cout << " Particle type - " << theParticleDefinition->GetParticleName() << G4endl
<< " mass: " << GetMass()/GeV << "[GeV]" <<G4endl
@@ -412,7 +420,7 @@ G4double G4DynamicParticle::GetElectronMass() const
if (electronMass<=0.0) {
G4ParticleDefinition* electron = G4ParticleTable::GetParticleTable()->FindParticle("e-");
if (electron == 0) {
G4Exception("G4DynamicParticle: G4Electron is not defined !!");
G4Exception("G4DynamicParticle: G4Electron is not defined !!");
}
electronMass = electron->GetPDGMass();
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4ElectronOccupancy.cc,v 1.6 2001/07/11 10:01:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ----------------------------------------------------------------------
+12 -12
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4IonTable.cc,v 1.33 2003/03/10 08:43:53 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4IonTable.cc,v 1.35 2003/06/16 16:58:26 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -52,10 +52,10 @@
#include "G4VIsotopeTable.hh"
#include "G4ios.hh"
#include "g4std/iostream"
#include "g4std/iomanip"
#include <iostream>
#include <iomanip>
#include "g4std/strstream"
#include <strstream>
////////////////////
@@ -167,7 +167,7 @@ G4ParticleDefinition* G4IonTable::CreateIon(G4int Z, G4int A, G4double E, G4int
////////////////////
// -- GetIon methods ------
////////////////////
G4ParticleDefinition* G4IonTable::GetIon(G4int Z, G4int A, G4int J, G4int Q)
G4ParticleDefinition* G4IonTable::GetIon(G4int Z, G4int A, G4int , G4int )
{
return GetIon(Z, A);
}
@@ -270,9 +270,9 @@ G4String G4IonTable::GetIonName(G4int Z, G4int A, G4double E) const
return "?";
}
char val[50];
G4std::ostrstream os(val,50);
os.setf(G4std::ios::fixed);
os << A << '[' << G4std::setprecision(1) << E/keV << ']' << '\0';
std::ostrstream os(val,50);
os.setf(std::ios::fixed);
os << A << '[' << std::setprecision(1) << E/keV << ']' << '\0';
name += val;
return name;
}
@@ -459,7 +459,7 @@ void G4IonTable::AddProcessManager(const G4String& name)
{
// create command string for addProcManager
char cmdAdd[60];
G4std::ostrstream osAdd(cmdAdd,60);
std::ostrstream osAdd(cmdAdd,60);
osAdd << "/run/particle/addProcManager "<< name << '\0';
// set /control/verbose 0
@@ -473,7 +473,7 @@ void G4IonTable::AddProcessManager(const G4String& name)
G4UImanager::GetUIpointer()->SetVerboseLevel(tempVerboseLevel);
}
#include "g4std/vector"
#include <vector>
////////////////////
void G4IonTable::RegisterIsotopeTable(G4VIsotopeTable* table)
@@ -489,7 +489,7 @@ G4VIsotopeTable* G4IonTable::GetIsotopeTable() const
////////////////////
G4IsotopeProperty* G4IonTable::FindIsotope(G4int Z, G4int A, G4double E, G4int J)
G4IsotopeProperty* G4IonTable::FindIsotope(G4int Z, G4int A, G4double E, G4int )
{
if (fIsotopeTable ==0) return 0;
+4 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Ions.cc,v 1.8 2003/03/11 05:49:41 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4Ions.cc,v 1.9 2003/06/16 16:58:27 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ----------------------------------------------------------------------
@@ -32,8 +32,8 @@
// 4th April 1996, G.Cosmo
// **********************************************************************
#include "g4std/fstream"
#include "g4std/iomanip"
#include <fstream>
#include <iomanip>
#include "G4Ions.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4IsotopeProperty.cc,v 1.3 2001/07/11 10:02:00 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4IsotopeProperty.cc,v 1.4 2003/06/16 16:58:28 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ----------------------------------------------------------------------
@@ -32,7 +32,7 @@
// New design using G4VIsotopeTable 5 Oct. 99 H.Kurashige
#include "G4ios.hh"
#include "g4std/iomanip"
#include <iomanip>
#include "G4IsotopeProperty.hh"
#include "G4DecayTable.hh"
@@ -102,7 +102,7 @@ void G4IsotopeProperty::DumpInfo() const
G4cout << "AtomicNumber: " << fAtomicNumber << G4endl;
G4cout << "AtomicMass: " << fAtomicMass << G4endl;
G4cout << "Spin: " << fISpin << "/2" << G4endl;
G4cout << "Excited Energy: " << G4std::setprecision(1) << fEnergy/keV << "[keV]" << G4endl;
G4cout << "Excited Energy: " << std::setprecision(1) << fEnergy/keV << "[keV]" << G4endl;
G4cout << "Life Time: " << fLifeTime/ns << "[ns]" << G4endl;
if (fDecayTable != 0) {
fDecayTable->DumpInfo();
@@ -22,7 +22,7 @@
//
//
// $Id: G4KL3DecayChannel.cc,v 1.5 2001/07/11 10:02:00 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4MaterialCutsCouple.cc,v 1.4 2003/04/10 02:51:19 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4MaterialCutsCouple.cc,v 1.5 2003/06/16 16:58:29 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -31,7 +31,7 @@
// --------------------------------------------------------------
#include "G4MaterialCutsCouple.hh"
#include "g4std/iomanip"
#include <iomanip>
#include "G4Material.hh"
#include "G4ProductionCuts.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuonDecayChannel.cc,v 1.9 2001/07/11 10:02:00 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4NeutronBetaDecayChannel.cc,v 1.4 2002/04/03 09:05:33 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4NucleiProperties.cc,v 1.10 2002/05/30 02:13:10 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4NucleiPropertiesTableA.cc,v 1.7 2001/10/15 09:58:34 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4NucleiPropertiesTableB.cc,v 1.7 2001/10/15 09:58:35 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
// -------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NucleiPropertiesTheoreticalTableA.cc,v 1.4 2001/10/15 09:58:35 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4NucleiPropertiesTheoreticalTableA.cc,v 1.5 2003/05/19 17:10:25 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -38,7 +38,7 @@ G4int G4NucleiPropertiesTheoreticalTable::shortTable[G4NucleiPropertiesTheoretic
G4NucleiPropertiesTheoreticalTable G4NucleiPropertiesTheoreticalTable::theInstance(2.5);
// Default constructor
G4NucleiPropertiesTheoreticalTable::G4NucleiPropertiesTheoreticalTable(G4double dummy)
G4NucleiPropertiesTheoreticalTable::G4NucleiPropertiesTheoreticalTable(G4double )
{
G4int j = 0;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PDGCodeChecker.cc,v 1.5 2001/07/11 10:02:03 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4PDGCodeChecker.cc,v 1.6 2003/06/16 16:58:30 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ----------------------------------------------------------------------
@@ -32,8 +32,8 @@
// 17 Aug 1999 H.Kurashige
// **********************************************************************
#include "g4std/fstream"
#include "g4std/iomanip"
#include <fstream>
#include <iomanip>
#include "G4PDGCodeChecker.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleDefinition.cc,v 1.16 2003/04/11 11:48:40 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ParticleDefinition.cc,v 1.17.2.1 2003/06/16 17:18:49 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -116,7 +116,7 @@ G4ParticleDefinition::G4ParticleDefinition(
#endif
}
G4ParticleDefinition::G4ParticleDefinition(const G4ParticleDefinition &right)
G4ParticleDefinition::G4ParticleDefinition(const G4ParticleDefinition &)
{
G4Exception("You call Copy Constructor of G4ParticleDefinition ");
}
@@ -296,7 +296,7 @@ void G4ParticleDefinition::SetRangeCut(G4double aCut, const G4Material*)
defaultCuts->SetProductionCut(aCut,this);
}
void G4ParticleDefinition::SetRangeCutVector(G4std::vector<G4double>& vec)
void G4ParticleDefinition::SetRangeCutVector(std::vector<G4double>& vec)
{
G4cerr << "Warning : you invoked G4ParticleDefinition::SetRangeCutVector." << G4endl;
G4cerr << " This method is obsolete and will be removed soon." << G4endl;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleMessenger.cc,v 1.6 2001/10/24 18:42:41 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ParticleMessenger.cc,v 1.7 2003/06/16 16:58:32 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
@@ -42,7 +42,7 @@
//---------------------------------------------------------------
#include "G4ios.hh" // Include from 'system'
#include "g4std/iomanip" // Include from 'system'
#include <iomanip> // Include from 'system'
#include "G4ParticleMessenger.hh"
#include "G4UImanager.hh"
@@ -114,7 +114,7 @@ void G4ParticleMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
while( (*piter)() ){
G4ParticleDefinition *particle = piter->value();
if ((newValues=="all") || (newValues==particle->GetParticleType())) {
G4cout << G4std::setw(19) << particle->GetParticleName();
G4cout << std::setw(19) << particle->GetParticleName();
if ((counter++)%4 == 3) {
G4cout << G4endl;
} else {
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticlePropertyMessenger.cc,v 1.5 2002/12/04 18:36:45 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ParticlePropertyMessenger.cc,v 1.6 2003/06/16 16:58:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
@@ -52,7 +52,7 @@
#include "G4ParticlePropertyMessenger.hh"
#include "G4ParticleTable.hh"
#include "G4ios.hh" // Include from 'system'
#include "g4std/iomanip" // Include from 'system'
#include <iomanip> // Include from 'system'
G4ParticlePropertyMessenger::G4ParticlePropertyMessenger(G4ParticleTable* pTable)
:theParticleTable(pTable),
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleTable.cc,v 1.18 2001/07/11 10:02:03 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ParticleTable.cc,v 1.19 2003/05/19 17:10:26 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// class G4ParticleTable
//
@@ -267,7 +267,7 @@ G4ParticleDefinition* G4ParticleTable::Remove(G4ParticleDefinition* particle)
}
////////////////////
G4ParticleDefinition* G4ParticleTable::FindIon(G4int Z, G4int A, G4int J, G4int Q)
G4ParticleDefinition* G4ParticleTable::FindIon(G4int Z, G4int A, G4int , G4int )
{
if (Z<=0) return 0;
if (A<Z) return 0;
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhaseSpaceDecayChannel.cc,v 1.7 2001/10/15 09:58:36 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ProductionCuts.cc,v 1.6 2003/04/10 02:51:19 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ProductionCuts.cc,v 1.7 2003/06/16 16:58:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -31,7 +31,7 @@
// --------------------------------------------------------------
#include "G4ProductionCuts.hh"
#include "g4std/iomanip"
#include <iomanip>
const G4ParticleDefinition* G4ProductionCuts::gammaDef = 0;
const G4ParticleDefinition* G4ProductionCuts::electDef = 0;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ProductionCutsTable.cc,v 1.14 2003/04/29 04:25:58 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ProductionCutsTable.cc,v 1.17 2003/06/18 08:16:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -44,8 +44,8 @@
#include "G4UnitsTable.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/fstream"
#include <iomanip>
#include <fstream>
@@ -73,7 +73,7 @@ G4ProductionCutsTable::G4ProductionCutsTable()
defaultProductionCuts = new G4ProductionCuts();
}
G4ProductionCutsTable::G4ProductionCutsTable(const G4ProductionCutsTable& right)
G4ProductionCutsTable::G4ProductionCutsTable(const G4ProductionCutsTable& )
{;}
G4ProductionCutsTable::~G4ProductionCutsTable()
@@ -109,12 +109,12 @@ void G4ProductionCutsTable::UpdateCoupleTable()
{ (*CoupleItr)->SetUseFlag(false); }
// Update Material-Cut-Couple
typedef G4std::vector<G4Region*>::iterator regionIterator;
typedef std::vector<G4Region*>::iterator regionIterator;
for(regionIterator rItr=fG4RegionStore->begin();rItr!=fG4RegionStore->end();rItr++)
{
///////////////////if(!((*rItr)->IsModified())) continue;
G4ProductionCuts* fProductionCut = (*rItr)->GetProductionCuts();
G4std::vector<G4Material*>::const_iterator mItr = (*rItr)->GetMaterialIterator();
std::vector<G4Material*>::const_iterator mItr = (*rItr)->GetMaterialIterator();
size_t nMaterial = (*rItr)->GetNumberOfMaterials();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -164,7 +164,7 @@ void G4ProductionCutsTable::UpdateCoupleTable()
// if((*rItr)==theWorldRegion)
// {
// aCouple->SetUseFlag(false);
// G4std::vector<G4Material*>::const_iterator mItr1 = (*rItr)->GetMaterialIterator();
// std::vector<G4Material*>::const_iterator mItr1 = (*rItr)->GetMaterialIterator();
// size_t nMaterial1 = (*rItr)->GetNumberOfMaterials();
// for(size_t iMate1=0;iMate1<nMaterial1;iMate1++)
// {
@@ -176,7 +176,7 @@ void G4ProductionCutsTable::UpdateCoupleTable()
// The previous part of the code should be removed once all EM processes
// become "Region-aware"
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
G4std::vector<G4LogicalVolume*>::iterator rootLVItr
std::vector<G4LogicalVolume*>::iterator rootLVItr
= (*rItr)->GetRootLogicalVolumeIterator();
size_t nRootLV = (*rItr)->GetNumberOfRootVolumes();
for(size_t iLV=0;iLV<nRootLV;iLV++)
@@ -345,7 +345,7 @@ void G4ProductionCutsTable::DumpCouples() const
if(aCouple->IsUsed())
{
G4cout << " Region(s) which use this couple : " << G4endl;
typedef G4std::vector<G4Region*>::iterator regionIterator;
typedef std::vector<G4Region*>::iterator regionIterator;
for(regionIterator rItr=fG4RegionStore->begin();rItr!=fG4RegionStore->end();rItr++)
{
if (IsCoupleUsedInTheRegion(aCouple, *rItr) ){
@@ -395,15 +395,13 @@ G4bool G4ProductionCutsTable::StoreMaterialInfo(const G4String& directory,
{
const G4String fileName = directory + "/" + "material.dat";
const G4String key = "MATERIAL-V2.0";
G4std::ofstream fOut;
std::ofstream fOut;
// open output file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii )
fOut.open(fileName,G4std::ios::out|G4std::ios::binary);
fOut.open(fileName,std::ios::out|std::ios::binary);
else
#endif
fOut.open(fileName,G4std::ios::out);
fOut.open(fileName,std::ios::out);
// check if the file has been opened successfully
@@ -427,15 +425,15 @@ G4bool G4ProductionCutsTable::StoreMaterialInfo(const G4String& directory,
// number of materials in the table
fOut << numberOfMaterial << G4endl;
fOut.setf(G4std::ios::scientific);
fOut.setf(std::ios::scientific);
// material name and density
for (size_t idx=0; G4int(idx)<numberOfMaterial; ++idx){
fOut << G4std::setw(FixedStringLengthForStore) << ((*matTable)[idx])->GetName();
fOut << G4std::setw(FixedStringLengthForStore) << ((*matTable)[idx])->GetDensity()/(g/cm3) << G4endl;
fOut << std::setw(FixedStringLengthForStore) << ((*matTable)[idx])->GetName();
fOut << std::setw(FixedStringLengthForStore) << ((*matTable)[idx])->GetDensity()/(g/cm3) << G4endl;
}
fOut.unsetf(G4std::ios::scientific);
fOut.unsetf(std::ios::scientific);
} else {
/////////////// Binary mode /////////////////
@@ -471,15 +469,13 @@ G4bool G4ProductionCutsTable::CheckMaterialInfo(const G4String& directory,
{
const G4String fileName = directory + "/" + "material.dat";
const G4String key = "MATERIAL-V2.0";
G4std::ifstream fIn;
std::ifstream fIn;
// open input file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii )
fIn.open(fileName,G4std::ios::in|G4std::ios::binary);
fIn.open(fileName,std::ios::in|std::ios::binary);
else
#endif
fIn.open(fileName,G4std::ios::in);
fIn.open(fileName,std::ios::in);
// check if the file has been opened successfully
if (!fIn) {
@@ -562,9 +558,9 @@ G4bool G4ProductionCutsTable::CheckMaterialInfo(const G4String& directory,
#ifdef G4VERBOSE
G4cout << "G4ProductionCutsTable::CheckMaterialInfo ";
G4cout << " Inconsistent material name or density" << G4endl;;
G4cout << G4std::setw(40) << name;
G4cout << G4std::setw(20) << G4std::setiosflags(G4std::ios::scientific) << density << G4endl;
G4cout << G4std::resetiosflags(G4std::ios::scientific);
G4cout << std::setw(40) << name;
G4cout << std::setw(20) << std::setiosflags(std::ios::scientific) << density << G4endl;
G4cout << std::resetiosflags(std::ios::scientific);
#endif
fIn.close();
return false;
@@ -582,16 +578,14 @@ G4bool G4ProductionCutsTable::StoreMaterialCutsCoupleInfo(const G4String& direc
{
const G4String fileName = directory + "/" + "couple.dat";
const G4String key = "COUPLE-V2.0";
G4std::ofstream fOut;
std::ofstream fOut;
char temp[FixedStringLengthForStore];
// open output file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii )
fOut.open(fileName,G4std::ios::out|G4std::ios::binary);
fOut.open(fileName,std::ios::out|std::ios::binary);
else
#endif
fOut.open(fileName,G4std::ios::out);
fOut.open(fileName,std::ios::out);
// check if the file has been opened successfully
@@ -606,7 +600,7 @@ G4bool G4ProductionCutsTable::StoreMaterialCutsCoupleInfo(const G4String& direc
if (ascii) {
/////////////// ASCII mode /////////////////
// key word
fOut << G4std::setw(FixedStringLengthForStore) << key << G4endl;
fOut << std::setw(FixedStringLengthForStore) << key << G4endl;
// number of couples in the table
fOut << numberOfCouples << G4endl;
@@ -638,7 +632,7 @@ G4bool G4ProductionCutsTable::StoreMaterialCutsCoupleInfo(const G4String& direc
G4String materialName = aCouple->GetMaterial()->GetName();
G4String regionName = "NONE";
if (aCouple->IsUsed()){
typedef G4std::vector<G4Region*>::iterator regionIterator;
typedef std::vector<G4Region*>::iterator regionIterator;
for(regionIterator rItr=fG4RegionStore->begin();rItr!=fG4RegionStore->end();rItr++){
if (IsCoupleUsedInTheRegion(aCouple, *rItr) ){
regionName = (*rItr)->GetName();
@@ -653,17 +647,17 @@ G4bool G4ProductionCutsTable::StoreMaterialCutsCoupleInfo(const G4String& direc
fOut << index << G4endl;
// material name
fOut << G4std::setw(FixedStringLengthForStore) << materialName<< G4endl;
fOut << std::setw(FixedStringLengthForStore) << materialName<< G4endl;
// region name
fOut << G4std::setw(FixedStringLengthForStore) << regionName<< G4endl;
fOut << std::setw(FixedStringLengthForStore) << regionName<< G4endl;
fOut.setf(G4std::ios::scientific);
fOut.setf(std::ios::scientific);
// cut values
for (size_t idx=0; idx< NumberOfG4CutIndex; idx++) {
fOut << G4std::setw(FixedStringLengthForStore) << cutValues[idx]/(mm) << G4endl;
fOut << std::setw(FixedStringLengthForStore) << cutValues[idx]/(mm) << G4endl;
}
fOut.unsetf(G4std::ios::scientific);
fOut.unsetf(std::ios::scientific);
} else {
/////////////// Binary mode /////////////////
@@ -703,15 +697,13 @@ G4bool G4ProductionCutsTable::CheckMaterialCutsCoupleInfo(const G4String& direc
{
const G4String fileName = directory + "/" + "couple.dat";
const G4String key = "COUPLE-V2.0";
G4std::ifstream fIn;
std::ifstream fIn;
// open input file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii )
fIn.open(fileName,G4std::ios::in|G4std::ios::binary);
fIn.open(fileName,std::ios::in|std::ios::binary);
else
#endif
fIn.open(fileName,G4std::ios::in);
fIn.open(fileName,std::ios::in);
// check if the file has been opened successfully
if (!fIn) {
@@ -846,16 +838,14 @@ G4bool G4ProductionCutsTable::StoreCutsInfo(const G4String& directory,
{
const G4String fileName = directory + "/" + "cut.dat";
const G4String key = "CUT-V2.0";
G4std::ofstream fOut;
std::ofstream fOut;
char temp[FixedStringLengthForStore];
// open output file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii )
fOut.open(fileName,G4std::ios::out|G4std::ios::binary);
fOut.open(fileName,std::ios::out|std::ios::binary);
else
#endif
fOut.open(fileName,G4std::ios::out);
fOut.open(fileName,std::ios::out);
// check if the file has been opened successfully
@@ -889,18 +879,18 @@ G4bool G4ProductionCutsTable::StoreCutsInfo(const G4String& directory,
for (size_t idx=0; idx <NumberOfG4CutIndex; idx++) {
const G4std::vector<G4double>* fRange = GetRangeCutsVector(idx);
const G4std::vector<G4double>* fEnergy = GetEnergyCutsVector(idx);
const std::vector<G4double>* fRange = GetRangeCutsVector(idx);
const std::vector<G4double>* fEnergy = GetEnergyCutsVector(idx);
size_t i=0;
// Loop over all couples
CoupleTableIterator cItr;
for (cItr=coupleTable.begin();cItr!=coupleTable.end();cItr++, i++){
if (ascii) {
/////////////// ASCII mode /////////////////
fOut.setf(G4std::ios::scientific);
fOut << G4std::setw(20) << (*fRange)[i]/mm ;
fOut << G4std::setw(20) << (*fEnergy)[i]/keV << G4endl;
fOut.unsetf(G4std::ios::scientific);
fOut.setf(std::ios::scientific);
fOut << std::setw(20) << (*fRange)[i]/mm ;
fOut << std::setw(20) << (*fEnergy)[i]/keV << G4endl;
fOut.unsetf(std::ios::scientific);
} else {
/////////////// Binary mode /////////////////
G4double cut = (*fRange)[i];
@@ -920,15 +910,13 @@ G4bool G4ProductionCutsTable::RetrieveCutsInfo(const G4String& directory,
{
const G4String fileName = directory + "/" + "cut.dat";
const G4String key = "CUT-V2.0";
G4std::ifstream fIn;
std::ifstream fIn;
// open input file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii )
fIn.open(fileName,G4std::ios::in|G4std::ios::binary);
fIn.open(fileName,std::ios::in|std::ios::binary);
else
#endif
fIn.open(fileName,G4std::ios::in);
fIn.open(fileName,std::ios::in);
// check if the file has been opened successfully
if (!fIn) {
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RToEConvForAntiNeutron.cc,v 1.2 2002/12/16 11:15:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RToEConvForAntiNeutron.cc,v 1.3 2003/06/16 16:58:36 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -36,8 +36,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
G4RToEConvForAntiNeutron::G4RToEConvForAntiNeutron() : G4VRangeToEnergyConverter()
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RToEConvForAntiProton.cc,v 1.2 2002/12/16 11:15:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RToEConvForAntiProton.cc,v 1.3 2003/06/16 16:58:37 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -36,8 +36,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
G4RToEConvForAntiProton::G4RToEConvForAntiProton() : G4VRangeToEnergyConverter()
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RToEConvForElectron.cc,v 1.3 2003/01/07 23:52:24 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RToEConvForElectron.cc,v 1.4 2003/06/16 16:58:38 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -37,8 +37,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
G4RToEConvForElectron::G4RToEConvForElectron() : G4VRangeToEnergyConverter()
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RToEConvForGamma.cc,v 1.4 2003/01/07 23:52:24 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RToEConvForGamma.cc,v 1.5 2003/06/16 16:58:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -37,8 +37,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
G4RToEConvForGamma::G4RToEConvForGamma() : G4VRangeToEnergyConverter()
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RToEConvForNeutron.cc,v 1.2 2002/12/16 11:15:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RToEConvForNeutron.cc,v 1.3 2003/06/16 16:58:40 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -36,8 +36,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
G4RToEConvForNeutron::G4RToEConvForNeutron() : G4VRangeToEnergyConverter()
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RToEConvForPositron.cc,v 1.3 2003/01/07 23:52:24 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RToEConvForPositron.cc,v 1.4 2003/06/16 16:58:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -37,8 +37,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
G4RToEConvForPositron::G4RToEConvForPositron() : G4VRangeToEnergyConverter()
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RToEConvForProton.cc,v 1.2 2002/12/16 11:15:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RToEConvForProton.cc,v 1.3 2003/06/16 16:58:42 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -36,8 +36,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
G4RToEConvForProton::G4RToEConvForProton() : G4VRangeToEnergyConverter()
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ShortLivedTable.cc,v 1.10 2001/07/11 10:02:04 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ShortLivedTable.cc,v 1.11 2003/06/16 16:58:43 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -39,7 +39,7 @@
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
G4ShortLivedTable::G4ShortLivedTable()
@@ -22,7 +22,7 @@
//
//
// $Id: G4TauLeptonicDecayChannel.cc,v 1.2 2002/03/28 10:56:09 kurasige Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VDecayChannel.cc,v 1.15 2002/11/20 15:05:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VRangeToEnergyConverter.cc,v 1.3 2003/01/07 23:52:24 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VRangeToEnergyConverter.cc,v 1.5 2003/06/16 16:58:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -36,8 +36,8 @@
#include "G4PhysicsLogVector.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4std/strstream"
#include <iomanip>
#include <strstream>
// energy range
G4double G4VRangeToEnergyConverter::LowestEnergy = 0.99e-3*MeV;
@@ -431,7 +431,8 @@ G4double G4VRangeToEnergyConverter::ConvertCutToKineticEnergy(
G4cout << "G4VRangeToEnergyConverter::ConvertCutToKineticEnergy ";
G4cout << " for " << theParticle->GetParticleName() << G4endl;
G4cout << "The cut in range [" << theCutInLength/mm << " (mm)] ";
G4cout << " is too big " << G4endl;
G4cout << " is too big " ;
G4cout << " for material idx=" << materialIndex <<G4endl;
G4cout << "The cut in energy is set" << DBL_MAX/GeV << "GeV " <<G4endl;
}
#endif