Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4QParton.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 #ifndef G4QParton_h
28 #define G4QParton_h 1
29 
30 // $Id$
31 //
32 // ------------------------------------------------------------
33 // GEANT 4 class header file
34 //
35 // ---------------- G4QParton ----------------
36 // by Mikhail Kosov, October 2006
37 // class for Quark-Parton for quark-level models
38 // For comparison mirror member functions are taken from G4 class:
39 // G4Parton
40 // -----------------------------------------------------------------
41 // Short description: The Quark-Gluon String consists of the partons, which
42 // are quarks and some times gluons.
43 // ------------------------------------------------------------------------
44 
45 #include "globals.hh"
46 #include "G4QContent.hh"
47 #include "G4LorentzVector.hh"
48 #include "G4ThreeVector.hh"
49 #include <iostream>
50 #include "Randomize.hh"
51 
52 class G4QParton
53 {
54  public:
55  // Constructors
56  G4QParton(); // Default fullRandom constructor
57  G4QParton(G4int aPGG); // Collor/Spin are still random
58  G4QParton(const G4QParton &right);
59  G4QParton(const G4QParton* right);
60 
61  // Destructor
62  ~G4QParton();
63 
64  // Operators
65  const G4QParton& operator=(const G4QParton &right);
66  G4int operator==(const G4QParton &right) const {return this==&right;}
67  G4int operator!=(const G4QParton &right) const {return this!=&right;}
68 
69  // Modifiers
70  void DefineEPz(G4LorentzVector hadr4Mom){theMomentum+=hadr4Mom*theX;} // CHIPS solution
71  void DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection);
72  void SetPDGCode(G4int aPDG);
73  void SetColour(G4int aColour) {theColour = aColour;}
74  void SetX(G4double anX) {theX = anX;}
75  void Set4Momentum(const G4LorentzVector& aMomentum) {theMomentum=aMomentum;}
76  void SetPosition(const G4ThreeVector& aPosition) {thePosition=aPosition;}
77  void SetSpinZ(G4double aSpinZ) {theSpinZ = aSpinZ;}
78  G4bool ReduceDiQADiQ(G4QParton* d1, G4QParton* d2); // Reduce DiQ-aDiQ to Q-aQ (general)
79 
80  // Selectors
81  G4int GetPDGCode() const {return PGGCode;}
82  G4QContent GetQC() const {return QCont;}
83  const G4ThreeVector& GetPosition() const {return thePosition;}
84  const G4LorentzVector& Get4Momentum() const {return theMomentum;}
85  G4double GetX() {return theX;}
86  G4int GetColour() {return theColour;}
87  G4double GetSpinZ() {return theSpinZ;}
88  const G4int& GetType() const {return theType;}
89  private:
90  // Body
91  G4int PGGCode;
92  G4QContent QCont; // Quark Content of the parton
93  G4int theType; // 0 = gluon, 1 = quark-antiquark, 2 = diquark/antidiquark
94  G4int theColour;
95  G4double theSpinZ;
96  G4double theX;
97  G4ThreeVector thePosition;
98  G4LorentzVector theMomentum;
99 };
100 
101 #endif