File indexing completed on 2025-02-23 09:20:50
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
0032
0033 #include "DetectorWatase86.hh"
0034
0035 #include "Materials.hh"
0036 #include "SensitiveDetector.hh"
0037
0038 #include "G4Box.hh"
0039 #include "G4FieldManager.hh"
0040 #include "G4LogicalVolume.hh"
0041 #include "G4Material.hh"
0042 #include "G4PVPlacement.hh"
0043 #include "G4Region.hh"
0044 #include "G4SDManager.hh"
0045 #include "G4SystemOfUnits.hh"
0046 #include "G4TransportationManager.hh"
0047 #include "G4UniformMagField.hh"
0048 #include "G4UnitsTable.hh"
0049 #include "G4ios.hh"
0050
0051
0052
0053 DetectorWatase86::DetectorWatase86() : fRadiatorDescription(0) {}
0054
0055
0056
0057 DetectorWatase86::~DetectorWatase86()
0058 {
0059
0060
0061 }
0062
0063
0064
0065 G4VPhysicalVolume* DetectorWatase86::Construct()
0066 {
0067
0068
0069
0070 G4cout << "DetectorWatase86 setup" << G4endl;
0071
0072 G4double worldSizeZ = 400. * cm;
0073 G4double worldSizeR = 20. * cm;
0074
0075
0076
0077 G4double radThickness = 0.04 * mm;
0078 G4double gasGap = 0.126 * mm;
0079 G4double foilGasRatio = radThickness / (radThickness + gasGap);
0080 G4double foilNumber = 300;
0081
0082 G4double absorberThickness = 30.0 * mm;
0083 G4double absorberRadius = 100. * mm;
0084
0085 G4double windowThick = 51.0 * micrometer;
0086 G4double electrodeThick = 10.0 * micrometer;
0087 G4double gapThick = 10.0 * cm;
0088 G4double detGap = 0.01 * mm;
0089
0090 G4double startZ = 100.0 * mm;
0091
0092
0093
0094
0095
0096 G4Material* li = Materials::GetInstance()->GetMaterial("Li");
0097 G4Material* he = Materials::GetInstance()->GetMaterial("He");
0098 G4Material* xe10CH4 = Materials::GetInstance()->GetMaterial("Xe10CH4");
0099
0100 G4double foilDensity = li->GetDensity();
0101 G4double gasDensity = he->GetDensity();
0102 G4double totDensity = foilDensity * foilGasRatio + gasDensity * (1.0 - foilGasRatio);
0103
0104 G4double fractionFoil = foilDensity * foilGasRatio / totDensity;
0105 G4double fractionGas = gasDensity * (1.0 - foilGasRatio) / totDensity;
0106 G4Material* radiatorMat = new G4Material("radiatorMat", totDensity, 2);
0107 radiatorMat->AddMaterial(li, fractionFoil);
0108 radiatorMat->AddMaterial(he, fractionGas);
0109
0110
0111 fRadiatorDescription = new RadiatorDescription;
0112 fRadiatorDescription->fFoilMaterial = li;
0113 fRadiatorDescription->fGasMaterial = he;
0114 fRadiatorDescription->fFoilThickness = radThickness;
0115 fRadiatorDescription->fGasThickness = gasGap;
0116 fRadiatorDescription->fFoilNumber = foilNumber;
0117
0118 G4Material* worldMaterial = he;
0119 G4Material* absorberMaterial = xe10CH4;
0120
0121
0122
0123
0124 G4VSolid* solidWorld = new G4Box("World", worldSizeR, worldSizeR, worldSizeZ / 2.);
0125
0126 G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, worldMaterial, "World");
0127
0128 G4VPhysicalVolume* physicsWorld =
0129 new G4PVPlacement(0, G4ThreeVector(), "World", logicWorld, 0, false, 0);
0130
0131
0132
0133 G4double radThick = foilNumber * (radThickness + gasGap) - gasGap + detGap;
0134 G4double radZ = startZ + 0.5 * radThick;
0135
0136 G4VSolid* solidRadiator =
0137 new G4Box("Radiator", 1.1 * absorberRadius, 1.1 * absorberRadius, 0.5 * radThick);
0138
0139 G4LogicalVolume* logicRadiator = new G4LogicalVolume(solidRadiator, radiatorMat, "Radiator");
0140
0141 new G4PVPlacement(0, G4ThreeVector(0, 0, radZ), "Radiator", logicRadiator, physicsWorld, false,
0142 0);
0143
0144 fRadiatorDescription->fLogicalVolume = logicRadiator;
0145
0146
0147
0148 G4Region* radRegion = new G4Region("XTRradiator");
0149 radRegion->AddRootLogicalVolume(logicRadiator);
0150
0151 G4double windowZ = startZ + radThick + windowThick / 2. + 15.0 * mm;
0152
0153 G4double gapZ = windowZ + windowThick / 2. + gapThick / 2. + 0.01 * mm;
0154
0155 G4double electrodeZ = gapZ + gapThick / 2. + electrodeThick / 2. + 0.01 * mm;
0156
0157
0158
0159 G4double absorberZ = electrodeZ + electrodeThick / 2. + absorberThickness / 2. + 0.01 * mm;
0160
0161 G4VSolid* solidAbsorber =
0162 new G4Box("Absorber", absorberRadius, absorberRadius, absorberThickness / 2.);
0163
0164 G4LogicalVolume* logicAbsorber = new G4LogicalVolume(solidAbsorber, absorberMaterial, "Absorber");
0165
0166 new G4PVPlacement(0, G4ThreeVector(0., 0., absorberZ), "Absorber", logicAbsorber, physicsWorld,
0167 false, 0);
0168
0169 G4Region* regGasDet = new G4Region("XTRdEdxDetector");
0170 regGasDet->AddRootLogicalVolume(logicAbsorber);
0171
0172
0173
0174 SensitiveDetector* sd = new SensitiveDetector("AbsorberSD");
0175 G4SDManager::GetSDMpointer()->AddNewDetector(sd);
0176 logicAbsorber->SetSensitiveDetector(sd);
0177
0178
0179
0180 G4cout << "\n The WORLD is made of " << worldSizeZ / mm << "mm of "
0181 << worldMaterial->GetName();
0182 G4cout << ", the transverse size (R) of the world is " << worldSizeR / mm << " mm. " << G4endl;
0183 G4cout << " The ABSORBER is made of " << absorberThickness / mm << "mm of "
0184 << absorberMaterial->GetName();
0185 G4cout << ", the transverse size (R) is " << absorberRadius / mm << " mm. " << G4endl;
0186 G4cout << " Z position of the (middle of the) absorber " << absorberZ / mm << " mm." << G4endl;
0187
0188 G4cout << "radZ = " << radZ / mm << " mm" << G4endl;
0189 G4cout << "startZ = " << startZ / mm << " mm" << G4endl;
0190
0191 G4cout << "fRadThick = " << radThick / mm << " mm" << G4endl;
0192 G4cout << "fFoilNumber = " << foilNumber << G4endl;
0193 G4cout << "fRadiatorMat = " << radiatorMat->GetName() << G4endl;
0194 G4cout << "WorldMaterial = " << worldMaterial->GetName() << G4endl;
0195 G4cout << G4endl;
0196
0197 return physicsWorld;
0198 }
0199
0200