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
@@ -0,0 +1,92 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4FastSimulationPhysics_h
#define G4FastSimulationPhysics_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
#include <vector>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4FastSimulationPhysics : public G4VPhysicsConstructor
{
public:
G4FastSimulationPhysics(const G4String& name = "FastSimP");
virtual ~G4FastSimulationPhysics();
public:
// --------------------------------------
// -- Fast simulation activation methods:
// --------------------------------------
// -- Used to select particles for which fast simulation has to be activated:
// ---- Activate fast simulation for one particle with fast simulation attached to mass geometry:
void ActivateFastSimulation(const G4String& particleName);
// ---- Activate fast simulation for one particle with fast simulation attached to a parallel geometry:
void ActivateFastSimulation(const G4String& particleName, const G4String& parallelGeometryName);
// -- Information about particles under fast simulation:
void BeVerbose() { fVerbose = true; }
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4FastSimulationPhysics & operator=(const G4FastSimulationPhysics &right);
G4FastSimulationPhysics(const G4FastSimulationPhysics&);
// -- Particles under fast simulation:
std::vector< G4String > fParticlesUnderFastSimulation;
// -- And their related possible parallel geometries:
std::vector< G4String > fGeometries;
// -- Report:
G4bool fVerbose;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -47,6 +47,9 @@ public:
virtual ~G4GenericBiasingPhysics();
public:
// ------------------------------
// -- Biasing activation methods:
// ------------------------------
// -- Used to select particles and processes to be under biasing:
// ---- Put under biasing all physics processes of given particleName:
void PhysicsBias(const G4String& particleName);
@@ -77,6 +80,28 @@ public:
void NonPhysicsBiasAllNeutral( G4bool includeShortLived = false );
void BiasAllNeutral( G4bool includeShortLived = false );
// -------------------------------------------------------------
// -- Activation of parallel geometries used by generic biasing:
// -------------------------------------------------------------
// -- Each method can be called several times:
// -- - on a same particle type :
// -- myBiasingPhysics->AddParallelGeometry("neutron", "geometry1");
// -- myBiasingPhysics->AddParallelGeometry("neutron", "geometry2");
// -- - on a range of PDG particle:
// -- myBiasingPhysics->AddParallelGeometry(PDG1, PDG2, "geometryXX");
// -- myBiasingPhysics->AddParallelGeometry(PDG3, PDG4, vectorOfGeometries);
// -- etc.
void AddParallelGeometry( const G4String& particleName, const G4String& parallelGeometryName );
void AddParallelGeometry( const G4String& particleName, const std::vector< G4String >& parallelGeometryNames );
void AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const G4String& parallelGeometryName , G4bool includeAntiParticle = true );
void AddParallelGeometry( G4int PDGlow, G4int PDGhigh, const std::vector< G4String >& parallelGeometryNames, G4bool includeAntiParticle = true );
void AddParallelGeometryAllCharged( const G4String& parallelGeometryName , G4bool includeShortLived = false );
void AddParallelGeometryAllCharged( const std::vector< G4String >& parallelGeometryNames, G4bool includeShortLived = false );
void AddParallelGeometryAllNeutral( const G4String& parallelGeometryName , G4bool includeShortLived = false );
void AddParallelGeometryAllNeutral( const std::vector< G4String >& parallelGeometryNames, G4bool includeShortLived = false );
// -- Information about biased particles:
void BeVerbose() { fVerbose = true; }
@@ -110,8 +135,21 @@ private:
std::vector< G4int > fNonPhysBiasByPDGRangeLow, fNonPhysBiasByPDGRangeHigh;
G4bool fPhysBiasAllCharged, fNonPhysBiasAllCharged;
G4bool fPhysBiasAllChargedISL, fNonPhysBiasAllChargedISL;
G4bool fPhysBiasAllNeutral, fNonPhysBiasAllNeutral;
G4bool fPhysBiasAllNeutral, fNonPhysBiasAllNeutral;
G4bool fPhysBiasAllNeutralISL, fNonPhysBiasAllNeutralISL;
// -- Particles associated with parallel geometries:
std::vector< G4String > fParticlesWithParallelGeometries;
std::map< G4String, std::vector< G4String > > fParallelGeometriesForParticle;
std::vector< G4int > fPDGlowParallelGeometries, fPDGhighParallelGeometries;
std::map< G4int, std::vector< G4String > > fPDGrangeParallelGeometries;
std::vector< G4String > fParallelGeometriesForCharged, fParallelGeometriesForNeutral;
std::vector< G4bool > fAllChargedParallelGeometriesISL, fAllNeutralParallelGeometriesISL;
void AssociateParallelGeometries();
// -- Report:
G4bool fVerbose;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4StepLimiterPhysics.hh 81367 2014-05-27 12:59:27Z gcosmo $
// $Id: G4StepLimiterPhysics.hh 98777 2016-08-09 14:37:59Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -57,6 +57,11 @@ public:
// registered to the process manager of each particle type
virtual void ConstructProcess();
// Option to apply the step limit to all particles
// (by default the step limit is applied to charged particles only)
void SetApplyToAll(G4bool option) { fApplyToAll= option; }
G4bool GetApplyToAll() const { return fApplyToAll; }
private:
// hide assignment operator
@@ -65,7 +70,7 @@ private:
G4StepLimiter* fStepLimiter;
G4UserSpecialCuts* fUserSpecialCuts;
G4bool fApplyToAll;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......