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

MaGeGeometryGermaniumCrystalHole.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: MaGeGeometryGermaniumCrystalHole.cc,v 1.1 2004/11/26 09:46:30 pandola Exp $ 
00024 //      
00025 // CLASS IMPLEMENTATION:  MaGeGeometryGermaniumCrystal.cc
00026 //
00027 //---------------------------------------------------------------------------//
00033 // 
00034 //---------------------------------------------------------------------------//
00052 //---------------------------------------------------------------------------//
00053 //
00054 //G4 class headers
00055 #include "globals.hh"
00056 #include "G4LogicalVolume.hh"
00057 #include "G4PVPlacement.hh"
00058 #include "G4VPhysicalVolume.hh"
00059 #include "G4Material.hh"
00060 #include "G4Tubs.hh"
00061 #include "G4VisAttributes.hh"
00062 #include "G4Colour.hh"
00063 #include "G4SDManager.hh"
00064 #include "G4SubtractionSolid.hh"
00065 
00066 //---------------------------------------------------------------------------//
00067 
00068 #include "gerdageometry/MaGeGeometrySD.hh"
00069 // #include "gerdageometry/MaGeGeometryGermaniumCrystalHoleMessenger.hh"
00070 #include "gerdageometry/MaGeGeometryGermaniumCrystalHole.hh"                  
00071 //Present MJ Class Headers 
00072 
00073 //---------------------------------------------------------------------------//
00074 
00075 MaGeGeometryGermaniumCrystalHole::MaGeGeometryGermaniumCrystalHole() :
00076     //GeCrystalInnerRadius(1.0*cm),
00077 GeCrystalInnerRadius(0.0*cm),
00078 GeCrystalOuterRadius(4.0*cm),
00079 GeCrystalHeight(8.0*cm),
00080 GeCrystalDeadlayer(0.01*cm),
00081 GeCrystalHoleDepth(2.5*cm),
00082 GeCrystalHoleOuterRadius(0.5*cm),
00083 theGermaniumCrystalActiveLogical(0),
00084 theGermaniumCrystalDeadlayerLogical(0)
00085 {
00086   // coded in for the momentum
00087   //GeCrystalInnerRadius=1.0*cm;
00088   //GeCrystalOuterRadius=4.0*cm;
00089   //GeCrystalHeight     =8.0*cm;
00090   //GeCrystalDeadlayer  =0.01*cm;   
00091   //  fMessenger = new MaGeGeometryGermaniumCrystalMessenger(this);
00092 //  ConstructCrystal();
00093 }
00094 
00095 
00096 MaGeGeometryGermaniumCrystalHole::~MaGeGeometryGermaniumCrystalHole()
00097 {;}
00098 
00099 void MaGeGeometryGermaniumCrystalHole::ConstructCrystal()
00100 {
00101   //
00102   // ---- define material (will put into database later) ---- //
00103   // 
00104 
00105   G4Material* ge = G4Material::GetMaterial("Ge");
00106   //
00107   // ---- define volumes ---- //
00108   //
00109     G4double startAngleOfTheTube = 0.*deg;
00110     G4double spanningAngleOfTheTube = 360.*deg;
00111     G4double heightofTheTube = 0.5*GeCrystalHeight;
00112     G4double holeInnerRadius = 0.0*cm;
00113     G4ThreeVector  vector_hole(0,0,heightofTheTube-GeCrystalHoleDepth+0.5*mm);
00114 
00115     // the additional 0.5mm is to avoid the two volumes (crystal and hole) to 
00116     // share the same surface, it can create problems with visualization 
00117 
00118     // --- active part of crystal --- //
00119     G4Tubs*  GeCrystal_ActiveTub = new G4Tubs("gecrystal_activetub",
00120                                        GeCrystalInnerRadius,
00121                                        GeCrystalOuterRadius-GeCrystalDeadlayer,
00122                                        heightofTheTube,
00123                                        startAngleOfTheTube,
00124                                        spanningAngleOfTheTube);
00125 
00126     G4Tubs*  GeCrystal_Hole = new G4Tubs("gecrystal_hole",
00127                                        holeInnerRadius,
00128                                        GeCrystalHoleOuterRadius,
00129                                        GeCrystalHoleDepth,
00130                                        startAngleOfTheTube,
00131                                        spanningAngleOfTheTube);
00132 
00133     G4SubtractionSolid *GeCrystal_solid = new G4SubtractionSolid("GeCrystal_solid",GeCrystal_ActiveTub,GeCrystal_Hole,0,vector_hole);
00134  
00135    theGermaniumCrystalActiveLogical = new G4LogicalVolume(
00136                                        GeCrystal_solid,ge,
00137                                        "gecrystal_activelogical",0,0,0);
00138 
00139   // --- inactive part of the crystal --- //
00140     G4Tubs* GeCrystal_DeadlayerTub = new G4Tubs("gecrystal_deadlayertub",
00141                                        GeCrystalOuterRadius-GeCrystalDeadlayer,
00142                                        GeCrystalOuterRadius,
00143                                        heightofTheTube,
00144                                        startAngleOfTheTube,
00145                                        spanningAngleOfTheTube);
00146     theGermaniumCrystalDeadlayerLogical = new G4LogicalVolume(
00147                                        GeCrystal_DeadlayerTub,ge,
00148                                        "gecrystal_deadlayerlogical",0,0,0);
00149 
00150   //--- visualization attributes ---//
00151     G4VisAttributes* GeCrystalVisAtt=new G4VisAttributes(G4Colour(1.0,0.,0.));
00152     GeCrystalVisAtt->SetVisibility(true);
00153     GeCrystalVisAtt->SetForceSolid(true);
00154 
00155     theGermaniumCrystalActiveLogical->SetVisAttributes(GeCrystalVisAtt);
00156     theGermaniumCrystalDeadlayerLogical->SetVisAttributes(GeCrystalVisAtt);
00157 
00158   //--- sensitive detector definition ---//
00159   G4SDManager* SDman = G4SDManager::GetSDMpointer();
00160 
00161   G4String geCrystalSDname = "/mydet/gerda/gecrystal";
00162   MaGeGeometrySD * geCrystalSD = new MaGeGeometrySD(geCrystalSDname);
00163   SDman->AddNewDetector(geCrystalSD);
00164   theGermaniumCrystalActiveLogical->SetSensitiveDetector(geCrystalSD);
00165 
00166 };
00167 
00168 //
00169                          

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