Geant4  10.01
Pythia6.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 // $Id: Pythia6.hh 72244 2013-07-12 08:49:56Z gcosmo $
27 //
30 
31 //
32 // ----------------------------------------------------------------------------
33 
34 // ******************************************************************************
35 // ******************************************************************************
36 // ** **
37 // ** **
38 // ** *......* Welcome to the Lund Monte Carlo! **
39 // ** *:::!!:::::::::::* **
40 // ** *::::::!!::::::::::::::* PPP Y Y TTTTT H H III A **
41 // ** *::::::::!!::::::::::::::::* P P Y Y T H H I A A **
42 // ** *:::::::::!!:::::::::::::::::* PPP Y T HHHHH I AAAAA **
43 // ** *:::::::::!!:::::::::::::::::* P Y T H H I A A **
44 // ** *::::::::!!::::::::::::::::*! P Y T H H III A A **
45 // ** *::::::!!::::::::::::::* !! **
46 // ** !! *:::!!:::::::::::* !! This is PYTHIA version 6.418 **
47 // ** !! !* -><- * !! Last date of change: 9 Jun 2008 **
48 // ** !! !! !! **
49 // ** !! !! !! Now is 0 Jan 2000 at 0:00:00 **
50 // ** !! !! **
51 // ** !! lh !! Disclaimer: this program comes **
52 // ** !! !! without any guarantees. Beware **
53 // ** !! hh !! of errors and use common sense **
54 // ** !! ll !! when interpreting results. **
55 // ** !! !! **
56 // ** !! Copyright T. Sjostrand (2008) **
57 // ** **
58 // ** An archive of program versions and documentation is found on the web: **
59 // ** http://www.thep.lu.se/~torbjorn/Pythia.html **
60 // ** **
61 // ** When you cite this program, the official reference is to the 6.4 manual: **
62 // ** T. Sjostrand, S. Mrenna and P. Skands, JHEP05 (2006) 026 **
63 // ** (LU TP 06-13, FERMILAB-PUB-06-052-CD-T) [hep-ph/0603175]. **
64 // ** **
65 // ** Also remember that the program, to a large extent, represents original **
66 // ** physics research. Other publications of special relevance to your **
67 // ** studies may therefore deserve separate mention. **
68 // ** **
69 // ** Main author: Torbjorn Sjostrand; Department of Theoretical Physics, **
70 // ** Lund University, Solvegatan 14A, S-223 62 Lund, Sweden; **
71 // ** phone: + 46 - 46 - 222 48 16; e-mail: torbjorn@thep.lu.se **
72 // ** Author: Stephen Mrenna; Computing Division, GDS Group, **
73 // ** Fermi National Accelerator Laboratory, MS 234, Batavia, IL 60510, USA; **
74 // ** phone: + 1 - 630 - 840 - 2556; e-mail: mrenna@fnal.gov **
75 // ** Author: Peter Skands; Theoretical Physics Department, **
76 // ** Fermi National Accelerator Laboratory, MS 106, Batavia, IL 60510, USA; **
77 // ** and CERN/PH, CH-1211 Geneva, Switzerland; **
78 // ** phone: + 41 - 22 - 767 24 59; e-mail: skands@fnal.gov **
79 // ** **
80 // ** **
81 // ******************************************************************************
82 
83 #ifndef PYTHIA_Pythia6
84 #define PYTHIA_Pythia6
85 
86 #include <vector>
87 
88 int const KNDCAY = 8000; //should be 4000 for pythia61
89 
91 struct Pyjets_t
92 {
93  int N;
94  int NPAD;
95  int K[5][4000];
96  double P[5][4000];
97  double V[5][4000];
98 };
99 
101 struct Pydat1_t
102 {
103  int MSTU[200];
104  double PARU[200];
105  int MSTJ[200];
106  double PARJ[200];
107 };
108 
110 struct Pydat3_t
111 {
112  int MDCY[3][500];
113  int MDME[2][KNDCAY];
114  double BRAT[KNDCAY];
115  int KFDP[5][KNDCAY];
116 };
117 
120 {
122  int ks, int kf, int parent, int firstChild, int lastChild,
123  float px, float py, float pz, float energy, float mass,
124  float vx, float vy, float vz, float time, float lifetime)
125  : fKS(ks), fKF(kf),
126  fParent(parent), fFirstChild(firstChild), fLastChild(lastChild),
127  fPx(px), fPy(py), fPz(pz), fEnergy(energy), fMass(mass),
128  fVx(vx), fVy(vy), fVz(vz), fTime(time), fLifetime(lifetime) {}
129 
130  int fKS; // status of particle ( LUJETS K[1] )
131  int fKF; // KF flavour code ( LUJETS K[2] )
132  int fParent; // parrent's id ( LUJETS K[3] )
133  int fFirstChild; // id of first child ( LUJETS K[4] )
134  int fLastChild; // id of last child ( LUJETS K[5] )
135 
136  float fPx; // X momenta [GeV/c] ( LUJETS P[1] )
137  float fPy; // Y momenta [GeV/c] ( LUJETS P[2] )
138  float fPz; // Z momenta [GeV/c] ( LUJETS P[3] )
139  float fEnergy; // Energy [GeV] ( LUJETS P[4] )
140  float fMass; // Mass [Gev/c^2] ( LUJETS P[5] )
141 
142  float fVx; // X vertex [mm] ( LUJETS V[1] )
143  float fVy; // Y vertex [mm] ( LUJETS V[2] )
144  float fVz; // Z vertex [mm] ( LUJETS V[3] )
145  float fTime; // time of procuction [mm/c]( LUJETS V[4] )
146  float fLifetime; // proper lifetime [mm/c] ( LUJETS V[5] )
147 };
148 
149 typedef std::vector<Pythia6Particle*> ParticleVector;
150 
162 
163 class Pythia6
164 {
165  public:
166 
167  // ****** constructors and destructor
168  Pythia6();
169  virtual ~Pythia6();
170 
171  static Pythia6 *Instance();
172 
173  // ****** TPYTHIA routines
174  //
175  int Pycomp(int kf);
176  void Py1ent(int line, int kf, double pe, double theta, double phi);
178  int ImportParticles(ParticleVector* particles, const char* option="");
179 
180  // ****** /PYDAT1/
181  //
182  void SetMSTJ(int i, int m ) { fPydat1->MSTJ[i-1] = m; }
183 
184  // ****** /PYDAT3/
185  //
186  int GetMDCY(int i, int j) { return fPydat3->MDCY[j-1][i-1]; }
187  int GetKFDP(int i, int j) { return fPydat3->KFDP[j-1][i-1]; }
188  void SetMDCY(int i, int j, int m) { fPydat3->MDCY[j-1][i-1] = m; }
189  void SetMDME(int i, int j, int m) { fPydat3->MDME[j-1][i-1] = m; }
190 
191  private:
193 
198 };
199 
200 #endif
201 
void SetMSTJ(int i, int m)
Definition: Pythia6.hh:182
double PARJ[200]
Definition: Pythia6.hh:106
ParticleVector * fParticles
Definition: Pythia6.hh:194
Pydat1_t * fPydat1
Definition: Pythia6.hh:196
static Pythia6 * fgInstance
Definition: Pythia6.hh:192
Pythia6()
Definition: Pythia6.cc:128
static Pythia6 * Instance()
Definition: Pythia6.cc:117
int MSTJ[200]
Definition: Pythia6.hh:105
int Pycomp(int kf)
Definition: Pythia6.cc:170
float fLifetime
Definition: Pythia6.hh:146
int GetMDCY(int i, int j)
Definition: Pythia6.hh:186
Pythia6Particle(int ks, int kf, int parent, int firstChild, int lastChild, float px, float py, float pz, float energy, float mass, float vx, float vy, float vz, float time, float lifetime)
Definition: Pythia6.hh:121
PYDAT3 common-block.
Definition: Pythia6.hh:110
Structure for Pythia6 particle properties.
Definition: Pythia6.hh:119
void Py1ent(int line, int kf, double pe, double theta, double phi)
Definition: Pythia6.cc:179
int N
Definition: Pythia6.hh:93
int const KNDCAY
Definition: Pythia6.hh:88
virtual ~Pythia6()
Definition: Pythia6.cc:155
std::vector< Pythia6Particle * > ParticleVector
Definition: Pythia6.hh:149
int GetKFDP(int i, int j)
Definition: Pythia6.hh:187
ParticleVector * ImportParticles()
int NPAD
Definition: Pythia6.hh:94
The C++ interface class to Pythia6.
Definition: Pythia6.hh:163
double P[5][4000]
Definition: Pythia6.hh:96
PYJETS common-block.
Definition: Pythia6.hh:91
int KFDP[5][KNDCAY]
Definition: Pythia6.hh:115
int K[5][4000]
Definition: Pythia6.hh:95
int MDCY[3][500]
Definition: Pythia6.hh:112
double V[5][4000]
Definition: Pythia6.hh:97
G4double energy(const ThreeVector &p, const G4double m)
Pyjets_t * fPyjets
Definition: Pythia6.hh:195
int MDME[2][KNDCAY]
Definition: Pythia6.hh:113
Pydat3_t * fPydat3
Definition: Pythia6.hh:197
int MSTU[200]
Definition: Pythia6.hh:103
static const double m
Definition: G4SIunits.hh:110
PYDAT1 common-block.
Definition: Pythia6.hh:101
void SetMDCY(int i, int j, int m)
Definition: Pythia6.hh:188
double PARU[200]
Definition: Pythia6.hh:104
double BRAT[KNDCAY]
Definition: Pythia6.hh:114
void SetMDME(int i, int j, int m)
Definition: Pythia6.hh:189