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 | #ifndef G4QParton_h |
---|
28 | #define G4QParton_h 1 |
---|
29 | |
---|
30 | // $Id: G4QParton.hh,v 1.3 2009/02/23 09:49:24 mkossov Exp $ |
---|
31 | // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ |
---|
32 | // |
---|
33 | // ------------------------------------------------------------ |
---|
34 | // GEANT 4 class header file |
---|
35 | // |
---|
36 | // ---------------- G4QParton ---------------- |
---|
37 | // by Mikhail Kosov, October 2006 |
---|
38 | // class for Quark-Parton for quark-level models |
---|
39 | // For comparison mirror member functions are taken from G4 class: |
---|
40 | // G4Parton |
---|
41 | // ----------------------------------------------------------------- |
---|
42 | // Short description: The Quark-Gluon String consists of the partons, which |
---|
43 | // are quarks and some times gluons. |
---|
44 | // ------------------------------------------------------------------------ |
---|
45 | |
---|
46 | #include "globals.hh" |
---|
47 | #include "G4ThreeVector.hh" |
---|
48 | #include "G4LorentzVector.hh" |
---|
49 | #include <iostream> |
---|
50 | #include "G4ParticleTable.hh" |
---|
51 | #include "Randomize.hh" |
---|
52 | |
---|
53 | class G4QParton |
---|
54 | { |
---|
55 | public: |
---|
56 | // Constructors |
---|
57 | G4QParton() |
---|
58 | { |
---|
59 | // CHIPS is working only with u, d, and s quarks (SU(3)xSU(3)) (no gluons! M.K.) |
---|
60 | // Random Flavor/Colour/Spin definition for default constructor (with .3 s-suppresion) |
---|
61 | PDGencoding=(G4int)(2.3*G4UniformRand())+1; //@@ What about antiquarks? (M.K.) |
---|
62 | theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding); |
---|
63 | // random colour (1,2,3)=(R,G,B) for quarks and (-1,-2,-3)=(aR,aG,aB) for anti-quarks |
---|
64 | theColour = (G4int)(3*G4UniformRand())+1; |
---|
65 | if(theColour>3) theColour = 3; |
---|
66 | theIsoSpinZ = theDefinition->GetPDGIsospin3(); |
---|
67 | theSpinZ = (G4int)(2*G4UniformRand()) - 0.5; |
---|
68 | } |
---|
69 | G4QParton(G4int PDGencoding); // Collor/Spin are still random |
---|
70 | G4QParton(const G4QParton &right); |
---|
71 | G4QParton(const G4QParton* right); |
---|
72 | |
---|
73 | // Destructor |
---|
74 | ~G4QParton(); |
---|
75 | |
---|
76 | // Operators |
---|
77 | const G4QParton& operator=(const G4QParton &right); |
---|
78 | G4int operator==(const G4QParton &right) const {return this==&right;} |
---|
79 | G4int operator!=(const G4QParton &right) const {return this!=&right;} |
---|
80 | |
---|
81 | // Modifiers |
---|
82 | void DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection); |
---|
83 | void SetColour(G4int aColour) {theColour = aColour;} |
---|
84 | void SetX(G4double anX) {theX = anX;} |
---|
85 | void Set4Momentum(const G4LorentzVector& aMomentum) {theMomentum=aMomentum;} |
---|
86 | void SetPosition(const G4ThreeVector& aPosition) {thePosition=aPosition;} |
---|
87 | void SetIsoSpinZ(G4double anIsoSpinZ) {theIsoSpinZ = anIsoSpinZ;} |
---|
88 | void SetSpinZ(G4double aSpinZ) {theSpinZ = aSpinZ;} |
---|
89 | |
---|
90 | // Selectors |
---|
91 | G4int GetPDGCode() const {return PDGencoding;} |
---|
92 | G4ParticleDefinition* GetDefinition() {return theDefinition;} |
---|
93 | const G4ThreeVector& GetPosition()const {return thePosition;} |
---|
94 | const G4LorentzVector& Get4Momentum() const {return theMomentum;} |
---|
95 | G4double GetX() {return theX;} |
---|
96 | G4int GetColour() {return theColour;} |
---|
97 | G4double GetSpinZ() {return theSpinZ;} |
---|
98 | G4double GetIsoSpinZ() {return theIsoSpinZ;} |
---|
99 | G4double GetMass() {return theDefinition->GetPDGMass();} |
---|
100 | G4String GetParticleSubType() {return theDefinition->GetParticleSubType();} |
---|
101 | private: |
---|
102 | // Body |
---|
103 | G4int PDGencoding; |
---|
104 | G4ParticleDefinition* theDefinition; |
---|
105 | G4LorentzVector theMomentum; |
---|
106 | G4ThreeVector thePosition; |
---|
107 | G4int theColour; |
---|
108 | G4double theIsoSpinZ; |
---|
109 | G4double theSpinZ; |
---|
110 | G4double theX; |
---|
111 | }; |
---|
112 | |
---|
113 | #endif |
---|