Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -25,18 +25,17 @@
//
// $Id$
//
/// \file TrDetectorConstruction.hh
/// \brief Definition of the TrDetectorConstruction class
/// \file DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
#ifndef TrDetectorConstruction_h
#define TrDetectorConstruction_h 1
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "TrDetectorConstructionMessenger.hh"
#include "globals.hh"
class DetectorMessenger;
class G4LogicalVolume;
class G4VPhysicalVolume;
@@ -45,7 +44,7 @@ class G4VPhysicalVolume;
/// The geometry setup consists of two trapezoid volumes which are placed
/// in a world so that their axial symmetry axis is in given theta and phi
/// polar angles. The various ways of placement are implemented in the
/// TrDetectorConstruction class in the following private functions:
/// DetectorConstruction class in the following private functions:
/// - PlaceWithDirectMatrix()
/// - PlaceWithInverseMatrix()
/// - PlaceWithAxialRotations()
@@ -58,7 +57,7 @@ class G4VPhysicalVolume;
/// in parallel with z-axis in order to make easier to check reflection
/// visually.
class TrDetectorConstruction : public G4VUserDetectorConstruction
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
enum EMethod {
@@ -70,8 +69,8 @@ class TrDetectorConstruction : public G4VUserDetectorConstruction
};
public:
TrDetectorConstruction();
~TrDetectorConstruction();
DetectorConstruction();
~DetectorConstruction();
public:
// methods from base class
@@ -89,7 +88,7 @@ class TrDetectorConstruction : public G4VUserDetectorConstruction
void PlaceWithReflections();
// data members
TrDetectorConstructionMessenger fMessenger;
DetectorMessenger* fMessenger;
EMethod fMethod;
G4LogicalVolume* fWorldVolume;
G4LogicalVolume* fTrdVolume;
@@ -97,12 +96,6 @@ class TrDetectorConstruction : public G4VUserDetectorConstruction
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void TrDetectorConstruction::SetMethod(EMethod method) {
fMethod = method;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -25,16 +25,16 @@
//
// $Id$
//
/// \file TrDetectorConstructionMessenger.hh
/// \brief Definition of the TrDetectorConstructionMessenger class
/// \file DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
#ifndef TrDetectorConstructionMessenger_h
#define TrDetectorConstructionMessenger_h 1
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class TrDetectorConstruction;
class DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWith3VectorAndUnit;
@@ -42,21 +42,21 @@ class G4UIcmdWithADouble;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// Messenger class that defines commands for TrDetectorConstruction.
/// Messenger class that defines commands for DetectorConstruction.
///
/// It implements commands:
/// - /transform/setMethod method
class TrDetectorConstructionMessenger: public G4UImessenger
class DetectorMessenger: public G4UImessenger
{
public:
TrDetectorConstructionMessenger(TrDetectorConstruction* );
virtual ~TrDetectorConstructionMessenger();
DetectorMessenger(DetectorConstruction* );
virtual ~DetectorMessenger();
virtual void SetNewValue(G4UIcommand* command, G4String newValue);
private:
TrDetectorConstruction* fDetectorConstruction;
DetectorConstruction* fDetectorConstruction;
G4UIdirectory* fDirectory;
G4UIcmdWithAString* fSetMethodCmd;
};
@@ -1,84 +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. *
// ********************************************************************
//
// $Id$
//
/// \file ExG4DetectorConstruction02.hh
/// \brief Definition of the ExG4DetectorConstruction02 class
#ifndef ExG4DetectorConstruction02_h
#define ExG4DetectorConstruction02_h 1
#include "G4VUserDetectorConstruction.hh"
#include "ExG4DetectorConstruction02Messenger.hh"
#include "G4ThreeVector.hh"
#include "globals.hh"
class G4LogicalVolume;
class G4Material;
class DetectorMessenger;
/// Simple detector construction with a box volume placed in a world
class ExG4DetectorConstruction02 : public G4VUserDetectorConstruction
{
public:
ExG4DetectorConstruction02(
const G4String& boxMaterialName = "G4_AIR",
G4double boxHx = 40*cm, G4double boxHy = 40*cm, G4double boxHz = 40*cm,
const G4String& worldMaterialName = "G4_AIR",
G4double worldSizeFactor = 1.25);
~ExG4DetectorConstruction02();
public:
// methods from base class
virtual G4VPhysicalVolume* Construct();
// set methods
void SetBoxMaterial(const G4String& materialName);
void SetWorldMaterial(const G4String& materialName);
void SetBoxDimensions(G4double hx, G4double hy, G4double hz);
void SetWorldSizeFactor(G4double factor);
private:
ExG4DetectorConstruction02Messenger fMessenger;
G4String fBoxMaterialName;
G4String fWorldMaterialName;
G4ThreeVector fBoxDimensions;
G4double fWorldSizeFactor;
G4LogicalVolume* fBoxVolume;
G4LogicalVolume* fWorldVolume;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,74 +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. *
// ********************************************************************
//
// $Id: ExG4DetectorConstruction02Messenger.hh,v 1.2 2006-06-29 16:46:14 gunter Exp $
//
/// \file ExG4DetectorConstruction02Messenger.hh
/// \brief Definition of the ExG4DetectorConstruction02Messenger class
#ifndef ExG4DetectorConstruction02Messenger_h
#define ExG4DetectorConstruction02Messenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class ExG4DetectorConstruction02;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWith3VectorAndUnit;
class G4UIcmdWithADouble;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// Messenger class that defines commands for ExG4DetectorConstruction02.
///
/// It implements commands:
/// - /ExG4/det/setBoxMaterialName name
/// - /ExG4/det/setWorldMaterialName name
/// - /ExG4/det/setBoxDimensions hx hy hz unit
/// - /ExG4/det/setWorldSizeFactor value
class ExG4DetectorConstruction02Messenger: public G4UImessenger
{
public:
ExG4DetectorConstruction02Messenger(ExG4DetectorConstruction02* );
virtual ~ExG4DetectorConstruction02Messenger();
virtual void SetNewValue(G4UIcommand* command, G4String newValue);
private:
ExG4DetectorConstruction02* fDetectorConstruction;
G4UIdirectory* fTopDirectory;
G4UIdirectory* fDirectory;
G4UIcmdWithAString* fSetBoxMaterialCmd;
G4UIcmdWithAString* fSetWorldMaterialCmd;
G4UIcmdWith3VectorAndUnit* fSetBoxDimensionsCmd;
G4UIcmdWithADouble* fSetWorldSizeFactorCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,88 +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. *
// ********************************************************************
//
// $Id$
//
/// \file ExG4EventAction01.hh
/// \brief Definition of the ExG4EventAction01 class
#ifndef ExG4EventAction01_h
#define ExG4EventAction01_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
#include "ExG4EventAction01Messenger.hh"
/// Event action class
///
/// It provides:
/// - setting verbose level and event modulo pronting
/// - option to save random number status at the end of event
class ExG4EventAction01 : public G4UserEventAction
{
public:
ExG4EventAction01();
virtual ~ExG4EventAction01();
public:
// methods from base class
virtual void BeginOfEventAction(const G4Event* event);
virtual void EndOfEventAction(const G4Event* event);
// set methods
void SetVerboseLevel(G4int level);
void SetPrintModulo(G4int value);
void SetSaveRndm(G4bool value);
void SetDrawFlag(G4String value);
private:
// static data members (constants)
static const G4int fgkDefaultVerboseLevel;
static const G4int fgkDefaultPrintModulo;
// data members
ExG4EventAction01Messenger fMessenger;
G4int fVerboseLevel;
G4int fPrintModulo;
G4bool fSaveRndm;
};
// inline functions
inline void ExG4EventAction01::SetVerboseLevel(G4int level) {
fVerboseLevel = level;
}
inline void ExG4EventAction01::SetPrintModulo(G4int value) {
fPrintModulo = value;
}
inline void ExG4EventAction01::SetSaveRndm(G4bool value) {
fSaveRndm = value;
}
#endif
@@ -1,101 +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. *
// ********************************************************************
//
// $Id$
//
/// \file ExG4RunAction01.hh
/// \brief Definition of the ExG4RunAction01 class
#ifndef ExG4RunAction01_h
#define ExG4RunAction01_h 1
#include "ExG4RunAction01Messenger.hh"
#include "G4UserRunAction.hh"
#include "globals.hh"
class G4Run;
/// Run action class
///
/// It provides:
/// - setting verbose level
/// - option to save random number status at begin and end of run
/// - option to read random number from a file at begin of run
/// - option for automatic (time-based) random seeds for each run
class ExG4RunAction01 : public G4UserRunAction
{
public:
ExG4RunAction01();
~ExG4RunAction01();
public:
// methods
virtual void BeginOfRunAction(const G4Run* run);
virtual void EndOfRunAction(const G4Run* run);
// set methods
void SetRndmFileName(const G4String& fileName);
void SetVerboseLevel(G4int level);
void SetSaveRndm(G4bool value);
void SetReadRndm(G4bool value);
void SetAutoSeed(G4bool value);
private:
// static data members
static const G4String fgkDefaultRndmFileName;
// data members
ExG4RunAction01Messenger fMessenger;
G4String fRndmFileName;
G4int fVerboseLevel;
G4bool fSaveRndm;
G4bool fReadRndm;
G4bool fAutoSeed;
};
// inline functions
inline void ExG4RunAction01::SetVerboseLevel(G4int level) {
fVerboseLevel = level;
}
inline void ExG4RunAction01::SetRndmFileName(const G4String& fileName) {
fRndmFileName = fileName;
}
inline void ExG4RunAction01::SetSaveRndm(G4bool value) {
fSaveRndm = value;
}
inline void ExG4RunAction01::SetReadRndm(G4bool value) {
fReadRndm = value;
}
inline void ExG4RunAction01::SetAutoSeed(G4bool value) {
fAutoSeed = value;
}
#endif
@@ -23,46 +23,39 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
/// \file geometry/transforms/include/PhysicsList.hh
/// \brief Definition of the PhysicsList class
//
/// \file ExG4EventAction01Messenger.hh
/// \brief Definition of the ExG4EventAction01Messenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef ExG4EventAction01Messenger_h
#define ExG4EventAction01Messenger_h 1
#ifndef PhysicsList_h
#define PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
#include "G4UImessenger.hh"
class ExG4EventAction01;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
class G4UIcmdWithABool;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// Messenger class that defines commands for ExG4EventAction01
///
/// It implements commands:
/// - /ExG4/event/verboseLevel level
/// - /ExG4/event/printModulo modulo
/// - /ExG4/event/saveRndm true|false
class ExG4EventAction01Messenger: public G4UImessenger
class PhysicsList: public G4VUserPhysicsList
{
public:
ExG4EventAction01Messenger(ExG4EventAction01* eventAction);
~ExG4EventAction01Messenger();
virtual void SetNewValue(G4UIcommand* command, G4String newValue);
private:
// data members
ExG4EventAction01* fEventAction;
G4UIdirectory* fTopDirectory;
G4UIdirectory* fDirectory;
G4UIcmdWithAnInteger* fSetVerboseLevelCmd;
G4UIcmdWithAnInteger* fSetPrintModuloCmd;
G4UIcmdWithABool* fSetSaveRndmCmd;
//G4UIcmdWithAString* DrawCmd;
PhysicsList();
~PhysicsList();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
};
#endif //ExG4EventAction01Messenger_h
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,44 +23,43 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file geometry/transforms/include/PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//
//
// $Id$
//
/// \file ExG4PrimaryGeneratorAction01.hh
/// \brief Definition of the ExG4PrimaryGeneratorAction01 class
//
#ifndef ExG4PrimaryGeneratorAction01_h
#define ExG4PrimaryGeneratorAction01_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4ThreeVector.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
/// \ingroup primary_generator
/// \brief The primary generator class with particle gun
///
/// \author I. Hrivnacova; IPN Orsay
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class ExG4PrimaryGeneratorAction01 : public G4VUserPrimaryGeneratorAction
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
ExG4PrimaryGeneratorAction01(
const G4String& particleName = "e-",
G4double energy = 1.*MeV,
G4ThreeVector position= G4ThreeVector(0,0,0),
G4ThreeVector momentumDirection = G4ThreeVector(0,0,1));
~ExG4PrimaryGeneratorAction01();
PrimaryGeneratorAction();
~PrimaryGeneratorAction();
// methods
virtual void GeneratePrimaries(G4Event*);
public:
void GeneratePrimaries(G4Event*);
private:
// data members
G4ParticleGun* fParticleGun; //pointer a to G4 service class
G4ParticleGun* fParticleGun;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,53 +23,38 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file geometry/transforms/include/SteppingVerbose.hh
/// \brief Definition of the SteppingVerbose class
//
//
// $Id$
//
/// \file ExG4RunAction01Messenger.hh
/// \brief Definition of the ExG4RunAction01Messenger class
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
// It shows how to extract informations during the tracking of a particle.
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef ExG4RunAction01Messenger_h
#define ExG4RunAction01Messenger_h 1
#ifndef SteppingVerbose_h
#define SteppingVerbose_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4ios.hh"
#include "G4SteppingVerbose.hh"
class ExG4RunAction01;
class G4UIdirectory;
class G4UIcmdWithABool;
class G4UIcmdWithAnInteger;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// Messenger class that defines commands for ExG4RunAction01
///
/// It implements commands:
/// - /ExG4/run/verboseLevel level
/// - /ExG4/run/saveRndm true|false
/// - /ExG4/run/readRndm true|false
/// - /ExG4/run/rndmFileName fileName
/// - /ExG4/run/autoSeed true|false
class SteppingVerbose : public G4SteppingVerbose {
class ExG4RunAction01Messenger: public G4UImessenger
{
public:
public:
ExG4RunAction01Messenger(ExG4RunAction01* );
~ExG4RunAction01Messenger();
SteppingVerbose();
~SteppingVerbose();
virtual void SetNewValue(G4UIcommand* command, G4String newValue);
void StepInfo();
void TrackingStarted();
private:
ExG4RunAction01* fRunAction;
G4UIdirectory* fTopDirectory;
G4UIdirectory* fDirectory;
G4UIcmdWithAnInteger* fSetVerboseLevelCmd;
G4UIcmdWithABool* fSetSaveRndmCmd;
G4UIcmdWithABool* fSetReadRndmCmd;
G4UIcmdWithAString* fSetRndmFileNameCmd;
G4UIcmdWithABool* fSetAutoSeedCmd;
};
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif