Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file DetectorConstruction.hh
|
||||
/// \brief Definition of the DetectorConstruction class
|
||||
//
|
||||
/// \file common/include/DetectorConstruction.hh
|
||||
/// \brief Definition of the Common::DetectorConstruction class
|
||||
|
||||
#ifndef DetectorConstruction_h
|
||||
#define DetectorConstruction_h 1
|
||||
@@ -40,40 +40,45 @@ class G4GenericMessenger;
|
||||
|
||||
/// Simple detector construction with a box volume placed in a world
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
DetectorConstruction(
|
||||
const G4String& boxMaterialName = "G4_AIR",
|
||||
G4double boxHx = 40*CLHEP::cm,
|
||||
G4double boxHy = 40*CLHEP::cm,
|
||||
G4double boxHx = 40*CLHEP::cm,
|
||||
G4double boxHy = 40*CLHEP::cm,
|
||||
G4double boxHz = 40*CLHEP::cm,
|
||||
const G4String& worldMaterialName = "G4_AIR",
|
||||
G4double worldSizeFactor = 1.25);
|
||||
~DetectorConstruction();
|
||||
~DetectorConstruction() override;
|
||||
|
||||
public:
|
||||
// methods from base class
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
// methods from base class
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
|
||||
// set methods
|
||||
void SetBoxMaterial(const G4String& materialName);
|
||||
void SetWorldMaterial(const G4String& materialName);
|
||||
void SetBoxDimensions(G4ThreeVector dimensions);
|
||||
void SetWorldSizeFactor(G4double factor);
|
||||
|
||||
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4GenericMessenger* fMessenger;
|
||||
G4GenericMessenger* fMessenger = nullptr;
|
||||
G4String fBoxMaterialName;
|
||||
G4String fWorldMaterialName;
|
||||
G4ThreeVector fBoxDimensions;
|
||||
G4double fWorldSizeFactor;
|
||||
G4LogicalVolume* fBoxVolume;
|
||||
G4LogicalVolume* fWorldVolume;
|
||||
G4double fWorldSizeFactor = 0.;
|
||||
G4LogicalVolume* fBoxVolume = nullptr;
|
||||
G4LogicalVolume* fWorldVolume = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file DetectorConstruction0.hh
|
||||
/// \brief Definition of the DetectorConstruction0 class
|
||||
//
|
||||
/// \file common/include/DetectorConstruction0.hh
|
||||
/// \brief Definition of the Common::DetectorConstruction0 class
|
||||
|
||||
#ifndef DetectorConstruction0_h
|
||||
#define DetectorConstruction0_h 1
|
||||
@@ -40,33 +40,38 @@ class G4GenericMessenger;
|
||||
|
||||
/// Simple detector construction with only a world volume
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
class DetectorConstruction0 : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
DetectorConstruction0(
|
||||
const G4String& materialName = "G4_AIR",
|
||||
G4double hx = 50*CLHEP::cm,
|
||||
G4double hy = 50*CLHEP::cm,
|
||||
G4double hx = 50*CLHEP::cm,
|
||||
G4double hy = 50*CLHEP::cm,
|
||||
G4double hz = 50*CLHEP::cm);
|
||||
~DetectorConstruction0();
|
||||
~DetectorConstruction0() override;
|
||||
|
||||
public:
|
||||
// methods from base class
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
// methods from base class
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
|
||||
// set methods
|
||||
void SetMaterial(const G4String& materialName);
|
||||
void SetDimensions(G4ThreeVector dimensions);
|
||||
|
||||
|
||||
private:
|
||||
void DefineCommands();
|
||||
|
||||
G4GenericMessenger* fMessenger;
|
||||
G4GenericMessenger* fMessenger = nullptr;
|
||||
G4String fMaterialName;
|
||||
G4ThreeVector fDimensions;
|
||||
G4LogicalVolume* fWorldVolume;
|
||||
G4LogicalVolume* fWorldVolume = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file GeantinoPhysicsList.hh
|
||||
/// \brief Definition of the GeantinoPhysicsList class
|
||||
//
|
||||
/// \file common/include/GeantinoPhysicsList.hh
|
||||
/// \brief Definition of the Common::GeantinoPhysicsList class
|
||||
|
||||
#ifndef GeantinoPhysicsList_h
|
||||
#define GeantinoPhysicsList_h 1
|
||||
@@ -34,17 +34,22 @@
|
||||
|
||||
/// Physics list with geantino and charged geantino only
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
class GeantinoPhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
GeantinoPhysicsList();
|
||||
~GeantinoPhysicsList();
|
||||
~GeantinoPhysicsList() override;
|
||||
|
||||
protected:
|
||||
// Construct particle and physics process
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
void ConstructParticle() override;
|
||||
void ConstructProcess() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file GpsPrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the GpsPrimaryGeneratorActionclass
|
||||
/// \file common/include/GpsPrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the Common::GpsPrimaryGeneratorAction class
|
||||
//
|
||||
|
||||
#ifndef GpsPrimaryGeneratorAction_h
|
||||
@@ -42,23 +42,24 @@ class G4Event;
|
||||
///
|
||||
/// \author I. Hrivnacova; IPN Orsay
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
class GpsPrimaryGeneratorAction: public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
GpsPrimaryGeneratorAction();
|
||||
~GpsPrimaryGeneratorAction();
|
||||
GpsPrimaryGeneratorAction();
|
||||
~GpsPrimaryGeneratorAction() override;
|
||||
|
||||
// methods
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
|
||||
private:
|
||||
// static data members
|
||||
static const G4String fgkDefaultParticleName;
|
||||
static const G4double fgkDefaultEnergy;
|
||||
|
||||
// data members
|
||||
G4GeneralParticleSource* fGeneralParticleSource;
|
||||
G4GeneralParticleSource* fGeneralParticleSource = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file GunPrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the GunPrimaryGeneratorAction class
|
||||
/// \file common/include/GunPrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the Common::GunPrimaryGeneratorAction class
|
||||
|
||||
#ifndef GunPrimaryGeneratorAction_h
|
||||
#define GunPrimaryGeneratorAction_h 1
|
||||
@@ -44,6 +44,9 @@ class G4Event;
|
||||
///
|
||||
/// \author I. Hrivnacova; IPN Orsay
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
class GunPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
@@ -51,15 +54,17 @@ class GunPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
const G4String& particleName = "geantino",
|
||||
G4double energy = 1.*CLHEP::MeV,
|
||||
G4ThreeVector position= G4ThreeVector(0,0,0),
|
||||
G4ThreeVector momentumDirection = G4ThreeVector(0,0,1));
|
||||
~GunPrimaryGeneratorAction();
|
||||
G4ThreeVector momentumDirection = G4ThreeVector(0,0,1));
|
||||
~GunPrimaryGeneratorAction() override;
|
||||
|
||||
// methods
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
|
||||
private:
|
||||
// data members
|
||||
G4ParticleGun* fParticleGun;
|
||||
G4ParticleGun* fParticleGun = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user