30 #include "DetectorConstruction.hh"
40 gradientsInitialized=
false;
47 {
delete detectorMessenger;}
55 return ConstructVolumes();
60 void DetectorConstruction::DefineMaterials()
79 defaultMaterial = vacuum;
88 static G4bool fieldIsInitialized =
false;
89 if(!fieldIsInitialized && gradientsInitialized)
106 fieldIsInitialized =
true;
123 solidWorld =
new G4Box(
"World",
124 12*
m/2,12*
m/2,22*
m/2);
142 solidVol =
new G4Box(
"Vol",
143 10*
m/2,10*
m/2,9.120*
m/2);
178 solidGridVol=
new G4Box(
"GridVolume",x_grid,y_grid,z_grid);
196 G4int num_half_grid=100;
198 solidGridVol_Hole=
new G4Box(
"GridHole",holeSize/2,holeSize/2,z_grid);
205 for(
int i=-num_half_grid;i<num_half_grid;i++)
207 for (
int j=-num_half_grid;j<num_half_grid;j++)
211 G4int number_index_grid;
217 number_index_grid=(i+num_half_grid)*1000+(j+num_half_grid);
234 solidControlVol_GridShadow =
236 (
"ControlVol_GridShadow", ContVolSizeXY/2, ContVolSizeXY/2 , ImPlaneWidth/2);
238 logicControlVol_GridShadow =
240 (solidControlVol_GridShadow, defaultMaterial,
"ControlVol_GridShadow");
242 physiControlVol_GridShadow =
244 ( 0,
G4ThreeVector(0,0,(250+300)*mm), logicControlVol_GridShadow,
"ControlVol_GridShadow",logicWorld,
false, 0);
287 if (modelChoice==1)
model=1;
288 if (modelChoice==2)
model=2;
289 if (modelChoice==3)
model=3;
298 gradientsInitialized=
true;