Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -29,8 +29,6 @@
|
||||
|
||||
#include "F02ActionInitialization.hh"
|
||||
#include "F02PrimaryGeneratorAction.hh"
|
||||
#include "F02RunAction.hh"
|
||||
#include "F02EventAction.hh"
|
||||
#include "F02SteppingVerbose.hh"
|
||||
|
||||
#include "F02DetectorConstruction.hh"
|
||||
@@ -52,7 +50,6 @@ F02ActionInitialization::~F02ActionInitialization()
|
||||
|
||||
void F02ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
SetUserAction(new F02RunAction());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -60,11 +57,6 @@ void F02ActionInitialization::BuildForMaster() const
|
||||
void F02ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new F02PrimaryGeneratorAction(fDetConstruction));
|
||||
|
||||
F02RunAction* runAction = new F02RunAction();
|
||||
SetUserAction(runAction);
|
||||
F02EventAction* eventAction = new F02EventAction(runAction);
|
||||
SetUserAction(eventAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02CalorHit class
|
||||
//
|
||||
//
|
||||
// $Id: F02CalorHit.cc 76247 2013-11-08 11:18:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02CalorimeterSD class
|
||||
//
|
||||
//
|
||||
// $Id: F02CalorimeterSD.cc 76247 2013-11-08 11:18:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02DetectorConstruction class
|
||||
//
|
||||
//
|
||||
// $Id: F02DetectorConstruction.cc 101665 2016-11-21 09:11:07Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02DetectorMessenger class
|
||||
//
|
||||
//
|
||||
// $Id: F02DetectorMessenger.cc 77123 2013-11-21 16:13:28Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02ElectricFieldSetup class
|
||||
//
|
||||
//
|
||||
// $Id: F02ElectricFieldSetup.cc 109871 2018-05-09 12:40:14Z gcosmo $
|
||||
//
|
||||
// User Field class implementation.
|
||||
//
|
||||
@@ -250,7 +249,7 @@ void F02ElectricFieldSetup::CreateStepper()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02ElectricFieldSetup::SetFieldValue(G4double fieldValue)
|
||||
void F02ElectricFieldSetup::SetFieldZValue(G4double fieldValue)
|
||||
{
|
||||
// Set the value of the Global Field to fieldValue along Z
|
||||
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file field/field02/src/F02EventAction.cc
|
||||
/// \brief Implementation of the F02EventAction class
|
||||
//
|
||||
//
|
||||
// $Id: F02EventAction.cc 92497 2015-09-02 07:23:12Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "F02EventAction.hh"
|
||||
#include "F02RunAction.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02EventAction::F02EventAction(F02RunAction* action)
|
||||
: G4UserEventAction(),
|
||||
fRunAction(action)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02EventAction::~F02EventAction()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02EventAction::BeginOfEventAction(const G4Event*)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
// save rndm status
|
||||
if (fRunAction->GetRndmFreq() == 2)
|
||||
{
|
||||
G4Random::saveEngineStatus("endOfEvent.rndm");
|
||||
|
||||
G4int evtNb = evt->GetEventID();
|
||||
G4int printProgress = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
if (evtNb%printProgress == 0)
|
||||
{
|
||||
G4cout << "\n---> End of Event: " << evtNb << G4endl;
|
||||
G4Random::showEngineStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02FieldMessenger class
|
||||
//
|
||||
//
|
||||
// $Id: F02FieldMessenger.cc 104216 2017-05-18 13:45:22Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -38,6 +37,7 @@
|
||||
#include "F02ElectricFieldSetup.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWith3VectorAndUnit.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -47,6 +47,7 @@ F02FieldMessenger::F02FieldMessenger(F02ElectricFieldSetup* fieldSetup)
|
||||
fElFieldSetup(fieldSetup),
|
||||
fFieldDir(0),
|
||||
fStepperCmd(0),
|
||||
fElFieldZCmd(0),
|
||||
fElFieldCmd(0),
|
||||
fMinStepCmd(0),
|
||||
fUpdateCmd(0)
|
||||
@@ -66,12 +67,19 @@ F02FieldMessenger::F02FieldMessenger(F02ElectricFieldSetup* fieldSetup)
|
||||
fUpdateCmd->SetGuidance("if you changed geometrical value(s).");
|
||||
fUpdateCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
fElFieldCmd = new G4UIcmdWithADoubleAndUnit("/field/setFieldZ",this);
|
||||
fElFieldZCmd = new G4UIcmdWithADoubleAndUnit("/field/setFieldZ",this);
|
||||
fElFieldZCmd->SetGuidance("Define uniform Electric field.");
|
||||
fElFieldZCmd->SetGuidance("Electric field will be in Z direction.");
|
||||
fElFieldZCmd->SetGuidance("Value of Electric field has to be given in volt/m");
|
||||
fElFieldZCmd->SetParameterName("Ez",false,false);
|
||||
fElFieldZCmd->SetDefaultUnit("megavolt/m");
|
||||
fElFieldZCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
fElFieldCmd = new G4UIcmdWith3VectorAndUnit("/field/setField",this);
|
||||
fElFieldCmd->SetGuidance("Define uniform Electric field.");
|
||||
fElFieldCmd->SetGuidance("Electric field will be in Z direction.");
|
||||
fElFieldCmd->SetGuidance("Value of Electric field has to be given in volt/m");
|
||||
fElFieldCmd->SetParameterName("Ez",false,false);
|
||||
fElFieldCmd->SetDefaultUnit("volt/m");
|
||||
fElFieldCmd->SetParameterName("Ex","Ey","Ez",false,false);
|
||||
fElFieldCmd->SetDefaultUnit("megavolt/m");
|
||||
fElFieldCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
fMinStepCmd = new G4UIcmdWithADoubleAndUnit("/field/setMinStep",this);
|
||||
@@ -86,6 +94,7 @@ F02FieldMessenger::F02FieldMessenger(F02ElectricFieldSetup* fieldSetup)
|
||||
F02FieldMessenger::~F02FieldMessenger()
|
||||
{
|
||||
delete fStepperCmd;
|
||||
delete fElFieldZCmd;
|
||||
delete fElFieldCmd;
|
||||
delete fMinStepCmd;
|
||||
delete fFieldDir;
|
||||
@@ -100,8 +109,10 @@ void F02FieldMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
fElFieldSetup->SetStepperType(fStepperCmd->GetNewIntValue(newValue));
|
||||
if( command == fUpdateCmd )
|
||||
fElFieldSetup->UpdateIntegrator();
|
||||
if( command == fElFieldZCmd )
|
||||
fElFieldSetup->SetFieldZValue(fElFieldZCmd->GetNewDoubleValue(newValue));
|
||||
if( command == fElFieldCmd )
|
||||
fElFieldSetup->SetFieldValue(fElFieldCmd->GetNewDoubleValue(newValue));
|
||||
fElFieldSetup->SetFieldValue(fElFieldCmd->GetNew3VectorValue(newValue));
|
||||
if( command == fMinStepCmd )
|
||||
fElFieldSetup->SetMinStep(fMinStepCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02PrimaryGeneratorAction class
|
||||
//
|
||||
//
|
||||
// $Id: F02PrimaryGeneratorAction.cc 77893 2013-11-29 08:57:22Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02PrimaryGeneratorMessenger class
|
||||
//
|
||||
//
|
||||
// $Id: F02PrimaryGeneratorMessenger.cc 77893 2013-11-29 08:57:22Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file field/field02/src/F02RunAction.cc
|
||||
/// \brief Implementation of the F02RunAction class
|
||||
//
|
||||
//
|
||||
// $Id: F02RunAction.cc 110101 2018-05-15 11:31:37Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "F02RunAction.hh"
|
||||
#include "F02RunMessenger.hh"
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02RunAction::F02RunAction()
|
||||
: G4UserRunAction(),
|
||||
fMessenger(0),
|
||||
fSaveRndm(0)
|
||||
{
|
||||
fMessenger = new F02RunMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02RunAction::~F02RunAction()
|
||||
{
|
||||
delete fMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02RunAction::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
// save Rndm status
|
||||
if (fSaveRndm > 0)
|
||||
{
|
||||
G4Random::showEngineStatus();
|
||||
G4Random::saveEngineStatus("beginOfRun.rndm");
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02RunAction::EndOfRunAction(const G4Run*)
|
||||
{
|
||||
// save Rndm status
|
||||
|
||||
if (fSaveRndm == 1)
|
||||
{
|
||||
G4Random::showEngineStatus();
|
||||
G4Random::saveEngineStatus("endOfRun.rndm");
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -1,96 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file field/field02/src/F02RunMessenger.cc
|
||||
/// \brief Implementation of the F02RunMessenger class
|
||||
//
|
||||
//
|
||||
// $Id: F02RunMessenger.cc 76247 2013-11-08 11:18:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "F02RunMessenger.hh"
|
||||
|
||||
#include "F02RunAction.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02RunMessenger::F02RunMessenger(F02RunAction* action)
|
||||
: G4UImessenger(),
|
||||
fRunAction(action),
|
||||
fRndmDir(0),
|
||||
fRndmSaveCmd(0),
|
||||
fRndmReadCmd(0)
|
||||
{
|
||||
fRndmDir = new G4UIdirectory("/rndm/");
|
||||
fRndmDir->SetGuidance("Rndm status control.");
|
||||
|
||||
fRndmSaveCmd = new G4UIcmdWithAnInteger("/rndm/save",this);
|
||||
fRndmSaveCmd->
|
||||
SetGuidance("set frequency to save rndm status on external files.");
|
||||
fRndmSaveCmd->SetGuidance("freq = 0 not saved");
|
||||
fRndmSaveCmd->SetGuidance("freq > 0 saved on: beginOfRun.rndm");
|
||||
fRndmSaveCmd->SetGuidance("freq = 1 saved on: endOfRun.rndm");
|
||||
fRndmSaveCmd->SetGuidance("freq = 2 saved on: endOfEvent.rndm");
|
||||
fRndmSaveCmd->SetParameterName("frequency",false);
|
||||
fRndmSaveCmd->SetRange("frequency>=0 && frequency<=2");
|
||||
fRndmSaveCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fRndmReadCmd = new G4UIcmdWithAString("/rndm/read",this);
|
||||
fRndmReadCmd->SetGuidance("get rndm status from an external file.");
|
||||
fRndmReadCmd->SetParameterName("fileName",true);
|
||||
fRndmReadCmd->SetDefaultValue ("beginOfRun.rndm");
|
||||
fRndmReadCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02RunMessenger::~F02RunMessenger()
|
||||
{
|
||||
delete fRndmSaveCmd;
|
||||
delete fRndmReadCmd;
|
||||
delete fRndmDir;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02RunMessenger::SetNewValue(G4UIcommand* command,G4String newValues)
|
||||
{
|
||||
if (command == fRndmSaveCmd)
|
||||
fRunAction->SetRndmFreq(fRndmSaveCmd->GetNewIntValue(newValues));
|
||||
|
||||
if (command == fRndmReadCmd)
|
||||
{G4cout << "\n---> rndm status restored from file: " << newValues << G4endl;
|
||||
G4Random::restoreEngineStatus(newValues);
|
||||
G4Random::showEngineStatus();
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \brief Implementation of the F02SteppingVerbose class
|
||||
//
|
||||
//
|
||||
// $Id: F02SteppingVerbose.cc 76247 2013-11-08 11:18:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user