TPythia6.h

Go to the documentation of this file.
00001 // @(#)root/pythia6:$Id: TPythia6.h 32513 2010-03-09 21:10:43Z brun $
00002 // Author: Rene Brun   19/10/99
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef PYTHIA_TPythia6
00013 #define PYTHIA_TPythia6
00014 
00015 ////////////////////////////////////////////////////////////////////////////////
00016 //                                                                            //
00017 // TPythia6                                                                   //
00018 //                                                                            //
00019 // TPythia is an interface class to F77 version of Pythia 6.2                 //
00020 // CERNLIB event generators, written by T.Sjostrand.                          //
00021 // For the details about these generators look at Pythia/Jetset manual:       //
00022 //                                                                            //
00023 // ******************************************************************************
00024 // ******************************************************************************
00025 // **                                                                          **
00026 // **                                                                          **
00027 // **              *......*                  Welcome to the Lund Monte Carlo!  **
00028 // **         *:::!!:::::::::::*                                               **
00029 // **      *::::::!!::::::::::::::*          PPP  Y   Y TTTTT H   H III   A    **
00030 // **    *::::::::!!::::::::::::::::*        P  P  Y Y    T   H   H  I   A A   **
00031 // **   *:::::::::!!:::::::::::::::::*       PPP    Y     T   HHHHH  I  AAAAA  **
00032 // **   *:::::::::!!:::::::::::::::::*       P      Y     T   H   H  I  A   A  **
00033 // **    *::::::::!!::::::::::::::::*!       P      Y     T   H   H III A   A  **
00034 // **      *::::::!!::::::::::::::* !!                                         **
00035 // **      !! *:::!!:::::::::::*    !!       This is PYTHIA version 6.205      **
00036 // **      !!     !* -><- *         !!       Last date of change:  1 Mar 2002  **
00037 // **      !!     !!                !!                                         **
00038 // **      !!     !!                !!       Now is  0 Jan 2000 at  0:00:00    **
00039 // **      !!                       !!                                         **
00040 // **      !!        lh             !!       Disclaimer: this program comes    **
00041 // **      !!                       !!       without any guarantees. Beware    **
00042 // **      !!                 hh    !!       of errors and use common sense    **
00043 // **      !!    ll                 !!       when interpreting results.        **
00044 // **      !!                       !!                                         **
00045 // **      !!                                Copyright T. Sjostrand (2001)     **
00046 // **                                                                          **
00047 // ** An archive of program versions and documentation is found on the web:    **
00048 // ** http://www.thep.lu.se/~torbjorn/Pythia.html                              **
00049 // **                                                                          **
00050 // ** When you cite this program, currently the official reference is          **
00051 // ** T. Sjostrand, P. Eden, C. Friberg, L. Lonnblad, G. Miu, S. Mrenna and    **
00052 // ** E. Norrbin, Computer Physics Commun. 135 (2001) 238.                     **
00053 // ** The large manual is                                                      **
00054 // ** T. Sjostrand, L. Lonnblad and S. Mrenna, LU TP 01-21 [hep-ph/0108264].   **
00055 // ** Also remember that the program, to a large extent, represents original   **
00056 // ** physics research. Other publications of special relevance to your        **
00057 // ** studies may therefore deserve separate mention.                          **
00058 // **                                                                          **
00059 // ** Main author: Torbjorn Sjostrand; Department of Theoretical Physics 2,    **
00060 // **   Lund University, Solvegatan 14A, S-223 62 Lund, Sweden;                **
00061 // **   phone: + 46 - 46 - 222 48 16; e-mail: torbjorn@thep.lu.se              **
00062 // ** Author: Leif Lonnblad; Department of Theoretical Physics 2,              **
00063 // **   Lund University, Solvegatan 14A, S-223 62 Lund, Sweden;                **
00064 // **   phone: + 46 - 46 - 222 77 80; e-mail: leif@thep.lu.se                  **
00065 // ** Author: Stephen Mrenna; Computing Division, Simulations Group,           **
00066 // **   Fermi National Accelerator Laboratory, MS 234, Batavia, IL 60510, USA; **
00067 // **   phone: + 1 - 630 - 840 - 2556; e-mail: mrenna@fnal.gov                 **
00068 // ** Author: Peter Skands; Department of Theoretical Physics 2,               **
00069 // **   Lund University, Solvegatan 14A, S-223 62 Lund, Sweden;                **
00070 // **   phone: + 46 - 46 - 222 31 92; e-mail: zeiler@thep.lu.se                **
00071 // **                                                                          **
00072 // **                                                                          **
00073 // ******************************************************************************
00074 //#ifdef __GNUG__
00075 //#pragma interface
00076 //#endif
00077 
00078 #ifndef ROOT_TPythia6Calls
00079 #include "TPythia6Calls.h"
00080 #endif
00081 
00082 #ifndef ROOT_TGenerator
00083 #include "TGenerator.h"
00084 #endif
00085 
00086 #ifndef ROOT_TObjArray
00087 #include "TObjArray.h"
00088 #endif
00089 
00090 class TPythia6 : public TGenerator {
00091 
00092 protected:
00093    static  TPythia6* fgInstance;
00094    // PYTHIA6 common-blocks
00095    Pyjets_t*  fPyjets;
00096    Pydat1_t*  fPydat1;
00097    Pydat2_t*  fPydat2;
00098    Pydat3_t*  fPydat3;
00099    Pydat4_t*  fPydat4;
00100    Pydatr_t*  fPydatr;
00101    Pysubs_t*  fPysubs;
00102    Pypars_t*  fPypars;
00103    Pyint1_t*  fPyint1;
00104    Pyint2_t*  fPyint2;
00105    Pyint3_t*  fPyint3;
00106    Pyint4_t*  fPyint4;
00107    Pyint5_t*  fPyint5;
00108    Pyint6_t*  fPyint6;
00109    Pyint7_t*  fPyint7;
00110    Pyint8_t*  fPyint8;
00111    Pyint9_t*  fPyint9;
00112    Pymssm_t*  fPymssm;
00113    Pyssmt_t*  fPyssmt;
00114    Pyints_t*  fPyints;
00115    Pybins_t*  fPybins;
00116    // ****** cleanup stuff (thanks Jim K.)
00117    class  TPythia6Cleaner {
00118    public:
00119       TPythia6Cleaner();
00120       ~TPythia6Cleaner();
00121    };
00122    friend class TPythia6Cleaner;
00123 
00124    TPythia6(const TPythia6&);            // Cannot be copied
00125    TPythia6& operator=(const TPythia6&); // Cannot be copied
00126 
00127 public:
00128    // ****** constructors and destructor
00129    TPythia6();
00130    virtual ~TPythia6();
00131 
00132    static TPythia6 *Instance();
00133 
00134    // ****** accessors
00135    // FORTRAN indexing in accessing the arrays,
00136    // indices start from 1 !!!!!
00137 
00138    // ****** access to PYTHIA6 common-blocks
00139 
00140    // ****** /PYJETS/
00141 
00142    Pyjets_t*   GetPyjets        ()           { return fPyjets; }
00143    int         GetN             ()           { return fPyjets->N; }
00144    int         GetNPAD          ()           { return fPyjets->NPAD; }
00145    int         GetK(int ip, int i)           { return fPyjets->K[i-1][ip-1]; }
00146    double      GetP(int ip, int i)           { return fPyjets->P[i-1][ip-1]; }
00147    double      GetV(int ip, int i)           { return fPyjets->V[i-1][ip-1]; }
00148 
00149    void        SetN     (int n)              { fPyjets->N = n;    }
00150    void        SetNPAD  (int n)              { fPyjets->NPAD = n;    }
00151    void        SetK(int ip, int i, int k)    { fPyjets->K[i-1][ip-1] = k; }
00152    void        SetP(int ip, int i, double p) { fPyjets->P[i-1][ip-1] = p;    }
00153    void        SetV(int ip, int i, double v) { fPyjets->V[i-1][ip-1] = v;    }
00154 
00155    // ****** /PYDAT1/
00156 
00157    Pydat1_t*   GetPydat1   () { return fPydat1; }
00158    int         GetMSTU(int i) { return fPydat1->MSTU[i-1]; }
00159    double      GetPARU(int i) { return fPydat1->PARU[i-1]; }
00160    int         GetMSTJ(int i) { return fPydat1->MSTJ[i-1]; }
00161    double      GetPARJ(int i) { return fPydat1->PARJ[i-1]; }
00162 
00163    void        SetMSTU(int i, int m   ) { fPydat1->MSTU[i-1] = m; }
00164    void        SetPARU(int i, double p) { fPydat1->PARU[i-1] = p; }
00165    void        SetMSTJ(int i, int m   ) { fPydat1->MSTJ[i-1] = m; }
00166    void        SetPARJ(int i, double p) { fPydat1->PARJ[i-1] = p; }
00167 
00168    // ****** /PYDAT2/
00169 
00170    Pydat2_t*   GetPydat2           () { return fPydat2; }
00171    int         GetKCHG(int ip, int i) { return fPydat2->KCHG[i-1][ip-1]; }
00172    double      GetPMAS(int ip, int i) { return fPydat2->PMAS[i-1][ip-1]; }
00173    double      GetPARF        (int i) { return fPydat2->PARF[i-1]; }
00174    double      GetVCKM(int i,  int j) { return fPydat2->VCKM[j-1][i-1]; }
00175 
00176    void        SetKCHG(int ip, int i, int k   ) { fPydat2->KCHG[i-1][ip-1] = k; }
00177    void        SetPMAS(int ip, int i, double m) { fPydat2->PMAS[i-1][ip-1] = m; }
00178    void        SetPARF        (int i, double p) { fPydat2->PARF[i-1]       = p; }
00179    void        SetVCKM (int i, int j, double v) { fPydat2->VCKM[j-1][i-1]  = v; }
00180 
00181    // ****** /PYDAT3/
00182 
00183    Pydat3_t*   GetPydat3() { return fPydat3; }
00184    int         GetMDCY(int i, int j) { return fPydat3->MDCY[j-1][i-1]; }
00185    int         GetMDME(int i, int j) { return fPydat3->MDME[j-1][i-1]; }
00186    double      GetBRAT       (int i) { return fPydat3->BRAT[i-1]; }
00187    int         GetKFDP(int i, int j) { return fPydat3->KFDP[j-1][i-1]; }
00188 
00189    void        SetMDCY(int i, int j, int m) { fPydat3->MDCY[j-1][i-1] = m; }
00190    void        SetMDME(int i, int j, int m) { fPydat3->MDME[j-1][i-1] = m; }
00191    void        SetBRAT(int i, double b)     { fPydat3->BRAT[i-1]      = b; }
00192    void        SetKFDP(int i, int j, int k) { fPydat3->KFDP[j-1][i-1] = k; }
00193 
00194    // ****** /PYDAT4/
00195 
00196    Pydat4_t*   GetPydat4() { return fPydat4; }
00197 
00198    // ****** /PYDATR/ - random number generator info
00199 
00200    Pydatr_t*   GetPydatr   () { return fPydatr; }
00201    int         GetMRPY(int i) { return fPydatr->MRPY[i-1]; }
00202    double      GetRRPY(int i) { return fPydatr->RRPY[i-1]; }
00203 
00204    void        SetMRPY(int i, int m)    { fPydatr->MRPY[i-1] = m; }
00205    void        SetRRPY(int i, double r) { fPydatr->RRPY[i-1] = r; }
00206 
00207    // ****** /PYSUBS/
00208 
00209    Pysubs_t*   GetPysubs     () { return fPysubs; }
00210    int         GetMSEL       () { return fPysubs->MSEL; }
00211    int         GetMSELPD     () { return fPysubs->MSELPD; }
00212    int         GetMSUB  (int i) { return fPysubs->MSUB[i-1]; }
00213    double      GetCKIN  (int i) { return fPysubs->CKIN[i-1]; }
00214    Int_t       GetKFIN(int i, int j)  {return fPysubs->KFIN[j+40][i-1]; }
00215 
00216    void        SetMSEL   (int m)           { fPysubs->MSEL      = m; }
00217    void        SetMSELPD (int m)           { fPysubs->MSELPD    = m; }
00218    void        SetMSUB   (int i, int m)    { fPysubs->MSUB[i-1] = m; }
00219    void        SetCKIN   (int i, double c) { fPysubs->CKIN[i-1] = c; }
00220    void        SetKFIN(int i, int j, Int_t kfin=1) { fPysubs->KFIN[j+40][i-1] = kfin; }
00221 
00222    // ****** /PYPARS/
00223 
00224    Pypars_t*   GetPypars() { return fPypars; }
00225    int         GetMSTP(int i) { return fPypars->MSTP[i-1]; }
00226    double      GetPARP(int i) { return fPypars->PARP[i-1]; }
00227    int         GetMSTI(int i) { return fPypars->MSTI[i-1]; }
00228    double      GetPARI(int i) { return fPypars->PARI[i-1]; }
00229 
00230    void        SetMSTP   (int i, int    m) { fPypars->MSTP[i-1] = m; }
00231    void        SetPARP   (int i, double p) { fPypars->PARP[i-1] = p; }
00232    void        SetMSTI   (int i, int    m) { fPypars->MSTI[i-1] = m; }
00233    void        SetPARI   (int i, double p) { fPypars->PARI[i-1] = p; }
00234 
00235    // ****** /PYINT1/
00236 
00237    Pyint1_t*   GetPyint1() { return fPyint1; }
00238    int         GetMINT(int i) { return fPyint1->MINT[i-1]; }
00239    double      GetVINT(int i) { return fPyint1->VINT[i-1]; }
00240 
00241    void        SetMINT(int i, int m   ) { fPyint1->MINT[i-1] = m; }
00242    void        SetVINT(int i, double v) { fPyint1->VINT[i-1] = v; }
00243 
00244    // ****** /PYINT2/ and /PYINT3/
00245 
00246    Pyint2_t*   GetPyint2() { return fPyint2; }
00247    Pyint3_t*   GetPyint3() { return fPyint3; }
00248 
00249    // ****** /PYINT4/
00250 
00251    Pyint4_t*   GetPyint4() { return fPyint4; }
00252    int         GetMWID      (int i) { return fPyint4->MWID[i-1]; }
00253    double      GetWIDS(int i,int j) { return fPyint4->WIDS[j-1][i-1]; }
00254 
00255    void        SetMWID(int i, int m)           { fPyint4->MWID[i-1]      = m; }
00256    void        SetWIDS(int i, int j, double w) { fPyint4->WIDS[j-1][i-1] = w; }
00257 
00258    // ****** / PYINT5/
00259 
00260    Pyint5_t*   GetPyint5() { return fPyint5; }
00261    int         GetNGENPD() { return fPyint5->NGENPD; }
00262    void        SetNGENPD(int n) { fPyint5->NGENPD = n; }
00263 
00264    // ****** /PYINT6/
00265 
00266    Pyint6_t*   GetPyint6   () { return fPyint6; }
00267    char*       GetPROC(int i) { fPyint6->PROC[i][27]=0; return fPyint6->PROC[i]; }
00268 
00269    Pyint7_t*   GetPyint7() { return fPyint7; }
00270    Pyint8_t*   GetPyint8() { return fPyint8; }
00271    Pyint9_t*   GetPyint9() { return fPyint9; }
00272 
00273    // ****** /PYMSSM/ - indexing in FORTRAN starts
00274    // from 0!
00275 
00276    Pymssm_t*   GetPymssm()    { return fPymssm; }
00277    int         GetIMSS(int i) { return fPymssm->IMSS[i]; }
00278    double      GetRMSS(int i) { return fPymssm->RMSS[i]; }
00279 
00280    void        SetIMSS(int i, int    m) { fPymssm->IMSS[i] = m; }
00281    void        SetRMSS(int i, double r) { fPymssm->RMSS[i] = r; }
00282 
00283    // ****** /PYSSMT/
00284 
00285    Pyssmt_t*   GetPyssmt()           { return fPyssmt; }
00286    double      GetZMIX(int i, int j) { return fPyssmt->ZMIX[j-1][i-1]; }
00287    double      GetUMIX(int i, int j) { return fPyssmt->UMIX[j-1][i-1]; }
00288    double      GetVMIX(int i, int j) { return fPyssmt->VMIX[j-1][i-1]; }
00289    double      GetSMZ        (int i) { return fPyssmt->SMZ[i-1]; }
00290    double      GetSMW        (int i) { return fPyssmt->SMW[i-1]; }
00291 
00292    void        SetZMIX(int i, int j, double z) { fPyssmt->ZMIX[j-1][i-1] = z; }
00293    void        SetUMIX(int i, int j, double u) { fPyssmt->UMIX[j-1][i-1] = u; }
00294    void        SetSMZ (int i, double s)        { fPyssmt->SMZ[i-1]       = s; }
00295    void        SetSMW (int i, double s)        { fPyssmt->SMW[i-1]       = s; }
00296 
00297    Pyints_t*   GetPyints() { return fPyints; }
00298    Pybins_t*   GetPybins() { return fPybins; }
00299 
00300    // ****** TPYTHIA routines
00301 
00302    void             GenerateEvent();
00303 
00304    void             Initialize(const char *frame, const char *beam, const char *target, float win);
00305 
00306    Int_t            ImportParticles(TClonesArray *particles, Option_t *option="");
00307    TObjArray       *ImportParticles(Option_t *option="");
00308 
00309    void             OpenFortranFile(int lun, char* name);
00310    void             CloseFortranFile(int lun);
00311    int              Pychge(int kf);
00312    int              Pycomp(int kf);
00313    void             Pydiff();
00314    void             Pyedit(int medit);
00315    void             Pyevnt();
00316    void             Py1ent(Int_t line, Int_t kf, Double_t pe, Double_t theta, Double_t phi);
00317    void             Pyexec();
00318    void             Pyhepc(int mconv);
00319    void             Pygive(const char *param);
00320    void             Pyinit(char* frame, char* beam, char* target, double wint);
00321    void             Pylist(int flag);
00322    double           Pymass(int kf);
00323    void             Pyname(int kf, char* name);
00324    double           Pyr(int idummy);
00325    void             Pyrget(int lun, int move);
00326    void             Pyrset(int lun, int move);
00327    void             Pystat(int flag);
00328    void             Pytest(int flag);
00329    void             Pytune(int itune);
00330    void             Pyupda(int mupda, int lun);
00331    void             SetupTest();
00332 
00333    ClassDef(TPythia6,0)  //Interface to Pythia6.1 Event Generator
00334 };
00335 
00336 #endif

Generated on Tue Jul 5 14:45:16 2011 for ROOT_528-00b_version by  doxygen 1.5.1