Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -55,7 +55,6 @@ void ActionInitialization::BuildForMaster() const
|
||||
SetUserAction(new RunAction(fDetector));
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ActionInitialization::Build() const
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm3/src/DetectorConstruction.cc
|
||||
/// \brief Implementation of the DetectorConstruction class
|
||||
//
|
||||
// $Id: DetectorConstruction.cc 78655 2014-01-14 11:13:41Z gcosmo $
|
||||
// $Id: DetectorConstruction.cc 98762 2016-08-09 14:08:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -398,7 +398,6 @@ G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()
|
||||
|
||||
}
|
||||
|
||||
|
||||
PrintCalorParameters();
|
||||
|
||||
//always return the fPhysical World
|
||||
@@ -458,9 +457,9 @@ void DetectorConstruction::SetNbOfAbsor(G4int ival)
|
||||
{
|
||||
// set the number of Absorbers
|
||||
//
|
||||
if (ival < 1 || ival > (MaxAbsor-1))
|
||||
if (ival < 1 || ival > (kMaxAbsor-1))
|
||||
{ G4cout << "\n ---> warning from SetfNbOfAbsor: "
|
||||
<< ival << " must be at least 1 and and most " << MaxAbsor-1
|
||||
<< ival << " must be at least 1 and and most " << kMaxAbsor-1
|
||||
<< ". Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm3/src/DetectorMessenger.cc
|
||||
/// \brief Implementation of the DetectorMessenger class
|
||||
//
|
||||
// $Id: DetectorMessenger.cc 78655 2014-01-14 11:13:41Z gcosmo $
|
||||
// $Id: DetectorMessenger.cc 98762 2016-08-09 14:08:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -46,7 +46,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
|
||||
:G4UImessenger(),Detector(Det),
|
||||
:G4UImessenger(),fDetector(Det),
|
||||
fTestemDir(0),
|
||||
fDetDir(0),
|
||||
fSizeYZCmd(0),
|
||||
@@ -129,13 +129,13 @@ DetectorMessenger::~DetectorMessenger()
|
||||
void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if( command == fSizeYZCmd )
|
||||
{ Detector->SetCalorSizeYZ(fSizeYZCmd->GetNewDoubleValue(newValue));}
|
||||
{ fDetector->SetCalorSizeYZ(fSizeYZCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == fNbLayersCmd )
|
||||
{ Detector->SetNbOfLayers(fNbLayersCmd->GetNewIntValue(newValue));}
|
||||
{ fDetector->SetNbOfLayers(fNbLayersCmd->GetNewIntValue(newValue));}
|
||||
|
||||
if( command == fNbAbsorCmd )
|
||||
{ Detector->SetNbOfAbsor(fNbAbsorCmd->GetNewIntValue(newValue));}
|
||||
{ fDetector->SetNbOfAbsor(fNbAbsorCmd->GetNewIntValue(newValue));}
|
||||
|
||||
if (command == fAbsorCmd)
|
||||
{
|
||||
@@ -145,8 +145,8 @@ void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
is >> num >> mat >> tick >> unt;
|
||||
G4String material=mat;
|
||||
tick *= G4UIcommand::ValueOf(unt);
|
||||
Detector->SetAbsorMaterial (num,material);
|
||||
Detector->SetAbsorThickness(num,tick);
|
||||
fDetector->SetAbsorMaterial (num,material);
|
||||
fDetector->SetAbsorThickness(num,tick);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm3/src/EventAction.cc
|
||||
/// \brief Implementation of the EventAction class
|
||||
//
|
||||
// $Id: EventAction.cc 78655 2014-01-14 11:13:41Z gcosmo $
|
||||
// $Id: EventAction.cc 98762 2016-08-09 14:08:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -56,7 +56,7 @@ void EventAction::BeginOfEventAction(const G4Event*)
|
||||
{
|
||||
//initialize EnergyDeposit per event
|
||||
//
|
||||
for (G4int k=0; k<MaxAbsor; k++) {
|
||||
for (G4int k=0; k<kMaxAbsor; k++) {
|
||||
fEnergyDeposit[k] = fTrackLengthCh[k] = 0.0;
|
||||
}
|
||||
}
|
||||
@@ -78,4 +78,3 @@ void EventAction::EndOfEventAction(const G4Event*)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: HistoManager.cc 72233 2013-07-12 08:35:48Z gcosmo $
|
||||
// $Id: HistoManager.cc 98762 2016-08-09 14:08:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "HistoManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
@@ -74,12 +74,12 @@ void HistoManager::Book()
|
||||
|
||||
// Create all histograms as inactivated
|
||||
// as we have not yet set nbins, vmin, vmax
|
||||
for (G4int k=0; k<MaxHisto; k++) {
|
||||
if (k < MaxAbsor) title = "Edep in absorber " + id[k];
|
||||
if (k > MaxAbsor) title = "Edep longit. profile (MeV/event) in absorber "
|
||||
+ id[k-MaxAbsor];
|
||||
if (k == 2*MaxAbsor+1) title = "energy flow (MeV/event)";
|
||||
if (k == 2*MaxAbsor+2) title = "lateral energy leak (MeV/event)";
|
||||
for (G4int k=0; k<kMaxHisto; k++) {
|
||||
if (k < kMaxAbsor) title = "Edep in absorber " + id[k];
|
||||
if (k > kMaxAbsor) title = "Edep longit. profile (MeV/event) in absorber "
|
||||
+ id[k-kMaxAbsor];
|
||||
if (k == 2*kMaxAbsor+1) title = "energy flow (MeV/event)";
|
||||
if (k == 2*kMaxAbsor+2) title = "lateral energy leak (MeV/event)";
|
||||
G4int ih = analysisManager->CreateH1(id[k], title, nbins, vmin, vmax);
|
||||
analysisManager->SetH1Activation(ih, false);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysListEmStandard.cc 92914 2015-09-21 15:00:48Z gcosmo $
|
||||
// $Id: PhysListEmStandard.cc 100288 2016-10-17 08:45:43Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -99,9 +99,10 @@ void PhysListEmStandard::ConstructProcess()
|
||||
|
||||
// Add standard EM Processes
|
||||
//
|
||||
aParticleIterator->reset();
|
||||
while( (*aParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = aParticleIterator->value();
|
||||
auto particleIterator=GetParticleIterator();
|
||||
particleIterator->reset();
|
||||
while( (*particleIterator)() ){
|
||||
G4ParticleDefinition* particle = particleIterator->value();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm3/src/PhysicsList.cc
|
||||
/// \brief Implementation of the PhysicsList class
|
||||
//
|
||||
// $Id: PhysicsList.cc 95227 2016-02-01 09:19:15Z gcosmo $
|
||||
// $Id: PhysicsList.cc 100288 2016-10-17 08:45:43Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -239,9 +239,10 @@ void PhysicsList::AddDecay()
|
||||
//
|
||||
G4Decay* fDecayProcess = new G4Decay();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
auto particleIterator=GetParticleIterator();
|
||||
particleIterator->reset();
|
||||
while( (*particleIterator)() ){
|
||||
G4ParticleDefinition* particle = particleIterator->value();
|
||||
if (fDecayProcess->IsApplicable(*particle))
|
||||
ph->RegisterProcess(fDecayProcess, particle);
|
||||
}
|
||||
@@ -277,9 +278,10 @@ void PhysicsList::AddStepMax()
|
||||
// Step limitation seen as a process
|
||||
fStepMaxProcess = new StepMax();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while ((*theParticleIterator)()){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
auto particleIterator=GetParticleIterator();
|
||||
particleIterator->reset();
|
||||
while ((*particleIterator)()){
|
||||
G4ParticleDefinition* particle = particleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (fStepMaxProcess->IsApplicable(*particle))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm11/src/Run.cc
|
||||
/// \file electromagnetic/TestEm3/src/Run.cc
|
||||
/// \brief Implementation of the Run class
|
||||
//
|
||||
// $Id: Run.cc 71376 2013-06-14 07:44:50Z maire $
|
||||
@@ -61,7 +61,7 @@ Run::Run(DetectorConstruction* det)
|
||||
{
|
||||
//initialize cumulative quantities
|
||||
//
|
||||
for (G4int k=0; k<MaxAbsor; k++) {
|
||||
for (G4int k=0; k<kMaxAbsor; k++) {
|
||||
fSumEAbs[k] = fSum2EAbs[k] = fSumLAbs[k] = fSum2LAbs[k] = 0.;
|
||||
fEnergyDeposit[k].clear();
|
||||
fEdeptrue[k] = fRmstrue[k] = 1.;
|
||||
@@ -150,7 +150,7 @@ void Run::Merge(const G4Run* run)
|
||||
|
||||
// accumulate sums
|
||||
//
|
||||
for (G4int k=0; k<MaxAbsor; k++) {
|
||||
for (G4int k=0; k<kMaxAbsor; k++) {
|
||||
fSumEAbs[k] += localRun->fSumEAbs[k];
|
||||
fSum2EAbs[k] += localRun->fSum2EAbs[k];
|
||||
fSumLAbs[k] += localRun->fSumLAbs[k];
|
||||
@@ -173,7 +173,7 @@ void Run::Merge(const G4Run* run)
|
||||
|
||||
fApplyLimit = localRun->fApplyLimit;
|
||||
|
||||
for (G4int k=0; k<MaxAbsor; k++) {
|
||||
for (G4int k=0; k<kMaxAbsor; k++) {
|
||||
fEdeptrue[k] = localRun->fEdeptrue[k];
|
||||
fRmstrue[k] = localRun->fRmstrue[k];
|
||||
fLimittrue[k] = localRun->fLimittrue[k];
|
||||
@@ -282,14 +282,14 @@ void Run::EndOfRun()
|
||||
G4AnalysisManager* analysis = G4AnalysisManager::Instance();
|
||||
G4int Idmax = (fDetector->GetNbOfLayers())*(fDetector->GetNbOfAbsor());
|
||||
for (G4int Id=1; Id<=Idmax+1; Id++) {
|
||||
analysis->FillH1(2*MaxAbsor+1, (G4double)Id, fEnergyFlow[Id]);
|
||||
analysis->FillH1(2*MaxAbsor+2, (G4double)Id, fLateralEleak[Id]);
|
||||
analysis->FillH1(2*kMaxAbsor+1, (G4double)Id, fEnergyFlow[Id]);
|
||||
analysis->FillH1(2*kMaxAbsor+2, (G4double)Id, fLateralEleak[Id]);
|
||||
}
|
||||
|
||||
//Energy deposit from energy flow balance
|
||||
//
|
||||
G4double EdepTot[MaxAbsor];
|
||||
for (G4int k=0; k<MaxAbsor; k++) EdepTot[k] = 0.;
|
||||
G4double EdepTot[kMaxAbsor];
|
||||
for (G4int k=0; k<kMaxAbsor; k++) EdepTot[k] = 0.;
|
||||
|
||||
G4int nbOfAbsor = fDetector->GetNbOfAbsor();
|
||||
for (G4int Id=1; Id<=Idmax; Id++) {
|
||||
@@ -333,7 +333,7 @@ void Run::EndOfRun()
|
||||
|
||||
//normalize histograms
|
||||
//
|
||||
for (G4int ih = MaxAbsor+1; ih < MaxHisto; ih++) {
|
||||
for (G4int ih = kMaxAbsor+1; ih < kMaxHisto; ih++) {
|
||||
analysis->ScaleH1(ih,norm/MeV);
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ void Run::EndOfRun()
|
||||
|
||||
void Run::SetEdepAndRMS(G4int i, G4double edep, G4double rms, G4double lim)
|
||||
{
|
||||
if (i>=0 && i<MaxAbsor) {
|
||||
if (i>=0 && i<kMaxAbsor) {
|
||||
fEdeptrue [i] = edep;
|
||||
fRmstrue [i] = rms;
|
||||
fLimittrue[i] = lim;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm3/src/StepMax.cc
|
||||
/// \brief Implementation of the StepMax class
|
||||
//
|
||||
// $Id: StepMax.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
// $Id: StepMax.cc 98762 2016-08-09 14:08:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -39,7 +39,7 @@
|
||||
StepMax::StepMax(const G4String& processName)
|
||||
: G4VDiscreteProcess(processName),fMess(0)
|
||||
{
|
||||
for (G4int k=0; k<MaxAbsor; k++) fStepMax[k] = DBL_MAX;
|
||||
for (G4int k=0; k<kMaxAbsor; k++) fStepMax[k] = DBL_MAX;
|
||||
fMess = new StepMaxMessenger(this);
|
||||
}
|
||||
|
||||
@@ -60,4 +60,3 @@ void StepMax::SetStepMax(G4int k,G4double step) {fStepMax[k] = step;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm3/src/SteppingAction.cc
|
||||
/// \brief Implementation of the SteppingAction class
|
||||
//
|
||||
// $Id: SteppingAction.cc 78655 2014-01-14 11:13:41Z gcosmo $
|
||||
// $Id: SteppingAction.cc 98762 2016-08-09 14:08:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -95,7 +95,7 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
|
||||
//longitudinal profile of edep per absorber
|
||||
if (edep>0.) {
|
||||
G4AnalysisManager::Instance()->FillH1(MaxAbsor+absorNum,
|
||||
G4AnalysisManager::Instance()->FillH1(kMaxAbsor+absorNum,
|
||||
G4double(layerNum+1), edep);
|
||||
}
|
||||
//energy flow
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file radioactivedecay/rdecay01/src/SteppingVerbose.cc
|
||||
/// \file electromagnetic/TestEm3/src/SteppingVerbose.cc
|
||||
/// \brief Implementation of the SteppingVerbose class
|
||||
//
|
||||
//
|
||||
// $Id: SteppingVerbose.cc 71645 2013-06-19 15:37:57Z gcosmo $
|
||||
// $Id: SteppingVerbose.cc 98762 2016-08-09 14:08:07Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user