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

MaGeGeometryGermaniumCrystal.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: MaGeGeometryGermaniumCrystal.cc,v 1.6 2004/11/25 09:08:05 liu Exp $ 
00024 //      
00025 // CLASS IMPLEMENTATION:  MaGeGeometryGermaniumCrystal.cc
00026 //
00027 //---------------------------------------------------------------------------//
00033 // 
00034 //---------------------------------------------------------------------------//
00048 //---------------------------------------------------------------------------//
00049 //
00050 //G4 class headers
00051 #include "globals.hh"
00052 #include "G4LogicalVolume.hh"
00053 #include "G4PVPlacement.hh"
00054 #include "G4VPhysicalVolume.hh"
00055 #include "G4Material.hh"
00056 #include "G4Tubs.hh"
00057 #include "G4VisAttributes.hh"
00058 #include "G4Colour.hh"
00059 #include "G4SDManager.hh"
00060 
00061 //---------------------------------------------------------------------------//
00062 
00063 #include "gerdageometry/MaGeGeometrySD.hh"
00064 #include "gerdageometry/MaGeGeometryGermaniumCrystalMessenger.hh"
00065 
00066 #include "gerdageometry/MaGeGeometryGermaniumCrystal.hh"                  
00067 //Present MJ Class Headers 
00068 
00069 //---------------------------------------------------------------------------//
00070 
00071 MaGeGeometryGermaniumCrystal::MaGeGeometryGermaniumCrystal() :
00072 GeCrystalInnerRadius(1.0*cm),
00073 GeCrystalOuterRadius(4.0*cm),
00074 GeCrystalHeight(8.0*cm),
00075 GeCrystalDeadlayer(0.01*cm),
00076 theGermaniumCrystalActiveLogical(0),
00077 theGermaniumCrystalDeadlayerLogical(0)
00078 {
00079   // coded in for the momentum
00080   //GeCrystalInnerRadius=1.0*cm;
00081   //GeCrystalOuterRadius=4.0*cm;
00082   //GeCrystalHeight     =8.0*cm;
00083   //GeCrystalDeadlayer  =0.01*cm;   
00084   fMessenger = new MaGeGeometryGermaniumCrystalMessenger(this);
00085 //  ConstructCrystal();
00086 }
00087 
00088 
00089 MaGeGeometryGermaniumCrystal::~MaGeGeometryGermaniumCrystal()
00090 {;}
00091 
00092 void MaGeGeometryGermaniumCrystal::ConstructCrystal()
00093 {
00094   //
00095   // ---- define material (will put into database later) ---- //
00096   // 
00097 
00098   G4Material* ge = G4Material::GetMaterial("Ge");
00099   //
00100   // ---- define volumes ---- //
00101   //
00102     G4double startAngleOfTheTube = 0.*deg;
00103     G4double spanningAngleOfTheTube = 360.*deg;
00104     G4double heightofTheTube = 0.5*GeCrystalHeight;
00105 
00106   // --- active part of crystal --- //
00107     G4Tubs*  GeCrystal_ActiveTub = new G4Tubs("gecrystal_activetub",
00108                                        GeCrystalInnerRadius,
00109                                        GeCrystalOuterRadius-GeCrystalDeadlayer,
00110                                        heightofTheTube,
00111                                        startAngleOfTheTube,
00112                                        spanningAngleOfTheTube);
00113     theGermaniumCrystalActiveLogical = new G4LogicalVolume(
00114                                        GeCrystal_ActiveTub,ge,
00115                                        "gecrystal_activelogical",0,0,0);
00116 
00117   // --- inactive part of the crystal --- //
00118     G4Tubs* GeCrystal_DeadlayerTub = new G4Tubs("gecrystal_deadlayertub",
00119                                        GeCrystalOuterRadius-GeCrystalDeadlayer,
00120                                        GeCrystalOuterRadius,
00121                                        heightofTheTube,
00122                                        startAngleOfTheTube,
00123                                        spanningAngleOfTheTube);
00124     theGermaniumCrystalDeadlayerLogical = new G4LogicalVolume(
00125                                        GeCrystal_DeadlayerTub,ge,
00126                                        "gecrystal_deadlayerlogical",0,0,0);
00127 
00128   //--- visualization attributes ---//
00129     G4VisAttributes* GeCrystalVisAtt=new G4VisAttributes(G4Colour(1.0,0.,0.));
00130     GeCrystalVisAtt->SetVisibility(true);
00131     GeCrystalVisAtt->SetForceSolid(true);
00132 
00133     theGermaniumCrystalActiveLogical->SetVisAttributes(GeCrystalVisAtt);
00134     theGermaniumCrystalDeadlayerLogical->SetVisAttributes(GeCrystalVisAtt);
00135 
00136   //--- sensitive detector definition ---//
00137   G4SDManager* SDman = G4SDManager::GetSDMpointer();
00138 
00139   G4String geCrystalSDname = "/mydet/gerda/gecrystal";
00140   MaGeGeometrySD * geCrystalSD = new MaGeGeometrySD(geCrystalSDname);
00141   SDman->AddNewDetector(geCrystalSD);
00142   theGermaniumCrystalActiveLogical->SetSensitiveDetector(geCrystalSD);
00143 
00144 };
00145 
00146 //
00147                          

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