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: MaGeGeometryGermaniumArrayHoleMessenger.cc,v 1.1 2004/11/26 09:00:12 pandola Exp $ 00024 // 00025 // CLASS IMPLEMENTATION: @CLASS_NAME@.cc 00026 // 00027 //---------------------------------------------------------------------------// 00033 // 00034 //---------------------------------------------------------------------------// 00045 //---------------------------------------------------------------------------// 00046 // 00047 00048 #include "G4UIcmdWithAString.hh" 00049 #include "G4UIcmdWithADouble.hh" 00050 #include "G4UIdirectory.hh" 00051 00052 //---------------------------------------------------------------------------// 00053 00054 #include "gerdageometry/MaGeGeometryGermaniumArrayHoleMessenger.hh" 00055 #include "gerdageometry/MaGeGeometryGermaniumArrayHole.hh" 00056 00057 //---------------------------------------------------------------------------// 00058 MaGeGeometryGermaniumArrayHoleMessenger:: 00059 MaGeGeometryGermaniumArrayHoleMessenger( 00060 MaGeGeometryGermaniumArrayHole *Array) : fArray(Array) 00061 { 00062 // /MaGe/geometry/crystal 00063 fGeArrayDir = new G4UIdirectory("/MaGe/geometry/array/"); 00064 fGeArrayDir->SetGuidance("tune the crystal array parameters"); 00065 00066 // /MaGe/geometry/array/horizontalgap 00067 fArrayHorizontalGapCmd = new G4UIcmdWithADouble( 00068 "/MaGe/geometry/array/horizontalgap", this); 00069 fArrayHorizontalGapCmd->SetGuidance("Set horizontal gap between crystals"); 00070 00071 // /MaGe/geometry/array/verticalgap 00072 fArrayVerticalGapCmd = new G4UIcmdWithADouble( 00073 "/MaGe/geometry/array/verticalgap", this); 00074 fArrayVerticalGapCmd->SetGuidance("Set vertical gap between crystals"); 00075 00076 } 00077 00078 00079 MaGeGeometryGermaniumArrayHoleMessenger:: 00080 ~MaGeGeometryGermaniumArrayHoleMessenger() 00081 { 00082 delete fGeArrayDir; 00083 delete fArrayHorizontalGapCmd; 00084 delete fArrayVerticalGapCmd; 00085 } 00086 00087 void MaGeGeometryGermaniumArrayHoleMessenger::SetNewValue( 00088 G4UIcommand *cmd, G4String newValue) 00089 { 00090 if (cmd == fArrayHorizontalGapCmd) 00091 { G4double hg=fArrayHorizontalGapCmd->GetNewDoubleValue(newValue); 00092 fArray->SetHorizontalGap(hg*cm); } 00093 else if (cmd == fArrayVerticalGapCmd) 00094 { G4double hg=fArrayVerticalGapCmd->GetNewDoubleValue(newValue); 00095 fArray->SetVerticalGap(hg*cm); } 00096 } 00097 00098