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 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

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