[819] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
[961] | 26 | // $Id: G4DNAGenericIonsManager.cc,v 1.5 2008/07/16 19:01:07 sincerti Exp $ |
---|
| 27 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
[819] | 28 | |
---|
| 29 | #include "G4DNAGenericIonsManager.hh" |
---|
| 30 | #include "G4Alpha.hh" |
---|
| 31 | #include "G4Ions.hh" |
---|
| 32 | |
---|
[961] | 33 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 34 | |
---|
| 35 | G4DNAGenericIonsManager * G4DNAGenericIonsManager :: Instance(void) |
---|
[819] | 36 | { |
---|
| 37 | if (!theInstance) |
---|
| 38 | theInstance=new G4DNAGenericIonsManager; |
---|
| 39 | |
---|
| 40 | return theInstance; |
---|
| 41 | } |
---|
| 42 | |
---|
[961] | 43 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 44 | |
---|
| 45 | G4ParticleDefinition * G4DNAGenericIonsManager :: GetIon(const G4String & name) |
---|
[819] | 46 | { |
---|
| 47 | IonsMap::const_iterator i(map.find(name)); |
---|
| 48 | |
---|
| 49 | if (i==map.end()) |
---|
| 50 | return 0; |
---|
| 51 | |
---|
| 52 | return i->second; |
---|
| 53 | } |
---|
| 54 | |
---|
[961] | 55 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 56 | |
---|
| 57 | G4DNAGenericIonsManager :: G4DNAGenericIonsManager() |
---|
[819] | 58 | { |
---|
| 59 | // name mass width charge |
---|
| 60 | // 2*spin parity C-conjugation |
---|
| 61 | // 2*Isospin 2*Isospin3 G-parity |
---|
| 62 | // type lepton number baryon number PDG encoding |
---|
| 63 | // stable lifetime decay table |
---|
| 64 | |
---|
| 65 | G4Ions *helium; |
---|
| 66 | G4Ions *hydrogen; |
---|
| 67 | G4Ions *alphaPlus; |
---|
[961] | 68 | G4Ions *positronium1s; |
---|
| 69 | G4Ions *positronium2s; |
---|
[819] | 70 | |
---|
| 71 | helium= new G4Ions("helium", 3.727417*GeV, 0.0*MeV, +0.0*eplus, |
---|
| 72 | 0, +1, 0, |
---|
| 73 | 0, 0, 0, |
---|
| 74 | "nucleus", +2, +4, 0, |
---|
| 75 | true, -1.0, 0, false, |
---|
| 76 | "", 0, 0.0); |
---|
| 77 | |
---|
| 78 | alphaPlus= new G4Ions("alpha+", 3.727417*GeV, 0.0*MeV, +1.0*eplus, |
---|
| 79 | 1, +1, 0, |
---|
| 80 | 0, 0, 0, |
---|
| 81 | "nucleus", +1, +4, 0, |
---|
| 82 | true, -1.0, 0, false, |
---|
| 83 | "", 0, 0.0); |
---|
| 84 | |
---|
| 85 | hydrogen= new G4Ions("hydrogen", 0.9382723*GeV, 0.0*MeV, +0.0*eplus, |
---|
| 86 | 0, +1, 0, |
---|
| 87 | 0, 0, 0, |
---|
| 88 | "nucleus", +1, +1, 0, |
---|
[961] | 89 | true, -1.0, 0, false, |
---|
[819] | 90 | "", 0, 0.0); |
---|
| 91 | |
---|
[961] | 92 | positronium1s= new G4Ions("Ps-1s", 2*electron_mass_c2, 0.0*MeV, +0.0*eplus, |
---|
| 93 | 0, 0, 0, |
---|
| 94 | 0, 0, 0, |
---|
| 95 | "nucleus", 0, 0, 0, |
---|
| 96 | true, -1.0, 0, false, |
---|
| 97 | "", 0, 0.0); |
---|
| 98 | |
---|
| 99 | positronium2s= new G4Ions("Ps-2s", 2*electron_mass_c2, 0.0*MeV, +0.0*eplus, |
---|
| 100 | 0, 0, 0, |
---|
| 101 | 0, 0, 0, |
---|
| 102 | "nucleus", 0, 0, 0, |
---|
| 103 | true, -1.0, 0, false, |
---|
| 104 | "", 0, 0.0); |
---|
| 105 | |
---|
[819] | 106 | map["helium"]=helium; |
---|
| 107 | map["hydrogen"]=hydrogen; |
---|
| 108 | map["alpha+"]=alphaPlus; |
---|
| 109 | map["alpha++"]=G4Alpha::Alpha(); |
---|
[961] | 110 | map["Ps-1s"]=positronium1s; |
---|
| 111 | map["Ps-2s"]=positronium2s; |
---|
| 112 | |
---|
[819] | 113 | } |
---|
| 114 | |
---|
[961] | 115 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
[819] | 116 | |
---|
[961] | 117 | G4DNAGenericIonsManager * G4DNAGenericIonsManager::theInstance(0); |
---|
[819] | 118 | |
---|