]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TUHKMgen/AliGenUHKM.cxx
Coding convention compliant version (by Raffaele)
[u/mrichter/AliRoot.git] / TUHKMgen / AliGenUHKM.cxx
CommitLineData
b1c2e580 1/////////////////////////////////////////////////////////////////////////////
2// Generator using UHKM 3.0 as an external generator. //
3// ( only the HYDJET++ part is implemented for a moment) //
4// temporary link: //
5// http://lav01.sinp.msu.ru/~igor/hydjet++/hydjet++.txt //
6// The main UHKM options are accessable through this interface. //
7// Uses the TUHKMgen implementation of TGenerator. //
8// Author of the first implementation: Sergey Zaporozhets //
9// (zaporozh@sunhe.jinr.ru) //
10// Futhers modifications were made by //
11// Ionut Cristian Arsene (i.c.arsene@fys.uio.no) //
12// & Malinina Liudmila(malinina@lav01.sinp.msu.ru) using as an example //
13// AliGenTherminator.cxx created by Adam Kisiel //
14// //
15////////////////////////////////////////////////////////////////////////////
16
17#include <TUHKMgen.h>
18#ifndef DATABASE_PDG
19#include "DatabasePDG.h"
20#endif
21#ifndef PARTICLE_PDG
22#include "ParticlePDG.h"
23#endif
24#include <TLorentzVector.h>
25#include <TPDGCode.h>
26#include <TParticle.h>
27#include <TClonesArray.h>
28#include <TMCProcess.h>
29#include "TDatabasePDG.h"
30#include "TSystem.h"
31
32#include "AliGenUHKM.h"
33#include "AliRun.h"
34#include "AliConst.h"
35#include "AliDecayer.h"
36#include "AliGenEventHeader.h"
37#include "AliGenHijingEventHeader.h"
38#include "AliLog.h"
39
40#include <iostream>
41#include <string>
42using namespace std;
43
44ClassImp(AliGenUHKM)
45
46//_______________________________________
47AliGenUHKM::AliGenUHKM()
48 :AliGenMC(),
49 fTrials(0),
50 fUHKMgen(0),
786056a2 51 fHydjetParams(),
52 fStableFlagged(0),
b1c2e580 53 fUseCharmParticles(kFALSE),
54 fMinWidth(0.0),
55 fMaxWidth(10.0),
56 fMinMass(0.0001),
57 fMaxMass(10.0)
58{
59 cout << "AliGenUHKM::AliGenUHKM() IN" << endl;
60
61 // LHC
62 fHydjetParams.fSqrtS=5500; //LHC
63 fHydjetParams.fAw=207;//Pb-Pb
64 fHydjetParams.fBmin=0.;
65 fHydjetParams.fBmax=0.5; //0-5% centrality
66 fHydjetParams.fT = 0.170;
67 fHydjetParams.fMuB = 0.0;
68 fHydjetParams.fMuS = 0.0;
69 fHydjetParams.fMuI3 = 0.0;
70 fHydjetParams.fThFO = 0.130;
71 fHydjetParams.fMu_th_pip = 0.0;
72 fHydjetParams.fSeed=0;
73 fHydjetParams.fTau=10.;
74 fHydjetParams.fSigmaTau=3.;
75 fHydjetParams.fR=11.;
76 fHydjetParams.fYlmax=4.0;
77 fHydjetParams.fUmax=1.1;
78 fHydjetParams.fDelta=0.;
79 fHydjetParams.fEpsilon=0.;
80 fHydjetParams.fWeakDecay=0; //>=0 on ,-1 off
81 fHydjetParams.fEtaType=1;//gaus
82 fHydjetParams.fCorrS=1.;
83 fHydjetParams.fNhsel=2;
84 fHydjetParams.fIshad=1;
85 fHydjetParams.fPtmin=7.0;
86 fHydjetParams.fT0=0.8;
87 fHydjetParams.fTau0=0.1;
88 fHydjetParams.fNf=0;
89 fHydjetParams.fIenglu=0;
90 fHydjetParams.fIanglu=0;
91
92
93/* RHIC
94 fHydjetParams.fSqrtS=200; //RHIC
95 fHydjetParams.fAw=197;//Au-Au
96 fHydjetParams.fBmin=0.;
97 fHydjetParams.fBmax=0.5; //0-5% centrality
98 fHydjetParams.fT = 0.165;
99 fHydjetParams.fMuB = 0.0285;
100 fHydjetParams.fMuS = 0.007;
101 fHydjetParams.fMuI3 = -0.001;
102 fHydjetParams.fThFO = 0.100;
103 fHydjetParams.fMu_th_pip = 0.053;
104 fHydjetParams.fSeed=0;
105 fHydjetParams.fTau=8.;
106 fHydjetParams.fSigmaTau=2.;
107 fHydjetParams.fR=10.;
108 fHydjetParams.fYlmax=3.3;
109 fHydjetParams.fUmax=1.1;
110 fHydjetParams.fDelta=0.;
111 fHydjetParams.fEpsilon=0.;
112 fHydjetParams.fWeakDecay=0; //>=0 on ,-1 off
113 fHydjetParams.fEtaType=1;//gaus
114 fHydjetParams.fCorrS=1.;
115 fHydjetParams.fNhsel=2;
116 fHydjetParams.fIshad=0;
117 fHydjetParams.fPtmin=3.4;
118 fHydjetParams.fT0=0.3;
119 fHydjetParams.fTau0=0.4;
120 fHydjetParams.fNf=2;
121 fHydjetParams.fIenglu=0;
122 fHydjetParams.fIanglu=0;
123*/
124 strcpy(fParticleFilename, Form("%s/TUHKMgen/UHKM/particles.data", gSystem->Getenv("ALICE_ROOT")));
125 strcpy(fDecayFilename, Form("%s/TUHKMgen/UHKM/tabledecay.txt", gSystem->Getenv("ALICE_ROOT")));
126 for(Int_t i=0; i<500; i++) {
127 fStableFlagPDG[i] = 0;
128 fStableFlagStatus[i] = kFALSE;
129 }
130 fStableFlagged = 0;
131
132 cout << "AliGenUHKM::AliGenUHKM() OUT" << endl;
133}
134
135//_______________________________________
136AliGenUHKM::AliGenUHKM(Int_t npart)
137 :AliGenMC(npart),
138 fTrials(0),
139 fUHKMgen(0),
786056a2 140 fHydjetParams(),
141 fStableFlagged(0),
b1c2e580 142 fUseCharmParticles(kFALSE),
143 fMinWidth(0.0),
144 fMaxWidth(10.0),
145 fMinMass(0.0001),
146 fMaxMass(10.0)
147{
148 cout << "AliGenUHKM::AliGenUHKM(Int_t) IN" << endl;
149 fName = "UHKM";
150 fTitle= "Particle Generator using UHKM 3.0";
151
152 // Constructor specifying the size of the particle table
153 fNprimaries = 0;
154
155 //LHC
156 fHydjetParams.fSqrtS=5500; //LHC
157 fHydjetParams.fAw=207;//Pb-Pb
158 fHydjetParams.fBmin=0.;
159 fHydjetParams.fBmax=0.5; //0-5% centrality
160 fHydjetParams.fT = 0.170;
161 fHydjetParams.fMuB = 0.0;
162 fHydjetParams.fMuS = 0.0;
163 fHydjetParams.fMuI3 = 0.0;
164 fHydjetParams.fThFO = 0.130;
165 fHydjetParams.fMu_th_pip = 0.0;
166 fHydjetParams.fSeed=0;
167 fHydjetParams.fTau=10.;
168 fHydjetParams.fSigmaTau=3.;
169 fHydjetParams.fR=11.;
170 fHydjetParams.fYlmax=4.0;
171 fHydjetParams.fUmax=1.1;
172 fHydjetParams.fDelta=0.;
173 fHydjetParams.fEpsilon=0.;
174 fHydjetParams.fWeakDecay=0; //>=0 on ,-1 off
175 fHydjetParams.fEtaType=1;//gaus
176 fHydjetParams.fCorrS=1.;
177 fHydjetParams.fNhsel=2;
178 fHydjetParams.fIshad=1;
179 fHydjetParams.fPtmin=7.0;
180 fHydjetParams.fT0=0.8;
181 fHydjetParams.fTau0=0.1;
182 fHydjetParams.fNf=0;
183 fHydjetParams.fIenglu=0;
184 fHydjetParams.fIanglu=0;
185
186/*RHIC
187 fHydjetParams.fSqrtS=200; //RHIC
188 fHydjetParams.fAw=197;//Au-Au
189 fHydjetParams.fBmin=0.;
190 fHydjetParams.fBmax=0.5; //0-5% centrality
191 fHydjetParams.fT = 0.165;
192 fHydjetParams.fMuB = 0.0285;
193 fHydjetParams.fMuS = 0.007;
194 fHydjetParams.fMuI3 = -0.001;
195 fHydjetParams.fThFO = 0.100;
196 fHydjetParams.fMu_th_pip = 0.053;
197 fHydjetParams.fSeed=0;
198 fHydjetParams.fTau=8.;
199 fHydjetParams.fSigmaTau=2.;
200 fHydjetParams.fR=10.;
201 fHydjetParams.fYlmax=3.3;
202 fHydjetParams.fUmax=1.1;
203 fHydjetParams.fDelta=0.;
204 fHydjetParams.fEpsilon=0.;
205 fHydjetParams.fWeakDecay=0;//>=0 on ,-1 off
206 fHydjetParams.fEtaType=1;//gaus
207 fHydjetParams.fCorrS=1.;
208 fHydjetParams.fNhsel=2;
209 fHydjetParams.fIshad=1;
210 fHydjetParams.fPtmin=3.4;
211 fHydjetParams.fT0=0.3;
212 fHydjetParams.fTau0=0.4;
213 fHydjetParams.fNf=2;
214 fHydjetParams.fIenglu=0;
215 fHydjetParams.fIanglu=0;
216*/
217
218 strcpy(fParticleFilename, Form("%s/TUHKMgen/UHKM/particles.data", gSystem->Getenv("ALICE_ROOT")));
219 strcpy(fDecayFilename, Form("%s/TUHKMgen/UHKM/tabledecay.txt", gSystem->Getenv("ALICE_ROOT")));
220 for(Int_t i=0; i<500; i++) {
221 fStableFlagPDG[i] = 0;
222 fStableFlagStatus[i] = kFALSE;
223 }
224 fStableFlagged = 0;
225
226 cout << "AliGenUHKM::AliGenUHKM(Int_t) OUT" << endl;
227}
228
229//__________________________________________
230AliGenUHKM::~AliGenUHKM()
231{}
232
233void AliGenUHKM::SetAllParametersRHIC()
234{
235 SetEcms(200.0); // RHIC top energy
236 SetAw(197); // Au+Au
237 SetBmin(0.0); // 0%
238 SetBmax(0.5); // 5%
239 SetChFrzTemperature(0.165); // T_ch = 165 MeV
240 SetMuB(0.0285); // mu_B = 28.5 MeV
241 SetMuS(0.007); // mu_S = 7 MeV
242 SetMuQ(-0.001); // mu_Q = -1 MeV
243 SetThFrzTemperature(0.100); // T_th = 100 MeV
244 SetMuPionThermal(0.053); // mu_th_pion = 53 MeV
245 SetSeed(0); // use UNIX time
246 SetTauB(8.0); // tau = 8 fm/c
247 SetSigmaTau(2.0); // sigma_tau = 2 fm/c
248 SetRmaxB(10.0); // fR = 10 fm
249 SetYlMax(3.3); // fYmax = 3.3
250 SetEtaRMax(1.1); // Umax = 1.1
251 SetMomAsymmPar(0.0); // delta = 0.0
252 SetCoordAsymmPar(0.0); // epsilon = 0.0
253 SetFlagWeakDecay(0); // weak decay on (<0 off !!!)
254 SetEtaType(1); // gaus distributed with fYmax dispersion (0 means boost invariant)
255 SetGammaS(1.0); // gammaS = 1.0 (no strangeness canonical suppresion)
256 SetPyquenNhsel(2); // hydro on, jets on, jet quenching on
257 SetPyquenShad(1); // shadowing on (0 off)
258 SetPyquenPtmin(3.4); // ptmin = 3.4 GeV/c
259 SetPyquenT0(0.3); // T0 = 300 MeV
260 SetPyquenTau0(0.4); // tau0 = 0.4 fm/c
261 SetPyquenNf(2); // 2 flavours
262 SetPyquenIenglu(0); // radiative and collisional energy loss
263 SetPyquenIanglu(0); // small gluon angular distribution
264}
265
266void AliGenUHKM::SetAllParametersLHC()
267{
268 SetEcms(5500.0); // LHC
269 SetAw(207); // Pb+Pb
270 SetBmin(0.0); // 0%
271 SetBmax(0.5); // 5%
272 SetChFrzTemperature(0.170); // T_ch = 170 MeV
273 SetMuB(0.0); // mu_B = 0 MeV
274 SetMuS(0.0); // mu_S = 0 MeV
275 SetMuQ(0.0); // mu_Q = 0 MeV
276 SetThFrzTemperature(0.130); // T_th = 130 MeV
277 SetMuPionThermal(0.0); // mu_th_pion = 0 MeV
278 SetSeed(0); // use UNIX time
279 SetTauB(10.0); // tau = 10 fm/c
280 SetSigmaTau(3.0); // sigma_tau = 3 fm/c
281 SetRmaxB(11.0); // fR = 11 fm
282 SetYlMax(4.0); // fYmax = 4.0
283 SetEtaRMax(1.1); // Umax = 1.1
284 SetMomAsymmPar(0.0); // delta = 0.0
285 SetCoordAsymmPar(0.0); // epsilon = 0.0
286 SetFlagWeakDecay(0); // weak decay on (<0 off !!!)
287 SetEtaType(1); // gaus distributed with fYmax dispersion (0 means boost invariant)
288 SetGammaS(1.0); // gammaS = 1.0 (no strangeness canonical suppresion)
289 SetPyquenNhsel(2); // hydro on, jets on, jet quenching on
290 SetPyquenShad(1); // shadowing on (0 off)
291 SetPyquenPtmin(7.0); // ptmin = 7.0 GeV/c
292 SetPyquenT0(0.8); // T0 = 800 MeV
293 SetPyquenTau0(0.1); // tau0 = 0.4 fm/c
294 SetPyquenNf(0); // 0 flavours
295 SetPyquenIenglu(0); // radiative and collisional energy loss
296 SetPyquenIanglu(0); // small gluon angular distribution
297}
298
299//_________________________________________
300void AliGenUHKM::Init()
301{
302 cout << "AliGenUHKM::Init() IN" << endl;
303
304 SetMC(new TUHKMgen());
305 fUHKMgen = (TUHKMgen*) fMCEvGen;
306 SetAllParameters();
307
308 AliGenMC::Init();
309
310 fUHKMgen->Initialize();
311 CheckPDGTable();
312
313 fUHKMgen->Print();
314 cout << "AliGenUHKM::Init() OUT" << endl;
315}
316
317
318
319//________________________________________
320void AliGenUHKM::Generate()
321{
322 cout << "AliGenUHKM::Generate() IN" << endl;
323 Float_t polar[3] = {0,0,0};
324 Float_t origin[3] = {0,0,0};
325 Float_t origin0[3] = {0,0,0};
326 Float_t v[3];
327 Float_t mass, energy;
328
329 Vertex();
330 for(Int_t j=0; j<3; j++) origin0[j] = fVertex[j];
331
332 fTrials = 0;
333 // cout << "AliGenUHKM::Generate() fTrials = " << fTrials << endl;
334
335 Int_t nt = 0;
336
337 fUHKMgen->GenerateEvent();
338 fTrials++;
339
340 fUHKMgen->ImportParticles(&fParticles,"All");
341
342 Int_t np = fParticles.GetEntriesFast();
343 cout << "AliGenUHKM::Generate() GetEntries " <<np<< endl;
344
345
346 Int_t* idsOnStack = new Int_t[np];
347 Int_t* newPos = new Int_t[np];
348 for(Int_t i=0; i<np; i++) newPos[i] = i;
349
350 //_________ Loop for particle selection
351 // for(Int_t i=1; i<np; i++) {
352 for(Int_t i=1; i<np; i++) {
353 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
354 // the particle indexes are 0 based but fParticles is a 1 based array
355 // -1 is the trivial code (when it does not exist)
356 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
357 TParticle *iparticle = (TParticle*)fParticles.At(i);
358// cout << "AliGenUHKM::Generate() particle #" << i << " in fParticles *********************"<< endl;
359
360 Int_t kf = iparticle->GetPdgCode();
361// cout << "AliGenUHKM::Generate() PDG = " << kf << endl;
362
363 Bool_t hasMother = (iparticle->GetFirstMother() >= 0);
364
365// cout << "AliGenUHKM::Generate() mother index in fParticles = "
366// << (iparticle->GetFirstMother()==-1 ? -1 : iparticle->GetFirstMother()+1)
367// << " ; hasMother = " << hasMother << endl;
368
369 Bool_t hasDaughter = (iparticle->GetNDaughters() > 0);
370
371 // cout << "AliGenUHKM::Generate() n.daughters = " << iparticle->GetNDaughters()
372 //<< " ; hasDaughter = " << hasDaughter << endl;
373
374
375 if(hasDaughter) {
376 // cout << "AliGenUHKM::Generate() decayed particle (not trackable)" << endl;
377 // This particle has decayed
378 // It will not be tracked
379 // Add it only once with coordiinates not
380 // smeared with primary vertex position
381 Float_t p[3] = {p[0] = iparticle->Px(),
382 p[1] = iparticle->Py(),
383 p[2] = iparticle->Pz()};
384 mass = TDatabasePDG::Instance()->GetParticle(kf)->Mass();
385 energy = sqrt(mass*mass + p[0]*p[0] + p[1]*p[1] + p[2]*p[2]);
386 v[0] = iparticle->Vx();
387 v[1] = iparticle->Vy();
388 v[2] = iparticle->Vz();
389 Float_t time = iparticle->T();
390
391 Int_t type = iparticle->GetStatusCode(); //j1/h0
392
393 Int_t imo = -1;
394 if(hasMother) {
395 imo = iparticle->GetFirstMother(); //index of mother particle in fParticles
396 } // if has mother
397 Bool_t trackFlag = (!hasDaughter); // tFlag is kFALSE --> do not track the particle
398
399// printf("Pushing Track %d with status %d mother %d\n", kf, trackFlag, imo>=0?idsOnStack[imo]:imo);
400 PushTrack(trackFlag, (imo>=0 ? idsOnStack[imo+1] : imo), kf,
401 p[0], p[1], p[2], energy,
402 v[0], v[1], v[2], time,
403 polar[0], polar[1], polar[2],
404 (hasMother ? kPDecay : kPNoProcess), nt);
405 // cout << "AliGenUHKM::Generate() pushed on stack with stack index = " << nt
406// << "; mother index on stack = " << (imo>=0 ? idsOnStack[imo+1] : imo) << endl;
407 idsOnStack[i] = nt;
408 fNprimaries++;
409 KeepTrack(nt);
410 }
411 else {
412 // cout << "AliGenUHKM::Generate() final particle --> push it twice on the stack" << endl;
413 // This is a final state particle
414 // It will be tracked
415 // Add it TWICE to the stack !!!
416 // First time with event-wide coordinates (for femtoscopy) -
417 // this one will not be tracked
418 // Second time with event-wide ccordiantes and vertex smearing
419 // this one will be tracked
420 Float_t p[3] = {p[0] = iparticle->Px(),
421 p[1] = iparticle->Py(),
422 p[2] = iparticle->Pz()};
423 mass = TDatabasePDG::Instance()->GetParticle(kf)->Mass();
424 energy = sqrt(mass*mass + p[0]*p[0] + p[1]*p[1] + p[2]*p[2]);
425 v[0] = iparticle->Vx();
426 v[1] = iparticle->Vy();
427 v[2] = iparticle->Vz();
428
429 Int_t type = iparticle->GetStatusCode(); //j1/h0
430 Int_t coeffT=1;
431 if(type==1)coeffT=-1; //to separate particles from jets
432
433 Int_t imo = -1;
434
435 if(hasMother) {
436 imo = iparticle->GetFirstMother();
437 } // if has mother
438 Bool_t trackFlag = (hasDaughter); // tFlag = kFALSE --> do not track this one, its for femtoscopy
439
440 PushTrack(trackFlag, (imo>=0 ? idsOnStack[imo+1] : imo), kf,
441 p[0], p[1], p[2], energy,
442 v[0], v[1], v[2], (iparticle->T())*coeffT,
443 polar[0], polar[1], polar[2],
444 hasMother ? kPDecay:kPNoProcess, nt);
445 // cout << "AliGenUHKM::Generate() pushed on stack with stack index = " << nt
446 // << "; mother index on stack = " << (imo>=0 ? idsOnStack[imo+1] : imo) << endl;
447
448 idsOnStack[i] = nt;
449 fNprimaries++;
450 KeepTrack(nt);
451
452 origin[0] = origin0[0]+v[0];
453 origin[1] = origin0[1]+v[1];
454 origin[2] = origin0[2]+v[2];
455 imo = nt;
456
457 trackFlag = (!hasDaughter); // tFlag = kTRUE --> track this one
458 //cout << "AliGenUHKM::Generate() trackFlag = " << trackFlag << endl;
459
460 PushTrack(trackFlag, imo, kf,
461 p[0], p[1], p[2], energy,
462 origin[0], origin[1], origin[2], iparticle->T(),
463 polar[0], polar[1], polar[2],
464 hasMother ? kPDecay:kPNoProcess, nt);
465 // cout << "AliGenUHKM::Generate() pushed on stack with stack index = " << nt
466 // << "; mother index on stack = " << imo << endl;
467 fNprimaries++;
468 KeepTrack(nt);
469 }
470 }
471
472 SetHighWaterMark(fNprimaries);
473
474 TArrayF eventVertex;
475 eventVertex.Set(3);
476 eventVertex[0] = origin0[0];
477 eventVertex[1] = origin0[1];
478 eventVertex[2] = origin0[2];
479
480 // Builds the event header, to be called after each event
481 AliGenEventHeader* header = new AliGenHijingEventHeader("UHKM");
482
483 ((AliGenHijingEventHeader*) header)->SetNProduced(fNprimaries);
484 ((AliGenHijingEventHeader*) header)->SetPrimaryVertex(eventVertex);
485 ((AliGenHijingEventHeader*) header)->SetImpactParameter(0.0);
486 ((AliGenHijingEventHeader*) header)->SetTotalEnergy(0.0);
487 ((AliGenHijingEventHeader*) header)->SetHardScatters(0);
488 ((AliGenHijingEventHeader*) header)->SetParticipants(0, 0);
489 ((AliGenHijingEventHeader*) header)->SetCollisions(0, 0, 0, 0);
490 ((AliGenHijingEventHeader*) header)->SetSpectators(0, 0, 0, 0);
491 ((AliGenHijingEventHeader*) header)->SetReactionPlaneAngle(0);//evrot);
492
493 header->SetPrimaryVertex(fVertex);
494 AddHeader(header);
495 fCollisionGeometry = (AliGenHijingEventHeader*) header;
496
497 delete idsOnStack;
498
499 // gAlice->SetGenEventHeader(header);
500
501 printf(" Finish Generate .. %d ..\n",nt);
502 cout << "AliGenUHKM::Generate() OUT" << endl;
503}
504
505void AliGenUHKM::Copy(TObject &) const
506{
507 Fatal("Copy","Not implemented!\n");
508}
509
510void AliGenUHKM::SetAllParameters() {
511 cout << "AliGenUHKM::SetAllParameters() IN" << endl;
512
513 fUHKMgen->SetEcms(fHydjetParams.fSqrtS);
514 fUHKMgen->SetBmin(fHydjetParams.fBmin);
515 fUHKMgen->SetBmax(fHydjetParams.fBmax);
516 fUHKMgen->SetAw(fHydjetParams.fAw);
517 fUHKMgen->SetSeed(fHydjetParams.fSeed);
518
519 fUHKMgen->SetChFrzTemperature(fHydjetParams.fT);
520 fUHKMgen->SetMuB(fHydjetParams.fMuB);
521 fUHKMgen->SetMuS(fHydjetParams.fMuS);
522 fUHKMgen->SetMuQ(fHydjetParams.fMuI3);
523 fUHKMgen->SetTauB(fHydjetParams.fTau);
524 fUHKMgen->SetThFrzTemperature(fHydjetParams.fThFO);
525 fUHKMgen->SetMuPionThermal(fHydjetParams.fMu_th_pip);
526
527 fUHKMgen->SetSigmaTau(fHydjetParams.fSigmaTau);
528 fUHKMgen->SetRmaxB(fHydjetParams.fR);
529 fUHKMgen->SetYlMax(fHydjetParams.fYlmax);
530 fUHKMgen->SetEtaRMax(fHydjetParams.fUmax);
531 fUHKMgen->SetMomAsymmPar(fHydjetParams.fDelta);
532 fUHKMgen->SetCoordAsymmPar(fHydjetParams.fEpsilon);
533
534 fUHKMgen->SetGammaS(fHydjetParams.fCorrS);
535 // fUHKMgen->SetHdec(fHydjetParams.fTime);
536 fUHKMgen->SetEtaType(fHydjetParams.fEtaType);
537 fUHKMgen->SetFlagWeakDecay(fHydjetParams.fWeakDecay);
538
539 //PYQUEN parameters
540
541 fUHKMgen->SetPyquenNhsel(fHydjetParams.fNhsel);
542 fUHKMgen->SetPyquenShad(fHydjetParams.fIshad);
543 fUHKMgen->SetPyquenPtmin(fHydjetParams.fPtmin);
544 fUHKMgen->SetPyquenT0(fHydjetParams.fT0);
545 fUHKMgen->SetPyquenTau0(fHydjetParams.fTau0);
546 fUHKMgen->SetPyquenNf(fHydjetParams.fNf);
547 fUHKMgen->SetPyquenIenglu(fHydjetParams.fIenglu);
548 fUHKMgen->SetPyquenIanglu(fHydjetParams.fIanglu);
549
550 fUHKMgen->SetPDGParticleFile(fParticleFilename);
551 fUHKMgen->SetPDGDecayFile(fDecayFilename);
552 for(Int_t i=0; i<fStableFlagged; i++) fUHKMgen->SetPDGParticleStable(fStableFlagPDG[i], fStableFlagStatus[i]);
553 fUHKMgen->SetUseCharmParticles(fUseCharmParticles);
554 fUHKMgen->SetMinimumWidth(fMinWidth);
555 fUHKMgen->SetMaximumWidth(fMaxWidth);
556 fUHKMgen->SetMinimumMass(fMinMass);
557 fUHKMgen->SetMaximumMass(fMaxMass);
558
559 cout<<" Print all parameters "<<endl;
560 cout<<" SqrtS = "<<fHydjetParams.fSqrtS<<endl;
561 cout<<" Bmin = "<< fHydjetParams.fBmin<<endl;
562 cout<<" Bmax= "<<fHydjetParams.fBmax<<endl;
563 cout<<" Aw= "<<fHydjetParams.fAw<<endl;
564 cout<<" Seed= "<<fHydjetParams.fSeed<<endl;
565
566 cout<<" ---Stat-model parameters----------- "<<endl;
567
568 cout<<" ChFrzTemperature= "<<fHydjetParams.fT<<endl;
569 cout<<" MuB= "<<fHydjetParams.fMuB<<endl;
570 cout<<" MuS= "<<fHydjetParams.fMuS<<endl;
571 cout<<" MuQ= "<<fHydjetParams.fMuI3<<endl;
572 cout<<" TauB= "<<fHydjetParams.fTau<<endl;
573 cout<<" ThFrzTemperature= "<<fHydjetParams.fThFO<<endl;
574 cout<<" MuPionThermal= "<<fHydjetParams.fMu_th_pip<<endl;
575
576cout<<"-----Volume parameters -------------- "<<endl;
577
578 cout<<" SigmaTau= "<<fHydjetParams.fSigmaTau<<endl;
579 cout<<" RmaxB= "<<fHydjetParams.fR<<endl;
580 cout<<" YlMax= "<<fHydjetParams.fYlmax<<endl;
581 cout<<" EtaRMax= "<<fHydjetParams.fUmax<<endl;
582 cout<<" MomAsymmPar= "<<fHydjetParams.fDelta<<endl;
583 cout<<" CoordAsymmPar= "<<fHydjetParams.fEpsilon<<endl;
584
585cout<<" --------Flags------ "<<endl;
586
587 cout<<" GammaS= "<<fHydjetParams.fCorrS<<endl;
588 // fUHKMgen->SetHdec(fHydjetParams.fTime<<endl;
589 cout<<" EtaType= "<<fHydjetParams.fEtaType<<endl;
590 cout<<" FlagWeakDecay= "<<fHydjetParams.fWeakDecay<<endl;
591
592 cout<<"----PYQUEN parameters---"<<endl;
593
594 cout<<" Nhsel= "<<fHydjetParams.fNhsel<<endl;
595 cout<<" Shad= "<<fHydjetParams.fIshad<<endl;
596 cout<<" Ptmin= "<<fHydjetParams.fPtmin<<endl;
597 cout<<" T0= "<<fHydjetParams.fT0<<endl;
598 cout<<" Tau0= "<<fHydjetParams.fTau0<<endl;
599 cout<<" Nf= "<<fHydjetParams.fNf<<endl;
600 cout<<" Ienglu= "<<fHydjetParams.fIenglu<<endl;
601 cout<<" Ianglu= "<<fHydjetParams.fIanglu<<endl;
602
603 cout<<"----PDG table parameters---"<<endl;
604
605 cout<<" UseCharmParticles= "<<fUseCharmParticles<<endl;
606 cout<<" MinimumWidth= "<<fMinWidth<<endl;
607 cout<<" MaximumWidth= "<<fMaxWidth<<endl;
608 cout<<" MinimumMass= "<<fMinMass<<endl;
609 cout<<" MaximumMass= "<<fMaxMass<<endl;
610
611
612
613 cout << "AliGenUHKM::SetAllParameters() OUT" << endl;
614}
615
616// add the additional PDG codes from UHKM(SHARE table) to ROOT's table
617void AliGenUHKM::CheckPDGTable() {
618 cout << "AliGenUHKM::CheckPDGTable() IN" << endl;
619 //TDabasePDG *rootPDG = TDatabasePDG::Instance(); // ROOT's PDG table
620 DatabasePDG *uhkmPDG = fUHKMgen->PDGInfo(); // UHKM's PDG table
621 TParticlePDG *rootTestParticle;
622 ParticlePDG *uhkmTestParticle;
623
624 cout << "particles with good status in UHKM table = " << uhkmPDG->GetNParticles() << endl;
625 // loop over all particles in the SHARE table
626 for(Int_t i=0; i<uhkmPDG->GetNParticles(); i++) {
627 cout << "particle #" << i << " ================" << endl;
628 // get a particle specie
629 uhkmTestParticle = uhkmPDG->GetPDGParticleByIndex(i);
630 cout << "PDG = " << uhkmTestParticle->GetPDG() << endl;
631 // check if this code exists in ROOT's table
632 rootTestParticle = TDatabasePDG::Instance()->GetParticle(uhkmTestParticle->GetPDG());
633 if(!rootTestParticle) { // if not then add it to the ROOT's PDG database
634
635 TDatabasePDG::Instance()->AddParticle(uhkmTestParticle->GetName(), uhkmTestParticle->GetName(),
636 uhkmTestParticle->GetMass(), uhkmTestParticle->GetElectricCharge(),
637 (uhkmTestParticle->GetWidth()<1e-10 ? kTRUE : kFALSE),
638 uhkmTestParticle->GetWidth(),
639 (Int_t(uhkmTestParticle->GetBaryonNumber())==0 ? "meson" : "baryon"),
640 uhkmTestParticle->GetPDG());
641 cout << "Not found in ROOT's PDG database --> added now" << endl;
642 if(uhkmTestParticle->GetWidth()<1e-10) cout<<uhkmTestParticle->GetPDG()<<"its mass "<<
643 TDatabasePDG::Instance()->GetParticle(uhkmTestParticle->GetPDG())->Mass()<<
644 TDatabasePDG::Instance()->GetParticle(uhkmTestParticle->GetPDG())->Width()<<endl;
645 }
646 else
647 cout << "Found in ROOT's PDG database --> not added" << endl;
648 } // end for
649 cout << "AliGenUHKM::CheckPDGTable() OUT" << endl;
650}