Warning, file /include/Geant4/G4Parton.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 #ifndef G4Parton_h
0030 #define G4Parton_h 1
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #include "globals.hh"
0041 #include "G4ThreeVector.hh"
0042 #include "G4LorentzVector.hh"
0043 #include <iostream>
0044 #include "G4ParticleTable.hh"
0045 #include "Randomize.hh"
0046
0047 class G4Parton
0048 {
0049 public:
0050 G4Parton()
0051 {
0052
0053
0054
0055 PDGencoding=(G4int)(2.*G4UniformRand());
0056 theColour = (G4int)(3.*G4UniformRand())+1;
0057 theIsoSpinZ = ((G4int)(G4UniformRand()))-0.5;
0058 theSpinZ = ((G4int)(G4UniformRand()))-0.5;
0059 }
0060
0061 G4Parton(G4int PDGencoding);
0062 G4Parton(const G4Parton &right);
0063
0064 ~G4Parton();
0065
0066 G4Parton & operator=(const G4Parton &right);
0067
0068 G4bool operator==(const G4Parton &right) const;
0069
0070 G4bool operator!=(const G4Parton &right) const;
0071
0072 G4int GetPDGcode() const;
0073
0074 G4ParticleDefinition * GetDefinition();
0075 void SetDefinition(G4ParticleDefinition * aDefinition);
0076
0077 void DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection);
0078 void DefineMomentumInZ(G4double aLightConeMomentum,G4double aLightConeE, G4bool aDirection);
0079
0080 const G4ThreeVector & GetPosition()const;
0081 void SetPosition(const G4ThreeVector &aPosition);
0082
0083 const G4LorentzVector & Get4Momentum() const;
0084 void Set4Momentum(const G4LorentzVector & aMomentum);
0085
0086 void SetX(G4double anX) { theX = anX; }
0087 G4double GetX() {return theX;}
0088
0089 void SetColour(G4int aColour) {theColour = aColour;}
0090 G4int GetColour() {return theColour;}
0091
0092 void SetIsoSpinZ(G4double anIsoSpinZ) {theIsoSpinZ = anIsoSpinZ;}
0093 G4double GetIsoSpinZ() {return theIsoSpinZ;}
0094
0095 void SetSpinZ(G4double aSpinZ) {theSpinZ = aSpinZ;}
0096 G4double GetSpinZ() {return theSpinZ;}
0097
0098 private:
0099 G4double GetMass();
0100
0101 public:
0102 G4int PDGencoding;
0103 G4ParticleDefinition * theDefinition;
0104
0105 private:
0106 G4LorentzVector theMomentum;
0107 G4ThreeVector thePosition;
0108
0109 G4int theColour;
0110 G4double theIsoSpinZ;
0111 G4double theSpinZ;
0112
0113 G4double theX;
0114
0115 };
0116
0117 inline G4bool G4Parton::operator==(const G4Parton &right) const
0118 {
0119 return this==&right;
0120 }
0121
0122 inline G4bool G4Parton::operator!=(const G4Parton &right) const
0123 {
0124 return this!=&right;
0125 }
0126
0127 inline G4int G4Parton::GetPDGcode() const
0128 {
0129 return PDGencoding;
0130 }
0131
0132 inline const G4ThreeVector & G4Parton::GetPosition() const
0133 {
0134 return thePosition;
0135 }
0136
0137 inline void G4Parton::SetPosition(const G4ThreeVector &aPosition)
0138 {
0139 thePosition=aPosition;
0140 }
0141
0142
0143 inline const G4LorentzVector & G4Parton::Get4Momentum() const
0144 {
0145 return theMomentum;
0146 }
0147
0148 inline void G4Parton::Set4Momentum(const G4LorentzVector & aMomentum)
0149 {
0150 theMomentum=aMomentum;
0151 }
0152
0153
0154 inline
0155 G4double G4Parton::GetMass()
0156 {
0157 return theDefinition->GetPDGMass();
0158 }
0159
0160 inline
0161 G4ParticleDefinition * G4Parton::GetDefinition()
0162 {
0163 return theDefinition;
0164 }
0165
0166 inline void G4Parton::SetDefinition(G4ParticleDefinition * aDefinition)
0167 {
0168 theDefinition = aDefinition;
0169 PDGencoding = theDefinition->GetPDGEncoding();
0170 }
0171
0172
0173 #endif