File indexing completed on 2025-01-18 09:59:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 #ifndef G4QMDParticipant_hh
0040 #define G4QMDParticipant_hh
0041
0042 #include <CLHEP/Units/SystemOfUnits.h>
0043
0044 #include "G4ParticleDefinition.hh"
0045 #include "G4ThreeVector.hh"
0046 #include "G4LorentzVector.hh"
0047
0048 class G4QMDParticipant
0049 {
0050 public:
0051
0052 G4QMDParticipant( const G4ParticleDefinition* , G4ThreeVector , G4ThreeVector );
0053 ~G4QMDParticipant();
0054
0055 void SetDefinition( const G4ParticleDefinition* pd ) { definition = pd; };
0056 const G4ParticleDefinition* GetDefinition() { return definition; };
0057
0058 void SetPosition( G4ThreeVector r ) { position = r; };
0059 G4ThreeVector GetPosition() { return position; };
0060
0061 void SetMomentum( G4ThreeVector p ) { momentum = p; };
0062 G4ThreeVector GetMomentum() { return momentum; };
0063
0064 G4double GetMass() { return definition->GetPDGMass()/CLHEP::GeV; };
0065
0066 G4LorentzVector Get4Momentum();
0067
0068 G4double GetKineticEnergy() { return Get4Momentum().e() - GetMass(); };
0069
0070 G4int GetBaryonNumber() { return definition->GetBaryonNumber(); };
0071 G4int GetNuc() { return definition->GetBaryonNumber(); };
0072
0073 G4int GetChargeInUnitOfEplus() { return int ( definition->GetPDGCharge()/CLHEP::eplus ); };
0074
0075 void UnsetInitialMark() { projectile = false; target = false; }
0076 void UnsetHitMark() { hit = false; }
0077 G4bool IsThisHit() { return hit; }
0078 void SetHitMark() { hit = true; }
0079
0080 void SetProjectile() { projectile = true; }
0081 void SetTarget() { target = true; }
0082 G4bool IsThisProjectile() { return projectile; }
0083 G4bool IsThisTarget() { return target; }
0084
0085 private:
0086 const G4ParticleDefinition* definition;
0087 G4ThreeVector momentum;
0088 G4ThreeVector position;
0089
0090 G4bool projectile;
0091 G4bool target;
0092 G4bool hit;
0093 };
0094
0095 #endif