Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -36,15 +36,15 @@ class LXeDetectorConstruction;
|
||||
|
||||
class LXeActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
LXeActionInitialization(const LXeDetectorConstruction* det);
|
||||
~LXeActionInitialization() override = default;
|
||||
public:
|
||||
LXeActionInitialization(const LXeDetectorConstruction* det);
|
||||
~LXeActionInitialization() override = default;
|
||||
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
|
||||
private:
|
||||
const LXeDetectorConstruction* fDetector = nullptr;
|
||||
private:
|
||||
const LXeDetectorConstruction* fDetector = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "G4Cache.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
class LXeMainVolume;
|
||||
@@ -52,102 +53,102 @@ class G4VPhysicalVolume;
|
||||
|
||||
class LXeDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
LXeDetectorConstruction();
|
||||
~LXeDetectorConstruction() override;
|
||||
public:
|
||||
LXeDetectorConstruction();
|
||||
~LXeDetectorConstruction() override;
|
||||
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
// Functions to modify the geometry
|
||||
void SetDimensions(G4ThreeVector);
|
||||
void SetHousingThickness(G4double);
|
||||
void SetNX(G4int);
|
||||
void SetNY(G4int);
|
||||
void SetNZ(G4int);
|
||||
void SetPMTRadius(G4double);
|
||||
void SetDefaults();
|
||||
void SetSaveThreshold(G4int);
|
||||
// Functions to modify the geometry
|
||||
void SetDimensions(G4ThreeVector);
|
||||
void SetHousingThickness(G4double);
|
||||
void SetNX(G4int);
|
||||
void SetNY(G4int);
|
||||
void SetNZ(G4int);
|
||||
void SetPMTRadius(G4double);
|
||||
void SetDefaults();
|
||||
void SetSaveThreshold(G4int);
|
||||
|
||||
// Get values
|
||||
G4int GetNX() const { return fNx; };
|
||||
G4int GetNY() const { return fNy; };
|
||||
G4int GetNZ() const { return fNz; };
|
||||
G4int GetSaveThreshold() const { return fSaveThreshold; };
|
||||
G4double GetScintX() const { return fScint_x; }
|
||||
G4double GetScintY() const { return fScint_y; }
|
||||
G4double GetScintZ() const { return fScint_z; }
|
||||
G4double GetHousingThickness() const { return fD_mtl; }
|
||||
G4double GetPMTRadius() const { return fOuterRadius_pmt; }
|
||||
G4double GetSlabZ() const { return fSlab_z; }
|
||||
// Get values
|
||||
G4int GetNX() const { return fNx; };
|
||||
G4int GetNY() const { return fNy; };
|
||||
G4int GetNZ() const { return fNz; };
|
||||
G4int GetSaveThreshold() const { return fSaveThreshold; };
|
||||
G4double GetScintX() const { return fScint_x; }
|
||||
G4double GetScintY() const { return fScint_y; }
|
||||
G4double GetScintZ() const { return fScint_z; }
|
||||
G4double GetHousingThickness() const { return fD_mtl; }
|
||||
G4double GetPMTRadius() const { return fOuterRadius_pmt; }
|
||||
G4double GetSlabZ() const { return fSlab_z; }
|
||||
|
||||
void SetSphereOn(G4bool);
|
||||
static G4bool GetSphereOn() { return fSphereOn; }
|
||||
void SetSphereOn(G4bool);
|
||||
static G4bool GetSphereOn() { return fSphereOn; }
|
||||
|
||||
void SetHousingReflectivity(G4double);
|
||||
G4double GetHousingReflectivity() const { return fRefl; }
|
||||
void SetHousingReflectivity(G4double);
|
||||
G4double GetHousingReflectivity() const { return fRefl; }
|
||||
|
||||
void SetWLSSlabOn(G4bool b);
|
||||
G4bool GetWLSSlabOn() const { return fWLSslab; }
|
||||
void SetWLSSlabOn(G4bool b);
|
||||
G4bool GetWLSSlabOn() const { return fWLSslab; }
|
||||
|
||||
void SetMainVolumeOn(G4bool b);
|
||||
G4bool GetMainVolumeOn() const { return fMainVolumeOn; }
|
||||
void SetMainVolumeOn(G4bool b);
|
||||
G4bool GetMainVolumeOn() const { return fMainVolumeOn; }
|
||||
|
||||
void SetNFibers(G4int n);
|
||||
G4int GetNFibers() const { return fNfibers; }
|
||||
void SetNFibers(G4int n);
|
||||
G4int GetNFibers() const { return fNfibers; }
|
||||
|
||||
void SetMainScintYield(G4double);
|
||||
void SetWLSScintYield(G4double);
|
||||
void SetMainScintYield(G4double);
|
||||
void SetWLSScintYield(G4double);
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
private:
|
||||
void DefineMaterials();
|
||||
|
||||
LXeDetectorMessenger* fDetectorMessenger = nullptr;
|
||||
LXeDetectorMessenger* fDetectorMessenger = nullptr;
|
||||
|
||||
G4Box* fExperimentalHall_box = nullptr;
|
||||
G4LogicalVolume* fExperimentalHall_log = nullptr;
|
||||
G4VPhysicalVolume* fExperimentalHall_phys = nullptr;
|
||||
G4Box* fExperimentalHall_box = nullptr;
|
||||
G4LogicalVolume* fExperimentalHall_log = nullptr;
|
||||
G4VPhysicalVolume* fExperimentalHall_phys = nullptr;
|
||||
|
||||
// Materials & Elements
|
||||
G4Element* fN = nullptr;
|
||||
G4Element* fO = nullptr;
|
||||
G4Element* fC = nullptr;
|
||||
G4Element* fH = nullptr;
|
||||
G4Material* fLXe = nullptr;
|
||||
G4Material* fAl = nullptr;
|
||||
G4Material* fAir = nullptr;
|
||||
G4Material* fVacuum = nullptr;
|
||||
G4Material* fGlass = nullptr;
|
||||
G4Material* fPstyrene = nullptr;
|
||||
G4Material* fPMMA = nullptr;
|
||||
G4Material* fPethylene1 = nullptr;
|
||||
G4Material* fPethylene2 = nullptr;
|
||||
// Materials & Elements
|
||||
G4Element* fN = nullptr;
|
||||
G4Element* fO = nullptr;
|
||||
G4Element* fC = nullptr;
|
||||
G4Element* fH = nullptr;
|
||||
G4Material* fLXe = nullptr;
|
||||
G4Material* fAl = nullptr;
|
||||
G4Material* fAir = nullptr;
|
||||
G4Material* fVacuum = nullptr;
|
||||
G4Material* fGlass = nullptr;
|
||||
G4Material* fPstyrene = nullptr;
|
||||
G4Material* fPMMA = nullptr;
|
||||
G4Material* fPethylene1 = nullptr;
|
||||
G4Material* fPethylene2 = nullptr;
|
||||
|
||||
// Geometry
|
||||
G4double fScint_x = 17.8 * CLHEP::cm;
|
||||
G4double fScint_y = 17.8 * CLHEP::cm;
|
||||
G4double fScint_z = 22.6 * CLHEP::cm;
|
||||
G4double fD_mtl = 0.0635 * CLHEP::cm;
|
||||
G4int fNx = 2;
|
||||
G4int fNy = 2;
|
||||
G4int fNz = 3;
|
||||
G4int fSaveThreshold = 0;
|
||||
G4double fOuterRadius_pmt = 2.3 * CLHEP::cm;
|
||||
G4int fNfibers = 15;
|
||||
static G4bool fSphereOn;
|
||||
G4double fRefl = 1.;
|
||||
G4bool fWLSslab = false;
|
||||
G4bool fMainVolumeOn = true;
|
||||
G4double fSlab_z = 2.5 * CLHEP::mm;
|
||||
// Geometry
|
||||
G4double fScint_x = 17.8 * CLHEP::cm;
|
||||
G4double fScint_y = 17.8 * CLHEP::cm;
|
||||
G4double fScint_z = 22.6 * CLHEP::cm;
|
||||
G4double fD_mtl = 0.0635 * CLHEP::cm;
|
||||
G4int fNx = 2;
|
||||
G4int fNy = 2;
|
||||
G4int fNz = 3;
|
||||
G4int fSaveThreshold = 0;
|
||||
G4double fOuterRadius_pmt = 2.3 * CLHEP::cm;
|
||||
G4int fNfibers = 15;
|
||||
static G4bool fSphereOn;
|
||||
G4double fRefl = 1.;
|
||||
G4bool fWLSslab = false;
|
||||
G4bool fMainVolumeOn = true;
|
||||
G4double fSlab_z = 2.5 * CLHEP::mm;
|
||||
|
||||
LXeMainVolume* fMainVolume = nullptr;
|
||||
LXeMainVolume* fMainVolume = nullptr;
|
||||
|
||||
G4MaterialPropertiesTable* fLXe_mt = nullptr;
|
||||
G4MaterialPropertiesTable* fMPTPStyrene = nullptr;
|
||||
G4MaterialPropertiesTable* fLXe_mt = nullptr;
|
||||
G4MaterialPropertiesTable* fMPTPStyrene = nullptr;
|
||||
|
||||
// Sensitive Detectors
|
||||
G4Cache<LXeScintSD*> fScint_SD;
|
||||
G4Cache<LXePMTSD*> fPmt_SD;
|
||||
// Sensitive Detectors
|
||||
G4Cache<LXeScintSD*> fScint_SD;
|
||||
G4Cache<LXePMTSD*> fPmt_SD;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef LXeDetectorMessenger_h
|
||||
#define LXeDetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class LXeDetectorConstruction;
|
||||
|
||||
@@ -46,31 +46,31 @@ class G4UIdirectory;
|
||||
|
||||
class LXeDetectorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
LXeDetectorMessenger(LXeDetectorConstruction*);
|
||||
~LXeDetectorMessenger() override;
|
||||
public:
|
||||
LXeDetectorMessenger(LXeDetectorConstruction*);
|
||||
~LXeDetectorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
LXeDetectorConstruction* fLXeDetector = nullptr;
|
||||
G4UIdirectory* fDetectorDir = nullptr;
|
||||
G4UIdirectory* fVolumesDir = nullptr;
|
||||
G4UIcmdWith3VectorAndUnit* fDimensionsCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fHousingThicknessCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fPmtRadiusCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNxCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNyCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNzCmd = nullptr;
|
||||
G4UIcmdWithABool* fSphereCmd = nullptr;
|
||||
G4UIcmdWithADouble* fReflectivityCmd = nullptr;
|
||||
G4UIcmdWithABool* fWlsCmd = nullptr;
|
||||
G4UIcmdWithABool* fLxeCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNFibersCmd = nullptr;
|
||||
G4UIcommand* fDefaultsCmd = nullptr;
|
||||
G4UIcmdWithADouble* fMainScintYield = nullptr;
|
||||
G4UIcmdWithADouble* fWLSScintYield = nullptr;
|
||||
G4UIcmdWithAnInteger* fSaveThresholdCmd = nullptr;
|
||||
private:
|
||||
LXeDetectorConstruction* fLXeDetector = nullptr;
|
||||
G4UIdirectory* fDetectorDir = nullptr;
|
||||
G4UIdirectory* fVolumesDir = nullptr;
|
||||
G4UIcmdWith3VectorAndUnit* fDimensionsCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fHousingThicknessCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fPmtRadiusCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNxCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNyCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNzCmd = nullptr;
|
||||
G4UIcmdWithABool* fSphereCmd = nullptr;
|
||||
G4UIcmdWithADouble* fReflectivityCmd = nullptr;
|
||||
G4UIcmdWithABool* fWlsCmd = nullptr;
|
||||
G4UIcmdWithABool* fLxeCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fNFibersCmd = nullptr;
|
||||
G4UIcommand* fDefaultsCmd = nullptr;
|
||||
G4UIcmdWithADouble* fMainScintYield = nullptr;
|
||||
G4UIcmdWithADouble* fWLSScintYield = nullptr;
|
||||
G4UIcmdWithAnInteger* fSaveThresholdCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,101 +33,101 @@
|
||||
|
||||
#include "LXeEventMessenger.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Event;
|
||||
class LXeDetectorConstruction;
|
||||
|
||||
class LXeEventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
LXeEventAction(const LXeDetectorConstruction*);
|
||||
~LXeEventAction() override;
|
||||
public:
|
||||
LXeEventAction(const LXeDetectorConstruction*);
|
||||
~LXeEventAction() override;
|
||||
|
||||
void BeginOfEventAction(const G4Event*) override;
|
||||
void EndOfEventAction(const G4Event*) override;
|
||||
void BeginOfEventAction(const G4Event*) override;
|
||||
void EndOfEventAction(const G4Event*) override;
|
||||
|
||||
void SetEventVerbose(G4int v) { fVerbose = v; }
|
||||
void SetEventVerbose(G4int v) { fVerbose = v; }
|
||||
|
||||
void SetPMTThreshold(G4int t) { fPMTThreshold = t; }
|
||||
void SetPMTThreshold(G4int t) { fPMTThreshold = t; }
|
||||
|
||||
void SetForceDrawPhotons(G4bool b) { fForcedrawphotons = b; }
|
||||
void SetForceDrawNoPhotons(G4bool b) { fForcenophotons = b; }
|
||||
void SetForceDrawPhotons(G4bool b) { fForcedrawphotons = b; }
|
||||
void SetForceDrawNoPhotons(G4bool b) { fForcenophotons = b; }
|
||||
|
||||
void IncPhotonCount_Scint() { ++fPhotonCount_Scint; }
|
||||
void IncPhotonCount_Ceren() { ++fPhotonCount_Ceren; }
|
||||
void IncEDep(G4double dep) { fTotE += dep; }
|
||||
void IncAbsorption() { ++fAbsorptionCount; }
|
||||
void IncBoundaryAbsorption() { ++fBoundaryAbsorptionCount; }
|
||||
void IncHitCount(G4int i = 1) { fHitCount += i; }
|
||||
void IncPhotonCount_Scint() { ++fPhotonCount_Scint; }
|
||||
void IncPhotonCount_Ceren() { ++fPhotonCount_Ceren; }
|
||||
void IncEDep(G4double dep) { fTotE += dep; }
|
||||
void IncAbsorption() { ++fAbsorptionCount; }
|
||||
void IncBoundaryAbsorption() { ++fBoundaryAbsorptionCount; }
|
||||
void IncHitCount(G4int i = 1) { fHitCount += i; }
|
||||
|
||||
void SetEWeightPos(const G4ThreeVector& p) { fEWeightPos = p; }
|
||||
void SetReconPos(const G4ThreeVector& p) { fReconPos = p; }
|
||||
void SetConvPos(const G4ThreeVector& p)
|
||||
{
|
||||
fConvPos = p;
|
||||
fConvPosSet = true;
|
||||
}
|
||||
void SetPosMax(const G4ThreeVector& p, G4double edep)
|
||||
{
|
||||
fPosMax = p;
|
||||
fEdepMax = edep;
|
||||
}
|
||||
void SetEWeightPos(const G4ThreeVector& p) { fEWeightPos = p; }
|
||||
void SetReconPos(const G4ThreeVector& p) { fReconPos = p; }
|
||||
void SetConvPos(const G4ThreeVector& p)
|
||||
{
|
||||
fConvPos = p;
|
||||
fConvPosSet = true;
|
||||
}
|
||||
void SetPosMax(const G4ThreeVector& p, G4double edep)
|
||||
{
|
||||
fPosMax = p;
|
||||
fEdepMax = edep;
|
||||
}
|
||||
|
||||
G4int GetPhotonCount_Scint() const { return fPhotonCount_Scint; }
|
||||
G4int GetPhotonCount_Ceren() const { return fPhotonCount_Ceren; }
|
||||
G4int GetHitCount() const { return fHitCount; }
|
||||
G4double GetEDep() const { return fTotE; }
|
||||
G4int GetAbsorptionCount() const { return fAbsorptionCount; }
|
||||
G4int GetBoundaryAbsorptionCount() const { return fBoundaryAbsorptionCount; }
|
||||
G4int GetPhotonCount_Scint() const { return fPhotonCount_Scint; }
|
||||
G4int GetPhotonCount_Ceren() const { return fPhotonCount_Ceren; }
|
||||
G4int GetHitCount() const { return fHitCount; }
|
||||
G4double GetEDep() const { return fTotE; }
|
||||
G4int GetAbsorptionCount() const { return fAbsorptionCount; }
|
||||
G4int GetBoundaryAbsorptionCount() const { return fBoundaryAbsorptionCount; }
|
||||
|
||||
G4ThreeVector GetEWeightPos() { return fEWeightPos; }
|
||||
G4ThreeVector GetReconPos() { return fReconPos; }
|
||||
G4ThreeVector GetConvPos() { return fConvPos; }
|
||||
G4ThreeVector GetPosMax() { return fPosMax; }
|
||||
G4double GetEDepMax() { return fEdepMax; }
|
||||
G4double IsConvPosSet() { return fConvPosSet; }
|
||||
G4ThreeVector GetEWeightPos() { return fEWeightPos; }
|
||||
G4ThreeVector GetReconPos() { return fReconPos; }
|
||||
G4ThreeVector GetConvPos() { return fConvPos; }
|
||||
G4ThreeVector GetPosMax() { return fPosMax; }
|
||||
G4double GetEDepMax() { return fEdepMax; }
|
||||
G4double IsConvPosSet() { return fConvPosSet; }
|
||||
|
||||
// Gets the total photon count produced
|
||||
G4int GetPhotonCount() { return fPhotonCount_Scint + fPhotonCount_Ceren; }
|
||||
// Gets the total photon count produced
|
||||
G4int GetPhotonCount() { return fPhotonCount_Scint + fPhotonCount_Ceren; }
|
||||
|
||||
void IncPMTSAboveThreshold() { ++fPMTsAboveThreshold; }
|
||||
G4int GetPMTSAboveThreshold() { return fPMTsAboveThreshold; }
|
||||
void IncPMTSAboveThreshold() { ++fPMTsAboveThreshold; }
|
||||
G4int GetPMTSAboveThreshold() { return fPMTsAboveThreshold; }
|
||||
|
||||
private:
|
||||
LXeEventMessenger* fEventMessenger = nullptr;
|
||||
const LXeDetectorConstruction* fDetector = nullptr;
|
||||
private:
|
||||
LXeEventMessenger* fEventMessenger = nullptr;
|
||||
const LXeDetectorConstruction* fDetector = nullptr;
|
||||
|
||||
G4int fScintCollID = -1;
|
||||
G4int fPMTCollID = -1;
|
||||
G4int fScintCollID = -1;
|
||||
G4int fPMTCollID = -1;
|
||||
|
||||
G4int fVerbose = 0;
|
||||
G4int fVerbose = 0;
|
||||
|
||||
G4int fPMTThreshold = 1;
|
||||
G4int fPMTThreshold = 1;
|
||||
|
||||
G4bool fForcedrawphotons = false;
|
||||
G4bool fForcenophotons = false;
|
||||
G4bool fForcedrawphotons = false;
|
||||
G4bool fForcenophotons = false;
|
||||
|
||||
G4int fHitCount = 0;
|
||||
G4int fPhotonCount_Scint = 0;
|
||||
G4int fPhotonCount_Ceren = 0;
|
||||
G4int fAbsorptionCount = 0;
|
||||
G4int fBoundaryAbsorptionCount = 0;
|
||||
G4int fHitCount = 0;
|
||||
G4int fPhotonCount_Scint = 0;
|
||||
G4int fPhotonCount_Ceren = 0;
|
||||
G4int fAbsorptionCount = 0;
|
||||
G4int fBoundaryAbsorptionCount = 0;
|
||||
|
||||
G4double fTotE = 0.;
|
||||
G4double fTotE = 0.;
|
||||
|
||||
// These only have meaning if totE > 0
|
||||
// If totE = 0 then these won't be set by EndOfEventAction
|
||||
G4ThreeVector fEWeightPos;
|
||||
G4ThreeVector fReconPos; // Also relies on hitCount>0
|
||||
G4ThreeVector fConvPos; // true (initial) converstion position
|
||||
G4bool fConvPosSet = false;
|
||||
G4ThreeVector fPosMax;
|
||||
G4double fEdepMax = 0.;
|
||||
// These only have meaning if totE > 0
|
||||
// If totE = 0 then these won't be set by EndOfEventAction
|
||||
G4ThreeVector fEWeightPos;
|
||||
G4ThreeVector fReconPos; // Also relies on hitCount>0
|
||||
G4ThreeVector fConvPos; // true (initial) converstion position
|
||||
G4bool fConvPosSet = false;
|
||||
G4ThreeVector fPosMax;
|
||||
G4double fEdepMax = 0.;
|
||||
|
||||
G4int fPMTsAboveThreshold = 0;
|
||||
G4int fPMTsAboveThreshold = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef LXeEventMessenger_h
|
||||
#define LXeEventMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class LXeEventAction;
|
||||
class G4UIcmdWithABool;
|
||||
@@ -40,18 +40,18 @@ class G4UIcmdWithAnInteger;
|
||||
|
||||
class LXeEventMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
LXeEventMessenger(LXeEventAction*);
|
||||
~LXeEventMessenger() override;
|
||||
public:
|
||||
LXeEventMessenger(LXeEventAction*);
|
||||
~LXeEventMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
LXeEventAction* fLXeEvent = nullptr;
|
||||
G4UIcmdWithAnInteger* fVerboseCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fPmtThresholdCmd = nullptr;
|
||||
G4UIcmdWithABool* fForceDrawPhotonsCmd = nullptr;
|
||||
G4UIcmdWithABool* fForceDrawNoPhotonsCmd = nullptr;
|
||||
private:
|
||||
LXeEventAction* fLXeEvent = nullptr;
|
||||
G4UIcmdWithAnInteger* fVerboseCmd = nullptr;
|
||||
G4UIcmdWithAnInteger* fPmtThresholdCmd = nullptr;
|
||||
G4UIcmdWithABool* fForceDrawPhotonsCmd = nullptr;
|
||||
G4UIcmdWithABool* fForceDrawNoPhotonsCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,20 +34,20 @@
|
||||
#ifndef LXeHistoManager_h
|
||||
#define LXeHistoManager_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4AnalysisManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class LXeHistoManager
|
||||
{
|
||||
public:
|
||||
LXeHistoManager();
|
||||
~LXeHistoManager() = default;
|
||||
public:
|
||||
LXeHistoManager();
|
||||
~LXeHistoManager() = default;
|
||||
|
||||
private:
|
||||
void Book();
|
||||
G4String fFileName;
|
||||
private:
|
||||
void Book();
|
||||
G4String fFileName;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -41,58 +41,57 @@ class G4Tubs;
|
||||
|
||||
class LXeMainVolume : public G4PVPlacement
|
||||
{
|
||||
public:
|
||||
LXeMainVolume(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
|
||||
G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo,
|
||||
LXeDetectorConstruction* c);
|
||||
public:
|
||||
LXeMainVolume(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
|
||||
G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo,
|
||||
LXeDetectorConstruction* c);
|
||||
|
||||
G4LogicalVolume* GetLogPhotoCath() { return fPhotocath_log; }
|
||||
G4LogicalVolume* GetLogScint() { return fScint_log; }
|
||||
G4LogicalVolume* GetLogPhotoCath() { return fPhotocath_log; }
|
||||
G4LogicalVolume* GetLogScint() { return fScint_log; }
|
||||
|
||||
std::vector<G4ThreeVector> GetPmtPositions() { return fPmtPositions; }
|
||||
std::vector<G4ThreeVector> GetPmtPositions() { return fPmtPositions; }
|
||||
|
||||
private:
|
||||
void VisAttributes();
|
||||
void SurfaceProperties();
|
||||
private:
|
||||
void VisAttributes();
|
||||
void SurfaceProperties();
|
||||
|
||||
void PlacePMTs(G4LogicalVolume* pmt_Log, G4RotationMatrix* rot, G4double& a,
|
||||
G4double& b, G4double da, G4double db, G4double amin,
|
||||
G4double bmin, G4int na, G4int nb, G4double& x, G4double& y,
|
||||
G4double& z, G4int& k);
|
||||
void PlacePMTs(G4LogicalVolume* pmt_Log, G4RotationMatrix* rot, G4double& a, G4double& b,
|
||||
G4double da, G4double db, G4double amin, G4double bmin, G4int na, G4int nb,
|
||||
G4double& x, G4double& y, G4double& z, G4int& k);
|
||||
|
||||
void CopyValues();
|
||||
void CopyValues();
|
||||
|
||||
LXeDetectorConstruction* fConstructor = nullptr;
|
||||
LXeDetectorConstruction* fConstructor = nullptr;
|
||||
|
||||
G4double fScint_x = 0.;
|
||||
G4double fScint_y = 0.;
|
||||
G4double fScint_z = 0.;
|
||||
G4double fD_mtl = 0.;
|
||||
G4int fNx = 0;
|
||||
G4int fNy = 0;
|
||||
G4int fNz = 0;
|
||||
G4double fOuterRadius_pmt = 0.;
|
||||
G4bool fSphereOn = false;
|
||||
G4double fRefl = 0.;
|
||||
G4double fScint_x = 0.;
|
||||
G4double fScint_y = 0.;
|
||||
G4double fScint_z = 0.;
|
||||
G4double fD_mtl = 0.;
|
||||
G4int fNx = 0;
|
||||
G4int fNy = 0;
|
||||
G4int fNz = 0;
|
||||
G4double fOuterRadius_pmt = 0.;
|
||||
G4bool fSphereOn = false;
|
||||
G4double fRefl = 0.;
|
||||
|
||||
// Basic Volumes
|
||||
//
|
||||
G4Box* fScint_box = nullptr;
|
||||
G4Box* fHousing_box = nullptr;
|
||||
G4Tubs* fPmt = nullptr;
|
||||
G4Tubs* fPhotocath = nullptr;
|
||||
G4Sphere* fSphere = nullptr;
|
||||
// Basic Volumes
|
||||
//
|
||||
G4Box* fScint_box = nullptr;
|
||||
G4Box* fHousing_box = nullptr;
|
||||
G4Tubs* fPmt = nullptr;
|
||||
G4Tubs* fPhotocath = nullptr;
|
||||
G4Sphere* fSphere = nullptr;
|
||||
|
||||
// Logical volumes
|
||||
//
|
||||
G4LogicalVolume* fScint_log = nullptr;
|
||||
G4LogicalVolume* fHousing_log = nullptr;
|
||||
G4LogicalVolume* fPmt_log = nullptr;
|
||||
G4LogicalVolume* fPhotocath_log = nullptr;
|
||||
G4LogicalVolume* fSphere_log = nullptr;
|
||||
// Logical volumes
|
||||
//
|
||||
G4LogicalVolume* fScint_log = nullptr;
|
||||
G4LogicalVolume* fHousing_log = nullptr;
|
||||
G4LogicalVolume* fPmt_log = nullptr;
|
||||
G4LogicalVolume* fPhotocath_log = nullptr;
|
||||
G4LogicalVolume* fSphere_log = nullptr;
|
||||
|
||||
// Sensitive Detectors positions
|
||||
std::vector<G4ThreeVector> fPmtPositions;
|
||||
// Sensitive Detectors positions
|
||||
std::vector<G4ThreeVector> fPmtPositions;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,48 +39,42 @@
|
||||
|
||||
class LXePMTHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
LXePMTHit() = default;
|
||||
LXePMTHit(const LXePMTHit& right);
|
||||
~LXePMTHit() override = default;
|
||||
public:
|
||||
LXePMTHit() = default;
|
||||
LXePMTHit(const LXePMTHit& right);
|
||||
~LXePMTHit() override = default;
|
||||
|
||||
const LXePMTHit& operator=(const LXePMTHit& right);
|
||||
G4bool operator==(const LXePMTHit& right) const;
|
||||
const LXePMTHit& operator=(const LXePMTHit& right);
|
||||
G4bool operator==(const LXePMTHit& right) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
void Draw() override;
|
||||
void Print() override;
|
||||
void Draw() override;
|
||||
void Print() override;
|
||||
|
||||
inline void SetDrawit(G4bool b) { fDrawit = b; }
|
||||
inline G4bool GetDrawit() { return fDrawit; }
|
||||
inline void SetDrawit(G4bool b) { fDrawit = b; }
|
||||
inline G4bool GetDrawit() { return fDrawit; }
|
||||
|
||||
inline void IncPhotonCount() { ++fPhotons; }
|
||||
inline G4int GetPhotonCount() { return fPhotons; }
|
||||
inline void IncPhotonCount() { ++fPhotons; }
|
||||
inline G4int GetPhotonCount() { return fPhotons; }
|
||||
|
||||
inline void SetPMTNumber(G4int n) { fPmtNumber = n; }
|
||||
inline G4int GetPMTNumber() { return fPmtNumber; }
|
||||
inline void SetPMTNumber(G4int n) { fPmtNumber = n; }
|
||||
inline G4int GetPMTNumber() { return fPmtNumber; }
|
||||
|
||||
inline void SetPMTPhysVol(G4VPhysicalVolume* physVol)
|
||||
{
|
||||
fPhysVol = physVol;
|
||||
}
|
||||
inline G4VPhysicalVolume* GetPMTPhysVol() { return fPhysVol; }
|
||||
inline void SetPMTPhysVol(G4VPhysicalVolume* physVol) { fPhysVol = physVol; }
|
||||
inline G4VPhysicalVolume* GetPMTPhysVol() { return fPhysVol; }
|
||||
|
||||
inline void SetPMTPos(G4double x, G4double y, G4double z)
|
||||
{
|
||||
fPos = G4ThreeVector(x, y, z);
|
||||
}
|
||||
inline void SetPMTPos(G4double x, G4double y, G4double z) { fPos = G4ThreeVector(x, y, z); }
|
||||
|
||||
inline G4ThreeVector GetPMTPos() { return fPos; }
|
||||
inline G4ThreeVector GetPMTPos() { return fPos; }
|
||||
|
||||
private:
|
||||
G4int fPmtNumber = -1;
|
||||
G4int fPhotons = 0;
|
||||
G4ThreeVector fPos;
|
||||
G4VPhysicalVolume* fPhysVol = nullptr;
|
||||
G4bool fDrawit = false;
|
||||
private:
|
||||
G4int fPmtNumber = -1;
|
||||
G4int fPhotons = 0;
|
||||
G4ThreeVector fPos;
|
||||
G4VPhysicalVolume* fPhysVol = nullptr;
|
||||
G4bool fDrawit = false;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<LXePMTHit> LXePMTHitsCollection;
|
||||
@@ -89,14 +83,13 @@ extern G4ThreadLocal G4Allocator<LXePMTHit>* LXePMTHitAllocator;
|
||||
|
||||
inline void* LXePMTHit::operator new(size_t)
|
||||
{
|
||||
if(!LXePMTHitAllocator)
|
||||
LXePMTHitAllocator = new G4Allocator<LXePMTHit>;
|
||||
return (void*) LXePMTHitAllocator->MallocSingle();
|
||||
if (!LXePMTHitAllocator) LXePMTHitAllocator = new G4Allocator<LXePMTHit>;
|
||||
return (void*)LXePMTHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void LXePMTHit::operator delete(void* aHit)
|
||||
{
|
||||
LXePMTHitAllocator->FreeSingle((LXePMTHit*) aHit);
|
||||
LXePMTHitAllocator->FreeSingle((LXePMTHit*)aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -43,41 +43,38 @@ class G4Step;
|
||||
|
||||
class LXePMTSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
LXePMTSD(G4String name);
|
||||
~LXePMTSD() override;
|
||||
public:
|
||||
LXePMTSD(G4String name);
|
||||
~LXePMTSD() override;
|
||||
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*) override;
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*) override;
|
||||
|
||||
// A version of processHits active on boundary
|
||||
G4bool ProcessHits_boundary(const G4Step*, G4TouchableHistory*);
|
||||
// A version of processHits active on boundary
|
||||
G4bool ProcessHits_boundary(const G4Step*, G4TouchableHistory*);
|
||||
|
||||
// Initialize the arrays to store pmt possitions
|
||||
inline void InitPMTs()
|
||||
{
|
||||
if(fPMTPositionsX)
|
||||
delete fPMTPositionsX;
|
||||
if(fPMTPositionsY)
|
||||
delete fPMTPositionsY;
|
||||
if(fPMTPositionsZ)
|
||||
delete fPMTPositionsZ;
|
||||
fPMTPositionsX = new G4DataVector();
|
||||
fPMTPositionsY = new G4DataVector();
|
||||
fPMTPositionsZ = new G4DataVector();
|
||||
}
|
||||
// Initialize the arrays to store pmt possitions
|
||||
inline void InitPMTs()
|
||||
{
|
||||
if (fPMTPositionsX) delete fPMTPositionsX;
|
||||
if (fPMTPositionsY) delete fPMTPositionsY;
|
||||
if (fPMTPositionsZ) delete fPMTPositionsZ;
|
||||
fPMTPositionsX = new G4DataVector();
|
||||
fPMTPositionsY = new G4DataVector();
|
||||
fPMTPositionsZ = new G4DataVector();
|
||||
}
|
||||
|
||||
// Store a pmt position
|
||||
void SetPmtPositions(const std::vector<G4ThreeVector>& positions);
|
||||
// Store a pmt position
|
||||
void SetPmtPositions(const std::vector<G4ThreeVector>& positions);
|
||||
|
||||
private:
|
||||
LXePMTHitsCollection* fPMTHitCollection = nullptr;
|
||||
private:
|
||||
LXePMTHitsCollection* fPMTHitCollection = nullptr;
|
||||
|
||||
G4DataVector* fPMTPositionsX = nullptr;
|
||||
G4DataVector* fPMTPositionsY = nullptr;
|
||||
G4DataVector* fPMTPositionsZ = nullptr;
|
||||
G4DataVector* fPMTPositionsX = nullptr;
|
||||
G4DataVector* fPMTPositionsY = nullptr;
|
||||
G4DataVector* fPMTPositionsZ = nullptr;
|
||||
|
||||
G4int fHitCID = -1;
|
||||
G4int fHitCID = -1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,14 +38,14 @@ class G4Event;
|
||||
|
||||
class LXePrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
LXePrimaryGeneratorAction();
|
||||
~LXePrimaryGeneratorAction() override;
|
||||
public:
|
||||
LXePrimaryGeneratorAction();
|
||||
~LXePrimaryGeneratorAction() override;
|
||||
|
||||
void GeneratePrimaries(G4Event* anEvent) override;
|
||||
void GeneratePrimaries(G4Event* anEvent) override;
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun = nullptr;
|
||||
private:
|
||||
G4ParticleGun* fParticleGun = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,73 +33,73 @@
|
||||
#ifndef LXeRun_h
|
||||
#define LXeRun_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class LXeRun : public G4Run
|
||||
{
|
||||
public:
|
||||
LXeRun() = default;
|
||||
~LXeRun() override = default;
|
||||
public:
|
||||
LXeRun() = default;
|
||||
~LXeRun() override = default;
|
||||
|
||||
void IncPhotonCount_Scint(G4int count)
|
||||
{
|
||||
fPhotonCount_Scint += count;
|
||||
fPhotonCount_Scint2 += count * count;
|
||||
}
|
||||
void IncPhotonCount_Ceren(G4int count)
|
||||
{
|
||||
fPhotonCount_Ceren += count;
|
||||
fPhotonCount_Ceren2 += count * count;
|
||||
}
|
||||
void IncEDep(G4double dep)
|
||||
{
|
||||
fTotE += dep;
|
||||
fTotE2 += dep * dep;
|
||||
}
|
||||
void IncAbsorption(G4int count)
|
||||
{
|
||||
fAbsorptionCount += count;
|
||||
fAbsorptionCount2 += count * count;
|
||||
}
|
||||
void IncBoundaryAbsorption(G4int count)
|
||||
{
|
||||
fBoundaryAbsorptionCount += count;
|
||||
fBoundaryAbsorptionCount2 += count * count;
|
||||
}
|
||||
void IncHitCount(G4int count)
|
||||
{
|
||||
fHitCount += count;
|
||||
fHitCount2 += count * count;
|
||||
}
|
||||
void IncHitsAboveThreshold(G4int count)
|
||||
{
|
||||
fPMTsAboveThreshold += count;
|
||||
fPMTsAboveThreshold2 += count * count;
|
||||
}
|
||||
void IncPhotonCount_Scint(G4int count)
|
||||
{
|
||||
fPhotonCount_Scint += count;
|
||||
fPhotonCount_Scint2 += count * count;
|
||||
}
|
||||
void IncPhotonCount_Ceren(G4int count)
|
||||
{
|
||||
fPhotonCount_Ceren += count;
|
||||
fPhotonCount_Ceren2 += count * count;
|
||||
}
|
||||
void IncEDep(G4double dep)
|
||||
{
|
||||
fTotE += dep;
|
||||
fTotE2 += dep * dep;
|
||||
}
|
||||
void IncAbsorption(G4int count)
|
||||
{
|
||||
fAbsorptionCount += count;
|
||||
fAbsorptionCount2 += count * count;
|
||||
}
|
||||
void IncBoundaryAbsorption(G4int count)
|
||||
{
|
||||
fBoundaryAbsorptionCount += count;
|
||||
fBoundaryAbsorptionCount2 += count * count;
|
||||
}
|
||||
void IncHitCount(G4int count)
|
||||
{
|
||||
fHitCount += count;
|
||||
fHitCount2 += count * count;
|
||||
}
|
||||
void IncHitsAboveThreshold(G4int count)
|
||||
{
|
||||
fPMTsAboveThreshold += count;
|
||||
fPMTsAboveThreshold2 += count * count;
|
||||
}
|
||||
|
||||
void Merge(const G4Run* run) override;
|
||||
void Merge(const G4Run* run) override;
|
||||
|
||||
void EndOfRun();
|
||||
void EndOfRun();
|
||||
|
||||
private:
|
||||
G4int fHitCount = 0;
|
||||
G4int fHitCount2 = 0;
|
||||
G4int fPhotonCount_Scint = 0;
|
||||
G4int fPhotonCount_Scint2 = 0;
|
||||
G4int fPhotonCount_Ceren = 0;
|
||||
G4int fPhotonCount_Ceren2 = 0;
|
||||
G4int fAbsorptionCount = 0;
|
||||
G4int fAbsorptionCount2 = 0;
|
||||
G4int fBoundaryAbsorptionCount = 0;
|
||||
G4int fBoundaryAbsorptionCount2 = 0;
|
||||
G4int fPMTsAboveThreshold = 0;
|
||||
G4int fPMTsAboveThreshold2 = 0;
|
||||
private:
|
||||
G4int fHitCount = 0;
|
||||
G4int fHitCount2 = 0;
|
||||
G4int fPhotonCount_Scint = 0;
|
||||
G4int fPhotonCount_Scint2 = 0;
|
||||
G4int fPhotonCount_Ceren = 0;
|
||||
G4int fPhotonCount_Ceren2 = 0;
|
||||
G4int fAbsorptionCount = 0;
|
||||
G4int fAbsorptionCount2 = 0;
|
||||
G4int fBoundaryAbsorptionCount = 0;
|
||||
G4int fBoundaryAbsorptionCount2 = 0;
|
||||
G4int fPMTsAboveThreshold = 0;
|
||||
G4int fPMTsAboveThreshold2 = 0;
|
||||
|
||||
G4double fTotE = 0.;
|
||||
G4double fTotE2 = 0.;
|
||||
G4double fTotE = 0.;
|
||||
G4double fTotE2 = 0.;
|
||||
};
|
||||
|
||||
#endif // LXeRun_h
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
#ifndef LXeRunAction_h
|
||||
#define LXeRunAction_h 1
|
||||
# define LXeRunAction_h 1
|
||||
|
||||
class LXeRun;
|
||||
class LXeHistoManager;
|
||||
@@ -40,17 +40,17 @@ class G4Run;
|
||||
|
||||
class LXeRunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
LXeRunAction();
|
||||
~LXeRunAction() override;
|
||||
public:
|
||||
LXeRunAction();
|
||||
~LXeRunAction() override;
|
||||
|
||||
G4Run* GenerateRun() override;
|
||||
void BeginOfRunAction(const G4Run*) override;
|
||||
void EndOfRunAction(const G4Run*) override;
|
||||
G4Run* GenerateRun() override;
|
||||
void BeginOfRunAction(const G4Run*) override;
|
||||
void EndOfRunAction(const G4Run*) override;
|
||||
|
||||
private:
|
||||
LXeRun* fRun = nullptr;
|
||||
LXeHistoManager* fHistoManager = nullptr;
|
||||
private:
|
||||
LXeRun* fRun = nullptr;
|
||||
LXeHistoManager* fHistoManager = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,39 +31,39 @@
|
||||
#ifndef LXeScintHit_h
|
||||
#define LXeScintHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VHit.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
class LXeScintHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
LXeScintHit() = default;
|
||||
LXeScintHit(G4VPhysicalVolume* pVol);
|
||||
~LXeScintHit() override = default;
|
||||
public:
|
||||
LXeScintHit() = default;
|
||||
LXeScintHit(G4VPhysicalVolume* pVol);
|
||||
~LXeScintHit() override = default;
|
||||
|
||||
LXeScintHit(const LXeScintHit& right);
|
||||
const LXeScintHit& operator=(const LXeScintHit& right);
|
||||
G4bool operator==(const LXeScintHit& right) const;
|
||||
LXeScintHit(const LXeScintHit& right);
|
||||
const LXeScintHit& operator=(const LXeScintHit& right);
|
||||
G4bool operator==(const LXeScintHit& right) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
inline void SetEdep(G4double de) { fEdep = de; }
|
||||
inline void AddEdep(G4double de) { fEdep += de; }
|
||||
inline G4double GetEdep() { return fEdep; }
|
||||
inline void SetEdep(G4double de) { fEdep = de; }
|
||||
inline void AddEdep(G4double de) { fEdep += de; }
|
||||
inline G4double GetEdep() { return fEdep; }
|
||||
|
||||
inline void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
inline G4ThreeVector GetPos() { return fPos; }
|
||||
inline void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
inline G4ThreeVector GetPos() { return fPos; }
|
||||
|
||||
inline const G4VPhysicalVolume* GetPhysV() { return fPhysVol; }
|
||||
inline const G4VPhysicalVolume* GetPhysV() { return fPhysVol; }
|
||||
|
||||
private:
|
||||
G4double fEdep = 0.;
|
||||
G4ThreeVector fPos;
|
||||
const G4VPhysicalVolume* fPhysVol = nullptr;
|
||||
private:
|
||||
G4double fEdep = 0.;
|
||||
G4ThreeVector fPos;
|
||||
const G4VPhysicalVolume* fPhysVol = nullptr;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<LXeScintHit> LXeScintHitsCollection;
|
||||
@@ -72,14 +72,13 @@ extern G4ThreadLocal G4Allocator<LXeScintHit>* LXeScintHitAllocator;
|
||||
|
||||
inline void* LXeScintHit::operator new(size_t)
|
||||
{
|
||||
if(!LXeScintHitAllocator)
|
||||
LXeScintHitAllocator = new G4Allocator<LXeScintHit>;
|
||||
return (void*) LXeScintHitAllocator->MallocSingle();
|
||||
if (!LXeScintHitAllocator) LXeScintHitAllocator = new G4Allocator<LXeScintHit>;
|
||||
return (void*)LXeScintHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void LXeScintHit::operator delete(void* aHit)
|
||||
{
|
||||
LXeScintHitAllocator->FreeSingle((LXeScintHit*) aHit);
|
||||
LXeScintHitAllocator->FreeSingle((LXeScintHit*)aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,16 +40,16 @@ class G4HCofThisEvent;
|
||||
|
||||
class LXeScintSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
LXeScintSD(G4String name);
|
||||
~LXeScintSD() override = default;
|
||||
public:
|
||||
LXeScintSD(G4String name);
|
||||
~LXeScintSD() override = default;
|
||||
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*) override;
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*) override;
|
||||
|
||||
private:
|
||||
LXeScintHitsCollection* fScintCollection = nullptr;
|
||||
G4int fHitsCID = -1;
|
||||
private:
|
||||
LXeScintHitsCollection* fScintCollection = nullptr;
|
||||
G4int fHitsCID = -1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,14 +37,14 @@ class LXeEventAction;
|
||||
|
||||
class LXeStackingAction : public G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
LXeStackingAction(LXeEventAction*);
|
||||
~LXeStackingAction() override = default;
|
||||
public:
|
||||
LXeStackingAction(LXeEventAction*);
|
||||
~LXeStackingAction() override = default;
|
||||
|
||||
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) override;
|
||||
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) override;
|
||||
|
||||
private:
|
||||
LXeEventAction* fEventAction = nullptr;
|
||||
private:
|
||||
LXeEventAction* fEventAction = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
/// \brief Definition of the LXeSteppingAction class
|
||||
//
|
||||
#ifndef LXeSteppingAction_h
|
||||
#define LXeSteppingACtion_h 1
|
||||
# define LXeSteppingACtion_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4OpBoundaryProcess.hh"
|
||||
#include "G4UserSteppingAction.hh"
|
||||
# include "G4OpBoundaryProcess.hh"
|
||||
# include "G4UserSteppingAction.hh"
|
||||
# include "globals.hh"
|
||||
|
||||
class LXeEventAction;
|
||||
class LXeTrackingAction;
|
||||
@@ -40,22 +40,22 @@ class LXeSteppingMessenger;
|
||||
|
||||
class LXeSteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
LXeSteppingAction(LXeEventAction*);
|
||||
~LXeSteppingAction() override;
|
||||
public:
|
||||
LXeSteppingAction(LXeEventAction*);
|
||||
~LXeSteppingAction() override;
|
||||
|
||||
void UserSteppingAction(const G4Step*) override;
|
||||
void UserSteppingAction(const G4Step*) override;
|
||||
|
||||
void SetOneStepPrimaries(G4bool b) { fOneStepPrimaries = b; }
|
||||
G4bool GetOneStepPrimaries() { return fOneStepPrimaries; }
|
||||
void SetOneStepPrimaries(G4bool b) { fOneStepPrimaries = b; }
|
||||
G4bool GetOneStepPrimaries() { return fOneStepPrimaries; }
|
||||
|
||||
private:
|
||||
G4bool fOneStepPrimaries = false;
|
||||
LXeSteppingMessenger* fSteppingMessenger = nullptr;
|
||||
LXeEventAction* fEventAction = nullptr;
|
||||
G4OpBoundaryProcess* fBoundary = nullptr;
|
||||
private:
|
||||
G4bool fOneStepPrimaries = false;
|
||||
LXeSteppingMessenger* fSteppingMessenger = nullptr;
|
||||
LXeEventAction* fEventAction = nullptr;
|
||||
G4OpBoundaryProcess* fBoundary = nullptr;
|
||||
|
||||
G4OpBoundaryProcessStatus fExpectedNextStatus = Undefined;
|
||||
G4OpBoundaryProcessStatus fExpectedNextStatus = Undefined;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,15 +39,15 @@ class G4UIcmdWithABool;
|
||||
|
||||
class LXeSteppingMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
LXeSteppingMessenger(LXeSteppingAction*);
|
||||
~LXeSteppingMessenger() override;
|
||||
public:
|
||||
LXeSteppingMessenger(LXeSteppingAction*);
|
||||
~LXeSteppingMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
LXeSteppingAction* fStepping = nullptr;
|
||||
G4UIcmdWithABool* fOneStepPrimariesCmd = nullptr;
|
||||
private:
|
||||
LXeSteppingAction* fStepping = nullptr;
|
||||
G4UIcmdWithABool* fOneStepPrimariesCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,19 +31,19 @@
|
||||
#ifndef LXeTrackingAction_h
|
||||
#define LXeTrackingAction_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserTrackingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class LXeTrackingAction : public G4UserTrackingAction
|
||||
{
|
||||
public:
|
||||
LXeTrackingAction() = default;
|
||||
~LXeTrackingAction() = default;
|
||||
public:
|
||||
LXeTrackingAction() = default;
|
||||
~LXeTrackingAction() = default;
|
||||
|
||||
void PreUserTrackingAction(const G4Track*) override;
|
||||
void PostUserTrackingAction(const G4Track*) override;
|
||||
void PreUserTrackingAction(const G4Track*) override;
|
||||
void PostUserTrackingAction(const G4Track*) override;
|
||||
|
||||
private:
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,42 +39,41 @@ class G4ParticleDefinition;
|
||||
|
||||
class LXeTrajectory : public G4Trajectory
|
||||
{
|
||||
public:
|
||||
LXeTrajectory() = default;
|
||||
LXeTrajectory(const G4Track* aTrack);
|
||||
LXeTrajectory(LXeTrajectory&);
|
||||
~LXeTrajectory() = default;
|
||||
public:
|
||||
LXeTrajectory() = default;
|
||||
LXeTrajectory(const G4Track* aTrack);
|
||||
LXeTrajectory(LXeTrajectory&);
|
||||
~LXeTrajectory() = default;
|
||||
|
||||
void DrawTrajectory() const override;
|
||||
void DrawTrajectory() const override;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
|
||||
void SetDrawTrajectory(G4bool b) { fDrawit = b; }
|
||||
void WLS() { fWls = true; }
|
||||
void SetForceDrawTrajectory(G4bool b) { fForceDraw = b; }
|
||||
void SetForceNoDrawTrajectory(G4bool b) { fForceNoDraw = b; }
|
||||
void SetDrawTrajectory(G4bool b) { fDrawit = b; }
|
||||
void WLS() { fWls = true; }
|
||||
void SetForceDrawTrajectory(G4bool b) { fForceDraw = b; }
|
||||
void SetForceNoDrawTrajectory(G4bool b) { fForceNoDraw = b; }
|
||||
|
||||
private:
|
||||
G4bool fWls = false;
|
||||
G4bool fDrawit = false;
|
||||
G4bool fForceNoDraw = false;
|
||||
G4bool fForceDraw = false;
|
||||
G4ParticleDefinition* fParticleDefinition = nullptr;
|
||||
private:
|
||||
G4bool fWls = false;
|
||||
G4bool fDrawit = false;
|
||||
G4bool fForceNoDraw = false;
|
||||
G4bool fForceDraw = false;
|
||||
G4ParticleDefinition* fParticleDefinition = nullptr;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<LXeTrajectory>* LXeTrajectoryAllocator;
|
||||
|
||||
inline void* LXeTrajectory::operator new(size_t)
|
||||
{
|
||||
if(!LXeTrajectoryAllocator)
|
||||
LXeTrajectoryAllocator = new G4Allocator<LXeTrajectory>;
|
||||
return (void*) LXeTrajectoryAllocator->MallocSingle();
|
||||
if (!LXeTrajectoryAllocator) LXeTrajectoryAllocator = new G4Allocator<LXeTrajectory>;
|
||||
return (void*)LXeTrajectoryAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void LXeTrajectory::operator delete(void* aTrajectory)
|
||||
{
|
||||
LXeTrajectoryAllocator->FreeSingle((LXeTrajectory*) aTrajectory);
|
||||
LXeTrajectoryAllocator->FreeSingle((LXeTrajectory*)aTrajectory);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
|
||||
enum LXeTrackStatus
|
||||
{
|
||||
active = 1,
|
||||
hitPMT = 2,
|
||||
absorbed = 4,
|
||||
active = 1,
|
||||
hitPMT = 2,
|
||||
absorbed = 4,
|
||||
boundaryAbsorbed = 8,
|
||||
hitSphere = 16,
|
||||
inactive = 14
|
||||
hitSphere = 16,
|
||||
inactive = 14
|
||||
};
|
||||
|
||||
/*LXeTrackStatus:
|
||||
@@ -56,30 +56,30 @@ enum LXeTrackStatus
|
||||
|
||||
class LXeUserTrackInformation : public G4VUserTrackInformation
|
||||
{
|
||||
public:
|
||||
LXeUserTrackInformation() = default;
|
||||
~LXeUserTrackInformation() override = default;
|
||||
public:
|
||||
LXeUserTrackInformation() = default;
|
||||
~LXeUserTrackInformation() override = default;
|
||||
|
||||
// Sets the track status to s (does not check validity of flags)
|
||||
void SetTrackStatusFlags(int s) { fStatus = s; }
|
||||
// Does a smart add of track status flags (disabling old flags that conflict)
|
||||
// If s conflicts with itself it will not be detected
|
||||
void AddTrackStatusFlag(int s);
|
||||
// Sets the track status to s (does not check validity of flags)
|
||||
void SetTrackStatusFlags(int s) { fStatus = s; }
|
||||
// Does a smart add of track status flags (disabling old flags that conflict)
|
||||
// If s conflicts with itself it will not be detected
|
||||
void AddTrackStatusFlag(int s);
|
||||
|
||||
int GetTrackStatus() const { return fStatus; }
|
||||
int GetTrackStatus() const { return fStatus; }
|
||||
|
||||
void IncReflections() { ++fReflections; }
|
||||
G4int GetReflectionCount() const { return fReflections; }
|
||||
void IncReflections() { ++fReflections; }
|
||||
G4int GetReflectionCount() const { return fReflections; }
|
||||
|
||||
void SetForceDrawTrajectory(G4bool b) { fForcedraw = b; }
|
||||
G4bool GetForceDrawTrajectory() { return fForcedraw; }
|
||||
void SetForceDrawTrajectory(G4bool b) { fForcedraw = b; }
|
||||
G4bool GetForceDrawTrajectory() { return fForcedraw; }
|
||||
|
||||
inline virtual void Print() const override {};
|
||||
inline virtual void Print() const override {};
|
||||
|
||||
private:
|
||||
int fStatus = active;
|
||||
G4int fReflections = 0;
|
||||
G4bool fForcedraw = false;
|
||||
private:
|
||||
int fStatus = active;
|
||||
G4int fReflections = 0;
|
||||
G4bool fForcedraw = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,35 +38,34 @@ class G4LogicalVolume;
|
||||
|
||||
class LXeWLSFiber : public G4PVPlacement
|
||||
{
|
||||
public:
|
||||
LXeWLSFiber(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
|
||||
G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo,
|
||||
LXeDetectorConstruction* c);
|
||||
public:
|
||||
LXeWLSFiber(G4RotationMatrix* pRot, const G4ThreeVector& tlate, G4LogicalVolume* pMotherLogical,
|
||||
G4bool pMany, G4int pCopyNo, LXeDetectorConstruction* c);
|
||||
|
||||
private:
|
||||
void CopyValues();
|
||||
private:
|
||||
void CopyValues();
|
||||
|
||||
static G4LogicalVolume* fClad2_log;
|
||||
static G4LogicalVolume* fClad2_log;
|
||||
|
||||
G4double fFiber_rmin = 0.;
|
||||
G4double fFiber_rmax = 0.;
|
||||
G4double fFiber_z = 0.;
|
||||
G4double fFiber_sphi = 0.;
|
||||
G4double fFiber_ephi = 0.;
|
||||
G4double fFiber_rmin = 0.;
|
||||
G4double fFiber_rmax = 0.;
|
||||
G4double fFiber_z = 0.;
|
||||
G4double fFiber_sphi = 0.;
|
||||
G4double fFiber_ephi = 0.;
|
||||
|
||||
G4double fClad1_rmin = 0.;
|
||||
G4double fClad1_rmax = 0.;
|
||||
G4double fClad1_z = 0.;
|
||||
G4double fClad1_sphi = 0.;
|
||||
G4double fClad1_ephi = 0.;
|
||||
G4double fClad1_rmin = 0.;
|
||||
G4double fClad1_rmax = 0.;
|
||||
G4double fClad1_z = 0.;
|
||||
G4double fClad1_sphi = 0.;
|
||||
G4double fClad1_ephi = 0.;
|
||||
|
||||
G4double fClad2_rmin = 0.;
|
||||
G4double fClad2_rmax = 0.;
|
||||
G4double fClad2_z = 0.;
|
||||
G4double fClad2_sphi = 0.;
|
||||
G4double fClad2_ephi = 0.;
|
||||
G4double fClad2_rmin = 0.;
|
||||
G4double fClad2_rmax = 0.;
|
||||
G4double fClad2_z = 0.;
|
||||
G4double fClad2_sphi = 0.;
|
||||
G4double fClad2_ephi = 0.;
|
||||
|
||||
LXeDetectorConstruction* fConstructor = nullptr;
|
||||
LXeDetectorConstruction* fConstructor = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,29 +31,28 @@
|
||||
#ifndef LXeWLSSlab_h
|
||||
#define LXeWLSSlab_h 1
|
||||
|
||||
#include "G4PVPlacement.hh"
|
||||
|
||||
#include "LXeDetectorConstruction.hh"
|
||||
|
||||
#include "G4PVPlacement.hh"
|
||||
|
||||
class LXeWLSSlab : public G4PVPlacement
|
||||
{
|
||||
public:
|
||||
LXeWLSSlab(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
|
||||
G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo,
|
||||
LXeDetectorConstruction* c);
|
||||
public:
|
||||
LXeWLSSlab(G4RotationMatrix* pRot, const G4ThreeVector& tlate, G4LogicalVolume* pMotherLogical,
|
||||
G4bool pMany, G4int pCopyNo, LXeDetectorConstruction* c);
|
||||
|
||||
private:
|
||||
void CopyValues();
|
||||
private:
|
||||
void CopyValues();
|
||||
|
||||
LXeDetectorConstruction* fConstructor = nullptr;
|
||||
LXeDetectorConstruction* fConstructor = nullptr;
|
||||
|
||||
static G4LogicalVolume* fScintSlab_log;
|
||||
static G4LogicalVolume* fScintSlab_log;
|
||||
|
||||
G4int fNfibers = 0;
|
||||
G4double fScint_x = 0.;
|
||||
G4double fScint_y = 0.;
|
||||
G4double fScint_z = 0.;
|
||||
G4double fSlab_z = 0.;
|
||||
G4int fNfibers = 0;
|
||||
G4double fScint_x = 0.;
|
||||
G4double fScint_y = 0.;
|
||||
G4double fScint_z = 0.;
|
||||
G4double fSlab_z = 0.;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user