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
00047
00048
00049
00050 #include "G4Element.hh"
00051 #include "G4Material.hh"
00052 #include "G4Box.hh"
00053 #include "G4Tubs.hh"
00054 #include "G4Sphere.hh"
00055 #include "G4SubtractionSolid.hh"
00056 #include "G4LogicalVolume.hh"
00057 #include "G4ThreeVector.hh"
00058 #include "G4PVPlacement.hh"
00059 #include "G4PVParameterised.hh"
00060 #include "globals.hh"
00061 #include "G4UnitsTable.hh"
00062 #include "G4Transform3D.hh"
00063 #include "G4RotationMatrix.hh"
00064 #include "G4SDManager.hh"
00065 #include "G4VisAttributes.hh"
00066 #include "G4Colour.hh"
00067
00068
00069 #include "geometry/MJGeometryDetector.hh"
00070 #include "geometry/MJGeometryDetectorConstruction.hh"
00071 #include "io/MJLogger.hh"
00072
00073
00074 #include "gerdageometry/MaGeGeometryGerda.hh"
00075
00076
00077
00078
00079
00080
00081 MaGeGeometryGerda::MaGeGeometryGerda() :
00082 MJGeometryDetector("")
00083 {
00084 theArray = new MaGeGeometryGermaniumArray();
00085 theShielding = new MaGeGeometryShielding();
00086 }
00087
00088 MaGeGeometryGerda::~MaGeGeometryGerda()
00089 {
00090 delete theArray;
00091 delete theShielding;
00092 }
00093
00094 void MaGeGeometryGerda::ConstructDetector()
00095 {
00096
00097 theShielding->ConstructShielding();
00098
00099 theArray->ConstructArrayPositions();
00100
00101 char nameactive[30];
00102 char namedeadlayer[30];
00103 for (G4int i=0; i<GeCrystalNum; i++) {
00104 sprintf(nameactive,"Ge_det_%d",i);
00105 sprintf(namedeadlayer,"Ge_deadlayer_%d",i);
00106 GeActiveCrystal_Physical[i]=
00107 new G4PVPlacement(0,theArray->GetCrystalPosition(i),
00108 theArray->GetCrystalActiveLogical(),
00109 nameactive,
00110 theShielding->GetCrystalContainerLogical(),
00111 false,i);
00112 GeDeadlayerCrystal_Physical[i]=
00113 new G4PVPlacement(0,theArray->GetCrystalPosition(i),
00114 theArray->GetCrystalDeadLayerLogical(),
00115 namedeadlayer,
00116 theShielding->GetCrystalContainerLogical(),
00117 false,i);
00118 }
00119
00120 SetDetectorLogical(theShielding->GetOverallLogical());
00121
00122
00123 SetDetectorName("WaterTube");
00124 }