00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #ifndef G4ParticleTable_h
00049 #define G4ParticleTable_h 1
00050
00051 #include "G4ios.hh"
00052 #include "globals.hh"
00053 #include "G4ParticleDefinition.hh"
00054
00055
00056 #include <map>
00057 #include "G4ParticleTableIterator.hh"
00058
00059 class G4UImessenger;
00060 class G4ParticleMessenger;
00061 class G4IonTable;
00062 class G4ShortLivedTable;
00063
00064 class G4ParticleTable
00065 {
00066
00067
00068
00069
00070
00071
00072
00073
00074 public:
00075
00076 typedef G4ParticleTableIterator<G4String, G4ParticleDefinition*>::Map G4PTblDictionary;
00077 typedef G4ParticleTableIterator<G4String, G4ParticleDefinition*> G4PTblDicIterator;
00078 typedef G4ParticleTableIterator<G4int, G4ParticleDefinition*>::Map G4PTblEncodingDictionary;
00079 typedef G4ParticleTableIterator<G4int, G4ParticleDefinition*> G4PTblEncodingDicIterator;
00080
00081 protected:
00082
00083 G4ParticleTable();
00084
00085 G4ParticleTable(const G4ParticleTable &right);
00086 G4ParticleTable & operator=(const G4ParticleTable &);
00087
00088 public:
00089 virtual ~G4ParticleTable();
00090
00091 public:
00092 static G4ParticleTable* GetParticleTable();
00093
00094
00095
00096
00097
00098 G4bool contains(const G4ParticleDefinition *particle);
00099 G4bool contains(const G4String &particle_name);
00100
00101
00102 G4int entries() const;
00103 G4int size() const;
00104
00105
00106 G4ParticleDefinition* GetParticle(G4int index);
00107
00108
00109
00110 const G4String& GetParticleName(G4int index);
00111
00112
00113 G4ParticleDefinition* FindParticle(G4int PDGEncoding );
00114 G4ParticleDefinition* FindParticle(const G4String &particle_name);
00115 G4ParticleDefinition* FindParticle(const G4ParticleDefinition *particle);
00116
00117
00118 G4ParticleDefinition* FindAntiParticle(G4int PDGEncoding );
00119 G4ParticleDefinition* FindAntiParticle(const G4String &particle_name);
00120 G4ParticleDefinition* FindAntiParticle(const G4ParticleDefinition *particle);
00121
00122
00123 G4ParticleDefinition* FindIon( G4int atomicNumber,
00124 G4int atomicMass,
00125 G4double excitationEnergy );
00126 G4ParticleDefinition* FindIon( G4int atomicNumber,
00127 G4int atomicMass,
00128 G4int numberOfLambda,
00129 G4double excitationEnergy );
00130
00131
00132
00133 G4ParticleDefinition* GetIon( G4int atomicNumber,
00134 G4int atomicMass,
00135 G4double excitationEnergy);
00136 G4ParticleDefinition* GetIon( G4int atomicNumber,
00137 G4int atomicMass,
00138 G4int numberOfLambda,
00139 G4double excitationEnergy);
00140
00141
00142
00143 G4ParticleDefinition* FindIon( G4int atomicNumber,
00144 G4int atomicMass,
00145 G4int dummy1,
00146 G4int dummy2 );
00147
00148
00149
00150
00151
00152 G4PTblDicIterator* GetIterator();
00153
00154
00155 void DumpTable(const G4String &particle_name = "ALL");
00156
00157
00158 public:
00159
00160 G4IonTable* GetIonTable();
00161
00162
00163 const G4ShortLivedTable* GetShortLivedTable();
00164
00165
00166 public:
00167 G4ParticleDefinition* Insert(G4ParticleDefinition *particle);
00168
00169
00170
00171
00172
00173
00174 G4ParticleDefinition* Remove(G4ParticleDefinition *particle);
00175
00176
00177 void RemoveAllParticles();
00178
00179
00180 void DeleteAllParticles();
00181
00182
00183 public:
00184 G4UImessenger* CreateMessenger();
00185 void DeleteMessenger();
00186
00187
00188 protected:
00189 G4PTblDictionary* GetDictionary();
00190
00191 const G4String& GetKey(const G4ParticleDefinition *particle) const;
00192
00193
00194 const G4PTblEncodingDictionary* GetEncodingDictionary();
00195
00196
00197 private:
00198 G4int verboseLevel;
00199
00200
00201
00202
00203
00204 public:
00205 void SetVerboseLevel(G4int value);
00206 G4int GetVerboseLevel() const;
00207
00208 private:
00209 G4ParticleMessenger* fParticleMessenger;
00210 G4PTblDictionary* fDictionary;
00211 G4PTblDicIterator* fIterator;
00212 G4PTblEncodingDictionary* fEncodingDictionary;
00213
00214 static G4ParticleTable* fgParticleTable;
00215
00216 G4IonTable* fIonTable;
00217 G4ShortLivedTable* fShortLivedTable;
00218
00219 G4String noName;
00220
00221 G4bool readyToUse;
00222
00223 public:
00224 void SetReadiness(G4bool val=true);
00225 G4bool GetReadiness() const;
00226 private:
00227 void CheckReadiness();
00228 };
00229 #include "G4ParticleTable.icc"
00230
00231 #endif
00232
00233
00234
00235
00236
00237