]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliPythia.cxx
Changes suggested by fca
[u/mrichter/AliRoot.git] / EVGEN / AliPythia.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
65fb704d 18Revision 1.11 2000/10/20 06:30:06 fca
19Use version 0 to avoid streamer generation
20
3be3dfc7 21Revision 1.10 2000/10/06 14:18:44 morsch
22Upper cut of prim. pT distribution set to 5. GeV
23
e8d05e6c 24Revision 1.9 2000/09/18 10:41:35 morsch
25Add possibility to use nuclear structure functions from PDF library V8.
26
811826d8 27Revision 1.8 2000/09/06 14:26:24 morsch
28Decayer functionality of AliPythia has been moved to AliDecayerPythia.
29Class is now a singleton.
30
95b811fe 31Revision 1.7 2000/06/09 20:34:50 morsch
32All coding rule violations except RS3 corrected
33
f87cfe57 34Revision 1.6 1999/11/09 07:38:48 fca
35Changes for compatibility with version 2.23 of ROOT
36
084c1b4a 37Revision 1.5 1999/11/03 17:43:20 fca
38New version from G.Martinez & A.Morsch
39
886b6f73 40Revision 1.4 1999/09/29 09:24:14 fca
41Introduction of the Copyright and cvs Log
42
4c039060 43*/
44
75c6d54e 45
fe4da5cc 46#include "AliPythia.h"
f87cfe57 47
fe4da5cc 48ClassImp(AliPythia)
49
fe4da5cc 50//_____________________________________________________________________________
51
95b811fe 52AliPythia* AliPythia::fgAliPythia=NULL;
fe4da5cc 53
75c6d54e 54AliPythia::AliPythia()
55{
95b811fe 56// Default Constructor
fe4da5cc 57}
58
59void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
60{
f87cfe57 61// Initialise the process to generate
fe4da5cc 62 fProcess = process;
63 fEcms = energy;
64 fStrucFunc = strucfunc;
65// don't decay p0
95b811fe 66 SetMDCY(Pycomp(111),1,0);
fe4da5cc 67// select structure function
68 SetMSTP(52,2);
69 SetMSTP(51,strucfunc);
70//
71// Pythia initialisation for selected processes//
72//
73// Make MSEL clean
74//
75 for (Int_t i=1; i<= 200; i++) {
76 SetMSUB(i,0);
77 }
78// select charm production
79 switch (process)
80 {
81 case charm:
82 SetMSEL(4);
83//
84// heavy quark masses
85
86 SetPMAS(4,1,1.2);
87
88//
89// primordial pT
90 SetMSTP(91,1);
e8d05e6c 91 SetPARP(91,1.);
92 SetPARP(93,5.);
fe4da5cc 93//
94 break;
95 case beauty:
96 SetMSEL(5);
97 SetPMAS(5,1,4.75);
98 break;
99 case jpsi:
100 SetMSEL(0);
101// gg->J/Psi g
102 SetMSUB(86,1);
103 break;
104 case jpsi_chi:
105 SetMSEL(0);
106// gg->J/Psi g
107 SetMSUB(86,1);
108// gg-> chi_0c g
109 SetMSUB(87,1);
110// gg-> chi_1c g
111 SetMSUB(88,1);
112// gg-> chi_2c g
113 SetMSUB(89,1);
114 case charm_unforced:
115 SetMSEL(0);
116// gq->qg
117 SetMSUB(28,1);
118// gg->qq
119 SetMSUB(53,1);
120// gg->gg
121 SetMSUB(68,1);
122 case beauty_unforced:
123 SetMSEL(0);
124// gq->qg
125 SetMSUB(28,1);
126// gg->qq
127 SetMSUB(53,1);
128// gg->gg
129 SetMSUB(68,1);
130 break;
75c6d54e 131 case mb:
132// Minimum Bias pp-Collisions
133//
134// Tuning of parameters descibed in G. Ciapetti and A. Di Ciaccio
135// Proc. of the LHC Workshop, Aachen 1990, Vol. II p. 155
136//
137// select Pythia min. bias model
138 SetMSEL(2);
139 SetMSUB(92,1);
140 SetMSUB(93,1);
141 SetMSUB(94,1);
142 SetMSUB(95,1);
143// Multiple interactions switched on
144 SetMSTP(81,1);
145 SetMSTP(82,1);
146// Low-pT cut-off for hard scattering
147 SetPARP(81,1.9);
148// model for subsequent non-hardest interaction
149// 90% gg->gg 10% gg->qq
150 SetPARP(86,0.9);
151// 90% of gluon interactions have minimum string length
152 SetPARP(85,0.9);
fe4da5cc 153 }
154//
155// Initialize PYTHIA
95b811fe 156 SetMSTP(41,1);
75c6d54e 157
95b811fe 158 Initialize("CMS","p","p",fEcms);
fe4da5cc 159}
160
95b811fe 161Int_t AliPythia::CheckedLuComp(Int_t kf)
fe4da5cc 162{
95b811fe 163// Check Lund particle code (for debugging)
164 Int_t kc=Pycomp(kf);
165 printf("\n Lucomp kf,kc %d %d",kf,kc);
166 return kc;
fe4da5cc 167}
168
811826d8 169void AliPythia::SetNuclei(Int_t a1, Int_t a2)
170{
171// Treat protons as inside nuclei with mass numbers a1 and a2
172// The MSTP array in the PYPARS common block is used to enable and
173// select the nuclear structure functions.
174// MSTP(52) : (D=1) choice of proton and nuclear structure-function library
175// =1: internal PYTHIA acording to MSTP(51)
176// =2: PDFLIB proton s.f., with MSTP(51) = 1000xNGROUP+NSET
177// =3: PDFLIB proton s.f. with nuclar correction:
178// MSTP( 51) = 1000xNPGROUP+NPSET
179// MSTP(151) = 1000xNAGROUP+NASET
180// MSTP(192) : Mass number of nucleus side 1
181// MSTP(193) : Mass number of nucleus side 2
182
183 SetMSTP(52,3);
184 SetMSTP(191, 1001);
185 SetMSTP(192, a1);
186 SetMSTP(193, a2);
187}
188
189
95b811fe 190AliPythia* AliPythia::Instance()
fe4da5cc 191{
95b811fe 192 if (fgAliPythia) {
193 return fgAliPythia;
194 } else {
195 fgAliPythia = new AliPythia();
196 return fgAliPythia;
fe4da5cc 197 }
fe4da5cc 198}
fe4da5cc 199
200
201
202
203
204