Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MJGeometry800gCrystal.cc

Go to the documentation of this file.
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: MJGeometry800gCrystal.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 
00024 //      
00025 // CLASS IMPLEMENTATION:  MJGeometry800gCrystal.cc
00026 //
00027 //---------------------------------------------------------------------------//
00033 // 
00034 //---------------------------------------------------------------------------//
00045 //---------------------------------------------------------------------------//
00046 //
00047 
00048 //---------------------------------------------------------------------------//
00049 
00050 //  MJ headers
00051 #include "geometry/MJGeometry800gCrystal.hh"      //Present MJ Class Headers 
00052 #include "geometry/MJGeometryGlobals.hh"
00053 #include "database/MJDatabase.hh"
00054 
00055 //  GEANT4 headers
00056 #include "G4Material.hh"
00057 #include "G4Tubs.hh"
00058 #include "G4LogicalVolume.hh"
00059 
00060 //---------------------------------------------------------------------------//
00061 MJGeometry800gCrystal::MJGeometry800gCrystal( G4String serNum ) :
00062 serialNumber( serNum ), theDBcrystal(0), theCrystalLogical(0)
00063 {
00064         theDBcrystal = MJDatabase::GetSimple800g( serialNumber );
00065         ConstructCrystal();
00066 }
00067 
00068 //---------------------------------------------------------------------------//
00069 //MJGeometry800gCrystal::MJGeometry800gCrystal(const MJGeometry800gCrystal & other)
00070 //{
00071 //
00072 //}
00073 
00074 //---------------------------------------------------------------------------//
00075 MJGeometry800gCrystal::~MJGeometry800gCrystal() {;}
00076 
00077 //---------------------------------------------------------------------------//
00078 void MJGeometry800gCrystal::ConstructCrystal() {
00079 
00080         //  Grab the relevant variables from the database object to avoid multiple dereferenced lookups
00081         G4double crystalRadius = theDBcrystal->GetCrystalRadius();
00082         G4double height = theDBcrystal->GetCrystalHeight();
00083         G4Material *crystalMaterial = G4Material::GetMaterial( theDBcrystal->GetMaterialName() );
00084 
00085         //  Set the visualization attributes for each of the components
00086         G4VisAttributes *activeCrystalVisAtt = new G4VisAttributes( magenta );
00087         activeCrystalVisAtt->SetVisibility( true );
00088         activeCrystalVisAtt->SetForceSolid( true );
00089 
00090         //  Build the crystal. The crystal has basically no features to it at this point. It's just a simple, solid right cylinder.
00091         G4Tubs *bulkCrystal1Solid = new G4Tubs( "bulkCrystal1Solid", 0*cm, crystalRadius*cm, (height/2)*cm, 0*deg, 360*deg );
00092         theCrystalLogical = new G4LogicalVolume( bulkCrystal1Solid, crystalMaterial, "theCrystalLogical" );
00093 }

Generated on Mon Nov 29 16:58:51 2004 for Majorana Simulation by  doxygen 1.3.9.1