From: morsch Date: Fri, 8 Sep 2000 15:37:58 +0000 (+0000) Subject: pt and y-parameterisations for PMD physics simulation. X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=0ed0a0a2eb469a55e9ad958c5f2e6fdf4f6adf85;p=u%2Fmrichter%2FAliRoot.git pt and y-parameterisations for PMD physics simulation. THIS VERSION IS JUST A TEMPLATE THE PT AND Y DISTRIBUTIONS HAVE TO BE CORRECTED !!!!. --- diff --git a/EVGEN/AliGenPMDlib.cxx b/EVGEN/AliGenPMDlib.cxx new file mode 100644 index 00000000000..fcf3242209f --- /dev/null +++ b/EVGEN/AliGenPMDlib.cxx @@ -0,0 +1,204 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* +$Log$ +*/ + +#include "AliGenPMDlib.h" +#include "AliMC.h" +#include "AliPDG.h" + +ClassImp(AliGenPMDlib) +// +// Neutral Pions + +Double_t AliGenPMDlib::PtPi0(Double_t *px, Double_t *dummy) +{ +// +// PT-PARAMETERIZATION CDF, PRL 61(88) 1819 +// POWER LAW FOR PT > 500 MEV +// MT SCALING BELOW (T=160 MEV) +// + const Double_t kp0 = 1.3; + const Double_t kxn = 8.28; + const Double_t kxlim=0.5; + const Double_t kt=0.160; + const Double_t kxmpi=0.139; + const Double_t kb=1.; + Double_t y, y1, xmpi2, ynorm, a; + Double_t x=*px; + // + y1=TMath::Power(kp0/(kp0+kxlim),kxn); + xmpi2=kxmpi*kxmpi; + ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt)); + a=ynorm/y1; + if (x > kxlim) + y=a*TMath::Power(kp0/(kp0+x),kxn); + else + y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt); + return y*x; +} + +// +// y-distribution +// +Double_t AliGenPMDlib::YPi0( Double_t *py, Double_t *dummy) +{ + // + // y parametrisation for pi0 + // + const Double_t ka1 = 4913.; + const Double_t ka2 = 1819.; + const Double_t keta1 = 0.22; + const Double_t keta2 = 3.66; + const Double_t kdeta1 = 1.47; + const Double_t kdeta2 = 1.51; + Double_t y=TMath::Abs(*py); + // + Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1); + Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2); + return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2); +} + +// particle composition +// +Int_t AliGenPMDlib::IpPi0() +{ +// Pi0 + return kPi0; +} + +//____________________________________________________________ +// +// Mt-scaling + +Double_t AliGenPMDlib::PtScal(Double_t pt, Int_t np) +{ + // SCALING EN MASSE PAR RAPPORT A PTPI + // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI + const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0}; + // VALUE MESON/PI AT 5 GEV + const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0}; + np--; + Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3); + Double_t fmax2=f5/kfmax[np]; + // PIONS + Double_t ptpion=100.*PtPi0(&pt, (Double_t*) 0); + Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/ + (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2; + return fmtscal*ptpion; +} +// +// kaon +// +// pt-distribution +//____________________________________________________________ + +Double_t AliGenPMDlib::PtEta( Double_t *px, Double_t *dummy) +{ +// Kaon pT + return PtScal(*px,3); +} + +// y-distribution +//____________________________________________________________ +Double_t AliGenPMDlib::YEta( Double_t *py, Double_t *dummy) +{ + // + // y parametrisation for etas + // + const Double_t ka1 = 4913.; + const Double_t ka2 = 1819.; + const Double_t keta1 = 0.22; + const Double_t keta2 = 3.66; + const Double_t kdeta1 = 1.47; + const Double_t kdeta2 = 1.51; + Double_t y=TMath::Abs(*py); + // + Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1); + Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2); + return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2); +} + +// particle composition +// +Int_t AliGenPMDlib::IpEta() +{ + return 221; +} + + +typedef Double_t (*GenFunc) (Double_t*, Double_t*); +GenFunc AliGenPMDlib::GetPt(Param_t param, const char* tname) +{ +// Return pointer to pT parameterisation + GenFunc func=NULL; + switch (param) + { + case Pion: + func=PtPi0; + break; + case Eta: + func=PtEta; + break; + default: + func=0; + printf(" unknown parametrisation\n"); + } + return func; +} + +GenFunc AliGenPMDlib::GetY(Param_t param, const char* tname) +{ +// Return pointer to y- parameterisation + GenFunc func=NULL; + switch (param) + { + case Pion: + func=YPi0; + break; + case Eta: + func=YEta; + break; + default: + func=0; + printf(" unknown parametrisation\n"); + } + return func; + +} +typedef Int_t (*GenFuncIp) (); +GenFuncIp AliGenPMDlib::GetIp(Param_t param, const char* tname) +{ +// Return pointer to particle type parameterisation + GenFuncIp func=NULL; + switch (param) + { + case Pion: + func=IpPi0; + break; + case Eta: + func=IpEta; + break; + default: + printf(" unknown parametrisation\n"); + } + return func; +} + + + + diff --git a/EVGEN/AliGenPMDlib.h b/EVGEN/AliGenPMDlib.h new file mode 100644 index 00000000000..d3e61708e21 --- /dev/null +++ b/EVGEN/AliGenPMDlib.h @@ -0,0 +1,36 @@ +#ifndef ALIGENPMDLIB_H +#define ALIGENPMDLIB_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include "AliGenLib.h" + +class AliGenPMDlib : +public AliGenLib +{ + public: +// Neutral pions + static Double_t PtPi0(Double_t *px, Double_t *dummy); + static Double_t PtScal(Double_t pt, Int_t np); + static Double_t YPi0( Double_t *py, Double_t *dummy); + static Int_t IpPi0(); +// Etas + static Double_t PtEta(Double_t *px, Double_t *dummy); + static Double_t YEta( Double_t *py, Double_t *dummy); + static Int_t IpEta(); +// + GenFunc GetPt(Param_t param, const char* tname=0); + GenFunc GetY (Param_t param, const char* tname=0); + GenFuncIp GetIp(Param_t param, const char* tname=0); + ClassDef(AliGenPMDlib,1) // Library providing y and pT parameterisations +}; +#endif + + + + + + +