Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
@@ -32,19 +32,14 @@
#include "G4VUserActionInitialization.hh"
class B4DetectorConstruction;
/// Action initialization class.
///
class OpNoviceActionInitialization : public G4VUserActionInitialization
{
public:
OpNoviceActionInitialization();
virtual ~OpNoviceActionInitialization();
public:
OpNoviceActionInitialization();
~OpNoviceActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
void BuildForMaster() const override;
void Build() const override;
};
#endif
@@ -41,25 +41,24 @@
class OpNoviceDetectorConstruction : public G4VUserDetectorConstruction
{
public:
OpNoviceDetectorConstruction();
virtual ~OpNoviceDetectorConstruction();
public:
OpNoviceDetectorConstruction();
~OpNoviceDetectorConstruction();
public:
virtual G4VPhysicalVolume* Construct();
G4VPhysicalVolume* Construct() override;
private:
G4double fExpHall_x;
G4double fExpHall_y;
G4double fExpHall_z;
private:
G4double fExpHall_x;
G4double fExpHall_y;
G4double fExpHall_z;
G4double fTank_x;
G4double fTank_y;
G4double fTank_z;
G4double fTank_x;
G4double fTank_y;
G4double fTank_z;
G4double fBubble_x;
G4double fBubble_y;
G4double fBubble_z;
G4double fBubble_x;
G4double fBubble_y;
G4double fBubble_z;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * 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 optical/OpNovice/include/OpNoviceEventAction.hh
/// \brief Definition of the OpNoviceEventAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNoviceEventAction_h
#define OpNoviceEventAction_h 1
#include "globals.hh"
#include "G4UserEventAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNoviceEventAction : public G4UserEventAction
{
public:
OpNoviceEventAction();
~OpNoviceEventAction();
void BeginOfEventAction(const G4Event*) override;
void EndOfEventAction(const G4Event*) override;
void AddRayleigh() { ++fRayleigh; }
void AddAbsorption() { ++fAbsorption; }
void AddMie() { ++fMie; }
void AddBoundary() { ++fBoundary; }
private:
G4int fRayleigh;
G4int fAbsorption;
G4int fMie;
G4int fBoundary;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -34,10 +34,10 @@
#ifndef OpNovicePrimaryGeneratorAction_h
#define OpNovicePrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
#include "G4ParticleGun.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class OpNovicePrimaryGeneratorMessenger;
@@ -45,19 +45,20 @@ class OpNovicePrimaryGeneratorMessenger;
class OpNovicePrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
OpNovicePrimaryGeneratorAction();
virtual ~OpNovicePrimaryGeneratorAction();
public:
OpNovicePrimaryGeneratorAction();
~OpNovicePrimaryGeneratorAction();
public:
virtual void GeneratePrimaries(G4Event*);
void GeneratePrimaries(G4Event*) override;
void SetOptPhotonPolar();
void SetOptPhotonPolar(G4double);
void SetOptPhotonPolar();
void SetOptPhotonPolar(G4double);
private:
G4ParticleGun* fParticleGun;
OpNovicePrimaryGeneratorMessenger* fGunMessenger;
G4ParticleGun* GetParticleGun() { return fParticleGun; }
private:
G4ParticleGun* fParticleGun;
OpNovicePrimaryGeneratorMessenger* fGunMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -28,7 +28,6 @@
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -36,8 +35,8 @@
#ifndef OpNovicePrimaryGeneratorMessenger_h
#define OpNovicePrimaryGeneratorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
#include "G4UImessenger.hh"
class OpNovicePrimaryGeneratorAction;
class G4UIdirectory;
@@ -45,18 +44,18 @@ class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNovicePrimaryGeneratorMessenger: public G4UImessenger
class OpNovicePrimaryGeneratorMessenger : public G4UImessenger
{
public:
OpNovicePrimaryGeneratorMessenger(OpNovicePrimaryGeneratorAction* );
virtual ~OpNovicePrimaryGeneratorMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
OpNovicePrimaryGeneratorAction* fOpNoviceAction;
G4UIdirectory* fGunDir;
G4UIcmdWithADoubleAndUnit* fPolarCmd;
public:
OpNovicePrimaryGeneratorMessenger(OpNovicePrimaryGeneratorAction*);
~OpNovicePrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String) override;
private:
OpNovicePrimaryGeneratorAction* fOpNoviceAction;
G4UIdirectory* fGunDir;
G4UIcmdWithADoubleAndUnit* fPolarCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,105 @@
//
// ********************************************************************
// * 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 OpNovice/include/OpNoviceRun.hh
/// \brief Definition of the OpNoviceRun class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNoviceRun_h
#define OpNoviceRun_h 1
#include "G4Run.hh"
class G4ParticleDefinition;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OpNoviceRun : public G4Run
{
public:
OpNoviceRun();
~OpNoviceRun();
void SetPrimary(G4ParticleDefinition* particle, G4double energy);
void AddCerenkov(G4double n)
{
fCerenkovCounter += n;
fCerenkov2 += n * n;
};
void AddScintillation(G4double n)
{
fScintillationCounter += n;
fScintillation2 += n * n;
};
void AddRayleigh(G4double n)
{
fRayleighCounter += n;
fRayleigh2 += n * n;
};
void AddAbsorption(G4double n)
{
fAbsorptionCounter += n;
fAbsorption2 += n * n;
};
void AddMie(G4double n)
{
fMieCounter += n;
fMie2 += n * n;
};
void AddBoundary(G4double n)
{
fBoundaryCounter += n;
fBoundary2 += n * n;
};
void Merge(const G4Run*) override;
void EndOfRun();
private:
G4double fCerenkovCounter;
G4double fCerenkov2;
G4double fScintillationCounter;
G4double fScintillation2;
G4double fRayleighCounter;
G4double fRayleigh2;
G4double fAbsorptionCounter;
G4double fAbsorption2;
G4double fMieCounter;
G4double fMie2;
G4double fBoundaryCounter;
G4double fBoundary2;
G4ParticleDefinition* fParticle;
G4double fEnergy;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -27,7 +27,7 @@
/// \brief Definition of the OpNoviceRunAction class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,25 +37,28 @@
#include "globals.hh"
#include "G4UserRunAction.hh"
class OpNovicePrimaryGeneratorAction;
class OpNoviceRun;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Timer;
class G4Run;
class OpNoviceRunAction : public G4UserRunAction
{
public:
OpNoviceRunAction();
virtual ~OpNoviceRunAction();
public:
OpNoviceRunAction(OpNovicePrimaryGeneratorAction* = nullptr);
~OpNoviceRunAction();
public:
virtual void BeginOfRunAction(const G4Run* aRun);
virtual void EndOfRunAction(const G4Run* aRun);
G4Run* GenerateRun() override;
void BeginOfRunAction(const G4Run*) override;
void EndOfRunAction(const G4Run*) override;
private:
G4Timer* fTimer;
private:
OpNoviceRun* fRun;
OpNovicePrimaryGeneratorAction* fPrimary;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /*OpNoviceRunAction_h*/
#endif
@@ -30,8 +30,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef OpNoviceStackingAction_H
#define OpNoviceStackingAction_H 1
#ifndef OpNoviceStackingAction_h
#define OpNoviceStackingAction_h 1
#include "globals.hh"
#include "G4UserStackingAction.hh"
@@ -40,18 +40,17 @@
class OpNoviceStackingAction : public G4UserStackingAction
{
public:
OpNoviceStackingAction();
virtual ~OpNoviceStackingAction();
public:
OpNoviceStackingAction();
~OpNoviceStackingAction();
public:
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
virtual void NewStage();
virtual void PrepareNewEvent();
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) override;
void NewStage() override;
void PrepareNewEvent() override;
private:
G4int fScintillationCounter;
G4int fCerenkovCounter;
private:
G4int fScintillationCounter;
G4int fCerenkovCounter;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -30,25 +30,21 @@
#ifndef OpNoviceSteppingAction_h
#define OpNoviceSteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "globals.hh"
#include "OpNoviceEventAction.hh"
/// Stepping action class
///
#include "globals.hh"
#include "G4UserSteppingAction.hh"
class OpNoviceSteppingAction : public G4UserSteppingAction
{
public:
OpNoviceSteppingAction();
virtual ~OpNoviceSteppingAction();
public:
OpNoviceSteppingAction(OpNoviceEventAction*);
~OpNoviceSteppingAction();
// method from the base class
virtual void UserSteppingAction(const G4Step*);
void UserSteppingAction(const G4Step*) override;
private:
G4int fScintillationCounter;
G4int fCerenkovCounter;
G4int fEventNumber;
private:
OpNoviceEventAction* fEventAction;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......