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: MJGeometrySolidBlock.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 00024 // 00025 // CLASS IMPLEMENTATION: MJGeometrySolidBlock.cc 00026 // 00027 //---------------------------------------------------------------------------// 00031 // 00032 //---------------------------------------------------------------------------// 00042 //---------------------------------------------------------------------------// 00043 // 00044 00045 #include "globals.hh" 00046 00047 #include "G4Box.hh" 00048 #include "G4LogicalVolume.hh" 00049 #include "G4Material.hh" 00050 #include "G4VisAttributes.hh" 00051 00052 #include "geometry/MJGeometryGlobals.hh" 00053 #include "geometry/MJGeometrySolidBlockMessenger.hh" 00054 #include "io/MJLogger.hh" 00055 00056 //---------------------------------------------------------------------------// 00057 00058 #include "geometry/MJGeometrySolidBlock.hh" 00059 00060 //---------------------------------------------------------------------------// 00061 00062 MJGeometrySolidBlock::MJGeometrySolidBlock(): 00063 MJGeometryDetector(""), fMaterialName("Germanium-Nat") 00064 { 00065 fMessenger = new MJGeometrySolidBlockMessenger(this); 00066 } 00067 00068 //---------------------------------------------------------------------------// 00069 00070 MJGeometrySolidBlock::~MJGeometrySolidBlock() 00071 {;} 00072 00073 //---------------------------------------------------------------------------// 00074 00075 void MJGeometrySolidBlock::ConstructDetector() 00076 { 00077 // Visualization attributes for block. 00078 G4VisAttributes *blockVisAtt = new G4VisAttributes( blue ); 00079 blockVisAtt->SetVisibility( true ); 00080 blockVisAtt->SetForceSolid( false ); 00081 00082 // Default block is 2x2x2 m^3 00083 G4double boxEdge = 1.0 * m; 00084 G4Material *boxMaterial = G4Material::GetMaterial(fMaterialName); 00085 if(!boxMaterial) { 00086 MJLog(error) << "Material " <<fMaterialName<<" not in database!"<<endlog; 00087 MJLog(fatal) << endlog; 00088 } 00089 G4Box *theBox = new G4Box("solidBlock", boxEdge, boxEdge, boxEdge); 00090 theDetectorLogical = new G4LogicalVolume(theBox, boxMaterial, "block"); 00091 theDetectorLogical->SetVisAttributes(blockVisAtt); 00092 MJLog(routine) << "Solid Block created out of: " << fMaterialName << endlog; 00093 } 00094 00095 //---------------------------------------------------------------------------// 00096 //---------------------------------------------------------------------------// 00097