X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenHIJINGparaBa.cxx;h=9d80934fed10d350929d1269c91694954753822d;hb=26428fe757714b208d115cbc49ad4cfbfb87e825;hp=1fbae4289352a1f7f213e244b5e0d15e37ca03cd;hpb=88cb7938ca21d4a80991d4e7aa564008c29340f7;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVGEN/AliGenHIJINGparaBa.cxx b/EVGEN/AliGenHIJINGparaBa.cxx index 1fbae428935..9d80934fed1 100644 --- a/EVGEN/AliGenHIJINGparaBa.cxx +++ b/EVGEN/AliGenHIJINGparaBa.cxx @@ -13,18 +13,8 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.1.4.1 2003/04/14 17:33:50 hristov -Merging with v3-09-08 (part1) +/* $Id$ */ -Revision 1.2 2003/01/14 10:50:18 alibrary -Cleanup of STEER coding conventions - -Revision 1.1 2002/01/08 09:47:28 morsch -HIJING parameterisation including baryons, first commit. - -*/ /////////////////////////////////////////////////////////////////// // Parameterisation of pi, K, n and p eta and pt distributions // // eta: according to HIJING (shadowing + quenching) // @@ -45,7 +35,7 @@ HIJING parameterisation including baryons, first commit. ClassImp(AliGenHIJINGparaBa) -static Double_t ptpi(Double_t *px, Double_t *) +static Double_t ptpi(const Double_t *px, const Double_t *) { // // PT-PARAMETERIZATION CDF, PRL 61(88) 1819 @@ -153,38 +143,38 @@ static Double_t etakac( Double_t *py, Double_t *) { // eta-distribution //____________________________________________________________ - const Float_t p0 = 1.10343e+02; - const Float_t p1 = 1.73247e+01; - const Float_t p2 = -7.23808e+00; - const Float_t p3 = 4.48334e-01; - const Double_t y = TMath::Abs(*py); + const Float_t kp0 = 1.10343e+02; + const Float_t kp1 = 1.73247e+01; + const Float_t kp2 = -7.23808e+00; + const Float_t kp3 = 4.48334e-01; + const Double_t ky = TMath::Abs(*py); // - return (p0+p1*y+p2*y*y+p3*y*y*y)/20.; + return (kp0+kp1*ky+kp2*ky*ky+kp3*ky*ky*ky)/20.; } AliGenHIJINGparaBa::AliGenHIJINGparaBa() - :AliGenHIJINGpara() + :AliGenHIJINGpara(), + fPtba(0), + fETAba(0) { // // Default constructor // fName="HIGINGparaBa"; fTitle="HIJING Parametrisation Particle Generator with Baryons"; - fETAba = 0; - fPtba = 0; } //_____________________________________________________________________________ AliGenHIJINGparaBa::AliGenHIJINGparaBa(Int_t npart) - :AliGenHIJINGpara(npart) + :AliGenHIJINGpara(npart), + fPtba(0), + fETAba(0) { // // Standard constructor // fName="HIGINGparaBa"; fTitle="HIJING Parametrisation Particle Generator with Baryons"; - fETAba = 0; - fPtba = 0; } //_____________________________________________________________________________ @@ -214,35 +204,35 @@ void AliGenHIJINGparaBa::Init() fETAkac = new TF1("etakac",&etakac,etaMin,etaMax,0); fETAba = new TF1("etabaryon",&etabaryon,etaMin,etaMax,0); - TF1 *etaPic0 = new TF1("etapic",&etapic, -7, 7, 0); - TF1 *etaKac0 = new TF1("etakac",&etakac, -7, 7, 0); - TF1 *etaBar0 = new TF1("etabar",&etabaryon, -7, 7, 0); + TF1 etaPic0("etapic(-7,7)",&etapic, -7, 7, 0); + TF1 etaKac0("etakac(-7,7)",&etakac, -7, 7, 0); + TF1 etaBar0("etabar(-7,7)",&etabaryon, -7, 7, 0); - TF1 *ptPic0 = new TF1("ptpi", &ptpi, 0., 15., 0); - TF1 *ptKac0 = new TF1("ptka", &ptka, 0., 15., 0); - TF1 *ptBar0 = new TF1("ptbar", &ptbaryon, 0., 15., 0); + TF1 ptPic0("ptpi(0,15)", &ptpi, 0., 15., 0); + TF1 ptKac0("ptka(0,15)", &ptka, 0., 15., 0); + TF1 ptBar0("ptbar(0,15)", &ptbaryon, 0., 15., 0); - Float_t intETApi = etaPic0->Integral(-0.5, 0.5); - Float_t intETAka = etaKac0->Integral(-0.5, 0.5); - Float_t intETAba = etaBar0->Integral(-0.5, 0.5); + Float_t intETApi = etaPic0.Integral(-0.5, 0.5); + Float_t intETAka = etaKac0.Integral(-0.5, 0.5); + Float_t intETAba = etaBar0.Integral(-0.5, 0.5); Float_t scalePi = 6979./(intETApi/1.5); Float_t scaleKa = 657./(intETAka/2.0); Float_t scaleBa = 364./(intETAba/2.0); // Fraction of events corresponding to the selected pt-range - Float_t intPt = (0.837*ptPic0->Integral(0, 15)+ - 0.105*ptKac0->Integral(0, 15)+ - 0.058*ptBar0->Integral(0, 15)); - Float_t intPtSel = (0.837*ptPic0->Integral(fPtMin, fPtMax)+ - 0.105*ptKac0->Integral(fPtMin, fPtMax)+ - 0.058*ptBar0->Integral(fPtMin, fPtMax)); + Float_t intPt = (0.837*ptPic0.Integral(0, 15)+ + 0.105*ptKac0.Integral(0, 15)+ + 0.058*ptBar0.Integral(0, 15)); + Float_t intPtSel = (0.837*ptPic0.Integral(fPtMin, fPtMax)+ + 0.105*ptKac0.Integral(fPtMin, fPtMax)+ + 0.058*ptBar0.Integral(fPtMin, fPtMax)); Float_t ptFrac = intPtSel/intPt; // Fraction of events corresponding to the selected eta-range - Float_t intETASel = (scalePi*etaPic0->Integral(etaMin, etaMax)+ - scaleKa*etaKac0->Integral(etaMin, etaMax)+ - scaleBa*etaBar0->Integral(etaMin, etaMax)); + Float_t intETASel = (scalePi*etaPic0.Integral(etaMin, etaMax)+ + scaleKa*etaKac0.Integral(etaMin, etaMax)+ + scaleBa*etaBar0.Integral(etaMin, etaMax)); // Fraction of events corresponding to the selected phi-range Float_t phiFrac = (fPhiMax-fPhiMin)/2/TMath::Pi(); @@ -279,6 +269,7 @@ void AliGenHIJINGparaBa::Generate() const Int_t kBaryons[4] = {kProton, kProtonBar, kNeutron, kNeutronBar}; // Float_t origin[3]; + Float_t time; Float_t pt, pl, ptot; Float_t phi, theta; Float_t p[3]; @@ -290,6 +281,7 @@ void AliGenHIJINGparaBa::Generate() Float_t random[6]; // for (j=0;j<3;j++) origin[j]=fOrigin[j]; + time = fTimeOrigin; if(fVertexSmear == kPerEvent) { Float_t dv[3]; @@ -302,12 +294,18 @@ void AliGenHIJINGparaBa::Generate() } } for (j=0; j < 3; j++) origin[j] += dv[j]; + + Rndm(random,2); + time += fOsigma[2]/TMath::Ccgs()* + TMath::Cos(2*random[0]*TMath::Pi())* + TMath::Sqrt(-2*TMath::Log(random[1])); } // if kPerEvent TArrayF eventVertex; eventVertex.Set(3); eventVertex[0] = origin[0]; eventVertex[1] = origin[1]; eventVertex[2] = origin[2]; + Float_t eventTime = time; for(i=0;iSetPrimaryVertex(eventVertex); + header->SetInteractionTime(eventTime); gAlice->SetGenEventHeader(header); }