Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -27,7 +27,7 @@
/// \brief Implementation of the F02ElectricFieldSetup class
//
//
// $Id: F02ElectricFieldSetup.cc 104352 2017-05-26 07:23:36Z gcosmo $
// $Id: F02ElectricFieldSetup.cc 109871 2018-05-09 12:40:14Z gcosmo $
//
// User Field class implementation.
//
@@ -117,7 +117,7 @@ F02ElectricFieldSetup::F02ElectricFieldSetup(G4ThreeVector fieldVector)
F02ElectricFieldSetup::~F02ElectricFieldSetup()
{
G4cout << " F02ElectricFieldSetup - dtor called. " << G4endl;
// G4cout << " F02ElectricFieldSetup - dtor called. " << G4endl;
delete fFieldMessenger; fFieldMessenger= nullptr;
// Delete the messenger first, to avoid messages to deleted classes!
@@ -161,12 +161,18 @@ void F02ElectricFieldSetup::UpdateIntegrator()
// -- Careful to call this after all old objects are destroyed, and
// pointers nullified.
CreateStepper(); // Note that this method deleted the existing Stepper!
fIntgrDriver = new G4MagInt_Driver(fMinStep,
fStepper,
fStepper->GetNumberOfVariables());
// G4cout << "F02ElectricFieldSetup::UpdateIntegrator> "
// << "New value of stepper ptr= " << fStepper << G4endl;
assert(fStepper != nullptr);
fChordFinder = new G4ChordFinder(fIntgrDriver);
if( fStepper ) {
fIntgrDriver = new G4MagInt_Driver(fMinStep,
fStepper,
fStepper->GetNumberOfVariables());
if( fIntgrDriver ){
fChordFinder = new G4ChordFinder(fIntgrDriver);
}
}
fFieldManager->SetChordFinder(fChordFinder);
fFieldManager->SetDetectorField(fEMfield);
@@ -203,7 +209,7 @@ void F02ElectricFieldSetup::CreateStepper()
break;
case 4:
fStepper = new G4ClassicalRK4( fEquation, nvar );
G4cout<<"G4ClassicalRK4 (default) is called"<<G4endl;
G4cout<<"G4ClassicalRK4 is called"<<G4endl;
break;
case 5:
fStepper = new G4CashKarpRKF45( fEquation, nvar );
@@ -226,7 +232,10 @@ void F02ElectricFieldSetup::CreateStepper()
fStepper = 0; // new G4HelixSimpleRunge( fEquation );
G4cout<<"G4HelixSimpleRunge is not valid for Electric Field"<<G4endl;
break;
default: fStepper = 0;
default: /* fStepper = 0; // Older code */
fStepper = new G4ClassicalRK4( fEquation, nvar );
G4cout<<"G4ClassicalRK4 (default) is called"<<G4endl;
break;
}
delete oldStepper;
@@ -27,7 +27,7 @@
/// \brief Implementation of the F02RunAction class
//
//
// $Id: F02RunAction.cc 92497 2015-09-02 07:23:12Z gcosmo $
// $Id: F02RunAction.cc 110101 2018-05-15 11:31:37Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,22 +69,12 @@ void F02RunAction::BeginOfRunAction(const G4Run*)
G4Random::showEngineStatus();
G4Random::saveEngineStatus("beginOfRun.rndm");
}
G4UImanager* ui = G4UImanager::GetUIpointer();
G4VVisManager* visManager = G4VVisManager::GetConcreteInstance();
if (visManager) ui->ApplyCommand("/vis/scene/notifyHandlers");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void F02RunAction::EndOfRunAction(const G4Run*)
{
if (G4VVisManager::GetConcreteInstance())
{
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
}
// save Rndm status
if (fSaveRndm == 1)