Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleTypeConverter.cc
Go to the documentation of this file.
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
29
30#include "G4Proton.hh"
31#include "G4Neutron.hh"
32#include "G4Gamma.hh"
33#include "G4PionPlus.hh"
34#include "G4PionZero.hh"
35#include "G4PionMinus.hh"
36#include "G4ParticleTable.hh"
38#include "G4KaonMinus.hh"
39#include "G4KaonPlus.hh"
40#include "G4KaonZero.hh"
41#include "G4AntiKaonZero.hh"
42#include "G4KaonZeroShort.hh"
43#include "G4KaonZeroLong.hh"
44#include "G4Lambda.hh"
45
47{
48 G4ShortLivedConstructor ShortLived;
49 ShortLived.ConstructParticle();
50
51 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4Proton::ProtonDefinition(), NUCLEON) );
52 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4Neutron::NeutronDefinition(), NUCLEON) );
53 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4Gamma::GammaDefinition(), GAMMA) );
54 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4PionPlus::PionPlusDefinition(), PION) );
55 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4PionZero::PionZeroDefinition(), PION) );
56 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4PionMinus::PionMinusDefinition(), PION) );
57 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4KaonMinus::KaonMinusDefinition(), KAON) );
58 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4KaonPlus::KaonPlusDefinition(), KAON) );
59 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4KaonZero::KaonZeroDefinition(), KAON) );
60 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4AntiKaonZero::AntiKaonZeroDefinition(), KAON) );
61 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4KaonZeroShort::KaonZeroShortDefinition(), KAON) );
62 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4KaonZeroLong::KaonZeroLongDefinition(), KAON) );
63 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4Lambda::LambdaDefinition(), Lambda) );
64
65 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(221), ETA) ); // eta
66 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(113), RHO) ); // rho0
67 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(213), RHO) ); // rho+
68 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(-213), RHO) ); // rho- ?????
69 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(223), omega) ); // omega
70
71 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2224), D1232) ); // D++
72 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2214), D1232) ); // D+
73 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2114), D1232) ); // D0
74 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1114), D1232) ); // D-
75
76 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(31114), D1600) ); // D-
77 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(32114), D1600) ); // D0
78 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(32214), D1600) ); // D+
79 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(32224), D1600) ); // D++
80
81 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1112), D1620) ); // D++
82 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1212), D1620) ); // D++
83 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2122), D1620) ); // D++
84 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2222), D1620) ); // D++
85
86 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(11114), D1700) ); // D++
87 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12114), D1700) ); // D++
88 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12214), D1700) ); // D++
89 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12224), D1700) ); // D++
90
91 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(11112), D1900) );
92 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(11212), D1900) );
93 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12122), D1900) );
94 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12222), D1900) );
95
96 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1116), D1905) );
97 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1216), D1905) );
98 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2126), D1905) );
99 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2226), D1905) );
100
101 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(21112), D1910) );
102 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(21212), D1910) );
103 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22122), D1910) );
104 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22222), D1910) );
105
106 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(21114), D1920) );
107 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22114), D1920) );
108 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22214), D1920) );
109 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22224), D1920) );
110
111 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(11116), D1930) );
112 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(11216), D1930) );
113 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12126), D1930) );
114 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12226), D1930) );
115
116 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1118), D1950) );
117 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2118), D1950) );
118 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2218), D1950) );
119 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2228), D1950) );
120
121 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12112), N1440) ); // N0
122 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12212), N1440) ); // N+
123 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1214), N1520) ); // N+
124 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2124), N1520) ); // N+
125 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22112), N1535) ); // N+
126 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22212), N1535) ); // N+
127 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(32112), N1650) ); // N+
128 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(32212), N1650) ); // N+
129 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2116), N1675) ); // N+
130 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2216), N1675) ); // N+
131 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12116), N1680) ); // N+
132 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12216), N1680) ); // N+
133 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(22124), N1700) ); // N+
134 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(21214), N1700) ); // N+
135 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(42212), N1710) ); // N+
136 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(42112), N1710) ); // N+
137 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(32124), N1720) ); // N+
138 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(31214), N1720) ); // N+
139 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(42124), N1900) ); // N+
140 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(41214), N1900) ); // N+
141 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12218), N1990) ); // N+
142 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(12118), N1990) ); // N+
143 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(52214), N2090) ); // N+
144 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(52114), N2090) ); // N+
145 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(2128), N2190) ); // N+
146 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(1218), N2190) ); // N+
147 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(100002210), N2220) ); // N+
148 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(100002110), N2220) ); // N+
149 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(100012210), N2250) ); // N+
150 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(100012110), N2250) ); // N+
151
152 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13122), L1405) );
153 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3124), L1520) );
154 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23122), L1600) );
155 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(33122), L1670) );
156 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13124), L1690) );
157 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(43122), L1800) );
158 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(53122), L1810) );
159 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3126), L1820) );
160 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13126), L1830) );
161 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23124), L1890) );
162 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3128), L2100) );
163 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23126), L2110) );
164
165 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3222), Sigma) );
166 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3212), Sigma) );
167 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3112), Sigma) );
168 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3224), S1385) );
169 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3114), S1385) );
170 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3214), S1385) );
171 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13222), S1660) );
172 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13112), S1660) );
173 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13212), S1660) );
174 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13224), S1670) );
175 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13114), S1670) );
176 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13214), S1670) );
177 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23222), S1750) );
178 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23112), S1750) );
179 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23212), S1750) );
180 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3226), S1775) );
181 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3116), S1775) );
182 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3216), S1775) );
183 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13226), S1915) );
184 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13116), S1915) );
185 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13216), S1915) );
186 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23224), S1940) );
187 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23114), S1940) );
188 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23214), S1940) );
189 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3228), S2030) );
190 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3118), S2030) );
191 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3218), S2030) );
192
193 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3324), X1530) );
194 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(3314), X1530) );
195 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23324), X1690) );
196 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(23314), X1690) );
197 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13324), X1820) );
198 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13314), X1820) );
199 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(33324), X1950) );
200 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(33314), X1950) );
201 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13326), X2030) );
202 defMap.push_back(std::pair<const G4ParticleDefinition*, GenericType>(G4ParticleTable::GetParticleTable()->FindParticle(13316), X2030) );
203
204
205// uMap[NUCLEON] = 1;
206// uMap[N1440] = 2;
207// uMap[D1232] = 12;
208// uMap[D1600] = 13;
209// uMap[GAMMA] = 100;
210// uMap[PION] = 101;
211}
212
213
215{
216 for(size_t i=0;i<defMap.size(); i++)
217 {
218 if(defMap[i].first == aParticleDef) return defMap[i].second;
219 }
220
221//GF G4cerr << "Unknown Particle : " << aParticleDef->GetParticleName() << G4endl;
222 return UNKNOWN;
223// throw G4HadronicException(__FILE__, __LINE__, "G4ParticleTypeConverter: unknown particle type!");
224}
225
227{
228 return GetGenericType(aTrack.GetDefinition());
229}
230
232{
233 //if (uMap.find(gType)!=uMap.end())
234 // hpw return uMap.operator[](gType);
235 //else
236 throw G4HadronicException(__FILE__, __LINE__, "G4ParticleTypeConverter: unknown particle type!");
237 return 0;
238}
239
241 const G4int isospin3) const
242{
243 MapIterator iter;
244 for (iter = defMap.begin(); iter!=defMap.end(); ++iter) {
245 G4ParticleTypeConverter::GenericType foo = (*iter).second;
246 if (gType==foo) {
247// G4cout << "convtype " << ((*iter).first)->GetParticleName() << G4endl;
248// G4cout << "conviso3 " << ((*iter).first)->GetPDGiIsospin3() << G4endl;
249 if (((*iter).first)->GetPDGiIsospin3()==isospin3)
250 return (*iter).first;
251 }
252 }
253// G4cout << "FindIso3State: can't find " << static_cast<G4int>(gType) << " with iso3 " << isospin3 << G4endl;
254 return nullptr;
255}
int G4int
Definition: G4Types.hh:85
static G4AntiKaonZero * AntiKaonZeroDefinition()
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:80
static G4KaonMinus * KaonMinusDefinition()
Definition: G4KaonMinus.cc:107
static G4KaonPlus * KaonPlusDefinition()
Definition: G4KaonPlus.cc:107
static G4KaonZeroLong * KaonZeroLongDefinition()
static G4KaonZeroShort * KaonZeroShortDefinition()
static G4KaonZero * KaonZeroDefinition()
Definition: G4KaonZero.cc:98
const G4ParticleDefinition * GetDefinition() const
static G4Lambda * LambdaDefinition()
Definition: G4Lambda.cc:102
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:98
static G4ParticleTable * GetParticleTable()
GenericType GetGenericType(const G4ParticleDefinition *const aParticleDef) const
const G4ParticleDefinition * FindIso3State(const GenericType gType, const G4int isospin3) const
G4int GetUrqmdItyp(GenericType gType) const
static G4PionMinus * PionMinusDefinition()
Definition: G4PionMinus.cc:92
static G4PionPlus * PionPlusDefinition()
Definition: G4PionPlus.cc:92
static G4PionZero * PionZeroDefinition()
Definition: G4PionZero.cc:102
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:87