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 | // |
---|
26 | // |
---|
27 | // $Id: G4DNAGenericIonsManager.cc,v 1.4 2006/06/29 19:39:24 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: $ |
---|
29 | |
---|
30 | #include "G4DNAGenericIonsManager.hh" |
---|
31 | #include "G4Alpha.hh" |
---|
32 | #include "G4Ions.hh" |
---|
33 | |
---|
34 | G4DNAGenericIonsManager * G4DNAGenericIonsManager :: Instance(void) |
---|
35 | { |
---|
36 | if (!theInstance) |
---|
37 | theInstance=new G4DNAGenericIonsManager; |
---|
38 | |
---|
39 | return theInstance; |
---|
40 | } |
---|
41 | |
---|
42 | G4ParticleDefinition * G4DNAGenericIonsManager :: GetIon(const G4String & name) |
---|
43 | { |
---|
44 | IonsMap::const_iterator i(map.find(name)); |
---|
45 | |
---|
46 | if (i==map.end()) |
---|
47 | return 0; |
---|
48 | |
---|
49 | // return map[name]; |
---|
50 | |
---|
51 | return i->second; |
---|
52 | } |
---|
53 | |
---|
54 | G4DNAGenericIonsManager :: G4DNAGenericIonsManager() |
---|
55 | { |
---|
56 | // name mass width charge |
---|
57 | // 2*spin parity C-conjugation |
---|
58 | // 2*Isospin 2*Isospin3 G-parity |
---|
59 | // type lepton number baryon number PDG encoding |
---|
60 | // stable lifetime decay table |
---|
61 | |
---|
62 | |
---|
63 | G4Ions *helium; |
---|
64 | G4Ions *hydrogen; |
---|
65 | G4Ions *alphaPlus; |
---|
66 | |
---|
67 | helium= new G4Ions("helium", 3.727417*GeV, 0.0*MeV, +0.0*eplus, |
---|
68 | 0, +1, 0, |
---|
69 | 0, 0, 0, |
---|
70 | "nucleus", +2, +4, 0, |
---|
71 | true, -1.0, 0, false, |
---|
72 | "", 0, 0.0); |
---|
73 | |
---|
74 | alphaPlus= new G4Ions("alpha+", 3.727417*GeV, 0.0*MeV, +1.0*eplus, |
---|
75 | 1, +1, 0, |
---|
76 | 0, 0, 0, |
---|
77 | "nucleus", +1, +4, 0, |
---|
78 | true, -1.0, 0, false, |
---|
79 | "", 0, 0.0); |
---|
80 | |
---|
81 | hydrogen= new G4Ions("hydrogen", 0.9382723*GeV, 0.0*MeV, +0.0*eplus, |
---|
82 | 0, +1, 0, |
---|
83 | 0, 0, 0, |
---|
84 | "nucleus", +1, +1, 0, |
---|
85 | true, -1.0, 0, false, |
---|
86 | "", 0, 0.0); |
---|
87 | |
---|
88 | map["helium"]=helium; |
---|
89 | map["hydrogen"]=hydrogen; |
---|
90 | map["alpha+"]=alphaPlus; |
---|
91 | map["alpha++"]=G4Alpha::Alpha(); |
---|
92 | } |
---|
93 | |
---|
94 | |
---|
95 | G4DNAGenericIonsManager * G4DNAGenericIonsManager::theInstance(0); |
---|
96 | |
---|