File indexing completed on 2025-10-13 08:26:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #ifndef B1DetectorConstruction_h
0032 #define B1DetectorConstruction_h 1
0033
0034 #include "G4VUserDetectorConstruction.hh"
0035 #include "G4ios.hh"
0036 #include "globals.hh"
0037 #include <CLHEP/Units/SystemOfUnits.h>
0038 #include <vector>
0039
0040 #include "G4Region.hh"
0041 #include "G4PVPlacement.hh"
0042
0043 #include "G4ChannelingFastSimModel.hh"
0044
0045 #include "DetectorConstructionMessenger.hh"
0046
0047 class G4VPhysicalVolume;
0048 class G4LogicalVolume;
0049
0050
0051
0052
0053
0054 class DetectorConstruction : public G4VUserDetectorConstruction
0055 {
0056 public:
0057 DetectorConstruction();
0058 ~DetectorConstruction() override = default;
0059
0060 G4VPhysicalVolume* Construct() override;
0061 void ConstructSDandField() override;
0062
0063
0064 void SetCrystalMaterial(const G4String& val) {fCrystalMaterialStr = val;}
0065 void SetCrystalSize(G4ThreeVector val) {fCrystalSize = val;}
0066 void SetCrystalBendingAngle(G4double val) {fBendingAngle = val;}
0067 void SetCrystalLattice(const G4String& val) {fLattice = val;}
0068 void SetCrystalAngleX(G4double val) {fAngleX = val;}
0069 void SetCrystalAngleY(G4double val) {fAngleY = val;}
0070 void SetRadiationModel(G4bool val) {fActivateRadiationModel = val;}
0071 void SetChannelingModel(G4bool val) {fActivateChannelingModel = val;}
0072
0073 void SetCrystallineUndulatorAmplitude(G4double val)
0074 {fCrystallineUndulatorAmplitude = val;}
0075 void SetCrystallineUndulatorPeriod(G4double val)
0076 {fCrystallineUndulatorPeriod = val;}
0077 void SetCrystallineUndulatorPhase(G4double val)
0078 {fCrystallineUndulatorPhase = val;}
0079
0080 void SetPotentialPath(const G4String& path){fPotentialPath = path;}
0081 void SetMinPhotonEnergy(G4double val) {fMinPhotonEnergy = val;}
0082 void SetSamplingPhotonsNumber(G4int val) {fSamplingPhotonsNumber = val;}
0083 void SetNSmallTrajectorySteps(G4int val) {fNSmallTrajectorySteps = val;}
0084 void SetRadiationAngleFactor(G4double val) {fRadiationAngleFactor = val;}
0085
0086 void SetMinPhotonEnergyAddStat(G4double val) {fMinPhotonEnergyAddStat = val;}
0087 void SetMaxPhotonEnergyAddStat(G4double val) {fMaxPhotonEnergyAddStat = val;}
0088 void SetMultiplePhotonStatistics(G4int val) {fTimesPhotonStatistics = val;}
0089
0090 void SetDetectorSize(G4ThreeVector val) {fDetectorSize = val;}
0091 void SetDetectorFrontPositionZ(G4double val) {fDetectorFrontPosZ = val;}
0092
0093 void SetParticleMinKinEnergy(G4double val) {fParticleMinKinEnergy = val;}
0094 void SetProtonMinKinEnergy(G4double val) {fProtonMinKinEnergy = val;}
0095 void SetAntiprotonMinKinEnergy(G4double val) {fAntiprotonMinKinEnergy = val;}
0096 void SetPiPlusMinKinEnergy(G4double val) {fPiPlusMinKinEnergy = val;}
0097 void SetPiMinusMinKinEnergy(G4double val) {fPiMinusMinKinEnergy = val;}
0098 void SetElectronMinKinEnergy(G4double val) {fElectronMinKinEnergy = val;}
0099 void SetPositronMinKinEnergy(G4double val) {fPositronMinKinEnergy = val;}
0100 void SetMuPlusMinKinEnergy(G4double val) {fMuPlusMinKinEnergy = val;}
0101 void SetMuMinusMinKinEnergy(G4double val) {fMuMinusMinKinEnergy = val;}
0102
0103 void SetLindhardAngles(G4double val) {fLindhardAngles = val;}
0104 void SetLindhardAnglesProton(G4double val) {fLindhardAnglesProton = val;}
0105 void SetLindhardAnglesAntiproton(G4double val) {fLindhardAnglesAntiproton = val;}
0106 void SetLindhardAnglesPiPlus(G4double val) {fLindhardAnglesPiPlus = val;}
0107 void SetLindhardAnglesPiMinus(G4double val) {fLindhardAnglesPiMinus = val;}
0108 void SetLindhardAnglesElectron(G4double val) {fLindhardAnglesElectron = val;}
0109 void SetLindhardAnglesPositron(G4double val) {fLindhardAnglesPositron = val;}
0110 void SetLindhardAnglesMuPlus(G4double val) {fLindhardAnglesMuPlus = val;}
0111 void SetLindhardAnglesMuMinus(G4double val) {fLindhardAnglesMuMinus = val;}
0112
0113 private:
0114 DetectorConstructionMessenger* fMessenger;
0115
0116
0117 G4LogicalVolume* fLogicCrystal{nullptr};
0118 G4String fCrystalMaterialStr = "G4_Si";
0119 G4Material* fCrystalMaterial{nullptr};
0120 G4ThreeVector fCrystalSize;
0121 G4double fBendingAngle = 0.;
0122 G4String fLattice;
0123 G4double fAngleX = 0.;
0124 G4double fAngleY = 0.;
0125 G4bool fActivateRadiationModel = false;
0126 G4bool fActivateChannelingModel = true;
0127
0128
0129 G4double fCrystallineUndulatorAmplitude = 0.;
0130 G4double fCrystallineUndulatorPeriod = 0.;
0131 G4double fCrystallineUndulatorPhase = 0.;
0132
0133 G4ThreeVector fDetectorSize;
0134 G4double fDetectorFrontPosZ = 1*CLHEP::m;
0135
0136 G4String fPotentialPath = "";
0137
0138 G4double fMinPhotonEnergy = 1*CLHEP::MeV;
0139 G4int fSamplingPhotonsNumber = 150;
0140 G4int fNSmallTrajectorySteps = 10000;
0141 G4double fRadiationAngleFactor = 4;
0142
0143 G4double fMinPhotonEnergyAddStat = 1*CLHEP::MeV;
0144 G4double fMaxPhotonEnergyAddStat = 20*CLHEP::MeV;
0145 G4int fTimesPhotonStatistics = 1;
0146
0147 G4double fParticleMinKinEnergy = 200.*CLHEP::MeV;
0148 G4double fProtonMinKinEnergy = 200.*CLHEP::MeV;
0149 G4double fAntiprotonMinKinEnergy = 200.*CLHEP::MeV;
0150 G4double fPiPlusMinKinEnergy = 200.*CLHEP::MeV;
0151 G4double fPiMinusMinKinEnergy = 200.*CLHEP::MeV;
0152 G4double fElectronMinKinEnergy = 200.*CLHEP::MeV;
0153 G4double fPositronMinKinEnergy = 200.*CLHEP::MeV;
0154 G4double fMuPlusMinKinEnergy = 200.*CLHEP::MeV;
0155 G4double fMuMinusMinKinEnergy = 200.*CLHEP::MeV;
0156
0157 G4double fLindhardAngles = 100;
0158 G4double fLindhardAnglesProton = 100;
0159 G4double fLindhardAnglesAntiproton = 100;
0160 G4double fLindhardAnglesPiPlus = 100;
0161 G4double fLindhardAnglesPiMinus = 100;
0162 G4double fLindhardAnglesElectron = 100;
0163 G4double fLindhardAnglesPositron = 100;
0164 G4double fLindhardAnglesMuPlus = 100;
0165 G4double fLindhardAnglesMuMinus = 100;
0166 };
0167
0168
0169
0170 #endif