]>
Commit | Line | Data |
---|---|---|
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$ | |
811826d8 | 18 | Revision 1.8 2000/09/06 14:26:24 morsch |
19 | Decayer functionality of AliPythia has been moved to AliDecayerPythia. | |
20 | Class is now a singleton. | |
21 | ||
95b811fe | 22 | Revision 1.7 2000/06/09 20:34:50 morsch |
23 | All coding rule violations except RS3 corrected | |
24 | ||
f87cfe57 | 25 | Revision 1.6 1999/11/09 07:38:48 fca |
26 | Changes for compatibility with version 2.23 of ROOT | |
27 | ||
084c1b4a | 28 | Revision 1.5 1999/11/03 17:43:20 fca |
29 | New version from G.Martinez & A.Morsch | |
30 | ||
886b6f73 | 31 | Revision 1.4 1999/09/29 09:24:14 fca |
32 | Introduction of the Copyright and cvs Log | |
33 | ||
4c039060 | 34 | */ |
35 | ||
75c6d54e | 36 | |
fe4da5cc | 37 | #include "AliPythia.h" |
f87cfe57 | 38 | #include "AliRun.h" |
39 | ||
fe4da5cc | 40 | ClassImp(AliPythia) |
41 | ||
fe4da5cc | 42 | //_____________________________________________________________________________ |
43 | ||
95b811fe | 44 | AliPythia* AliPythia::fgAliPythia=NULL; |
fe4da5cc | 45 | |
75c6d54e | 46 | AliPythia::AliPythia() |
47 | { | |
95b811fe | 48 | // Default Constructor |
fe4da5cc | 49 | } |
50 | ||
51 | void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc) | |
52 | { | |
f87cfe57 | 53 | // Initialise the process to generate |
fe4da5cc | 54 | fProcess = process; |
55 | fEcms = energy; | |
56 | fStrucFunc = strucfunc; | |
57 | // don't decay p0 | |
95b811fe | 58 | SetMDCY(Pycomp(111),1,0); |
fe4da5cc | 59 | // select structure function |
60 | SetMSTP(52,2); | |
61 | SetMSTP(51,strucfunc); | |
62 | // | |
63 | // Pythia initialisation for selected processes// | |
64 | // | |
65 | // Make MSEL clean | |
66 | // | |
67 | for (Int_t i=1; i<= 200; i++) { | |
68 | SetMSUB(i,0); | |
69 | } | |
70 | // select charm production | |
71 | switch (process) | |
72 | { | |
73 | case charm: | |
74 | SetMSEL(4); | |
75 | // | |
76 | // heavy quark masses | |
77 | ||
78 | SetPMAS(4,1,1.2); | |
79 | ||
80 | // | |
81 | // primordial pT | |
82 | SetMSTP(91,1); | |
83 | SetPARP(91,1); | |
84 | SetPARP(93,3); | |
85 | // | |
86 | break; | |
87 | case beauty: | |
88 | SetMSEL(5); | |
89 | SetPMAS(5,1,4.75); | |
90 | break; | |
91 | case jpsi: | |
92 | SetMSEL(0); | |
93 | // gg->J/Psi g | |
94 | SetMSUB(86,1); | |
95 | break; | |
96 | case jpsi_chi: | |
97 | SetMSEL(0); | |
98 | // gg->J/Psi g | |
99 | SetMSUB(86,1); | |
100 | // gg-> chi_0c g | |
101 | SetMSUB(87,1); | |
102 | // gg-> chi_1c g | |
103 | SetMSUB(88,1); | |
104 | // gg-> chi_2c g | |
105 | SetMSUB(89,1); | |
106 | case charm_unforced: | |
107 | SetMSEL(0); | |
108 | // gq->qg | |
109 | SetMSUB(28,1); | |
110 | // gg->qq | |
111 | SetMSUB(53,1); | |
112 | // gg->gg | |
113 | SetMSUB(68,1); | |
114 | case beauty_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 | break; | |
75c6d54e | 123 | case mb: |
124 | // Minimum Bias pp-Collisions | |
125 | // | |
126 | // Tuning of parameters descibed in G. Ciapetti and A. Di Ciaccio | |
127 | // Proc. of the LHC Workshop, Aachen 1990, Vol. II p. 155 | |
128 | // | |
129 | // select Pythia min. bias model | |
130 | SetMSEL(2); | |
131 | SetMSUB(92,1); | |
132 | SetMSUB(93,1); | |
133 | SetMSUB(94,1); | |
134 | SetMSUB(95,1); | |
135 | // Multiple interactions switched on | |
136 | SetMSTP(81,1); | |
137 | SetMSTP(82,1); | |
138 | // Low-pT cut-off for hard scattering | |
139 | SetPARP(81,1.9); | |
140 | // model for subsequent non-hardest interaction | |
141 | // 90% gg->gg 10% gg->qq | |
142 | SetPARP(86,0.9); | |
143 | // 90% of gluon interactions have minimum string length | |
144 | SetPARP(85,0.9); | |
fe4da5cc | 145 | } |
146 | // | |
147 | // Initialize PYTHIA | |
95b811fe | 148 | SetMSTP(41,1); |
75c6d54e | 149 | |
95b811fe | 150 | Initialize("CMS","p","p",fEcms); |
fe4da5cc | 151 | } |
152 | ||
95b811fe | 153 | Int_t AliPythia::CheckedLuComp(Int_t kf) |
fe4da5cc | 154 | { |
95b811fe | 155 | // Check Lund particle code (for debugging) |
156 | Int_t kc=Pycomp(kf); | |
157 | printf("\n Lucomp kf,kc %d %d",kf,kc); | |
158 | return kc; | |
fe4da5cc | 159 | } |
160 | ||
811826d8 | 161 | void AliPythia::SetNuclei(Int_t a1, Int_t a2) |
162 | { | |
163 | // Treat protons as inside nuclei with mass numbers a1 and a2 | |
164 | // The MSTP array in the PYPARS common block is used to enable and | |
165 | // select the nuclear structure functions. | |
166 | // MSTP(52) : (D=1) choice of proton and nuclear structure-function library | |
167 | // =1: internal PYTHIA acording to MSTP(51) | |
168 | // =2: PDFLIB proton s.f., with MSTP(51) = 1000xNGROUP+NSET | |
169 | // =3: PDFLIB proton s.f. with nuclar correction: | |
170 | // MSTP( 51) = 1000xNPGROUP+NPSET | |
171 | // MSTP(151) = 1000xNAGROUP+NASET | |
172 | // MSTP(192) : Mass number of nucleus side 1 | |
173 | // MSTP(193) : Mass number of nucleus side 2 | |
174 | ||
175 | SetMSTP(52,3); | |
176 | SetMSTP(191, 1001); | |
177 | SetMSTP(192, a1); | |
178 | SetMSTP(193, a2); | |
179 | } | |
180 | ||
181 | ||
95b811fe | 182 | AliPythia* AliPythia::Instance() |
fe4da5cc | 183 | { |
95b811fe | 184 | if (fgAliPythia) { |
185 | return fgAliPythia; | |
186 | } else { | |
187 | fgAliPythia = new AliPythia(); | |
188 | return fgAliPythia; | |
fe4da5cc | 189 | } |
fe4da5cc | 190 | } |
95b811fe | 191 | void AliPythia::Streamer(TBuffer &R__b) {} |
fe4da5cc | 192 | |
fe4da5cc | 193 | |
194 | ||
195 | ||
196 | ||
197 | ||
198 |