Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -38,13 +38,13 @@ class WLSActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
WLSActionInitialization(WLSDetectorConstruction*);
|
||||
~WLSActionInitialization();
|
||||
~WLSActionInitialization() override = default;
|
||||
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
|
||||
private:
|
||||
WLSDetectorConstruction* fDetector;
|
||||
WLSDetectorConstruction* fDetector = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "G4Cache.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
class WLSMaterials;
|
||||
class WLSDetectorMessenger;
|
||||
@@ -55,7 +56,7 @@ class WLSDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
WLSDetectorConstruction();
|
||||
~WLSDetectorConstruction();
|
||||
~WLSDetectorConstruction() override;
|
||||
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
G4VPhysicalVolume* ConstructDetector();
|
||||
@@ -118,74 +119,74 @@ class WLSDetectorConstruction : public G4VUserDetectorConstruction
|
||||
private:
|
||||
std::vector<G4VisAttributes*> fVisAttributes;
|
||||
|
||||
WLSMaterials* fMaterials;
|
||||
WLSMaterials* fMaterials = nullptr;
|
||||
|
||||
G4LogicalVolume* fLogicHole;
|
||||
G4LogicalVolume* fLogicWorld;
|
||||
G4LogicalVolume* fLogicHole = nullptr;
|
||||
G4LogicalVolume* fLogicWorld = nullptr;
|
||||
|
||||
G4VPhysicalVolume* fPhysiWorld;
|
||||
G4VPhysicalVolume* fPhysiHole;
|
||||
G4VPhysicalVolume* fPhysiWorld = nullptr;
|
||||
G4VPhysicalVolume* fPhysiHole = nullptr;
|
||||
|
||||
G4double fWorldSizeX;
|
||||
G4double fWorldSizeY;
|
||||
G4double fWorldSizeZ;
|
||||
G4double fWorldSizeX = -1.;
|
||||
G4double fWorldSizeY = -1.;
|
||||
G4double fWorldSizeZ = -1.;
|
||||
|
||||
G4double fWLSfiberRX;
|
||||
G4double fWLSfiberRY;
|
||||
G4double fWLSfiberZ;
|
||||
G4double fWLSfiberRX = -1.;
|
||||
G4double fWLSfiberRY = 0.5 * CLHEP::mm;
|
||||
G4double fWLSfiberZ = 1. * CLHEP::m;
|
||||
|
||||
G4double fClad1RX;
|
||||
G4double fClad1RY;
|
||||
G4double fClad1Z;
|
||||
G4double fClad1RX = -1.;
|
||||
G4double fClad1RY = -1.;
|
||||
G4double fClad1Z = -1.;
|
||||
|
||||
G4double fClad2RX;
|
||||
G4double fClad2RY;
|
||||
G4double fClad2Z;
|
||||
G4double fClad2RX = -1.;
|
||||
G4double fClad2RY = -1.;
|
||||
G4double fClad2Z = -1.;
|
||||
|
||||
G4double fClrfiberHalfL;
|
||||
G4double fClrfiberZ;
|
||||
G4double fClrfiberHalfL = -1.;
|
||||
G4double fClrfiberZ = -1.;
|
||||
|
||||
G4double fCoupleRX;
|
||||
G4double fCoupleRY;
|
||||
G4double fCoupleZ;
|
||||
G4double fCoupleRX = -1.;
|
||||
G4double fCoupleRY = -1.;
|
||||
G4double fCoupleZ = -1.;
|
||||
|
||||
G4double fMirrorRmax;
|
||||
G4double fMirrorZ;
|
||||
G4bool fMirrorToggle;
|
||||
G4double fMirrorRmax = -1.;
|
||||
G4double fMirrorZ = 0.1 * CLHEP::mm;
|
||||
G4bool fMirrorToggle = true;
|
||||
|
||||
G4String fMPPCShape;
|
||||
G4double fMPPCHalfL;
|
||||
G4double fMPPCZ;
|
||||
G4double fMPPCDist;
|
||||
G4double fMPPCTheta;
|
||||
G4String fMPPCShape = "Circle";
|
||||
G4double fMPPCHalfL = -1.;
|
||||
G4double fMPPCZ = 0.05 * CLHEP::mm;
|
||||
G4double fMPPCDist = 0.;
|
||||
G4double fMPPCTheta = 0;
|
||||
|
||||
G4double fWLSfiberOrigin;
|
||||
G4double fCoupleOrigin;
|
||||
G4double fMirrorOrigin;
|
||||
G4double fMPPCOriginX;
|
||||
G4double fMPPCOriginZ;
|
||||
G4double fWLSfiberOrigin = 0.;
|
||||
G4double fCoupleOrigin = 0.;
|
||||
G4double fMirrorOrigin = 0.;
|
||||
G4double fMPPCOriginX = 0.;
|
||||
G4double fMPPCOriginZ = 0.;
|
||||
|
||||
G4int fNumOfCladLayers;
|
||||
G4int fNumOfCladLayers = 0;
|
||||
|
||||
G4double fMirrorPolish;
|
||||
G4double fMirrorReflectivity;
|
||||
G4double fMPPCPolish;
|
||||
G4double fMPPCReflectivity;
|
||||
G4double fExtrusionPolish;
|
||||
G4double fExtrusionReflectivity;
|
||||
G4double fSurfaceRoughness;
|
||||
G4double fXYRatio;
|
||||
G4double fMirrorPolish = 1.;
|
||||
G4double fMirrorReflectivity = 1.;
|
||||
G4double fMPPCPolish = 1.;
|
||||
G4double fMPPCReflectivity = 0.;
|
||||
G4double fExtrusionPolish = 1.;
|
||||
G4double fExtrusionReflectivity = 1.;
|
||||
G4double fSurfaceRoughness = 1.;
|
||||
G4double fXYRatio = 1.;
|
||||
|
||||
G4double fBarLength;
|
||||
G4double fBarBase;
|
||||
G4double fHoleRadius;
|
||||
G4double fHoleLength;
|
||||
G4double fCoatingThickness;
|
||||
G4double fCoatingRadius;
|
||||
G4double fBarLength = 1. * CLHEP::m;
|
||||
G4double fBarBase = 9.6 * CLHEP::mm;
|
||||
G4double fHoleRadius = 0.9 * CLHEP::mm;
|
||||
G4double fHoleLength = -1.;
|
||||
G4double fCoatingThickness = 0.25 * CLHEP::mm;
|
||||
G4double fCoatingRadius = 1.875 * CLHEP::mm;
|
||||
|
||||
void UpdateGeometryParameters();
|
||||
|
||||
WLSDetectorMessenger* fDetectorMessenger;
|
||||
WLSDetectorMessenger* fDetectorMessenger = nullptr;
|
||||
G4Cache<WLSPhotonDetSD*> fmppcSD;
|
||||
};
|
||||
|
||||
|
||||
@@ -52,36 +52,36 @@ class WLSDetectorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
WLSDetectorMessenger(WLSDetectorConstruction*);
|
||||
~WLSDetectorMessenger();
|
||||
~WLSDetectorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
WLSDetectorConstruction* fDetector;
|
||||
WLSDetectorConstruction* fDetector = nullptr;
|
||||
|
||||
G4UIdirectory* fDetDir;
|
||||
G4UIdirectory* fDetDir = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fSetPhotonDetGeometryCmd;
|
||||
G4UIcmdWithAnInteger* fSetNumOfCladLayersCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetWLSLengthCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetWLSRadiusCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetClad1RadiusCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetClad2RadiusCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetPhotonDetHalfLengthCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetGapCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetPhotonDetAlignmentCmd;
|
||||
G4UIcmdWithADouble* fSetXYRatioCmd;
|
||||
G4UIcmdWithADouble* fSetSurfaceRoughnessCmd;
|
||||
G4UIcmdWithADouble* fSetMirrorPolishCmd;
|
||||
G4UIcmdWithADouble* fSetMirrorReflectivityCmd;
|
||||
G4UIcmdWithADouble* fSetPhotonDetPolishCmd;
|
||||
G4UIcmdWithADouble* fSetPhotonDetReflectivityCmd;
|
||||
G4UIcmdWithABool* fSetMirrorCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetBarLengthCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetBarBaseCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetHoleRadiusCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetCoatingThicknessCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetCoatingRadiusCmd;
|
||||
G4UIcmdWithAString* fSetPhotonDetGeometryCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fSetNumOfCladLayersCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetWLSLengthCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetWLSRadiusCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetClad1RadiusCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetClad2RadiusCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetPhotonDetHalfLengthCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetGapCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetPhotonDetAlignmentCmd = nullptr;
|
||||
G4UIcmdWithADouble* fSetXYRatioCmd = nullptr;
|
||||
G4UIcmdWithADouble* fSetSurfaceRoughnessCmd = nullptr;
|
||||
G4UIcmdWithADouble* fSetMirrorPolishCmd = nullptr;
|
||||
G4UIcmdWithADouble* fSetMirrorReflectivityCmd = nullptr;
|
||||
G4UIcmdWithADouble* fSetPhotonDetPolishCmd = nullptr;
|
||||
G4UIcmdWithADouble* fSetPhotonDetReflectivityCmd = nullptr;
|
||||
G4UIcmdWithABool* fSetMirrorCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetBarLengthCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetBarBaseCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetHoleRadiusCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetCoatingThicknessCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetCoatingRadiusCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,7 @@ class WLSEventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
WLSEventAction();
|
||||
~WLSEventAction();
|
||||
~WLSEventAction() override;
|
||||
|
||||
void BeginOfEventAction(const G4Event*) override;
|
||||
void EndOfEventAction(const G4Event*) override;
|
||||
@@ -64,23 +64,23 @@ class WLSEventAction : public G4UserEventAction
|
||||
void AddMirror() { fMirror += 1; };
|
||||
|
||||
private:
|
||||
WLSEventActionMessenger* fEventMessenger;
|
||||
WLSEventActionMessenger* fEventMessenger = nullptr;
|
||||
|
||||
G4int fVerboseLevel;
|
||||
G4int fVerboseLevel = 0;
|
||||
|
||||
G4int fMPPCCollID;
|
||||
G4int fMPPCCollID = 0;
|
||||
|
||||
G4int fNTIR;
|
||||
G4int fNExiting;
|
||||
G4int fEscapedEnd;
|
||||
G4int fEscapedMid;
|
||||
G4int fBounce;
|
||||
G4int fWLSBounce;
|
||||
G4int fClad1Bounce;
|
||||
G4int fClad2Bounce;
|
||||
G4int fReflected;
|
||||
G4int fEscaped;
|
||||
G4int fMirror;
|
||||
G4int fNTIR = 0;
|
||||
G4int fNExiting = 0;
|
||||
G4int fEscapedEnd = 0;
|
||||
G4int fEscapedMid = 0;
|
||||
G4int fBounce = 0;
|
||||
G4int fWLSBounce = 0;
|
||||
G4int fClad1Bounce = 0;
|
||||
G4int fClad2Bounce = 0;
|
||||
G4int fReflected = 0;
|
||||
G4int fEscaped = 0;
|
||||
G4int fMirror = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,14 +44,14 @@ class WLSEventActionMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
WLSEventActionMessenger(WLSEventAction*);
|
||||
~WLSEventActionMessenger();
|
||||
~WLSEventActionMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
WLSEventAction* fEventAction;
|
||||
WLSEventAction* fEventAction = nullptr;
|
||||
|
||||
G4UIcmdWithAnInteger* fSetVerboseCmd;
|
||||
G4UIcmdWithAnInteger* fSetVerboseCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,15 +53,15 @@ class WLSMaterials
|
||||
|
||||
static WLSMaterials* fInstance;
|
||||
|
||||
G4NistManager* fNistMan;
|
||||
G4NistManager* fNistMan = nullptr;
|
||||
|
||||
G4Material* fAir;
|
||||
G4Material* fPMMA;
|
||||
G4Material* fPethylene;
|
||||
G4Material* fFPethylene;
|
||||
G4Material* fPolystyrene;
|
||||
G4Material* fSilicone;
|
||||
G4Material* fCoating;
|
||||
G4Material* fAir = nullptr;
|
||||
G4Material* fPMMA = nullptr;
|
||||
G4Material* fPethylene = nullptr;
|
||||
G4Material* fFPethylene = nullptr;
|
||||
G4Material* fPolystyrene = nullptr;
|
||||
G4Material* fSilicone = nullptr;
|
||||
G4Material* fCoating = nullptr;
|
||||
};
|
||||
|
||||
#endif /*WLSMaterials_h*/
|
||||
|
||||
@@ -46,7 +46,7 @@ class WLSPhotonDetHit : public G4VHit
|
||||
public:
|
||||
WLSPhotonDetHit();
|
||||
WLSPhotonDetHit(G4ThreeVector pExit, G4ThreeVector pArrive, G4double pTime, G4double pEnergy);
|
||||
~WLSPhotonDetHit();
|
||||
~WLSPhotonDetHit() override = default;
|
||||
|
||||
WLSPhotonDetHit(const WLSPhotonDetHit& right);
|
||||
const WLSPhotonDetHit& operator=(const WLSPhotonDetHit& right);
|
||||
@@ -68,17 +68,17 @@ class WLSPhotonDetHit : public G4VHit
|
||||
inline void SetEnergy(G4double en) { fEnergy = en; }
|
||||
inline G4double GetEnergy() { return fEnergy; }
|
||||
|
||||
void Print();
|
||||
void Print() override;
|
||||
|
||||
private:
|
||||
// the arrival time of the photon
|
||||
G4double fArrivalTime;
|
||||
G4double fArrivalTime = 0.;
|
||||
// where the photon hit the detector (detector's coordinate)
|
||||
G4ThreeVector fPosArrive;
|
||||
// where the photon exited the fiber (world's coordinate)
|
||||
G4ThreeVector fPosExit;
|
||||
// energy of photon
|
||||
G4double fEnergy;
|
||||
G4double fEnergy = 0.;
|
||||
};
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@@ -45,7 +45,7 @@ class WLSPhotonDetSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
WLSPhotonDetSD(G4String);
|
||||
~WLSPhotonDetSD();
|
||||
~WLSPhotonDetSD() override = default;
|
||||
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
|
||||
@@ -54,8 +54,8 @@ class WLSPhotonDetSD : public G4VSensitiveDetector
|
||||
void EndOfEvent(G4HCofThisEvent*) override;
|
||||
|
||||
private:
|
||||
WLSPhotonDetHitsCollection* fPhotonDetHitCollection;
|
||||
G4int fHCID;
|
||||
WLSPhotonDetHitsCollection* fPhotonDetHitCollection = nullptr;
|
||||
G4int fHCID = -1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ class WLSPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
WLSPrimaryGeneratorAction(WLSDetectorConstruction*);
|
||||
~WLSPrimaryGeneratorAction();
|
||||
~WLSPrimaryGeneratorAction() override;
|
||||
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
|
||||
@@ -59,19 +59,19 @@ class WLSPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
void SetUseSampledEnergy(G4bool v) { fUseSampledEnergy = v; }
|
||||
|
||||
protected:
|
||||
G4PhysicsTable* fIntegralTable;
|
||||
G4PhysicsTable* fIntegralTable = nullptr;
|
||||
|
||||
private:
|
||||
void SetOptPhotonPolar();
|
||||
void SetOptPhotonTime();
|
||||
|
||||
WLSDetectorConstruction* fDetector;
|
||||
G4GeneralParticleSource* fParticleGun;
|
||||
WLSPrimaryGeneratorMessenger* fGunMessenger;
|
||||
WLSDetectorConstruction* fDetector = nullptr;
|
||||
G4GeneralParticleSource* fParticleGun = nullptr;
|
||||
WLSPrimaryGeneratorMessenger* fGunMessenger = nullptr;
|
||||
|
||||
static G4bool fFirst;
|
||||
G4double fTimeConstant;
|
||||
G4bool fUseSampledEnergy;
|
||||
G4double fTimeConstant = 0.;
|
||||
G4bool fUseSampledEnergy = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,18 +46,17 @@ class WLSPrimaryGeneratorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
WLSPrimaryGeneratorMessenger(WLSPrimaryGeneratorAction*);
|
||||
~WLSPrimaryGeneratorMessenger();
|
||||
~WLSPrimaryGeneratorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
WLSPrimaryGeneratorAction* fAction;
|
||||
WLSPrimaryGeneratorAction* fAction = nullptr;
|
||||
|
||||
G4UIdirectory* fGunDir;
|
||||
G4UIdirectory* fGunDir = nullptr;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fSetPolarizationCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetDecayTimeConstantCmd;
|
||||
// G4UIcmdWithABool* fSetUseSampledEnergyCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetPolarizationCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetDecayTimeConstantCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
class WLSRun : public G4Run
|
||||
{
|
||||
public:
|
||||
WLSRun();
|
||||
~WLSRun();
|
||||
WLSRun() = default;
|
||||
~WLSRun() override = default;
|
||||
|
||||
void AddTIR(G4int n)
|
||||
{
|
||||
@@ -119,30 +119,30 @@ class WLSRun : public G4Run
|
||||
void Merge(const G4Run*) override;
|
||||
|
||||
private:
|
||||
G4double fNTIR;
|
||||
G4double fNTIR2;
|
||||
G4double fNExiting;
|
||||
G4double fNExiting2;
|
||||
G4double fEscapedEnd;
|
||||
G4double fEscapedEnd2;
|
||||
G4double fEscapedMid;
|
||||
G4double fEscapedMid2;
|
||||
G4double fBounce;
|
||||
G4double fBounce2;
|
||||
G4double fWLSBounce;
|
||||
G4double fWLSBounce2;
|
||||
G4double fClad1Bounce;
|
||||
G4double fClad1Bounce2;
|
||||
G4double fClad2Bounce;
|
||||
G4double fClad2Bounce2;
|
||||
G4double fReflected;
|
||||
G4double fReflected2;
|
||||
G4double fEscaped;
|
||||
G4double fEscaped2;
|
||||
G4double fMirror;
|
||||
G4double fMirror2;
|
||||
G4double fDetectorHits;
|
||||
G4double fDetectorHits2;
|
||||
G4double fNTIR = 0.;
|
||||
G4double fNTIR2 = 0.;
|
||||
G4double fNExiting = 0.;
|
||||
G4double fNExiting2 = 0.;
|
||||
G4double fEscapedEnd = 0.;
|
||||
G4double fEscapedEnd2 = 0.;
|
||||
G4double fEscapedMid = 0.;
|
||||
G4double fEscapedMid2 = 0.;
|
||||
G4double fBounce = 0.;
|
||||
G4double fBounce2 = 0.;
|
||||
G4double fWLSBounce = 0.;
|
||||
G4double fWLSBounce2 = 0.;
|
||||
G4double fClad1Bounce = 0.;
|
||||
G4double fClad1Bounce2 = 0.;
|
||||
G4double fClad2Bounce = 0.;
|
||||
G4double fClad2Bounce2 = 0.;
|
||||
G4double fReflected = 0.;
|
||||
G4double fReflected2 = 0.;
|
||||
G4double fEscaped = 0.;
|
||||
G4double fEscaped2 = 0.;
|
||||
G4double fMirror = 0.;
|
||||
G4double fMirror2 = 0.;
|
||||
G4double fDetectorHits = 0.;
|
||||
G4double fDetectorHits2 = 0.;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,21 +37,20 @@
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
class WLSRun;
|
||||
|
||||
class G4Run;
|
||||
|
||||
class WLSRunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
WLSRunAction();
|
||||
~WLSRunAction();
|
||||
~WLSRunAction() override = default;
|
||||
|
||||
void BeginOfRunAction(const G4Run*) override;
|
||||
void EndOfRunAction(const G4Run*) override;
|
||||
G4Run* GenerateRun() override;
|
||||
|
||||
private:
|
||||
WLSRun* fRun;
|
||||
WLSRun* fRun = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,15 +40,15 @@
|
||||
class WLSStackingAction : public G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
WLSStackingAction();
|
||||
~WLSStackingAction();
|
||||
WLSStackingAction() = default;
|
||||
~WLSStackingAction() override = default;
|
||||
|
||||
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*) override;
|
||||
void NewStage() override;
|
||||
void PrepareNewEvent() override;
|
||||
|
||||
private:
|
||||
G4int fPhotonCounter;
|
||||
G4int fPhotonCounter = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,7 +49,7 @@ class WLSSteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
WLSSteppingAction(WLSDetectorConstruction*, WLSEventAction*);
|
||||
~WLSSteppingAction();
|
||||
~WLSSteppingAction() override;
|
||||
|
||||
void UserSteppingAction(const G4Step*) override;
|
||||
|
||||
@@ -65,30 +65,30 @@ class WLSSteppingAction : public G4UserSteppingAction
|
||||
|
||||
private:
|
||||
// Artificially kill the photon after it has bounced more than this number
|
||||
G4int fBounceLimit;
|
||||
G4int fBounceLimit = 100000;
|
||||
// number of photons that reach the end
|
||||
G4int fCounterEnd;
|
||||
G4int fCounterEnd = 0;
|
||||
// number of photons that didn't make it to the end
|
||||
G4int fCounterMid;
|
||||
G4int fCounterMid = 0;
|
||||
// total number of bounces that a photon been through
|
||||
G4int fCounterBounce;
|
||||
G4int fCounterBounce = 0;
|
||||
// number of bounces that a photon been through within the fibre
|
||||
G4int fCounterWLSBounce;
|
||||
G4int fCounterWLSBounce = 0;
|
||||
// number of bounces that a photon been through from Cladding 1 to 2
|
||||
G4int fCounterClad1Bounce;
|
||||
G4int fCounterClad1Bounce = 0;
|
||||
// number of bounces that a photon been through from Cladding 2 to World
|
||||
G4int fCounterClad2Bounce;
|
||||
G4int fCounterClad2Bounce = 0;
|
||||
|
||||
// initial gamma of the photon
|
||||
G4double fInitGamma;
|
||||
G4double fInitGamma = -1.;
|
||||
// initial theta of the photon
|
||||
G4double fInitTheta;
|
||||
G4double fInitTheta = -1.;
|
||||
|
||||
G4OpBoundaryProcess* fOpProcess;
|
||||
G4OpBoundaryProcess* fOpProcess = nullptr;
|
||||
|
||||
WLSDetectorConstruction* fDetector;
|
||||
WLSSteppingActionMessenger* fSteppingMessenger;
|
||||
WLSEventAction* fEventAction;
|
||||
WLSDetectorConstruction* fDetector = nullptr;
|
||||
WLSSteppingActionMessenger* fSteppingMessenger = nullptr;
|
||||
WLSEventAction* fEventAction = nullptr;
|
||||
|
||||
inline void ResetCounters()
|
||||
{
|
||||
|
||||
@@ -45,14 +45,14 @@ class WLSSteppingActionMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
WLSSteppingActionMessenger(WLSSteppingAction*);
|
||||
~WLSSteppingActionMessenger();
|
||||
~WLSSteppingActionMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
WLSSteppingAction* fSteppingAction;
|
||||
G4UIdirectory* fSteppingDir;
|
||||
G4UIcmdWithAnInteger* fSetBounceLimitCmd;
|
||||
WLSSteppingAction* fSteppingAction = nullptr;
|
||||
G4UIdirectory* fSteppingDir = nullptr;
|
||||
G4UIcmdWithAnInteger* fSetBounceLimitCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
class WLSTrackingAction : public G4UserTrackingAction
|
||||
{
|
||||
public:
|
||||
WLSTrackingAction(){};
|
||||
~WLSTrackingAction(){};
|
||||
WLSTrackingAction() = default;
|
||||
~WLSTrackingAction() override = default;
|
||||
|
||||
void PreUserTrackingAction(const G4Track*) override;
|
||||
};
|
||||
|
||||
@@ -49,10 +49,10 @@ typedef std::vector<G4VTrajectoryPoint*> WLSTrajectoryPointContainer;
|
||||
class WLSTrajectory : public G4VTrajectory
|
||||
{
|
||||
public:
|
||||
WLSTrajectory();
|
||||
WLSTrajectory() = default;
|
||||
WLSTrajectory(const G4Track*);
|
||||
WLSTrajectory(WLSTrajectory&);
|
||||
~WLSTrajectory();
|
||||
~WLSTrajectory() override;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
@@ -61,42 +61,42 @@ class WLSTrajectory : public G4VTrajectory
|
||||
return (this == &right);
|
||||
}
|
||||
|
||||
inline virtual G4int GetTrackID() const { return fTrackID; }
|
||||
inline virtual G4int GetParentID() const { return fParentID; }
|
||||
inline virtual G4String GetParticleName() const { return fParticleName; }
|
||||
inline virtual G4double GetCharge() const { return fPDGCharge; }
|
||||
inline virtual G4int GetPDGEncoding() const { return fPDGEncoding; }
|
||||
inline virtual G4ThreeVector GetInitialMomentum() const
|
||||
inline G4int GetTrackID() const override { return fTrackID; }
|
||||
inline G4int GetParentID() const override { return fParentID; }
|
||||
inline G4String GetParticleName() const override { return fParticleName; }
|
||||
inline G4double GetCharge() const override { return fPDGCharge; }
|
||||
inline G4int GetPDGEncoding() const override { return fPDGEncoding; }
|
||||
inline G4ThreeVector GetInitialMomentum() const override
|
||||
{
|
||||
return fInitialMomentum;
|
||||
}
|
||||
|
||||
virtual void ShowTrajectory(std::ostream& os = G4cout) const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
void ShowTrajectory(std::ostream& os = G4cout) const override;
|
||||
void AppendStep(const G4Step* aStep) override;
|
||||
void MergeTrajectory(G4VTrajectory* secondTrajectory) override;
|
||||
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
virtual int GetPointEntries() const { return fpPointsContainer->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
int GetPointEntries() const override { return fpPointsContainer->size(); }
|
||||
G4VTrajectoryPoint* GetPoint(G4int i) const override
|
||||
{
|
||||
return (*fpPointsContainer)[i];
|
||||
}
|
||||
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
const std::map<G4String, G4AttDef>* GetAttDefs() const override;
|
||||
std::vector<G4AttValue>* CreateAttValues() const override;
|
||||
|
||||
private:
|
||||
WLSTrajectoryPointContainer* fpPointsContainer;
|
||||
WLSTrajectoryPointContainer* fpPointsContainer = nullptr;
|
||||
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4double fPDGCharge;
|
||||
G4int fPDGEncoding;
|
||||
G4int fTrackID = 0;
|
||||
G4int fParentID = 0;
|
||||
G4double fPDGCharge = 0.;
|
||||
G4int fPDGEncoding = 0;
|
||||
G4String fParticleName;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
|
||||
G4ParticleDefinition* fParticleDefinition;
|
||||
G4ParticleDefinition* fParticleDefinition = nullptr;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<WLSTrajectory>* WLSTrajectoryAllocator;
|
||||
|
||||
@@ -47,11 +47,11 @@ class G4VProcess;
|
||||
class WLSTrajectoryPoint : public G4TrajectoryPoint
|
||||
{
|
||||
public:
|
||||
WLSTrajectoryPoint();
|
||||
WLSTrajectoryPoint() = default;
|
||||
WLSTrajectoryPoint(const G4Track*);
|
||||
WLSTrajectoryPoint(const G4Step*);
|
||||
WLSTrajectoryPoint(const WLSTrajectoryPoint& right);
|
||||
~WLSTrajectoryPoint();
|
||||
~WLSTrajectoryPoint() override = default;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aTrajectoryPoint);
|
||||
@@ -65,13 +65,13 @@ class WLSTrajectoryPoint : public G4TrajectoryPoint
|
||||
inline G4StepStatus GetStepStatus() const { return fStepStatus; };
|
||||
inline G4String GetVolumeName() const { return fVolumeName; };
|
||||
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
const std::map<G4String, G4AttDef>* GetAttDefs() const override;
|
||||
std::vector<G4AttValue>* CreateAttValues() const override;
|
||||
|
||||
private:
|
||||
G4double fTime;
|
||||
G4double fTime = 0.;
|
||||
G4ThreeVector fMomentum;
|
||||
G4StepStatus fStepStatus;
|
||||
G4StepStatus fStepStatus = fUndefined;
|
||||
G4String fVolumeName;
|
||||
};
|
||||
|
||||
|
||||
@@ -40,37 +40,23 @@
|
||||
enum TrackStatus
|
||||
{
|
||||
undefined = 0,
|
||||
left = 1,
|
||||
right = 2,
|
||||
defined = 3,
|
||||
EscapedFromSide = 4,
|
||||
EscapedFromReadOut = 8,
|
||||
ReflectedAtMirror = 16,
|
||||
ReflectedAtReadOut = 32,
|
||||
murderee = 64,
|
||||
InsideOfFiber = 128,
|
||||
OutsideOfFiber = 256
|
||||
left = 1, // track is going -z
|
||||
right = 2, // track is going +z
|
||||
defined = 3, // left or right flag is on (Can't be Set)
|
||||
EscapedFromSide = 4, // photon escaped through the side of the fiber
|
||||
EscapedFromReadOut = 8, // photon escaped through read-out end of the fiber
|
||||
ReflectedAtMirror = 16, // photon has been reflected by mirror at far end
|
||||
ReflectedAtReadOut = 32, // photon has been reflected at the read-out end
|
||||
murderee = 64, // photon is artificially killed
|
||||
InsideOfFiber = 128, // Flag is on if the photon is inside of fiber
|
||||
OutsideOfFiber = 256 // Flag is on if the photon is outside of fiber
|
||||
};
|
||||
|
||||
/*TrackStatus:
|
||||
undefined:
|
||||
left: track is going -z
|
||||
right: track is going +z
|
||||
defined: left or right flag is on (Can't be Set)
|
||||
EscapedFromSide: photon escaped through the side of the fiber
|
||||
EscapedFromReadOut: photon escaped through the read-out end of the fiber
|
||||
ReflectedAtMirror: photon has been reflected by the mirror at far end
|
||||
ReflectedAtReadOut: photon has been reflected at the read-out end
|
||||
murderee photon is artificially killed
|
||||
InsideOfFiber Flag is on if the photon is inside of fiber
|
||||
OutsideOfFiber Flag is on if the photon is outside of fiber
|
||||
*/
|
||||
|
||||
class WLSUserTrackInformation : public G4VUserTrackInformation
|
||||
{
|
||||
public:
|
||||
WLSUserTrackInformation();
|
||||
~WLSUserTrackInformation();
|
||||
WLSUserTrackInformation() = default;
|
||||
~WLSUserTrackInformation() override = default;
|
||||
|
||||
const G4ThreeVector& GetExitPosition() const { return fExitPosition; }
|
||||
void SetExitPosition(const G4ThreeVector& pos) { fExitPosition = pos; }
|
||||
@@ -87,7 +73,7 @@ class WLSUserTrackInformation : public G4VUserTrackInformation
|
||||
}
|
||||
|
||||
private:
|
||||
G4int fStatus;
|
||||
G4int fStatus = undefined;
|
||||
G4ThreeVector fExitPosition;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user