Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -34,17 +34,6 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05ActionInitialization::F05ActionInitialization()
|
||||
: G4VUserActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05ActionInitialization::~F05ActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F05ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
}
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05DetectorConstruction::F05DetectorConstruction()
|
||||
: fVacuum(0), fWorldSizeXY(0), fWorldSizeZ(0),
|
||||
fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0)
|
||||
: fVacuum(nullptr)
|
||||
{
|
||||
// materials
|
||||
DefineMaterials();
|
||||
@@ -78,7 +77,7 @@ F05DetectorConstruction::F05DetectorConstruction()
|
||||
|
||||
F05DetectorConstruction::~F05DetectorConstruction()
|
||||
{
|
||||
if (fField) delete fField;
|
||||
delete fField;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -100,29 +99,29 @@ G4VPhysicalVolume* F05DetectorConstruction::Construct()
|
||||
// World
|
||||
//
|
||||
|
||||
fWorldSizeXY = 20.0*m;
|
||||
fWorldSizeZ = 1.0*mm;
|
||||
G4double worldSizeXY = 20.0*m;
|
||||
G4double worldSizeZ = 1.0*mm;
|
||||
|
||||
fSolidWorld = new G4Box("World", //its name
|
||||
fWorldSizeXY/2,fWorldSizeXY/2,fWorldSizeZ/2); //its size
|
||||
|
||||
fLogicWorld = new G4LogicalVolume(fSolidWorld, //its solid
|
||||
auto solidWorld = new G4Box("World", //its name
|
||||
worldSizeXY/2,worldSizeXY/2,worldSizeZ/2); //its size
|
||||
|
||||
auto logicWorld = new G4LogicalVolume(solidWorld, //its solid
|
||||
fVacuum, //its material
|
||||
"World"); //its name
|
||||
|
||||
fPhysiWorld = new G4PVPlacement(0, //no rotation
|
||||
|
||||
auto physiWorld = new G4PVPlacement(nullptr, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
fLogicWorld, //its logical volume
|
||||
logicWorld, //its logical volume
|
||||
"World", //its name
|
||||
0, //its mother volume
|
||||
nullptr, //its mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
|
||||
|
||||
G4UserLimits* stepLimit;
|
||||
stepLimit = new G4UserLimits(5*mm);
|
||||
|
||||
fLogicWorld->SetUserLimits(stepLimit);
|
||||
|
||||
logicWorld->SetUserLimits(stepLimit);
|
||||
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
@@ -131,12 +130,12 @@ G4VPhysicalVolume* F05DetectorConstruction::Construct()
|
||||
//
|
||||
//always return the physical World
|
||||
//
|
||||
return fPhysiWorld;
|
||||
return physiWorld;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ThreadLocal F05Field* F05DetectorConstruction::fField = 0;
|
||||
G4ThreadLocal F05Field* F05DetectorConstruction::fField = nullptr;
|
||||
|
||||
void F05DetectorConstruction::ConstructSDandField()
|
||||
|
||||
@@ -146,7 +145,7 @@ void F05DetectorConstruction::ConstructSDandField()
|
||||
fField = new F05Field();
|
||||
|
||||
// G4RepleteEofM* equation = new G4RepleteEofM(fField);
|
||||
G4EqEMFieldWithSpin* equation = new G4EqEMFieldWithSpin(fField);
|
||||
auto equation = new G4EqEMFieldWithSpin(fField);
|
||||
// equation->SetBField();
|
||||
// equation->SetEField();
|
||||
// equation->SetSpin();
|
||||
@@ -159,7 +158,7 @@ void F05DetectorConstruction::ConstructSDandField()
|
||||
|
||||
G4double minStep = 0.01*mm;
|
||||
|
||||
G4ChordFinder* chordFinder =
|
||||
auto chordFinder =
|
||||
new G4ChordFinder((G4MagneticField*)fField,minStep,stepper);
|
||||
|
||||
// Set accuracy parameters
|
||||
|
||||
@@ -37,18 +37,6 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05Field::F05Field() : G4ElectroMagneticField()
|
||||
{
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05Field::~F05Field()
|
||||
{
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F05Field::GetFieldValue( const G4double Point[4], G4double* Bfield ) const
|
||||
{
|
||||
// Point[0],Point[1],Point[2] are x-, y-, z-cordinates, Point[3] is time
|
||||
@@ -57,7 +45,7 @@ void F05Field::GetFieldValue( const G4double Point[4], G4double* Bfield ) const
|
||||
const G4double Er = 2.113987E+6*volt/m;
|
||||
|
||||
G4double Ex,Ey;
|
||||
|
||||
|
||||
G4double posR = std::sqrt(std::pow(Point[0],2) + std::pow(Point[1],2));
|
||||
G4double cos_theta, sin_theta;
|
||||
|
||||
@@ -70,7 +58,7 @@ void F05Field::GetFieldValue( const G4double Point[4], G4double* Bfield ) const
|
||||
Ex=0;
|
||||
Ey=0;
|
||||
}
|
||||
|
||||
|
||||
Bfield[0]=0;
|
||||
Bfield[1]=0;
|
||||
Bfield[2]=Bz;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05PhysicsList::F05PhysicsList() : G4VModularPhysicsList()
|
||||
F05PhysicsList::F05PhysicsList() : G4VModularPhysicsList()
|
||||
{
|
||||
RegisterPhysics(new G4SpinDecayPhysics());
|
||||
RegisterPhysics(new G4StepLimiterPhysics());
|
||||
@@ -43,10 +43,6 @@ F05PhysicsList::F05PhysicsList() : G4VModularPhysicsList()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05PhysicsList::~F05PhysicsList() {;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F05PhysicsList::ConstructParticle()
|
||||
{
|
||||
G4VModularPhysicsList::ConstructParticle();
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05PrimaryGeneratorAction::F05PrimaryGeneratorAction(void)
|
||||
F05PrimaryGeneratorAction::F05PrimaryGeneratorAction()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* particle = particleTable->FindParticle("mu+");
|
||||
|
||||
@@ -75,7 +75,7 @@ void F05PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
G4double Kmu = Emu - mu_mass;
|
||||
|
||||
G4double x0 = -6.99*m;
|
||||
G4double y0 = 0.00*m;
|
||||
G4double y0 = 0.00*m;
|
||||
G4double z0 = 0.00*m;
|
||||
|
||||
fParticleGun->SetParticleEnergy(Kmu);
|
||||
|
||||
@@ -40,16 +40,6 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05SteppingAction::F05SteppingAction(void)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F05SteppingAction::~F05SteppingAction()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F05SteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
{
|
||||
|
||||
|
||||
@@ -38,40 +38,30 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
F05SteppingVerbose::F05SteppingVerbose()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
F05SteppingVerbose::~F05SteppingVerbose()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void F05SteppingVerbose::StepInfo()
|
||||
{
|
||||
CopyState();
|
||||
|
||||
|
||||
G4int prec = G4cout.precision(6);
|
||||
|
||||
if( verboseLevel >= 1 ){
|
||||
if( verboseLevel >= 4 ) VerboseTrack();
|
||||
if( verboseLevel >= 3 ){
|
||||
G4cout << G4endl;
|
||||
G4cout << G4endl;
|
||||
G4cout << std::setw( 5) << "#Step#" << " "
|
||||
<< std::setw(10) << "X" << " "
|
||||
<< std::setw(10) << "Y" << " "
|
||||
<< std::setw(10) << "Y" << " "
|
||||
<< std::setw(10) << "Z" << " "
|
||||
<< std::setw(10) << "Direction x" << " "
|
||||
<< std::setw(10) << "dir y" << " "
|
||||
<< std::setw(10) << "dir y" << " "
|
||||
<< std::setw(10) << "dir z" << " "
|
||||
<< std::setw( 8) << "Time" << " "
|
||||
<< std::setw( 6) << "dEStep" << " "
|
||||
<< std::setw(10) << "StepLeng"
|
||||
<< std::setw(10) << "TrakLeng"
|
||||
<< std::setw(10) << "NextVolu"
|
||||
<< std::setw( 6) << "dEStep" << " "
|
||||
<< std::setw(10) << "StepLeng"
|
||||
<< std::setw(10) << "TrakLeng"
|
||||
<< std::setw(10) << "NextVolu"
|
||||
<< std::setw(10) << "Process" << " "
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
|
||||
@@ -86,14 +76,14 @@ void F05SteppingVerbose::StepInfo()
|
||||
<< std::setw(10) << G4BestUnit(fStep->GetStepLength(),"Length")
|
||||
<< std::setw(10) << G4BestUnit(fTrack->GetTrackLength(),"Length");
|
||||
|
||||
if( fTrack->GetNextVolume() != 0 ) {
|
||||
if( fTrack->GetNextVolume() != nullptr ) {
|
||||
G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
|
||||
} else {
|
||||
G4cout << std::setw(10) << "OutOfWorld";
|
||||
}
|
||||
|
||||
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != 0){
|
||||
G4cout << " "
|
||||
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr){
|
||||
G4cout << " "
|
||||
<< std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
|
||||
->GetProcessName();
|
||||
} else {
|
||||
@@ -107,7 +97,7 @@ void F05SteppingVerbose::StepInfo()
|
||||
fN2ndariesPostStepDoIt;
|
||||
if(tN2ndariesTot>0){
|
||||
G4cout << " :----- List of 2ndaries - "
|
||||
<< "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
|
||||
<< "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
|
||||
<< "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
|
||||
<< ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
|
||||
<< ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
|
||||
@@ -116,7 +106,7 @@ void F05SteppingVerbose::StepInfo()
|
||||
<< " ---------------"
|
||||
<< G4endl;
|
||||
|
||||
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
|
||||
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
|
||||
lp1<(*fSecondary).size(); lp1++)
|
||||
{
|
||||
G4cout << " : "
|
||||
@@ -132,14 +122,14 @@ void F05SteppingVerbose::StepInfo()
|
||||
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4cout << " :-----------------------------"
|
||||
<< "----------------------------------"
|
||||
<< "-- EndOf2ndaries Info ---------------"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
@@ -155,18 +145,18 @@ void F05SteppingVerbose::TrackingStarted()
|
||||
|
||||
G4cout << std::setw( 5) << "Step#" << " "
|
||||
<< std::setw(10) << "X" << " "
|
||||
<< std::setw(10) << "Y" << " "
|
||||
<< std::setw(10) << "Y" << " "
|
||||
<< std::setw(10) << "Z" << " "
|
||||
<< std::setw(10) << "Direction x" << " "
|
||||
<< std::setw(10) << "dir y" << " "
|
||||
<< std::setw(10) << "dir y" << " "
|
||||
<< std::setw(10) << "dir z" << " "
|
||||
<< std::setw(10) << "Time" << " "
|
||||
<< std::setw(10) << "dEStep" << " "
|
||||
<< std::setw(10) << "StepLeng"
|
||||
<< std::setw(10) << "dEStep" << " "
|
||||
<< std::setw(10) << "StepLeng"
|
||||
<< std::setw(10) << "TrakLeng"
|
||||
<< std::setw(10) << "Volume" << " "
|
||||
<< std::setw(10) << "Process"
|
||||
<< G4endl;
|
||||
<< std::setw(10) << "Process"
|
||||
<< G4endl;
|
||||
|
||||
G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
|
||||
<< std::setw(10) << G4BestUnit(fTrack->GetPosition().x(),"Length")
|
||||
|
||||
Reference in New Issue
Block a user