00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00034
00035
00049
00050
00051
00052 #include "G4Element.hh"
00053 #include "G4Material.hh"
00054 #include "G4Box.hh"
00055 #include "G4Tubs.hh"
00056 #include "G4Sphere.hh"
00057 #include "G4SubtractionSolid.hh"
00058 #include "G4LogicalVolume.hh"
00059 #include "G4ThreeVector.hh"
00060 #include "G4PVPlacement.hh"
00061 #include "G4PVParameterised.hh"
00062 #include "globals.hh"
00063 #include "G4UnitsTable.hh"
00064 #include "G4Transform3D.hh"
00065 #include "G4RotationMatrix.hh"
00066 #include "G4SDManager.hh"
00067 #include "G4VisAttributes.hh"
00068 #include "G4Colour.hh"
00069
00070
00071 #include "geometry/MJGeometryDetector.hh"
00072 #include "geometry/MJGeometryDetectorConstruction.hh"
00073 #include "io/MJLogger.hh"
00074
00075
00076 #include "gerdageometry/MaGeGeometryGerdaHole.hh"
00077
00078
00079
00080
00081
00082
00083 MaGeGeometryGerdaHole::MaGeGeometryGerdaHole() :
00084 MJGeometryDetector("")
00085 {
00086 theArray = new MaGeGeometryGermaniumArrayHole();
00087 theShielding = new MaGeGeometryShielding();
00088 }
00089
00090 MaGeGeometryGerdaHole::~MaGeGeometryGerdaHole()
00091 {
00092 delete theArray;
00093 delete theShielding;
00094 }
00095
00096 void MaGeGeometryGerdaHole::ConstructDetector()
00097 {
00098
00099 theShielding->ConstructShielding();
00100
00101 theArray->ConstructArrayPositions();
00102
00103 char nameactive[30];
00104 char namedeadlayer[30];
00105 for (G4int i=0; i<GeCrystalNum; i++) {
00106 sprintf(nameactive,"Ge_det_%d",i);
00107 sprintf(namedeadlayer,"Ge_deadlayer_%d",i);
00108 GeActiveCrystal_Physical[i]=
00109 new G4PVPlacement(0,theArray->GetCrystalPosition(i),
00110 theArray->GetCrystalActiveLogical(),
00111 nameactive,
00112 theShielding->GetCrystalContainerLogical(),
00113 false,i);
00114 GeDeadlayerCrystal_Physical[i]=
00115 new G4PVPlacement(0,theArray->GetCrystalPosition(i),
00116 theArray->GetCrystalDeadLayerLogical(),
00117 namedeadlayer,
00118 theShielding->GetCrystalContainerLogical(),
00119 false,i);
00120 }
00121
00122 SetDetectorLogical(theShielding->GetOverallLogical());
00123
00124
00125 SetDetectorName("WaterTube");
00126 }