Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4QHadron.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id$
28//
29// ---------------- G4QHadron ----------------
30// by Mikhail Kossov, Sept 1999.
31// class header for Hadrons generated by the CHIPS Model
32// ------------------------------------------------------
33// Short description: In CHIPS all particles are G4QHadrons, while they
34// can be leptons, gammas or nuclei. The G4QPDGCode makes the difference.
35// In addition the 4-momentum is a basic value, so the mass can be
36// different from the GS mass (e.g. for the virtual gamma).
37// -------------------------------------------------------------------
38
39#ifndef G4QHadron_h
40#define G4QHadron_h 1
41
42#include "globals.hh"
43#include "G4ThreeVector.hh"
44#include "G4LorentzVector.hh"
45#include "Randomize.hh"
46#include "G4QParticle.hh"
47#include "G4QPartonVector.hh"
48#include "G4QPartonPair.hh"
49#include "G4LorentzRotation.hh"
50#include <list>
51
53{
54public:
55 // Constructors
56 G4QHadron(); // Default Constructor
57 G4QHadron(G4LorentzVector p); // Kinematical Constructor
58 G4QHadron(G4int PDGcode, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));//CHIPS-W Hadron
59 G4QHadron(G4QPDGCode QPDG, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));//CHIPS-W Had.
60 G4QHadron(G4QContent QC, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));//QC C-W Hadron
61 G4QHadron(G4int PDG, G4double m, G4QContent QC); // Constructor for Chipolino or Quasmon
62 G4QHadron(G4QPDGCode QPDG, G4double m, G4QContent QC);// Constr. for Chipolino or Quasmon
63 G4QHadron(G4int PDG, G4LorentzVector p, G4QContent QC);// Constr for Chipolino or Quasmon
64 G4QHadron(G4QPDGCode QPDG, G4LorentzVector p, G4QContent QC);// Con. for Chipo or Quasmon
65 G4QHadron(G4QParticle* pPart, G4double maxM); // Constructor for Res with RANDOM mass
66 G4QHadron(const G4QHadron& right); // Copy constructor by object
67 G4QHadron(const G4QHadron* right); // Copy constructor by pointer
68 G4QHadron(const G4QHadron* right, G4int ColC, G4ThreeVector Pos, G4LorentzVector Mom);
69 virtual ~G4QHadron(); // Destructor
70 // Operators
71 const G4QHadron& operator=(const G4QHadron& right);
72 G4bool operator==(const G4QHadron& right) const;
73 G4bool operator!=(const G4QHadron& right) const;
74 // Selectors
75 G4int GetPDGCode() const; // Get PDG code of the Hadron
76 G4int GetQCode() const; // Get Q code of the Hadron
77 G4QPDGCode GetQPDG() const; // Get QPDG of the Hadron
78 G4double GetSpin() const{return .5*(GetPDGCode()%10-1);}
79 G4LorentzVector Get4Momentum() const{return theMomentum;} // Get 4-mom of Hadron
80 G4ThreeVector Get3Momentum() const{return theMomentum.vect();}// Get 3-mom ofH
81 G4double GetEnergy() const{return theMomentum.e();} // Get E of Hadron
82 G4QContent GetQC() const; // Get private quark content
83 G4double GetMass() const; // Get a mass of the Hadron
84 G4double GetMass2() const; // Get an m^2 value for the Hadron
85 G4double GetWidth() const; // Get Width of Hadron
86 G4int GetNFragments() const; // Get a#of Fragments of this Hadron
87 G4int GetCharge() const; // Get Charge of the Hadron
88 G4int GetStrangeness() const; // Get Strangeness of the Hadron
89 G4int GetBaryonNumber() const; // Get Baryon Number of the Hadron
90 const G4ThreeVector& GetPosition() const; // Get hadron coordinates
91 G4double GetBindingEnergy() {return bindE;}// Returns binding E in NucMatter
92 G4double GetFormationTime() {return formTime;} // Returns formation time
93 std::list<G4QParton*> GetColor() {return Color;} // pointer to quarks/anti-diquarks
94 std::list<G4QParton*> GetAntiColor() {return AntiColor;}//pointer to anti-quarks/diquarks
95 // Modifiers
96 void SetQPDG(const G4QPDGCode& QPDG); // Set QPDG of the Hadron
97 void SetPDGCode(const G4QPDGCode& PDG){SetQPDG(G4QPDGCode(PDG));}// Set PDGCode of Hadron
98 void Set4Momentum(const G4LorentzVector& aMom); // Set 4-mom of the Hadron
99 void SetQC(const G4QContent& newQC); // Set new private quark content
100 void SetNFragments(const G4int& nf); // Set a#of Fragments of this Hadron
101 void NegPDGCode(); // Change a sign of the PDG code
102 void MakeAntiHadron(); // Make AntiHadron of this Hadron
103 void SetPosition(const G4ThreeVector& aPosition); // Set coordinates of hadron position
104 void IncrementCollisionCount(G4int aCount) {theCollisionCount+=aCount;}// IncrTheCCounter
105 void SplitUp(); // Make QGSM String Splitting of Hadron
106 G4QPartonPair* SplitInTwoPartons(); // RandomSplit ofTheHadron in 2 partons
107 G4QParton* GetNextParton(); // Next Parton in a string
108 G4QParton* GetNextAntiParton(); // Next Anti-Parton in a string
109 void SetBindingEnergy(G4double aBindE){bindE=aBindE;}// Set Binding E in Nuclear Matter
110 void Boost(const G4LorentzVector& theBoost); // Boosts hadron's 4-Momentum using 4M
111 void Boost(const G4ThreeVector& B){theMomentum.boost(B);} // Boosts 4-Momentum using v/c
113 void SetFormationTime(G4double fT){formTime=fT;} // Defines formationTime for the Hadron
114
115 // General
116 G4double RandomizeMass(G4QParticle* pPart, G4double maxM); // Randomize a mass value
119 G4bool CorMDecayIn2(G4double corM, G4LorentzVector& fr4Mom);// This(newMass corM)+fr4Mom
120 G4bool CorEDecayIn2(G4double corE, G4LorentzVector& fr4Mom);// This(E+=cE,P)+f(fE-=cE,fP)
122 G4double maxCost = 1., G4double minCost = -1.);
124 G4double cop);
127 G4LorentzVector& dir, G4double maxCost = 1., G4double minCost = -1.);
129 G4LorentzVector& dir, G4double cosp);
130 void Init3D(); // Initializes 3D nucleus with (Pos,4M)nucleons
131private:
132 // Private methods
133 void DefineQC(G4int PDGCode);
134 G4QParton* BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode);
135 G4double SampleCHIPSX(G4double anXtot, G4int nSea);
136 G4double* RandomX(G4int nPart);
137 void GetValenceQuarkFlavors(G4QParton* &Part1,G4QParton* &Part2);
138 G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare);
139 G4bool SplitMeson(G4int PDGcode, G4int* aEnd, G4int* bEnd);
140 G4bool SplitBaryon(G4int PDGcode, G4int* aEnd, G4int* bEnd);
141
142protected:
143 G4LorentzVector theMomentum; // The 4-mom of Hadron
144
145private:
146 // Static Parameters of QGSM Splitting
147 static G4double StrangeSuppress; // ? M.K.
148 static G4double sigmaPt; // Can be 0 ?
149 static G4double widthOfPtSquare; // ? M.K.
150 // Body
151 G4QPDGCode theQPDG; // Instance of QPDG for the Hadron
152 G4QContent valQ; // QC (@@ for Quasmon and Chipolino?)
153 G4int nFragm; // 0 - stable, N - decayed in N part's
154 // Body of Splitable Hadron and Nuclear Nucleon
155 G4ThreeVector thePosition; // Coordinates of Hadron position
156 G4int theCollisionCount; // ?
157 G4bool isSplit; // Flag, that splitting was done
158 G4bool Direction; // FALSE=target, TRUE=projectile
159 std::list<G4QParton*> Color; // container for quarks & anti-diquarks
160 std::list<G4QParton*> AntiColor; // container for anti-quarks & diquarks
161 G4double bindE; // Binding energy in nuclear matter
162 G4double formTime; // Formation time for the hadron
163};
164
165typedef std::pair<G4QHadron*, G4QHadron*> G4QHadronPair;
166
167inline G4bool G4QHadron::operator==(const G4QHadron &rhs) const {return this==&rhs;}
168inline G4bool G4QHadron::operator!=(const G4QHadron &rhs) const {return this!=&rhs;}
169
170inline G4int G4QHadron::GetPDGCode() const {return theQPDG.GetPDGCode();}
171inline G4int G4QHadron::GetQCode() const {return theQPDG.GetQCode();}
172inline G4QPDGCode G4QHadron::GetQPDG() const {return theQPDG;}
173inline G4QContent G4QHadron::GetQC() const {return valQ;}
174inline G4int G4QHadron::GetNFragments() const {return nFragm;}
175//@@ This is an example how to make other inline selectors for the 4-Momentum of the Hadron
176inline G4double G4QHadron::GetMass() const {return theMomentum.m();}
177inline G4double G4QHadron::GetMass2() const {return theMomentum.m2();}
178//@@ This is an example how to make other inline selectors for the Hadron
179inline G4int G4QHadron::GetCharge() const {return valQ.GetCharge();}
180inline G4int G4QHadron::GetStrangeness() const {return valQ.GetStrangeness();}
181inline G4int G4QHadron::GetBaryonNumber() const {return valQ.GetBaryonNumber();}
182inline const G4ThreeVector& G4QHadron::GetPosition() const {return thePosition;}
183//inline G4int G4QHadron::GetSoftCollisionCount() {return theCollisionCount;}
184
186inline void G4QHadron::SetQC(const G4QContent& newQC) {valQ=newQC;}
188inline void G4QHadron::SetNFragments(const G4int& nf) {nFragm=nf;}
189inline void G4QHadron::SetPosition(const G4ThreeVector& position) {thePosition=position;}
190
191inline void G4QHadron::NegPDGCode() {theQPDG.NegPDGCode(); valQ.Anti();}
193
194#endif
CLHEP::HepLorentzVector G4LorentzVector
std::pair< G4QHadron *, G4QHadron * > G4QHadronPair
Definition: G4QHadron.hh:165
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
HepLorentzVector & boost(double, double, double)
Hep3Vector vect() const
G4int GetCharge() const
Definition: G4QContent.cc:1159
G4int GetBaryonNumber() const
Definition: G4QContent.cc:1182
G4int GetStrangeness() const
Definition: G4QContent.hh:184
void Anti()
Definition: G4QContent.hh:248
virtual ~G4QHadron()
Definition: G4QHadron.cc:208
G4bool RelDecayIn3(G4LorentzVector &fh4M, G4LorentzVector &sh4M, G4LorentzVector &th4Mom, G4LorentzVector &dir, G4double maxCost=1., G4double minCost=-1.)
Definition: G4QHadron.cc:866
G4ThreeVector Get3Momentum() const
Definition: G4QHadron.hh:80
G4LorentzVector Get4Momentum() const
Definition: G4QHadron.hh:79
G4double GetMass() const
Definition: G4QHadron.hh:176
void Boost(const G4ThreeVector &B)
Definition: G4QHadron.hh:111
const G4QHadron & operator=(const G4QHadron &right)
Definition: G4QHadron.cc:191
void SetFormationTime(G4double fT)
Definition: G4QHadron.hh:113
void SetNFragments(const G4int &nf)
Definition: G4QHadron.hh:188
G4bool operator!=(const G4QHadron &right) const
Definition: G4QHadron.hh:168
G4int GetBaryonNumber() const
Definition: G4QHadron.hh:181
G4double GetFormationTime()
Definition: G4QHadron.hh:92
void IncrementCollisionCount(G4int aCount)
Definition: G4QHadron.hh:104
G4bool operator==(const G4QHadron &right) const
Definition: G4QHadron.hh:167
G4int GetCharge() const
Definition: G4QHadron.hh:179
G4QParton * GetNextParton()
Definition: G4QHadron.cc:1614
G4bool CorMDecayIn2(G4double corM, G4LorentzVector &fr4Mom)
Definition: G4QHadron.cc:635
G4int GetPDGCode() const
Definition: G4QHadron.hh:170
G4bool TestRealNeutral()
Definition: G4QHadron.hh:192
void SplitUp()
Definition: G4QHadron.cc:1087
void SetPDGCode(const G4QPDGCode &PDG)
Definition: G4QHadron.hh:97
G4double GetWidth() const
G4double GetEnergy() const
Definition: G4QHadron.hh:81
G4double GetSpin() const
Definition: G4QHadron.hh:78
G4bool DecayIn2(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom)
Definition: G4QHadron.cc:544
void Boost(const G4LorentzVector &theBoost)
Definition: G4QHadron.cc:1293
void NegPDGCode()
Definition: G4QHadron.hh:191
G4double RandomizeMass(G4QParticle *pPart, G4double maxM)
Definition: G4QHadron.cc:1035
G4bool CopDecayIn2(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom, G4LorentzVector &dir, G4double cop)
Definition: G4QHadron.cc:420
const G4ThreeVector & GetPosition() const
Definition: G4QHadron.hh:182
void LorentzRotate(const G4LorentzRotation &rotation)
Definition: G4QHadron.hh:112
void Init3D()
G4bool DecayIn3(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom, G4LorentzVector &t4Mom)
Definition: G4QHadron.cc:783
void MakeAntiHadron()
Definition: G4QHadron.hh:185
void SetQC(const G4QContent &newQC)
Definition: G4QHadron.hh:186
void SetPosition(const G4ThreeVector &aPosition)
Definition: G4QHadron.hh:189
G4int GetQCode() const
Definition: G4QHadron.hh:171
G4bool CopDecayIn3(G4LorentzVector &fh4M, G4LorentzVector &sh4M, G4LorentzVector &th4Mom, G4LorentzVector &dir, G4double cosp)
Definition: G4QHadron.cc:951
void SetBindingEnergy(G4double aBindE)
Definition: G4QHadron.hh:109
G4LorentzVector theMomentum
Definition: G4QHadron.hh:143
std::list< G4QParton * > GetColor()
Definition: G4QHadron.hh:93
void SetQPDG(const G4QPDGCode &QPDG)
Definition: G4QHadron.cc:275
std::list< G4QParton * > GetAntiColor()
Definition: G4QHadron.hh:94
G4QPartonPair * SplitInTwoPartons()
Definition: G4QHadron.cc:1631
G4QParton * GetNextAntiParton()
Definition: G4QHadron.cc:1622
G4double GetMass2() const
Definition: G4QHadron.hh:177
G4bool RelDecayIn2(G4LorentzVector &f4Mom, G4LorentzVector &s4Mom, G4LorentzVector &dir, G4double maxCost=1., G4double minCost=-1.)
Definition: G4QHadron.cc:296
G4int GetNFragments() const
Definition: G4QHadron.hh:174
G4double GetBindingEnergy()
Definition: G4QHadron.hh:91
G4QContent GetQC() const
Definition: G4QHadron.hh:173
G4bool CorEDecayIn2(G4double corE, G4LorentzVector &fr4Mom)
Definition: G4QHadron.cc:743
void Set4Momentum(const G4LorentzVector &aMom)
Definition: G4QHadron.hh:187
G4QPDGCode GetQPDG() const
Definition: G4QHadron.hh:172
G4int GetStrangeness() const
Definition: G4QHadron.hh:180
G4int GetPDGCode() const
Definition: G4QPDGCode.hh:326
G4bool TestRealNeutral()
Definition: G4QPDGCode.hh:337
void NegPDGCode()
Definition: G4QPDGCode.hh:336
G4int GetQCode() const
Definition: G4QPDGCode.hh:327
ush Pos
Definition: deflate.h:82
#define position
Definition: xmlparse.cc:605