Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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: ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
#ifndef ActionInitialization_h
#define ActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
class DetectorConstruction;
/// Action initialization class.
///
class ActionInitialization : public G4VUserActionInitialization
{
public:
ActionInitialization(DetectorConstruction* detector);
virtual ~ActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
private:
DetectorConstruction* fDetector;
};
#endif
@@ -0,0 +1,154 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file analysis/shared/include/DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//
//
// $Id: DetectorConstruction.hh 85901 2014-11-06 08:40:31Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4Box;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class DetectorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction();
virtual ~DetectorConstruction();
public:
void SetAbsorberMaterial (G4String);
void SetAbsorberThickness(G4double);
void SetGapMaterial (G4String);
void SetGapThickness(G4double);
void SetCalorSizeYZ(G4double);
void SetNbOfLayers (G4int);
virtual G4VPhysicalVolume* Construct();
public:
void PrintCalorParameters();
G4double GetWorldSizeX() {return fWorldSizeX;};
G4double GetWorldSizeYZ() {return fWorldSizeYZ;};
G4double GetCalorThickness() {return fCalorThickness;};
G4double GetCalorSizeYZ() {return fCalorSizeYZ;};
G4int GetNbOfLayers() {return fNbOfLayers;};
G4Material* GetAbsorberMaterial() {return fAbsorberMaterial;};
G4double GetAbsorberThickness() {return fAbsorberThickness;};
G4Material* GetGapMaterial() {return fGapMaterial;};
G4double GetGapThickness() {return fGapThickness;};
const G4VPhysicalVolume* GetphysiWorld() {return fPhysiWorld;};
const G4VPhysicalVolume* GetAbsorber() {return fPhysiAbsorber;};
const G4VPhysicalVolume* GetGap() {return fPhysiGap;};
private:
G4Material* fAbsorberMaterial;
G4double fAbsorberThickness;
G4Material* fGapMaterial;
G4double fGapThickness;
G4int fNbOfLayers;
G4double fLayerThickness;
G4double fCalorSizeYZ;
G4double fCalorThickness;
G4Material* fDefaultMaterial;
G4double fWorldSizeYZ;
G4double fWorldSizeX;
G4Box* fSolidWorld; //pointer to the solid World
G4LogicalVolume* fLogicWorld; //pointer to the logical World
G4VPhysicalVolume* fPhysiWorld; //pointer to the physical World
G4Box* fSolidCalor; //pointer to the solid Calor
G4LogicalVolume* fLogicCalor; //pointer to the logical Calor
G4VPhysicalVolume* fPhysiCalor; //pointer to the physical Calor
G4Box* fSolidLayer; //pointer to the solid Layer
G4LogicalVolume* fLogicLayer; //pointer to the logical Layer
G4VPhysicalVolume* fPhysiLayer; //pointer to the physical Layer
G4Box* fSolidAbsorber; //pointer to the solid Absorber
G4LogicalVolume* fLogicAbsorber; //pointer to the logical Absorber
G4VPhysicalVolume* fPhysiAbsorber; //pointer to the physical Absorber
G4Box* fSolidGap; //pointer to the solid Gap
G4LogicalVolume* fLogicGap; //pointer to the logical Gap
G4VPhysicalVolume* fPhysiGap; //pointer to the physical Gap
DetectorMessenger* fDetectorMessenger; //pointer to the Messenger
private:
void DefineMaterials();
void ComputeCalorParameters();
G4VPhysicalVolume* ConstructCalorimeter();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void DetectorConstruction::ComputeCalorParameters()
{
// Compute derived parameters of the calorimeter
fLayerThickness = fAbsorberThickness + fGapThickness;
fCalorThickness = fNbOfLayers*fLayerThickness;
fWorldSizeX = 1.2*fCalorThickness; fWorldSizeYZ = 1.2*fCalorSizeYZ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,76 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file analysis/shared/include/DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
//
//
// $Id: DetectorMessenger.hh 85901 2014-11-06 08:40:31Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class DetectorMessenger: public G4UImessenger
{
public:
DetectorMessenger(DetectorConstruction* );
virtual ~DetectorMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
DetectorConstruction* fDetector;
G4UIdirectory* fN03Dir;
G4UIdirectory* fDetDir;
G4UIcmdWithAString* fAbsMaterCmd;
G4UIcmdWithAString* fGapMaterCmd;
G4UIcmdWithADoubleAndUnit* fAbsThickCmd;
G4UIcmdWithADoubleAndUnit* fGapThickCmd;
G4UIcmdWithADoubleAndUnit* fSizeYZCmd;
G4UIcmdWithAnInteger* fNbLayersCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,74 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file analysis/shared/include/EventAction.hh
/// \brief Definition of the EventAction class
//
//
// $Id: EventAction.hh 85901 2014-11-06 08:40:31Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef EventAction_h
#define EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class RunAction;
class HistoManager;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class EventAction : public G4UserEventAction
{
public:
EventAction(RunAction*, HistoManager*);
virtual ~EventAction();
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
void AddAbs(G4double de, G4double dl) {fEnergyAbs += de; fTrackLAbs += dl;};
void AddGap(G4double de, G4double dl) {fEnergyGap += de; fTrackLGap += dl;};
private:
RunAction* fRunAct;
HistoManager* fHistoManager;
G4double fEnergyAbs, fEnergyGap;
G4double fTrackLAbs, fTrackLGap;
G4int fPrintModulo;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file analysis/shared/include/PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//
//
// $Id: PrimaryGeneratorAction.hh 85901 2014-11-06 08:40:31Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class DetectorConstruction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PrimaryGeneratorAction(DetectorConstruction*);
virtual ~PrimaryGeneratorAction();
virtual void GeneratePrimaries(G4Event*);
private:
G4ParticleGun* fParticleGun; //pointer a to G4 class
DetectorConstruction* fDetector; //pointer to the geometry
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file analysis/shared/include/RunAction.hh
/// \brief Definition of the RunAction class
//
//
// $Id: RunAction.hh 85901 2014-11-06 08:40:31Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef RunAction_h
#define RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Run;
class HistoManager;
class RunAction : public G4UserRunAction
{
public:
RunAction(HistoManager*);
virtual ~RunAction();
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
void fillPerEvent(G4double, G4double, G4double, G4double);
private:
HistoManager* fHistoManager;
G4double fSumEAbs, fSum2EAbs;
G4double fSumEGap, fSum2EGap;
G4double fSumLAbs, fSum2LAbs;
G4double fSumLGap, fSum2LGap;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
/// \file analysis/shared/include/SteppingAction.hh
/// \brief Definition of the SteppingAction class
//
//
// $Id: SteppingAction.hh 85901 2014-11-06 08:40:31Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef SteppingAction_h
#define SteppingAction_h 1
#include "G4UserSteppingAction.hh"
class DetectorConstruction;
class EventAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class SteppingAction : public G4UserSteppingAction
{
public:
SteppingAction(DetectorConstruction*, EventAction*);
virtual ~SteppingAction();
virtual void UserSteppingAction(const G4Step*);
private:
DetectorConstruction* fDetector;
EventAction* fEventAction;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif