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 G4DynamicParticle_h
00049 #define G4DynamicParticle_h 1
00050
00051 #include <cmath>
00052 #include <CLHEP/Units/SystemOfUnits.h>
00053
00054 #include "globals.hh"
00055 #include "G4ios.hh"
00056
00057 #include "G4ParticleDefinition.hh"
00058 #include "G4Allocator.hh"
00059 #include "G4LorentzVector.hh"
00060
00061 #include "G4ParticleMomentum.hh"
00062
00063
00064
00065
00066 #include "G4ElectronOccupancy.hh"
00067
00068
00069 class G4PrimaryParticle;
00070 class G4VProcess;
00071 class G4DecayProducts;
00072
00073 class G4DynamicParticle
00074 {
00075
00076
00077
00078
00079
00080
00081
00082 public:
00083
00084 G4DynamicParticle();
00085
00086 G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
00087 const G4ThreeVector& aMomentumDirection,
00088 G4double aKineticEnergy);
00089 G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
00090 const G4ThreeVector& aParticleMomentum);
00091 G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
00092 const G4LorentzVector &aParticleMomentum);
00093 G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
00094 G4double aTotalEnergy,
00095 const G4ThreeVector &aParticleMomentum);
00096
00097 G4DynamicParticle(const G4DynamicParticle &right);
00098
00099
00100 ~G4DynamicParticle();
00101
00102
00103 G4DynamicParticle & operator=(const G4DynamicParticle &right);
00104 G4int operator==(const G4DynamicParticle &right) const;
00105 G4int operator!=(const G4DynamicParticle &right) const;
00106
00107
00108 inline void *operator new(size_t);
00109 inline void operator delete(void *aDynamicParticle);
00110
00111
00112
00113 const G4ThreeVector& GetMomentumDirection() const;
00114
00115 void SetMomentumDirection(const G4ThreeVector &aDirection);
00116
00117 void SetMomentumDirection(G4double px, G4double py, G4double pz);
00118
00119
00120 G4ThreeVector GetMomentum() const;
00121
00122 void SetMomentum( const G4ThreeVector &momentum);
00123
00124
00125 G4LorentzVector Get4Momentum() const;
00126
00127 void Set4Momentum( const G4LorentzVector &momentum);
00128
00129
00130
00131 G4double GetTotalMomentum() const;
00132
00133 G4double GetTotalEnergy() const;
00134
00135
00136 G4double GetKineticEnergy() const;
00137
00138 void SetKineticEnergy(G4double aEnergy);
00139
00140
00141
00142 G4double GetProperTime() const;
00143
00144 void SetProperTime( G4double );
00145
00146
00147
00148 const G4ThreeVector& GetPolarization() const;
00149 void SetPolarization(G4double polX, G4double polY, G4double polZ);
00150
00151
00152
00153 G4double GetMass() const;
00154 void SetMass(G4double mass);
00155
00156
00157
00158
00159 G4double GetCharge() const;
00160 void SetCharge(G4double charge);
00161 void SetCharge(G4int chargeInUnitOfEplus);
00162
00163
00164
00165 G4double GetSpin() const;
00166 void SetSpin(G4double spin);
00167 void SetSpin(G4int spinInUnitOfHalfInteger);
00168
00169
00170
00171 G4double GetMagneticMoment() const;
00172 void SetMagneticMoment(G4double magneticMoment);
00173
00174
00175
00176
00177 const G4ElectronOccupancy* GetElectronOccupancy() const;
00178
00179
00180 G4int GetTotalOccupancy() const;
00181 G4int GetOccupancy(G4int orbit) const;
00182 void AddElectron(G4int orbit, G4int number = 1);
00183 void RemoveElectron(G4int orbit, G4int number = 1);
00184
00185
00186 const G4ParticleDefinition* GetParticleDefinition() const;
00187 void SetDefinition(const G4ParticleDefinition * aParticleDefinition);
00188
00189
00190
00191 G4ParticleDefinition* GetDefinition() const;
00192
00193
00194 const G4DecayProducts *GetPreAssignedDecayProducts() const;
00195 void SetPreAssignedDecayProducts(G4DecayProducts *aDecayProducts);
00196
00197
00198 G4double GetPreAssignedDecayProperTime() const;
00199 void SetPreAssignedDecayProperTime(G4double);
00200
00201
00202
00203
00204 void DumpInfo(G4int mode= 0) const;
00205
00206
00207
00208 protected:
00209 void AllocateElectronOccupancy();
00210 G4double GetElectronMass() const;
00211
00212 protected:
00213 G4ThreeVector theMomentumDirection;
00214
00215
00216 const G4ParticleDefinition *theParticleDefinition;
00217
00218
00219 G4ThreeVector thePolarization;
00220
00221 G4double theKineticEnergy;
00222
00223 G4double theProperTime;
00224
00225 G4double theDynamicalMass;
00226
00227 G4double theDynamicalCharge;
00228
00229 G4double theDynamicalSpin;
00230
00231 G4double theDynamicalMagneticMoment;
00232
00233 G4ElectronOccupancy* theElectronOccupancy;
00234
00235 G4DecayProducts *thePreAssignedDecayProducts;
00236
00237 G4double thePreAssignedDecayTime;
00238
00239 protected:
00240 G4int verboseLevel;
00241
00242 public:
00243 void SetVerboseLevel(G4int value);
00244 G4int GetVerboseLevel() const;
00245
00246
00247
00248
00249
00250 protected:
00251 G4PrimaryParticle* primaryParticle;
00252
00253
00254
00255
00256 public:
00257 void SetPrimaryParticle(G4PrimaryParticle* p);
00258 void SetPDGcode(G4int c);
00259
00260 public:
00261 G4PrimaryParticle* GetPrimaryParticle() const;
00262
00263
00264
00265
00266 G4int GetPDGcode() const;
00267
00268
00269
00270
00271
00272
00273 protected:
00274 G4int thePDGcode;
00275 };
00276
00277 #include "G4DynamicParticle.icc"
00278
00279 #endif