21 #include "G4Material.hh" 24 #include "G4LogicalVolume.hh" 25 #include "G4PVPlacement.hh" 26 #include "G4RotationMatrix.hh" 27 #include "G4VisAttributes.hh" 28 #include "G4Colour.hh" 29 #include "G4RunManager.hh" 30 #include "G4Transform3D.hh" 32 #include "G4PhysicalConstants.hh" 33 #include "G4SystemOfUnits.hh" 41 : silBulkMaterial(0),detConstruction(det) {
105 G4double silBulk_x = 24.5*mm;
106 G4double silBulk_y = 24.5*mm;
107 G4double silBulk_z = 0.3575*mm;
109 G4double silDSSDBulk_x = 31.5*mm;
110 G4double silDSSDBulk_y = 31.5*mm;
111 G4double silDSSDBulk_z = 0.75*mm;
113 G4double defectHalfLength = 0.5*mm;
114 G4double separationFromBox = 3*mm;
117 G4cout <<
"##################################################################" 119 <<
"########### ActarSimSilDetectorConstruction::ConstructSil() #########" 121 <<
" Note that only a thin (1 micron) Al window is defined in front " 123 <<
" of the silicons. No other box around the silicon volume is described." 125 <<
" MAYA detector characteristics: " 127 <<
" x dimension (half-side) of silicon: " << silBulk_x/mm <<
" mm" 129 <<
" y dimension (half-side) of silicon: " << silBulk_y/mm <<
" mm" 131 <<
" z dimension (half-side) of silicon: " << silBulk_z/mm <<
" mm" 133 <<
" DSSD detector characteristics: " 135 <<
" x dimension (half-side) of silicon: " << silDSSDBulk_x/mm <<
" mm" 137 <<
" y dimension (half-side) of silicon: " << silDSSDBulk_y/mm <<
" mm" 139 <<
" z dimension (half-side) of silicon: " << silDSSDBulk_z/mm <<
" mm" 141 <<
" Detector material: " 144 G4cout <<
"##################################################################" 147 G4LogicalVolume* silLog(0);
148 G4VPhysicalVolume* silPhys(0);
151 new G4Box(
"silBox", silBulk_x, silBulk_y, silBulk_z);
157 G4LogicalVolume* silDSSDLog(0);
158 G4VPhysicalVolume* silDSSDPhys(0);
161 new G4Box(
"silDSSDBox", silDSSDBulk_x, silDSSDBulk_y, silDSSDBulk_z);
178 G4int numberOfRowsX = ((G4int) (2*
xBoxSilHalfLength/(2*(silBulk_x+defectHalfLength)))) - 1;
180 G4int numberOfRowsY = ((G4int) (2*
yBoxSilHalfLength/(2*(silBulk_x+defectHalfLength)))) - 1;
182 G4int numberOfRowsZ = ((G4int) (2*
zBoxSilHalfLength/(2*(silBulk_x+defectHalfLength)))) - 1;
187 G4int iterationNumber = 0;
191 G4RotationMatrix* rotBack =
192 new G4RotationMatrix(0,pi,pi);
194 G4RotationMatrix* rotBottom =
195 new G4RotationMatrix(0,pi/2,0);
196 G4RotationMatrix* rotTop =
197 new G4RotationMatrix(0,-pi/2,0);
198 G4RotationMatrix* rotLeft =
199 new G4RotationMatrix(pi/2,pi/2,-pi/2);
200 G4RotationMatrix* rotRight =
201 new G4RotationMatrix(-pi/2,pi/2,pi/2);
240 G4double layerSizeZ = 0.00012*mm;
241 G4double z,a,density;
243 G4Box *DSSD_Al_Layer=
new G4Box(
"DSSD_Al_layer",silDSSDBulk_x,silDSSDBulk_y,layerSizeZ);
247 new G4Material(
"Aluminum", z= 13., a= 26.98*g/mole, density= 2.7*g/cm3);
249 G4LogicalVolume* DSSD_Al_LayerLog=
new G4LogicalVolume(DSSD_Al_Layer,Al,
"DSSD_Al_layer");
252 G4int DSSDAlIterationNumber = 0;
273 for(G4int rowX=0;rowX<2;rowX++){
274 for(G4int rowY=0;rowY<2;rowY++){
286 new G4PVPlacement(0,G4ThreeVector( (rowX-0.5)*2*(silDSSDBulk_x+defectHalfLength),
287 (rowY-0.5)*2*(silDSSDBulk_x+defectHalfLength),
290 silDSSDLog,
"silPhys", chamberLog,
false, iterationNumber);
292 DSSDAlIterationNumber++;
294 DSSD_Al_LayerPhys =
new G4PVPlacement(0,G4ThreeVector( (rowX-0.5)*2*(silDSSDBulk_x+defectHalfLength),
295 (rowY-0.5)*2*(silDSSDBulk_x+defectHalfLength),
297 DSSD_Al_LayerLog,
"DSSD_Al_layer",chamberLog,
false,DSSDAlIterationNumber);
299 DSSDAlIterationNumber++;
300 DSSD_Al_LayerPhys =
new G4PVPlacement(0,G4ThreeVector( (rowX-0.5)*2*(silDSSDBulk_x+defectHalfLength),
301 (rowY-0.5)*2*(silDSSDBulk_x+defectHalfLength),
303 DSSD_Al_LayerLog,
"DSSD_Al_layer",chamberLog,
false,DSSDAlIterationNumber);
321 for(G4int rowZ=0;rowZ<numberOfRowsZ;rowZ++){
322 for(G4int rowX=0;rowX<numberOfRowsX;rowX++){
325 new G4PVPlacement(rotBottom,G4ThreeVector(-
xBoxSilHalfLength + ((rowX+1)*2-1)*(silBulk_x+defectHalfLength),
327 ((rowZ+1)*2-1)*(silBulk_x+defectHalfLength)),
328 silLog,
"silPhys", chamberLog,
false, iterationNumber);
333 for(G4int rowZ=0;rowZ<numberOfRowsZ;rowZ++){
334 for(G4int rowX=0;rowX<numberOfRowsX;rowX++){
337 new G4PVPlacement(rotTop,G4ThreeVector(-
xBoxSilHalfLength + ((rowX+1)*2-1)*(silBulk_x+defectHalfLength),
339 ((rowZ+1)*2-1)*(silBulk_x+defectHalfLength)),
340 silLog,
"silPhys", chamberLog,
false, iterationNumber);
348 for(G4int rowZ=0;rowZ<3;rowZ++){
349 for(G4int rowY=0;rowY<2;rowY++){
354 (rowY-0.5)*2*(silBulk_y+defectHalfLength),
355 (rowZ-1)*2*(silBulk_x+defectHalfLength)),
356 silLog,
"silPhys", chamberLog,
false, iterationNumber);
378 for(G4int rowZ=0;rowZ<3;rowZ++){
379 for(G4int rowY=0;rowY<2;rowY++){
384 (rowY-0.5)*2*(silBulk_y+defectHalfLength),
385 (rowZ-1)*2*(silBulk_x+defectHalfLength)),
386 silLog,
"silPhys", chamberLog,
false, iterationNumber);
401 for(G4int rowX=0;rowX<numberOfRowsX;rowX++){
402 for(G4int rowY=0;rowY<numberOfRowsY;rowY++){
405 new G4PVPlacement(rotBack,G4ThreeVector(-
xBoxSilHalfLength + ((rowX+1)*2-1)*(silBulk_y+defectHalfLength),
407 -separationFromBox - silBulk_z),
408 silLog,
"silPhys", chamberLog,
false, iterationNumber);
422 G4VisAttributes* silVisAtt1 =
new G4VisAttributes(G4Colour(0,1,0));
423 silVisAtt1->SetVisibility(
true);
424 silLog->SetVisAttributes(silVisAtt1);
425 G4VisAttributes* silDSSDVisAtt1 =
new G4VisAttributes(G4Colour(0,0.75,0));
426 silDSSDVisAtt1->SetVisibility(
true);
427 silDSSDLog->SetVisAttributes(silDSSDVisAtt1);
429 G4VisAttributes* DSSD_Al_LayerVisAtt=
new G4VisAttributes(G4Colour(1.0,0.,1.0));
430 DSSD_Al_LayerVisAtt->SetVisibility(
false);
431 DSSD_Al_LayerLog->SetVisAttributes(DSSD_Al_LayerVisAtt);
445 G4Material* pttoMaterial = G4Material::GetMaterial(mat);
453 G4RunManager::GetRunManager()->
460 G4cout <<
"##################################################################" 462 <<
"#### ActarSimSilDetectorConstruction::PrintDetectorParameters() ####" 464 <<
" The silicon coverage is " <<
sideCoverage << G4endl
465 <<
"Reminder: 6 bits to indicate which sil wall is present (1) or absent (0)" << G4endl
466 <<
"bit1 (lsb) beam output wall, bit2 lower (gravity based) wall" << G4endl
467 <<
"bit3 upper (gravity based) wall, bit4 left (from beam point of view) wall" << G4endl
468 <<
"bit5 right (from beam point of view) wall, bit6 (msb) beam entrance wall" << G4endl << G4endl;
470 G4cout <<
" The silicon parameters are: " << G4endl
474 G4cout <<
"##################################################################"
G4VPhysicalVolume * ConstructSil(G4LogicalVolume *)
ActarSimDetectorConstruction * detConstruction
Pointer to the global detector.
G4double yBoxSilHalfLength
Silicon box half length along Y (Y is vertical)
G4VPhysicalVolume * Construct(G4LogicalVolume *)
Wrap for the construction function within the Silicon.
ActarSimSilDetectorMessenger * silMessenger
Pointer to the Messenger.
G4VPhysicalVolume * DSSD_Al_LayerPhys
void SetSilBulkMaterial(G4String)
Set the material the scintillator bulk is made of.
~ActarSimSilDetectorConstruction()
Destructor.
void SetXBoxSilHalfLength(G4double xBox)
ActarSimGasDetectorConstruction * GetGasDetector()
G4Material * silBulkMaterial
Pointer to the material the Silicon is made of.
void PrintDetectorParameters()
Prints Scintillator detector parameters.
G4VPhysicalVolume * GetWorldPhysicalVolume()
G4double GetGasBoxSizeX(void)
void SetSideCoverage(G4int cov)
void UpdateGeometry()
Updates Scintillator detector.
ActarSimSilSD * GetSilSD(void)
G4double zBoxSilHalfLength
Silicon box half length along Z (Z is along beam)
void SetYBoxSilHalfLength(G4double yBox)
G4double GetGasBoxSizeZ(void)
void SetZBoxSilHalfLength(G4double zBox)
G4double xBoxSilHalfLength
Silicon box half length along X (X is horizontal)
G4LogicalVolume * GetWorldLogicalVolume()
ActarSimSilDetectorConstruction(ActarSimDetectorConstruction *)
Constructor. Sets the material and the pointer to the Messenger.