00001 //---------------------------------------------------------------------------// 00002 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00003 // // 00004 // MAJORANA Simulation // 00005 // // 00006 // This code implementation is the intellectual property of the // 00007 // MAJORANA Collaboration. It is based on Geant4, an intellectual // 00008 // property of the RD44 GEANT4 collaboration. // 00009 // // 00010 // ********************* // 00011 // // 00012 // Neither the authors of this software system, nor their employing // 00013 // institutes, nor the agencies providing financial support for this // 00014 // work make any representation or warranty, express or implied, // 00015 // regarding this software system or assume any liability for its use. // 00016 // By copying, distributing or modifying the Program (or any work based // 00017 // on on the Program) you indicate your acceptance of this statement, // 00018 // and all its terms. // 00019 // // 00020 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00021 //---------------------------------------------------------------------------// 00022 // 00023 // $Id: MaGeGeometryGermaniumArray.cc,v 1.8 2004/11/25 09:08:05 liu Exp $ 00024 // 00025 // CLASS IMPLEMENTATION: @CLASS_NAME@.cc 00026 // 00027 //---------------------------------------------------------------------------// 00034 // 00035 //---------------------------------------------------------------------------// 00065 //---------------------------------------------------------------------------// 00066 // 00067 // G4 includes 00068 #include "G4Element.hh" 00069 #include "G4Material.hh" 00070 #include "G4Box.hh" 00071 #include "G4Tubs.hh" 00072 #include "G4Sphere.hh" 00073 #include "G4SubtractionSolid.hh" 00074 #include "G4LogicalVolume.hh" 00075 #include "G4ThreeVector.hh" 00076 #include "G4PVPlacement.hh" 00077 #include "G4PVParameterised.hh" 00078 #include "globals.hh" 00079 #include "G4UnitsTable.hh" 00080 #include "G4Transform3D.hh" 00081 #include "G4RotationMatrix.hh" 00082 #include "G4SDManager.hh" 00083 #include "G4VisAttributes.hh" 00084 #include "G4Colour.hh" 00085 00086 // MJ include 00087 #include "io/MJLogger.hh" 00088 00089 // Gerda include 00090 #include "gerdageometry/MaGeGeometryGermaniumCrystal.hh" 00091 #include "gerdageometry/MaGeGeometryGermaniumArrayMessenger.hh" 00092 00093 #include "gerdageometry/MaGeGeometryGermaniumArray.hh" 00094 00095 //---------------------------------------------------------------------------// 00096 00097 00098 //---------------------------------------------------------------------------// 00099 00100 MaGeGeometryGermaniumArray::MaGeGeometryGermaniumArray() : 00101 GeCrystalInnerRadius(1.0*cm), 00102 GeCrystalOuterRadius(4.0*cm), 00103 GeCrystalHeight(8.0*cm), 00104 GeCrystalDeadlayer(0.01*cm), 00105 GeDetectorHorizontalGap(1.0*cm), 00106 GeDetectorVerticalGap(5.0*cm) 00107 { 00108 00109 theCrystal = new MaGeGeometryGermaniumCrystal(); 00110 fMessenger = new MaGeGeometryGermaniumArrayMessenger(this); 00111 } 00112 00113 MaGeGeometryGermaniumArray::~MaGeGeometryGermaniumArray() 00114 { 00115 } 00116 00117 void MaGeGeometryGermaniumArray::ConstructArrayPositions() 00118 { 00119 00120 // --- position crystal inside liquid nitrogen --- // 00121 GeCrystalOuterRadius = theCrystal->GetOuterRadius(); 00122 GeCrystalInnerRadius = theCrystal->GetInnerRadius(); 00123 GeCrystalHeight = theCrystal->GetHeight(); 00124 GeCrystalDeadlayer = theCrystal->GetDeadLayer(); 00125 00126 float xpos[GeCrystalNumColumn]; 00127 float ypos[GeCrystalNumColumn]; 00128 float zpos[GeCrystalNumLayer]; 00129 00130 xpos[0]=0.0; 00131 ypos[0]=0.0; 00132 float angleinxyplane; 00133 for (G4int i=0; i<(GeCrystalNumColumn-1); i++) { 00134 angleinxyplane=(float(i)*60.0/180.0)*pi*rad; 00135 xpos[i+1]=(2.0*GeCrystalOuterRadius+GeDetectorHorizontalGap) 00136 *cos(angleinxyplane); 00137 ypos[i+1]=(2.0*GeCrystalOuterRadius+GeDetectorHorizontalGap) 00138 *sin(angleinxyplane); 00139 } 00140 zpos[0]=0.0; 00141 zpos[1]=GeCrystalHeight+GeDetectorVerticalGap; 00142 zpos[2]=0.0-GeCrystalHeight-GeDetectorVerticalGap; 00143 00144 G4int iGe=0; 00145 for (G4int i=0; i<GeCrystalNumLayer; i++) { // for the moment 3 layers 00146 for (G4int j=0; j<GeCrystalNumColumn; j++) { // 7 detectors in each layer 00147 // sprintf(name_ge[iGe],"Ge_det_%d",iGe); 00148 position_ge[iGe].setX(xpos[j]); 00149 position_ge[iGe].setY(ypos[j]); 00150 position_ge[iGe].setZ(zpos[i]); 00151 iGe++; 00152 } 00153 } 00154 00155 theCrystal->ConstructCrystal(); 00156 00157 }