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 #ifndef G4QHadron_h
00040 #define G4QHadron_h 1
00041
00042 #include "globals.hh"
00043 #include "G4ThreeVector.hh"
00044 #include "G4LorentzVector.hh"
00045 #include "Randomize.hh"
00046 #include "G4QParticle.hh"
00047 #include "G4QPartonVector.hh"
00048 #include "G4QPartonPair.hh"
00049 #include "G4LorentzRotation.hh"
00050 #include <list>
00051
00052 class G4QHadron
00053 {
00054 public:
00055
00056 G4QHadron();
00057 G4QHadron(G4LorentzVector p);
00058 G4QHadron(G4int PDGcode, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));
00059 G4QHadron(G4QPDGCode QPDG, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));
00060 G4QHadron(G4QContent QC, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));
00061 G4QHadron(G4int PDG, G4double m, G4QContent QC);
00062 G4QHadron(G4QPDGCode QPDG, G4double m, G4QContent QC);
00063 G4QHadron(G4int PDG, G4LorentzVector p, G4QContent QC);
00064 G4QHadron(G4QPDGCode QPDG, G4LorentzVector p, G4QContent QC);
00065 G4QHadron(G4QParticle* pPart, G4double maxM);
00066 G4QHadron(const G4QHadron& right);
00067 G4QHadron(const G4QHadron* right);
00068 G4QHadron(const G4QHadron* right, G4int ColC, G4ThreeVector Pos, G4LorentzVector Mom);
00069 virtual ~G4QHadron();
00070
00071 const G4QHadron& operator=(const G4QHadron& right);
00072 G4bool operator==(const G4QHadron& right) const;
00073 G4bool operator!=(const G4QHadron& right) const;
00074
00075 G4int GetPDGCode() const;
00076 G4int GetQCode() const;
00077 G4QPDGCode GetQPDG() const;
00078 G4double GetSpin() const{return .5*(GetPDGCode()%10-1);}
00079 G4LorentzVector Get4Momentum() const{return theMomentum;}
00080 G4ThreeVector Get3Momentum() const{return theMomentum.vect();}
00081 G4double GetEnergy() const{return theMomentum.e();}
00082 G4QContent GetQC() const;
00083 G4double GetMass() const;
00084 G4double GetMass2() const;
00085 G4double GetWidth() const;
00086 G4int GetNFragments() const;
00087 G4int GetCharge() const;
00088 G4int GetStrangeness() const;
00089 G4int GetBaryonNumber() const;
00090 const G4ThreeVector& GetPosition() const;
00091 G4double GetBindingEnergy() {return bindE;}
00092 G4double GetFormationTime() {return formTime;}
00093 std::list<G4QParton*> GetColor() {return Color;}
00094 std::list<G4QParton*> GetAntiColor() {return AntiColor;}
00095
00096 void SetQPDG(const G4QPDGCode& QPDG);
00097 void SetPDGCode(const G4QPDGCode& PDG){SetQPDG(G4QPDGCode(PDG));}
00098 void Set4Momentum(const G4LorentzVector& aMom);
00099 void SetQC(const G4QContent& newQC);
00100 void SetNFragments(const G4int& nf);
00101 void NegPDGCode();
00102 void MakeAntiHadron();
00103 void SetPosition(const G4ThreeVector& aPosition);
00104 void IncrementCollisionCount(G4int aCount) {theCollisionCount+=aCount;}
00105 void SplitUp();
00106 G4QPartonPair* SplitInTwoPartons();
00107 G4QParton* GetNextParton();
00108 G4QParton* GetNextAntiParton();
00109 void SetBindingEnergy(G4double aBindE){bindE=aBindE;}
00110 void Boost(const G4LorentzVector& theBoost);
00111 void Boost(const G4ThreeVector& B){theMomentum.boost(B);}
00112 void LorentzRotate(const G4LorentzRotation& rotation){theMomentum=rotation*theMomentum;}
00113 void SetFormationTime(G4double fT){formTime=fT;}
00114
00115
00116 G4double RandomizeMass(G4QParticle* pPart, G4double maxM);
00117 G4bool TestRealNeutral();
00118 G4bool DecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom);
00119 G4bool CorMDecayIn2(G4double corM, G4LorentzVector& fr4Mom);
00120 G4bool CorEDecayIn2(G4double corE, G4LorentzVector& fr4Mom);
00121 G4bool RelDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& dir,
00122 G4double maxCost = 1., G4double minCost = -1.);
00123 G4bool CopDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& dir,
00124 G4double cop);
00125 G4bool DecayIn3(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& t4Mom);
00126 G4bool RelDecayIn3(G4LorentzVector& fh4M, G4LorentzVector& sh4M, G4LorentzVector& th4Mom,
00127 G4LorentzVector& dir, G4double maxCost = 1., G4double minCost = -1.);
00128 G4bool CopDecayIn3(G4LorentzVector& fh4M, G4LorentzVector& sh4M, G4LorentzVector& th4Mom,
00129 G4LorentzVector& dir, G4double cosp);
00130 void Init3D();
00131 private:
00132
00133 void DefineQC(G4int PDGCode);
00134 G4QParton* BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode);
00135 G4double SampleCHIPSX(G4double anXtot, G4int nSea);
00136 G4double* RandomX(G4int nPart);
00137 void GetValenceQuarkFlavors(G4QParton* &Part1,G4QParton* &Part2);
00138 G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare);
00139 G4bool SplitMeson(G4int PDGcode, G4int* aEnd, G4int* bEnd);
00140 G4bool SplitBaryon(G4int PDGcode, G4int* aEnd, G4int* bEnd);
00141
00142 protected:
00143 G4LorentzVector theMomentum;
00144
00145 private:
00146
00147 static G4double StrangeSuppress;
00148 static G4double sigmaPt;
00149 static G4double widthOfPtSquare;
00150
00151 G4QPDGCode theQPDG;
00152 G4QContent valQ;
00153 G4int nFragm;
00154
00155 G4ThreeVector thePosition;
00156 G4int theCollisionCount;
00157 G4bool isSplit;
00158 G4bool Direction;
00159 std::list<G4QParton*> Color;
00160 std::list<G4QParton*> AntiColor;
00161 G4double bindE;
00162 G4double formTime;
00163 };
00164
00165 typedef std::pair<G4QHadron*, G4QHadron*> G4QHadronPair;
00166
00167 inline G4bool G4QHadron::operator==(const G4QHadron &rhs) const {return this==&rhs;}
00168 inline G4bool G4QHadron::operator!=(const G4QHadron &rhs) const {return this!=&rhs;}
00169
00170 inline G4int G4QHadron::GetPDGCode() const {return theQPDG.GetPDGCode();}
00171 inline G4int G4QHadron::GetQCode() const {return theQPDG.GetQCode();}
00172 inline G4QPDGCode G4QHadron::GetQPDG() const {return theQPDG;}
00173 inline G4QContent G4QHadron::GetQC() const {return valQ;}
00174 inline G4int G4QHadron::GetNFragments() const {return nFragm;}
00175
00176 inline G4double G4QHadron::GetMass() const {return theMomentum.m();}
00177 inline G4double G4QHadron::GetMass2() const {return theMomentum.m2();}
00178
00179 inline G4int G4QHadron::GetCharge() const {return valQ.GetCharge();}
00180 inline G4int G4QHadron::GetStrangeness() const {return valQ.GetStrangeness();}
00181 inline G4int G4QHadron::GetBaryonNumber() const {return valQ.GetBaryonNumber();}
00182 inline const G4ThreeVector& G4QHadron::GetPosition() const {return thePosition;}
00183
00184
00185 inline void G4QHadron::MakeAntiHadron() {if(TestRealNeutral()) NegPDGCode();}
00186 inline void G4QHadron::SetQC(const G4QContent& newQC) {valQ=newQC;}
00187 inline void G4QHadron::Set4Momentum(const G4LorentzVector& aMom) {theMomentum=aMom;}
00188 inline void G4QHadron::SetNFragments(const G4int& nf) {nFragm=nf;}
00189 inline void G4QHadron::SetPosition(const G4ThreeVector& position) {thePosition=position;}
00190
00191 inline void G4QHadron::NegPDGCode() {theQPDG.NegPDGCode(); valQ.Anti();}
00192 inline G4bool G4QHadron::TestRealNeutral() { return theQPDG.TestRealNeutral();}
00193
00194 #endif