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: MJGeometryNaIBarrel.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 00024 // 00025 // CLASS IMPLEMENTATION: MJGeometryNaIBarrel.cc 00026 // 00027 //---------------------------------------------------------------------------// 00033 // 00034 //---------------------------------------------------------------------------// 00044 //---------------------------------------------------------------------------// 00045 // 00046 00047 00048 #include <CLHEP/Units/PhysicalConstants.h> 00049 00050 #include "globals.hh" 00051 #include "G4LogicalVolume.hh" 00052 #include "G4Material.hh" 00053 #include "G4Tubs.hh" 00054 #include "G4VisAttributes.hh" 00055 00056 //---------------------------------------------------------------------------// 00057 00058 #include "geometry/MJGeometryGlobals.hh" 00059 #include "geometry/MJGeometryNaIBarrel.hh" 00060 #include "io/MJLogger.hh" 00061 00062 static const G4double inch = 2.54 * cm; 00063 00064 //---------------------------------------------------------------------------// 00065 00066 MJGeometryNaIBarrel::MJGeometryNaIBarrel(): 00067 fLogical(0) 00068 { 00069 fLength = 22.0 * inch; 00070 fInnerRadius = 10.35 * inch / 2.0; 00071 fOuterRadius = 14.35 * inch / 2.0; 00072 fGapWidth = 0.5 * inch; 00073 } 00074 00075 //---------------------------------------------------------------------------// 00076 00077 MJGeometryNaIBarrel::MJGeometryNaIBarrel(const MJGeometryNaIBarrel & other) 00078 {;} 00079 00080 //---------------------------------------------------------------------------// 00081 00082 MJGeometryNaIBarrel::~MJGeometryNaIBarrel() 00083 {;} 00084 00085 //---------------------------------------------------------------------------// 00086 void MJGeometryNaIBarrel::Construct() 00087 { 00088 G4double phi = fGapWidth / fInnerRadius; 00089 G4Tubs *barrelSolid = new G4Tubs("barrelSolid", fInnerRadius, fOuterRadius, 00090 fLength/2., phi * 0.5, 2 * pi - phi * 0.5); 00091 G4Material *naI = G4Material::GetMaterial("NaI"); 00092 if(!naI) { 00093 MJLog(error) << "NaI not a defined G4Material." << endlog; 00094 MJLog(fatal) << endlog; 00095 } 00096 fLogical = new G4LogicalVolume(barrelSolid, naI, "barrelLogical"); 00097 G4VisAttributes *barrelVisAtt = new G4VisAttributes(ltgray); 00098 barrelVisAtt->SetVisibility(true); 00099 barrelVisAtt->SetForceSolid(true); 00100 fLogical->SetVisAttributes(barrelVisAtt); 00101 } 00102 //---------------------------------------------------------------------------// 00103 //---------------------------------------------------------------------------//