Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: WLSDetectorConstruction.cc 84718 2014-10-20 07:40:45Z gcosmo $
// $Id: WLSDetectorConstruction.cc 101671 2016-11-21 09:18:37Z gcosmo $
//
/// \file optical/wls/src/WLSDetectorConstruction.cc
/// \brief Implementation of the WLSDetectorConstruction class
@@ -53,6 +53,7 @@
#include "G4RunManager.hh"
#include "G4SDManager.hh"
#include "WLSDetectorConstruction.hh"
#include "WLSDetectorMessenger.hh"
#include "WLSMaterials.hh"
@@ -690,6 +691,7 @@ void WLSDetectorConstruction::ConstructSDandField()
if (!fmppcSD.Get()) {
G4String mppcSDName = "WLS/PhotonDet";
WLSPhotonDetSD* mppcSD = new WLSPhotonDetSD(mppcSDName);
G4SDManager::GetSDMpointer()->AddNewDetector(mppcSD);
fmppcSD.Put(mppcSD);
}
SetSensitiveDetector("PhotonDet_LV", fmppcSD.Get(), true);
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: WLSExtraPhysics.cc 69561 2013-05-08 12:25:56Z gcosmo $
// $Id: WLSExtraPhysics.cc 100260 2016-10-17 08:03:33Z gcosmo $
//
/// \file optical/wls/src/WLSExtraPhysics.cc
/// \brief Implementation of the WLSExtraPhysics class
@@ -59,10 +59,11 @@ void WLSExtraPhysics::ConstructProcess()
G4cout << "WLSExtraPhysics:: Add Extra Physics Processes"
<< G4endl;
aParticleIterator->reset();
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while ((*aParticleIterator)()) {
G4ParticleDefinition* particle = aParticleIterator->value();
while ((*particleIterator)()) {
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
G4double charge = particle->GetPDGCharge();
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: WLSOpticalPhysics.cc 69561 2013-05-08 12:25:56Z gcosmo $
// $Id: WLSOpticalPhysics.cc 100260 2016-10-17 08:03:33Z gcosmo $
//
/// \file optical/wls/src/WLSOpticalPhysics.cc
/// \brief Implementation of the WLSOpticalPhysics class
@@ -113,10 +113,11 @@ void WLSOpticalPhysics::ConstructProcess()
G4EmSaturation* emSaturation = G4LossTableManager::Instance()->EmSaturation();
fScintProcess->AddSaturation(emSaturation);
aParticleIterator->reset();
while ( (*aParticleIterator)() ){
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while ( (*particleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ParticleDefinition* particle = particleIterator->value();
G4String particleName = particle->GetParticleName();
pManager = particle->GetProcessManager();
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: WLSPhysicsList.cc 78066 2013-12-03 11:08:36Z gcosmo $
// $Id: WLSPhysicsList.cc 101181 2016-11-08 15:08:33Z gcosmo $
//
/// \file optical/wls/src/WLSPhysicsList.cc
/// \brief Implementation of the WLSPhysicsList class
@@ -99,19 +99,10 @@ WLSPhysicsList::WLSPhysicsList(G4String physName) : G4VModularPhysicsList()
fAbsorptionOn = true;
//This looks complex, but it is not:
//Get from base-class the pointer of the phsyicsVector
//to be used. Remember: G4VModularPhysicsList is now a split class.
//Why G4VModularPhysicsList::RegisterPhysics method is not used instead?
//If possible we can remove this...
fPhysicsVector =
GetSubInstanceManager().offset[GetInstanceID()].physicsVector;
fPhysicsVector->push_back(new WLSExtraPhysics());
fPhysicsVector->push_back(fOpticalPhysics =
new WLSOpticalPhysics(fAbsorptionOn));
RegisterPhysics(new WLSExtraPhysics());
RegisterPhysics(fOpticalPhysics = new WLSOpticalPhysics(fAbsorptionOn));
fPhysicsVector->push_back(new G4RadioactiveDecayPhysics());
RegisterPhysics(new G4RadioactiveDecayPhysics());
fStepMaxProcess = new WLSStepMax();
}
@@ -322,9 +313,10 @@ void WLSPhysicsList::AddStepMax()
{
// Step limitation seen as a process
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) && !particle->IsShortLived())
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: WLSSteppingAction.cc 75292 2013-10-30 09:25:15Z gcosmo $
// $Id: WLSSteppingAction.cc 99622 2016-09-29 10:16:04Z gcosmo $
//
/// \file optical/wls/src/WLSSteppingAction.cc
/// \brief Implementation of the WLSSteppingAction class
@@ -115,7 +115,7 @@ G4int WLSSteppingAction::ResetSuccessCounter() {
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void WLSSteppingAction::saveRandomStatus(G4String subDir)
inline void WLSSteppingAction::SaveRandomStatus(G4String subDir)
// save the random status into a sub-directory
// Pre: subDir must be empty or ended with "/"
{
@@ -200,7 +200,7 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
(theStatus == TotalInternalReflection
|| theStatus == FresnelReflection
|| theStatus == FresnelRefraction)
&& trackInformation->isStatus(InsideOfFiber) ) {
&& trackInformation->IsStatus(InsideOfFiber) ) {
G4double px = theTrack->GetVertexMomentumDirection().x();
G4double py = theTrack->GetVertexMomentumDirection().y();
@@ -217,7 +217,7 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
if ( fInitGamma / deg > 90.0) { fInitGamma = 180 * deg - fInitGamma;}
}
// Record Photons that missed the photon detector but escaped from readout
if ( !thePostPV && trackInformation->isStatus(EscapedFromReadOut) ) {
if ( !thePostPV && trackInformation->IsStatus(EscapedFromReadOut) ) {
// UpdateHistogramSuccess(thePostPoint,theTrack);
ResetCounters();
@@ -239,11 +239,11 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
if ( isFiber ) {
if (trackInformation->isStatus(OutsideOfFiber))
if (trackInformation->IsStatus(OutsideOfFiber))
trackInformation->AddStatusFlag(InsideOfFiber);
// Set the Exit flag when the photon refracted out of the fiber
} else if (trackInformation->isStatus(InsideOfFiber)) {
} else if (trackInformation->IsStatus(InsideOfFiber)) {
// EscapedFromReadOut if the z position is the same as fiber's end
if (theTrack->GetPosition().z() == fDetector->GetWLSFiberEnd())
@@ -295,8 +295,8 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
// Determine if the photon has reflected off the read-out end
if (theTrack->GetPosition().z() == fDetector->GetWLSFiberEnd())
{
if (!trackInformation->isStatus(ReflectedAtReadOut) &&
trackInformation->isStatus(InsideOfFiber))
if (!trackInformation->IsStatus(ReflectedAtReadOut) &&
trackInformation->IsStatus(InsideOfFiber))
{
trackInformation->AddStatusFlag(ReflectedAtReadOut);
@@ -338,7 +338,7 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
if (mppcSD) mppcSD->ProcessHits_constStep(theStep,NULL);
// Record Photons that escaped at the end
// if (trackInformation->isStatus(EscapedFromReadOut))
// if (trackInformation->IsStatus(EscapedFromReadOut))
// UpdateHistogramSuccess(thePostPoint,theTrack);
// Stop Tracking when it hits the detector's surface
@@ -356,7 +356,7 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
// Check for absorbed photons
if (theTrack->GetTrackStatus() != fAlive &&
trackInformation->isStatus(InsideOfFiber))
trackInformation->IsStatus(InsideOfFiber))
{
// UpdateHistogramAbsorb(thePostPoint,theTrack);
ResetCounters();