File indexing completed on 2025-02-23 09:20:25
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 #ifndef STCyclotronDetectorConstruction_h
0031 #define STCyclotronDetectorConstruction_h 1
0032
0033 #include "G4VUserDetectorConstruction.hh"
0034 #include "globals.hh"
0035 #include "G4PhysicalConstants.hh"
0036 #include <fstream>
0037
0038 class G4VPhysicalVolume;
0039 class G4LogicalVolume;
0040 class G4Region;
0041 class G4Tubs;
0042 class G4Material;
0043 class STCyclotronDetectorMessenger;
0044 class G4Element;
0045
0046
0047
0048 class STCyclotronDetectorConstruction : public G4VUserDetectorConstruction
0049 {
0050 public:
0051 STCyclotronDetectorConstruction();
0052 ~STCyclotronDetectorConstruction();
0053
0054 G4VPhysicalVolume* Construct();
0055 void ConstructSDandField();
0056
0057 void SetTargetDiameter(G4double );
0058 void SetTargetIsotopeName(G4String );
0059 void SetTargetIsotopeZ(G4double );
0060 void SetTargetIsotopeN(G4int );
0061 void SetTargetIsotopeA(G4double );
0062 void SetTargetElementName(G4String );
0063 void SetTargetElementSymbole(G4String );
0064 void SetTargetElementNComponents(G4int );
0065 void SetTargetElementAbundance(G4double );
0066 void SetTargetMaterialDensity(G4double );
0067 void SetTargetMaterialNComponents(G4int );
0068 void SetTargetMaterialFractionMass(G4double );
0069 void SetTargetNaturalElement(G4String );
0070 void SetTargetNaturalMaterialFractionMass(G4double );
0071 G4bool UpdateMaterial();
0072 void SetTargetMaterial(G4String );
0073
0074 void SetFoilIsotopeName(G4String );
0075 void SetFoilIsotopeZ(G4double );
0076 void SetFoilIsotopeN(G4int );
0077 void SetFoilIsotopeA(G4double );
0078 void SetFoilElementName(G4String );
0079 void SetFoilElementSymbole(G4String );
0080 void SetFoilElementNComponents(G4int );
0081 void SetFoilElementAbundance(G4double );
0082 void SetFoilMaterialDensity(G4double );
0083 void SetFoilMaterialNComponents(G4int );
0084 void SetFoilMaterialFractionMass(G4double );
0085 void SetFoilNaturalElement(G4String );
0086 void SetFoilNaturalMaterialFractionMass(G4double );
0087 G4bool UpdateFoilMaterial();
0088 void SetFoilMaterial(G4String );
0089
0090 void SetTargetThickness(G4double );
0091 void SetFoilThickness(G4double );
0092
0093
0094 inline G4double GetTargetPosition1(){return fLayer1_z_position_PART4 + 0.5*11.5 - fTarget_thickness;}
0095 inline G4double GetTargetPosition2(){return fLayer1_z_position_PART4 + 0.5*11.5;}
0096 inline G4double GetVolumeTarget(){return pi*fTarget_diameter*fTarget_diameter/4*fTarget_thickness;}
0097 inline G4double GetFoilPosition1(){return fZ_foil_position - 0.5*fFoil_thickness;}
0098 inline G4double GetTargetVolume(){return fTargetVolume;}
0099 inline G4double GetFoilVolume(){return fFoilVolume;}
0100 inline G4double GetFoilThickness(){return fFoil_thickness;}
0101 inline G4double GetTargetThickness(){return fTarget_thickness;}
0102 inline G4double GetTargetDiameter(){return fTarget_diameter;}
0103
0104 private:
0105
0106 STCyclotronDetectorMessenger* fDetectorMessenger;
0107
0108
0109 G4double fTarget_diameter;
0110 std::vector<G4String> fIsotopeName;
0111 std::vector<G4double> fIsotopeZ;
0112 std::vector<G4int> fIsotopeN;
0113 std::vector<G4double> fIsotopeA;
0114 std::vector<G4String> fElementName;
0115 std::vector<G4String> fElementSymbole;
0116 std::vector<G4int> fElementNComponents;
0117 std::vector<G4double> fElementAbundance;
0118 std::vector<G4String> fNaturalElementName;
0119 std::vector<G4double> fNaturalMaterialFractionMass;
0120 G4double fDensity_target;
0121 G4int fTarget_NComponents;
0122 std::vector<G4double> fMaterialFractionMass;
0123
0124 std::vector<G4String> fIsotopeNameFoil;
0125 std::vector<G4double> fIsotopeZFoil;
0126 std::vector<G4int> fIsotopeNFoil;
0127 std::vector<G4double> fIsotopeAFoil;
0128 std::vector<G4String> fElementNameFoil;
0129 std::vector<G4String> fElementSymboleFoil;
0130 std::vector<G4int> fElementNComponentsFoil;
0131 std::vector<G4double> fElementAbundanceFoil;
0132 std::vector<G4String> fNaturalElementNameFoil;
0133 std::vector<G4double> fNaturalMaterialFractionMassFoil;
0134 G4double fDensity_foil;
0135 G4int fFoil_NComponents;
0136 std::vector<G4double> fMaterialFractionMassFoil;
0137
0138 G4double fTarget_thickness;
0139 G4double fFoil_thickness;
0140
0141
0142
0143
0144
0145 G4Material* fTarget_Material;
0146 G4Material* fFoil_Material;
0147
0148 G4double fZ_foil_position;
0149 G4Tubs* fSolidFoil;
0150 G4LogicalVolume* fLogicFoil;
0151 G4VPhysicalVolume* fPhysFoil;
0152
0153 G4LogicalVolume* fLogicWorld;
0154
0155 G4double fLayer_z_position_PART3;
0156 G4VPhysicalVolume* fPhysLayer_PART3;
0157 G4VPhysicalVolume* fPhysTube_PART3;
0158
0159 G4double fTube_outerRadius_PART4;
0160 G4double fTube_length_PART4;
0161 G4double fLayer_z_position_PART4;
0162 G4VPhysicalVolume* fPhysTube_PART4;
0163 G4VPhysicalVolume* fPhysLayer_PART4;
0164 G4double fLayer1_z_position_PART4;
0165 G4VPhysicalVolume* fPhysLayer1_PART4;
0166
0167 G4LogicalVolume* fLogicTarget;
0168 G4double fTarget_z_position;
0169 G4Tubs* fSolidTarget;
0170 G4VPhysicalVolume* fPhysTarget;
0171
0172 G4double fLayer1_z_position_PART5;
0173 G4VPhysicalVolume* fPhysLayer1_PART5;
0174 G4double fLayer2_z_position_PART5;
0175 G4VPhysicalVolume* fPhysLayer2_PART5;
0176 G4double fLayer3_z_position_PART5;
0177 G4VPhysicalVolume* fPhysLayer3_PART5;
0178
0179 G4Region* fRegionTarget;
0180 G4Region* fRegionFoil;
0181
0182 G4double fTargetVolume;
0183 G4double fFoilVolume;
0184
0185 std::ofstream fParametersSummary;
0186
0187 };
0188 #endif