source: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QParton.hh @ 836

Last change on this file since 836 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 5.0 KB
Line 
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.2 2006/12/12 11:02:22 mkossov Exp $
31// GEANT4 tag $Name:  $
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
43#include "globals.hh"
44#include "G4ThreeVector.hh"
45#include "G4LorentzVector.hh"
46#include <iostream>
47#include "G4ParticleTable.hh"
48#include "Randomize.hh"
49
50class G4QParton
51{
52 public:
53  // Constructors
54  G4QParton()
55  {
56    // CHIPS is working only with u, d, and s quarks (SU(3)xSU(3)) (no gluons! M.K.)
57    // Random Flavor/Colour/Spin definition for default constructor (with .3 s-suppresion)
58    PDGencoding=(G4int)(2.3*G4UniformRand())+1; //@@ What about antiquarks? (M.K.)
59        theDefinition=G4ParticleTable::GetParticleTable()->FindParticle(PDGencoding);
60        // random colour (1,2,3)=(R,G,B) for quarks and (-1,-2,-3)=(aR,aG,aB) for anti-quarks
61    theColour = (G4int)(3*G4UniformRand())+1;
62    if(theColour>3) theColour = 3;
63    theIsoSpinZ = theDefinition->GetPDGIsospin3();
64    theSpinZ = (G4int)(2*G4UniformRand()) - 0.5;
65  }
66                G4QParton(G4int PDGencoding);                            // Collor/Spin are still random
67  G4QParton(const G4QParton &right);
68  G4QParton(const G4QParton* right);
69
70  // Destructor
71  ~G4QParton();
72
73  // Operators
74  const G4QParton& operator=(const G4QParton &right);
75  G4int operator==(const G4QParton &right) const      {return this==&right;}   
76  G4int operator!=(const G4QParton &right) const      {return this!=&right;}   
77
78  // Modifiers
79  void DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection);
80  void SetColour(G4int aColour)                       {theColour = aColour;}
81  void SetX(G4double anX)                             {theX = anX;}
82  void Set4Momentum(const G4LorentzVector& aMomentum) {theMomentum=aMomentum;}
83  void SetPosition(const G4ThreeVector& aPosition)    {thePosition=aPosition;}
84  void SetIsoSpinZ(G4double anIsoSpinZ)               {theIsoSpinZ = anIsoSpinZ;}
85  void SetSpinZ(G4double aSpinZ)                      {theSpinZ = aSpinZ;}
86
87  // Selectors
88  G4int GetPDGCode() const                            {return PDGencoding;}
89  G4ParticleDefinition* GetDefinition()               {return theDefinition;}   
90  const G4ThreeVector& GetPosition()const             {return thePosition;}
91  const G4LorentzVector& Get4Momentum() const         {return theMomentum;} 
92  G4double GetX()                                     {return theX;}   
93  G4int GetColour()                                   {return theColour;}   
94  G4double GetSpinZ()                                 {return theSpinZ;}
95  G4double GetIsoSpinZ()                              {return theIsoSpinZ;}
96  G4double GetMass()                                  {return theDefinition->GetPDGMass();}
97  G4String GetParticleSubType()               {return theDefinition->GetParticleSubType();}
98 private: 
99                // Body
100  G4int                 PDGencoding;
101  G4ParticleDefinition* theDefinition;
102  G4LorentzVector       theMomentum;
103  G4ThreeVector         thePosition;
104  G4int                 theColour;
105  G4double              theIsoSpinZ;
106  G4double              theSpinZ;
107  G4double              theX;   
108};
109
110#endif
Note: See TracBrowser for help on using the repository browser.