1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 // AliGenGeVSim is a class implementing GeVSim event generator.
21 // GeVSim is a simple Monte-Carlo event generator for testing detector and
22 // algorythm performance especialy concerning flow and event-by-event studies
24 // In this event generator particles are generated from thermal distributions
25 // without any dynamics and addicional constrains. Distribution parameters like
26 // multiplicity, particle type yields, inverse slope parameters, flow coeficients
27 // and expansion velocities are expleicite defined by the user.
29 // GeVSim contains four thermal distributions the same as
30 // MevSim event generator developed for STAR experiment.
32 // In addition custom distributions can be used be the mean
33 // either two dimensional formula (TF2), a two dimensional histogram or
34 // two one dimensional histograms.
36 // Azimuthal distribution is deconvoluted from (Pt,Y) distribution
37 // and is described by two Fourier coefficients representing
38 // Directed and Elliptic flow.
40 ////////////////////////////////////////////////////////////////////////////////
42 // To apply flow to event ganerated by an arbitraly event generator
43 // refer to AliGenAfterBurnerFlow class.
45 ////////////////////////////////////////////////////////////////////////////////
47 // For examples, parameters and testing macros refer to:
48 // http:/home.cern.ch/radomski
50 // for more detailed description refer to ALICE NOTE
51 // "GeVSim Monte-Carlo Event Generator"
52 // S.Radosmki, P. Foka.
55 // Sylwester Radomski,
60 ////////////////////////////////////////////////////////////////////////////////
62 // Updated and revised: September 2002, S. Radomski, GSI
64 ////////////////////////////////////////////////////////////////////////////////
67 #include <Riostream.h>
73 #include <TObjArray.h>
75 #include <TParticle.h>
76 #include <TDatabasePDG.h>
80 #include "AliGeVSimParticle.h"
81 #include "AliGenGeVSim.h"
82 #include "AliGenGeVSimEventHeader.h"
83 #include "AliGenerator.h"
89 ClassImp(AliGenGeVSim)
91 //////////////////////////////////////////////////////////////////////////////////
93 AliGenGeVSim::AliGenGeVSim() :
106 // Default constructor
109 for (Int_t i=0; i<4; i++)
111 for (Int_t i=0; i<2; i++)
115 //////////////////////////////////////////////////////////////////////////////////
117 AliGenGeVSim::AliGenGeVSim(Float_t psi, Bool_t isMultTotal)
121 fIsMultTotal(isMultTotal),
130 // Standard Constructor.
132 // models - thermal model to be used:
133 // 1 - deconvoluted pt and Y source
134 // 2,3 - thermalized sphericaly symetric sources
135 // 4 - thermalized source with expansion
136 // 5 - custom model defined in TF2 object named "gevsimPtY"
137 // 6 - custom model defined by two 1D histograms
138 // 7 - custom model defined by 2D histogram
140 // psi - reaction plane in degrees
141 // isMultTotal - multiplicity mode
142 // kTRUE - total multiplicity (default)
143 // kFALSE - dN/dY at midrapidity
146 // checking consistancy
148 if (psi < 0 || psi > 360 )
149 Error ("AliGenGeVSim", "Reaction plane angle ( %13.3f )out of range [0..360]", psi);
151 fPsi = psi * TMath::Pi() / 180. ;
152 fIsMultTotal = isMultTotal;
156 fPartTypes = new TObjArray();
160 //////////////////////////////////////////////////////////////////////////////////
162 AliGenGeVSim::~AliGenGeVSim() {
164 // Default Destructor
166 // Removes TObjArray keeping list of registered particle types
169 if (fPartTypes != NULL) delete fPartTypes;
173 //////////////////////////////////////////////////////////////////////////////////
175 Bool_t AliGenGeVSim::CheckPtYPhi(Float_t pt, Float_t y, Float_t phi) const {
177 // private function used by Generate()
179 // Check bounds of Pt, Rapidity and Azimuthal Angle of a track
180 // Used only when generating particles from a histogram
183 if ( TestBit(kPtRange) && ( pt < fPtMin || pt > fPtMax )) return kFALSE;
184 if ( TestBit(kPhiRange) && ( phi < fPhiMin || phi > fPhiMax )) return kFALSE;
185 if ( TestBit(kYRange) && ( y < fYMin || y > fYMax )) return kFALSE;
190 //////////////////////////////////////////////////////////////////////////////////
192 Bool_t AliGenGeVSim::CheckAcceptance(Float_t p[3]) {
194 // private function used by Generate()
196 // Check bounds of a total momentum and theta of a track
199 if ( TestBit(kThetaRange) ) {
201 Double_t theta = TMath::ATan2( TMath::Sqrt(p[0]*p[0]+p[1]*p[1]), p[2]);
202 if ( theta < fThetaMin || theta > fThetaMax ) return kFALSE;
206 if ( TestBit(kMomentumRange) ) {
208 Double_t momentum = TMath::Sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2]);
209 if ( momentum < fPMin || momentum > fPMax) return kFALSE;
215 //////////////////////////////////////////////////////////////////////////////////
217 // Deconvoluted Pt Y formula
219 static Double_t aPtForm(Double_t * x, Double_t * par) {
220 // ptForm: pt -> x[0] , mass -> [0] , temperature -> [1]
221 // Description as string: " x * exp( -sqrt([0]*[0] + x*x) / [1] )"
223 return x[0] * TMath::Exp( -sqrt(par[0]*par[0] + x[0]*x[0]) / par[1]);
226 static Double_t aYForm(Double_t * x, Double_t * par) {
227 // y Form: y -> x[0] , sigmaY -> [0]
228 // Description as string: " exp ( - x*x / (2 * [0]*[0] ) )"
230 return TMath::Exp ( - x[0]*x[0] / (2 * par[0]*par[0] ) );
234 // Description as strings:
236 // const char *kFormE = " ( sqrt([0]*[0] + x*x) * cosh(y) ) ";
237 // const char *kFormG = " ( 1 / sqrt( 1 - [2]*[2] ) ) ";
238 // const char *kFormYp = "( [2]*sqrt(([0]*[0]+x*x)*cosh(y)*cosh(y)-[0]*[0])/([1]*sqrt(1-[2]*[2]))) ";
240 // const char* kFormula[3] = {
241 // " x * %s * exp( -%s / [1]) ",
242 // " (x * %s) / ( exp( %s / [1]) - 1 ) ",
243 // " x*%s*exp(-%s*%s/[1])*((sinh(%s)/%s)+([1]/(%s*%s))*(sinh(%s)/%s-cosh(%s)))"
245 // printf(kFormula[0], kFormE, kFormE);
246 // printf(kFormula[1], kFormE, kFormE);
247 // printf(kFormula[2], kFormE, kFormG, kFormE, kFormYp, kFormYp, kFormG, kFormE, kFormYp, kFormYp, kFormYp);
250 static Double_t aPtYFormula0(Double_t *x, Double_t * par) {
252 // mass -> [0] , temperature -> [1] , expansion velocity -> [2]
254 Double_t aFormE = TMath::Sqrt(par[0]*par[0] + x[0]*x[0]) * TMath::CosH(x[1]);
255 return x[0] * aFormE * TMath::Exp(-aFormE/par[1]);
258 static Double_t aPtYFormula1(Double_t *x, Double_t * par) {
260 // mass -> [0] , temperature -> [1] , expansion velocity -> [2]
262 Double_t aFormE = TMath::Sqrt(par[0]*par[0] + x[0]*x[0]) * TMath::CosH(x[1]);
263 return x[0] * aFormE / ( TMath::Exp( aFormE / par[1]) - 1 );
266 static Double_t aPtYFormula2(Double_t *x, Double_t * par) {
268 // mass -> [0] , temperature -> [1] , expansion velocity -> [2]
270 Double_t aFormE = TMath::Sqrt(par[0]*par[0] + x[0]*x[0]) * TMath::CosH(x[1]);
271 Double_t aFormG = 1 / TMath::Sqrt((1.-par[2])*(1.+par[2]));
272 Double_t aFormYp = par[2]*TMath::Sqrt( (par[0]*par[0] + x[0]*x[0])
273 * (TMath::CosH(x[1])-par[0])*(TMath::CosH(x[1])+par[0]))
274 /( par[1]*TMath::Sqrt((1.-par[2])*(1.+par[2])));
276 return x[0] * aFormE * TMath::Exp( - aFormG * aFormE / par[1])
277 *( TMath::SinH(aFormYp)/aFormYp
278 + par[1]/(aFormG*aFormE)
279 * ( TMath::SinH(aFormYp)/aFormYp-TMath::CosH(aFormYp) ) );
284 static Double_t aPhiForm(Double_t * x, Double_t * par) {
286 // Psi -> [0] , Direct Flow -> [1] , Elliptical Flow -> [2]
287 // Description as string: " 1 + 2*[1]*cos(x-[0]) + 2*[2]*cos(2*(x-[0])) "
289 return 1 + 2*par[1]*TMath::Cos(x[0]-par[0])
290 + 2*par[2]*TMath::Cos(2*(x[0]-par[0]));
293 void AliGenGeVSim::InitFormula() {
297 // Initalizes formulas used in GeVSim.
299 // Deconvoluted Pt Y formula
301 fPtFormula = new TF1("gevsimPt", &aPtForm, 0, 3, 2);
302 fYFormula = new TF1("gevsimRapidity", &aYForm, -3, 3,1);
304 fPtFormula->SetParNames("mass", "temperature");
305 fPtFormula->SetParameters(1., 1.);
307 fYFormula->SetParName(0, "sigmaY");
308 fYFormula->SetParameter(0, 1.);
311 fPtFormula->SetNpx(100);
312 fYFormula->SetNpx(100);
317 fPtYFormula[0] = new TF2("gevsimPtY_2", &aPtYFormula0, 0, 3, -2, 2, 2);
319 fPtYFormula[1] = new TF2("gevsimPtY_3", &aPtYFormula1, 0, 3, -2, 2, 2);
321 fPtYFormula[2] = new TF2("gevsimPtY_4", &aPtYFormula2, 0, 3, -2, 2, 3);
326 // setting names & initialisation
328 const char* kParamNames[3] = {"mass", "temperature", "expVel"};
331 for (i=0; i<3; i++) {
333 fPtYFormula[i]->SetNpx(100); // step 30 MeV
334 fPtYFormula[i]->SetNpy(100); //
336 for (j=0; j<3; j++) {
338 if ( i != 2 && j == 2 ) continue; // ExpVel
339 fPtYFormula[i]->SetParName(j, kParamNames[j]);
340 fPtYFormula[i]->SetParameter(j, 0.5);
346 fPhiFormula = new TF1("gevsimPhi", &aPhiForm, 0, 2*TMath::Pi(), 3);
348 fPhiFormula->SetParNames("psi", "directed", "elliptic");
349 fPhiFormula->SetParameters(0., 0., 0.);
351 fPhiFormula->SetNpx(180);
355 //////////////////////////////////////////////////////////////////////////////////
357 void AliGenGeVSim::AddParticleType(AliGeVSimParticle *part) {
359 // Adds new type of particles.
361 // Parameters are defeined in AliGeVSimParticle object
362 // This method has to be called for every particle type
365 if (fPartTypes == NULL)
366 fPartTypes = new TObjArray();
368 fPartTypes->Add(part);
371 //////////////////////////////////////////////////////////////////////////////////
373 void AliGenGeVSim::SetMultTotal(Bool_t isTotal) {
378 fIsMultTotal = isTotal;
381 //////////////////////////////////////////////////////////////////////////////////
383 Float_t AliGenGeVSim::FindScaler(Int_t paramId, Int_t pdg) {
386 // Finds Scallar for a given parameter.
387 // Function used in event-by-event mode.
389 // There are two types of scallars: deterministic and random
390 // and they can work on either global or particle type level.
391 // For every variable there are four scallars defined.
393 // Scallars are named as folowa
394 // deterministic global level : "gevsimParam" (eg. "gevsimTemp")
395 // deterinistig type level : "gevsimPdgParam" (eg. "gevsim211Mult")
396 // random global level : "gevsimParamRndm" (eg. "gevsimMultRndm")
397 // random type level : "gevsimPdgParamRndm" (eg. "gevsim-211V2Rndm");
399 // Pdg - code of a particle type in PDG standard (see: http://pdg.lbl.gov)
400 // Param - parameter name. Allowed parameters:
402 // "Temp" - inverse slope parameter
403 // "SigmaY" - rapidity width - for model (1) only
404 // "ExpVel" - expansion velocity - for model (4) only
405 // "V1" - directed flow
406 // "V2" - elliptic flow
407 // "Mult" - multiplicity
411 static const char* params[] = {"Temp", "SigmaY", "ExpVel", "V1", "V2", "Mult"};
412 static const char* ending[] = {"", "Rndm"};
414 static const char* patt1 = "gevsim%s%s";
415 static const char* patt2 = "gevsim%d%s%s";
422 // Scaler evoluation: i - global/local, j - determ/random
426 for (i=0; i<2; i++) {
427 for (j=0; j<2; j++) {
431 if (i == 0) snprintf(buffer, 80, patt1, params[paramId], ending[j]);
432 else snprintf(buffer, 80, patt2, pdg, params[paramId], ending[j]);
434 form = (TF1 *)gROOT->GetFunction(buffer);
437 if (j == 0) scaler *= form->Eval(gAlice->GetEvNumber());
439 form->SetParameter(0, gAlice->GetEvNumber());
440 scaler *= form->GetRandom();
449 //////////////////////////////////////////////////////////////////////////////////
451 void AliGenGeVSim::DetermineReactionPlane() {
453 // private function used by Generate()
455 // Retermines Reaction Plane angle and set this value
456 // as a parameter [0] in fPhiFormula
458 // Note: if "gevsimPsiRndm" function is found it override both
459 // "gevsimPhi" function and initial fPsi value
465 form = (TF1 *)gROOT->GetFunction("gevsimPsi");
466 if (form) fPsi = form->Eval(gAlice->GetEvNumber()) * TMath::Pi() / 180;
469 form = (TF1 *)gROOT->GetFunction("gevsimPsiRndm");
470 if (form) fPsi = form->GetRandom() * TMath::Pi() / 180;
473 cout << "Psi = " << fPsi << "\t" << (Int_t)(fPsi*180./TMath::Pi()) << endl;
475 fPhiFormula->SetParameter(0, fPsi);
478 //////////////////////////////////////////////////////////////////////////////////
480 Float_t AliGenGeVSim::GetdNdYToTotal() {
482 // Private, helper function used by Generate()
484 // Returns total multiplicity to dN/dY ration using current distribution.
485 // The function have to be called after setting distribution and its
486 // parameters (like temperature).
490 const Double_t kMaxPt = 3.0, kMaxY = 2.;
494 integ = fYFormula->Integral(-kMaxY, kMaxY);
495 mag = fYFormula->Eval(0);
499 // 2D formula standard or custom
501 if (fModel > 1 && fModel < 6) {
503 integ = ((TF2*)fCurrentForm)->Integral(0,kMaxPt, -kMaxY, kMaxY);
504 mag = ((TF2*)fCurrentForm)->Integral(0, kMaxPt, -0.1, 0.1) / 0.2;
512 integ = fHist[1]->Integral();
513 mag = fHist[0]->GetBinContent(fHist[0]->FindBin(0.));
514 mag /= fHist[0]->GetBinWidth(fHist[0]->FindBin(0.));
523 Int_t yBins = fPtYHist->GetNbinsY();
524 Int_t ptBins = fPtYHist->GetNbinsX();
526 integ = fPtYHist->Integral(0, ptBins, 0, yBins);
527 mag = fPtYHist->Integral(0, ptBins, (yBins/2)-1, (yBins/2)+1 ) / 2;
534 //////////////////////////////////////////////////////////////////////////////////
536 void AliGenGeVSim::SetFormula(Int_t pdg) {
538 // Private function used by Generate()
540 // Configure a formula for a given particle type and model Id (in fModel).
541 // If custom formula or histogram was selected the function tries
544 // The function implements naming conventions for custom distributions names
548 const char* msg[4] = {
549 "Custom Formula for Pt Y distribution not found [pdg = %d]",
550 "Histogram for Pt distribution not found [pdg = %d]",
551 "Histogram for Y distribution not found [pdg = %d]",
552 "HIstogram for Pt Y dostribution not found [pdg = %d]"
555 const char* pattern[8] = {
556 "gevsimDistPtY", "gevsimDist%dPtY",
557 "gevsimHistPt", "gevsimHist%dPt",
558 "gevsimHistY", "gevsimHist%dY",
559 "gevsimHistPtY", "gevsimHist%dPtY"
562 const char *where = "SetFormula";
565 if (fModel < 1 || fModel > 7)
566 Error("SetFormula", "Model Id (%d) out of range [1-7]", fModel);
571 if (fModel == 1) fCurrentForm = fPtFormula;
572 if (fModel > 1 && fModel < 5) fCurrentForm = fPtYFormula[fModel-2];
575 // custom model defined by a formula
580 fCurrentForm = (TF2*)gROOT->GetFunction(pattern[0]);
584 snprintf(buff, 40, pattern[1], pdg);
585 fCurrentForm = (TF2*)gROOT->GetFunction(buff);
587 if (!fCurrentForm) Error(where, msg[0], pdg);
595 for (Int_t i=0; i<2; i++) {
598 fHist[i] = (TH1D*)gROOT->FindObject(pattern[2+2*i]);
602 snprintf(buff, 40, pattern[3+2*i], pdg);
603 fHist[i] = (TH1D*)gROOT->FindObject(buff);
605 if (!fHist[i]) Error(where, msg[1+i], pdg);
615 fPtYHist = (TH2D*)gROOT->FindObject(pattern[6]);
619 snprintf(buff, 40, pattern[7], pdg);
620 fPtYHist = (TH2D*)gROOT->FindObject(buff);
623 if (!fPtYHist) Error(where, msg[3], pdg);
628 //////////////////////////////////////////////////////////////////////////////////
630 void AliGenGeVSim:: AdjustFormula() {
633 // Adjust fomula bounds according to acceptance cuts.
635 // Since GeVSim is producing "thermal" particles Pt
636 // is cut at 3 GeV even when acceptance extends to grater momenta.
639 // If custom formula was provided function preserves
643 const Double_t kMaxPt = 3.0;
644 const Double_t kMaxY = 2.0;
645 Double_t minPt, maxPt, minY, maxY;
648 if (fModel > 4) return;
651 if (TestBit(kPtRange) && fPtMax < kMaxPt ) maxPt = fPtMax;
655 if (TestBit(kPtRange)) minPt = fPtMin;
658 if (TestBit(kPtRange) && fPtMin > kMaxPt )
659 Warning("Acceptance", "Minimum Pt (%3.2f GeV) greater that 3.0 GeV ", fPtMin);
662 if (TestBit(kMomentumRange) && fPtMax < maxPt) maxPt = fPtMax;
664 // max and min rapidity
665 if (TestBit(kYRange)) {
676 fPtFormula->SetRange(fPtMin, maxPt);
677 fYFormula->SetRange(fYMin, fYMax);
681 ((TF2*)fCurrentForm)->SetRange(minPt, minY, maxPt, maxY);
685 if (TestBit(kPhiRange))
686 fPhiFormula->SetRange(fPhiMin, fPhiMax);
690 //////////////////////////////////////////////////////////////////////////////////
692 void AliGenGeVSim::GetRandomPtY(Double_t &pt, Double_t &y) {
694 // Private function used by Generate()
696 // Returns random values of Pt and Y corresponding to selected
701 pt = fPtFormula->GetRandom();
702 y = fYFormula->GetRandom();
706 if (fModel > 1 && fModel < 6) {
707 ((TF2*)fCurrentForm)->GetRandom2(pt, y);
712 pt = fHist[0]->GetRandom();
713 y = fHist[1]->GetRandom();
717 fPtYHist->GetRandom2(pt, y);
722 //////////////////////////////////////////////////////////////////////////////////
724 void AliGenGeVSim::Init() {
726 // Standard AliGenerator initializer.
731 //////////////////////////////////////////////////////////////////////////////////
733 void AliGenGeVSim::Generate() {
735 // Standard AliGenerator function
736 // This function do actual job and puts particles on stack.
739 PDG_t pdg; // particle type
740 Float_t mass; // particle mass
741 Float_t orgin[3] = {0,0,0}; // particle orgin [cm]
742 Float_t polar[3] = {0,0,0}; // polarisation
743 Float_t time = 0; // time of creation
745 Float_t multiplicity = 0;
746 Bool_t isMultTotal = kTRUE;
749 Float_t directedScaller = 1., ellipticScaller = 1.;
751 TLorentzVector *v = new TLorentzVector(0,0,0,0);
753 const Int_t kParent = -1;
758 orgin[0] = fVertex[0];
759 orgin[1] = fVertex[1];
760 orgin[2] = fVertex[2];
763 // Particle params database
765 TDatabasePDG *db = TDatabasePDG::Instance();
767 AliGeVSimParticle *partType;
769 Int_t nType, nParticle, nParam;
770 const Int_t kNParams = 6;
772 // reaction plane determination and model
773 DetermineReactionPlane();
775 // loop over particle types
777 for (nType = 0; nType < fPartTypes->GetEntries(); nType++) {
779 partType = (AliGeVSimParticle *)fPartTypes->At(nType);
781 pdg = (PDG_t)partType->GetPdgCode();
782 type = db->GetParticle(pdg);
785 fModel = partType->GetModel();
787 fCurrentForm->SetParameter("mass", mass);
790 // Evaluation of parameters - loop over parameters
792 for (nParam = 0; nParam < kNParams; nParam++) {
794 paramScaler = FindScaler(nParam, pdg);
797 fCurrentForm->SetParameter("temperature", paramScaler * partType->GetTemperature());
799 if (nParam == 1 && fModel == 1)
800 fYFormula->SetParameter("sigmaY", paramScaler * partType->GetSigmaY());
802 if (nParam == 2 && fModel == 4) {
804 Double_t totalExpVal = paramScaler * partType->GetExpansionVelocity();
806 if (totalExpVal == 0.0) totalExpVal = 0.0001;
807 if (totalExpVal == 1.0) totalExpVal = 9.9999;
809 fCurrentForm->SetParameter("expVel", totalExpVal);
814 if (nParam == 3) directedScaller = paramScaler;
815 if (nParam == 4) ellipticScaller = paramScaler;
821 if (partType->IsMultForced()) isMultTotal = partType->IsMultTotal();
822 else isMultTotal = fIsMultTotal;
824 multiplicity = paramScaler * partType->GetMultiplicity();
825 multiplicity *= (isMultTotal)? 1 : GetdNdYToTotal();
829 // Flow defined on the particle type level (not parameterised)
830 if (partType->IsFlowSimple()) {
831 fPhiFormula->SetParameter(1, partType->GetDirectedFlow(0,0) * directedScaller);
832 fPhiFormula->SetParameter(2, partType->GetEllipticFlow(0,0) * ellipticScaller);
838 Info("Generate","PDG = %d \t Mult = %d", pdg, (Int_t)multiplicity);
840 // loop over particles
843 while (nParticle < multiplicity) {
845 Double_t pt, y, phi; // momentum in [pt,y,phi]
846 Float_t p[3] = {0,0,0}; // particle momentum
850 // phi distribution configuration when differential flow defined
851 // to be optimised in future release
853 if (!partType->IsFlowSimple()) {
854 fPhiFormula->SetParameter(1, partType->GetDirectedFlow(pt,y) * directedScaller);
855 fPhiFormula->SetParameter(2, partType->GetEllipticFlow(pt,y) * ellipticScaller);
858 phi = fPhiFormula->GetRandom();
860 if (!isMultTotal) nParticle++;
861 if (fModel > 4 && !CheckPtYPhi(pt,y,phi) ) continue;
863 // coordinate transformation
864 v->SetPtEtaPhiM(pt, y, phi, mass);
870 // momentum range test
871 if ( !CheckAcceptance(p) ) continue;
873 // putting particle on the stack
875 PushTrack(fTrackIt, kParent, pdg, p, orgin, polar, time, kPPrimary, id, fTrackIt);
876 if (isMultTotal) nParticle++;
880 // prepare and store header
882 AliGenGeVSimEventHeader *header = new AliGenGeVSimEventHeader("GeVSim header");
883 TArrayF eventVertex(3,orgin);
885 header->SetPrimaryVertex(eventVertex);
886 header->SetInteractionTime(time);
887 header->SetEventPlane(fPsi);
888 header->SetEllipticFlow(fPhiFormula->GetParameter(2));
890 gAlice->SetGenEventHeader(header);
895 //////////////////////////////////////////////////////////////////////////////////