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

MJGeneratorRDMRadioactiveDecayGun.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 //---------------------------------------------------------------------------//
00032 // Begin description of class here
00036 // End class description
00037 //
00043 //
00044 // --------------------------------------------------------------------------//
00055 // --------------------------------------------------------------------------//
00056 #include "generators/MJGeneratorRDMNucleus.hh"
00057 #include "generators/MJGeneratorRDMRadioactiveDecayGun.hh"
00058 #include "generators/MJGeneratorRDMRadioactiveDecayGunMessenger.hh"
00059 #include "G4ParticleTable.hh"
00060 #include "G4ParticleDefinition.hh"
00061 
00062 
00063 #include "G4UImanager.hh"
00064 #include "G4IonTable.hh"
00065 #include "G4Ions.hh"
00067 //
00068 MJGeneratorRDMRadioactiveDecayGun::MJGeneratorRDMRadioactiveDecayGun ()
00069 {
00070 
00071   theMJGeneratorRDMRadioactiveDecayGunMessenger = new MJGeneratorRDMRadioactiveDecayGunMessenger(this);
00072 
00073 }
00075 MJGeneratorRDMRadioactiveDecayGun::~MJGeneratorRDMRadioactiveDecayGun()
00076 {
00077    delete theMJGeneratorRDMRadioactiveDecayGunMessenger;
00078 }
00079 
00080 void MJGeneratorRDMRadioactiveDecayGun::SetNucleus (MJGeneratorRDMNucleus theIon1)
00081 {
00082   theIon = theIon1;
00083 
00084   G4IonTable *theIonTable =
00085     (G4IonTable*)(G4ParticleTable::GetParticleTable()->GetIonTable());
00086 
00087   G4ParticleDefinition *aIon = NULL;
00088 
00089   G4int A = theIon.GetA();
00090   G4int Z = theIon.GetZ();
00091   G4double E = theIon.GetE();
00092 
00093   aIon = theIonTable->GetIon (Z, A, E);
00094 
00095   SetParticleDefinition(aIon);
00096 
00097   G4UImanager* UI = G4UImanager::GetUIpointer();
00098   UI->ApplyCommand("/gun/energy 0.000000 MeV");
00099   UI->ApplyCommand("/gun/position 0.0 0.0 8.0 cm");
00100   UI->ApplyCommand("/gun/direction 0.0 0.0 1.0 ");
00101 
00102 }
00103 

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