Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -0,0 +1,91 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelAnalysisManager.cc *
// * ------- *
// * *
// * Version: 0.2 *
// * Date: 30/11/00 *
// * Author: A. Pfeiffer, G. Barrand, MG Pia, R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 30.11.2000 M.G. Pia, R. Nartallo
// - Simplification of code
// - Inheritance directly from the base class G4VAnalysisManager instead
// of the derived class G4AnalysisManager
//
// 16.10.2000 G. Barrand
// - First implementation of XrayAnalysisManager class
// - Provision of code for various AIDA and non-AIDA systems
//
// **********************************************************************
#ifndef XrayTelAnalysisManager_h
#define XrayTelAnalysisManager_h 1
#include "G4VAnalysisManager.hh"
#include "globals.hh"
#include "g4std/vector"
#include "G4ThreeVector.hh"
class G4SteppingManager;
class G4VAnalysisSystem;
#ifdef G4ANALYSIS_USE
class IHistogramFactory;
class IHistogram1D;
class IHistogram2D;
#endif
#ifdef G4ANALYSIS_USE
class XrayTelAnalysisManager: public G4VAnalysisManager {
#endif
#ifndef G4ANALYSIS_USE
class XrayTelAnalysisManager {
#endif
public:
XrayTelAnalysisManager(const G4String&);
~XrayTelAnalysisManager();
G4bool RegisterAnalysisSystem(G4VAnalysisSystem*);
#ifdef G4ANALYSIS_USE
IHistogramFactory* GetHistogramFactory(const G4String&);
virtual void Store(IHistogram* = 0,const G4String& = "");
virtual void Plot(IHistogram*);
#endif
void BeginOfRun();
void EndOfRun();
void Step(const G4SteppingManager*);
private:
G4VAnalysisSystem* analysisSystem;
#ifdef G4ANALYSIS_USE
IHistogramFactory* hFactory;
IHistogram1D* enteringEnergyHistogram;
IHistogram2D* yzHistogram;
#endif
};
#endif
@@ -0,0 +1,59 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelDetectorConstruction.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelDetectorConstruction_H
#define XrayTelDetectorConstruction_H 1
class G4VPhysicalVolume;
#include "G4VUserDetectorConstruction.hh"
#include "G4LogicalVolume.hh"
class XrayTelDetectorConstruction : public G4VUserDetectorConstruction
{
public:
XrayTelDetectorConstruction();
~XrayTelDetectorConstruction();
public:
G4VPhysicalVolume* Construct();
private:
G4double world_x;
G4double world_y;
G4double world_z;
void ConstructTelescope();
void ConstructFocalPlane();
G4VPhysicalVolume* physicalWorld;
};
#endif
@@ -0,0 +1,66 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelEventAction.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelEventAction_h
#define XrayTelEventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class XrayTelEventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class XrayTelEventAction : public G4UserEventAction
{
public:
XrayTelEventAction(G4bool* dEvent);
~XrayTelEventAction();
public:
void BeginOfEventAction(const G4Event* anEvent);
void EndOfEventAction(const G4Event* anEvent);
void SetDrawFlag(G4String val) {drawFlag = val;};
private:
G4bool* drawEvent;
G4String drawFlag; // control the drawing of event
XrayTelEventActionMessenger* eventMessenger;
};
#endif
@@ -0,0 +1,62 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelEventActionMessenger.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelEventActionMessenger_h
#define XrayTelEventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class XrayTelEventAction;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class XrayTelEventActionMessenger: public G4UImessenger
{
public:
XrayTelEventActionMessenger(XrayTelEventAction*);
~XrayTelEventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
XrayTelEventAction* eventAction;
G4UIcmdWithAString* DrawCmd;
};
#endif
@@ -0,0 +1,85 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelPhysicsList.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelPhysicsList_h
#define XrayTelPhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
class XrayTelPhysicsList: public G4VUserPhysicsList
{
public:
XrayTelPhysicsList();
~XrayTelPhysicsList();
protected:
// Construct particle and physics process
void ConstructParticle();
void ConstructProcess();
void SetCuts();
public:
// Set/Get cut values
void SetCutForGamma(G4double);
void SetCutForElectron(G4double);
void SetCutForProton(G4double);
G4double GetCutForGamma() const;
G4double GetCutForElectron() const;
G4double GetCutForProton() const;
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBaryons();
void ConstructAllShortLiveds();
protected:
// these methods Construct physics processes and register them
void ConstructGeneral();
void ConstructEM();
private:
G4double cutForGamma;
G4double cutForElectron;
G4double cutForProton;
};
#endif
@@ -0,0 +1,62 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelPrimaryGeneratorAction.hh *
// * ------- *
// * *
// * Version: 0.5 *
// * Date: 15/11/00 *
// * Author: F.Lei *
// * Organisation: DERA, UK *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 15.11.2000 F.Lei
// - New version of PrimaryGeneratorAction using the GPS insead of the
// standard particle gun.
// - The PrimaryGeneratorMessenger is no longer needed.
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelPrimaryGeneratorAction_h
#define XrayTelPrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
class G4GeneralParticleSource;
class G4Event;
class XrayTelPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
XrayTelPrimaryGeneratorAction();
~XrayTelPrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4GeneralParticleSource* particleGun;
};
#endif
@@ -0,0 +1,67 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelRunAction.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelRunAction_h
#define XrayTelRunAction_h 1
#include "G4UserRunAction.hh"
#include "G4ThreeVector.hh"
#include "globals.hh"
#include "g4std/vector"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4Run;
class XrayTelAnalysisManager;
class XrayTelRunAction : public G4UserRunAction
{
public:
XrayTelRunAction(G4std::vector<G4double*> *enEnergy,
G4std::vector<G4ThreeVector*> *enDirect,
G4bool* dEvent,
XrayTelAnalysisManager* = 0);
~XrayTelRunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
private:
G4bool* drawEvent;
G4std::vector<G4double*>* enteringEnergy;
G4std::vector<G4ThreeVector*>* enteringDirection;
XrayTelAnalysisManager* fAnalysisManager;
};
#endif
@@ -0,0 +1,128 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelStepCut.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelStepCut_h
#define XrayTelStepCut_h 1
#include "G4ios.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Step.hh"
#include "globals.hh"
class XrayTelStepCut : public G4VDiscreteProcess
{
public:
XrayTelStepCut(const G4String& processName ="UserStepCut" );
XrayTelStepCut(XrayTelStepCut &);
~XrayTelStepCut();
G4double PostStepGetPhysicalInteractionLength(
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition
);
G4VParticleChange* PostStepDoIt(
const G4Track& ,
const G4Step&
);
void SetMaxStep(G4double);
protected:
// it is not needed here !
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
);
private:
// hide assignment operator as private
XrayTelStepCut & operator=(const XrayTelStepCut &right);
private:
G4double MaxChargedStep ;
};
// inlined function members implementation
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4UserLimits.hh"
#include "G4VParticleChange.hh"
#include "G4EnergyLossTables.hh"
inline G4double XrayTelStepCut::PostStepGetPhysicalInteractionLength(
const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
)
{
// condition is set to "Not Forced"
*condition = NotForced;
G4double ProposedStep = DBL_MAX;
if((MaxChargedStep > 0.) &&
(aTrack.GetVolume() != NULL) &&
(aTrack.GetVolume()->GetName() == "Absorber") &&
(aTrack.GetDynamicParticle()->GetDefinition()->GetPDGCharge() != 0.))
ProposedStep = MaxChargedStep ;
return ProposedStep;
}
inline G4VParticleChange* XrayTelStepCut::PostStepDoIt(
const G4Track& aTrack,
const G4Step&
)
{
// do nothing
aParticleChange.Initialize(aTrack);
return &aParticleChange;
}
inline G4double XrayTelStepCut::GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
)
{
return 0.;
}
#endif
@@ -0,0 +1,63 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelSteppingAction.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelSteppingAction_h
#define XrayTelSteppingAction_h 1
class XrayTelAnalysisManager;
#include "G4UserSteppingAction.hh"
#include "G4ThreeVector.hh"
#include "g4std/vector"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class XrayTelSteppingAction : public G4UserSteppingAction
{
public:
XrayTelSteppingAction(
G4std::vector<G4double*> *enEnergy,
G4std::vector<G4ThreeVector*> *enDirect,
G4bool* dEvent,
XrayTelAnalysisManager* = 0);
virtual ~XrayTelSteppingAction();
virtual void UserSteppingAction(const G4Step*);
private:
G4bool* drawEvent;
G4std::vector<G4double*>* enteringEnergy;
G4std::vector<G4ThreeVector*>* enteringDirection;
XrayTelAnalysisManager* fAnalysisManager;
};
#endif
@@ -0,0 +1,54 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// **********************************************************************
// * *
// * GEANT 4 xray_telescope advanced example *
// * *
// * MODULE: XrayTelVisManager.hh *
// * ------- *
// * *
// * Version: 0.4 *
// * Date: 06/11/00 *
// * Author: R Nartallo *
// * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands *
// * *
// **********************************************************************
//
// CHANGE HISTORY
// --------------
//
// 06.11.2000 R.Nartallo
// - First implementation of X-ray Telescope advanced example.
// - Based on Chandra and XMM models
//
//
// **********************************************************************
#ifndef XrayTelVisManager_h
#define XrayTelVisManager_h 1
#ifdef G4VIS_USE
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class XrayTelVisManager: public G4VisManager {
public:
XrayTelVisManager ();
private:
void RegisterGraphicsSystems ();
};
#endif
#endif