+
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
#include "AliPythia.h"
#include "AliPythiaRndm.h"
-#include "../FASTSIM/AliFastGlauber.h"
-#include "../FASTSIM/AliQuenchingWeights.h"
+#include "AliFastGlauber.h"
+#include "AliQuenchingWeights.h"
#include "TVector3.h"
+#include "PyquenCommon.h"
ClassImp(AliPythia)
AliPythia* AliPythia::fgAliPythia=NULL;
-AliPythia::AliPythia()
+AliPythia::AliPythia():
+ fProcess(kPyMb),
+ fEcms(0.),
+ fStrucFunc(kCTEQ5L),
+ fXJet(0.),
+ fYJet(0.),
+ fNGmax(30),
+ fZmax(0.97),
+ fGlauber(0),
+ fQuenchingWeights(0)
{
// Default Constructor
//
fQuenchingWeights = 0;
}
+AliPythia::AliPythia(const AliPythia& pythia):
+ TPythia6(pythia),
+ AliRndm(pythia),
+ fProcess(kPyMb),
+ fEcms(0.),
+ fStrucFunc(kCTEQ5L),
+ fXJet(0.),
+ fYJet(0.),
+ fNGmax(30),
+ fZmax(0.97),
+ fGlauber(0),
+ fQuenchingWeights(0)
+{
+ // Copy Constructor
+ pythia.Copy(*this);
+}
+
void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
{
// Initialise the process to generate
fEcms = energy;
fStrucFunc = strucfunc;
//...Switch off decay of pi0, K0S, Lambda, Sigma+-, Xi0-, Omega-.
- SetMDCY(Pycomp(111) ,1,0);
- SetMDCY(Pycomp(310) ,1,0);
- SetMDCY(Pycomp(3122),1,0);
- SetMDCY(Pycomp(3112),1,0);
- SetMDCY(Pycomp(3212),1,0);
- SetMDCY(Pycomp(3222),1,0);
- SetMDCY(Pycomp(3312),1,0);
- SetMDCY(Pycomp(3322),1,0);
- SetMDCY(Pycomp(3334),1,0);
- // select structure function
+ SetMDCY(Pycomp(111) ,1,0); // pi0
+ SetMDCY(Pycomp(310) ,1,0); // K0S
+ SetMDCY(Pycomp(3122),1,0); // kLambda
+ SetMDCY(Pycomp(3112),1,0); // sigma -
+ SetMDCY(Pycomp(3212),1,0); // sigma 0
+ SetMDCY(Pycomp(3222),1,0); // sigma +
+ SetMDCY(Pycomp(3312),1,0); // xi -
+ SetMDCY(Pycomp(3322),1,0); // xi 0
+ SetMDCY(Pycomp(3334),1,0); // omega-
+ // Select structure function
SetMSTP(52,2);
- SetMSTP(51,strucfunc);
-
+ SetMSTP(51, AliStructFuncType::PDFsetIndex(strucfunc));
+ // Particles produced in string fragmentation point directly to either of the two endpoints
+ // of the string (depending in the side they were generated from).
+ SetMSTU(16,2);
+
//
// Pythia initialisation for selected processes//
//
// heavy quark masses
SetPMAS(4,1,1.2);
- SetMSTU(16,2);
//
// primordial pT
SetMSTP(91,1);
case kPyBeauty:
SetMSEL(5);
SetPMAS(5,1,4.75);
- SetMSTU(16,2);
break;
case kPyJpsi:
SetMSEL(0);
break;
case kPyCharmUnforced:
SetMSEL(0);
- SetMSTU(16,2);
// gq->qg
SetMSUB(28,1);
// gg->qq
SetMSUB(68,1);
break;
case kPyBeautyUnforced:
- SetMSTU(16,2);
SetMSEL(0);
// gq->qg
SetMSUB(28,1);
AtlasTuning();
break;
+
+ case kPyMbWithDirectPhoton:
+// Minimum Bias pp-Collisions with direct photon processes added
+//
+//
+// select Pythia min. bias model
+ SetMSEL(0);
+ SetMSUB(92,1); // single diffraction AB-->XB
+ SetMSUB(93,1); // single diffraction AB-->AX
+ SetMSUB(94,1); // double diffraction
+ SetMSUB(95,1); // low pt production
+
+ SetMSUB(14,1); //
+ SetMSUB(18,1); //
+ SetMSUB(29,1); //
+ SetMSUB(114,1); //
+ SetMSUB(115,1); //
+
+
+ AtlasTuning();
+ break;
+
+ case kPyMbDefault:
+// Minimum Bias pp-Collisions
+//
+//
+// select Pythia min. bias model
+ SetMSEL(0);
+ SetMSUB(92,1); // single diffraction AB-->XB
+ SetMSUB(93,1); // single diffraction AB-->AX
+ SetMSUB(94,1); // double diffraction
+ SetMSUB(95,1); // low pt production
+
+ break;
+ case kPyLhwgMb:
+// Les Houches Working Group 05 Minimum Bias pp-Collisions: hep-ph/0604120
+// -> Pythia 6.3 or above is needed
+//
+ SetMSEL(0);
+ SetMSUB(92,1); // single diffraction AB-->XB
+ SetMSUB(93,1); // single diffraction AB-->AX
+ SetMSUB(94,1); // double diffraction
+ SetMSUB(95,1); // low pt production
+
+ SetMSTP(51,AliStructFuncType::PDFsetIndex(kCTEQ6ll)); // CTEQ6ll pdf
+ SetMSTP(52,2);
+ SetMSTP(68,1);
+ SetMSTP(70,2);
+ SetMSTP(81,1); // Multiple Interactions ON
+ SetMSTP(82,4); // Double Gaussian Model
+ SetMSTP(88,1);
+
+ SetPARP(82,2.3); // [GeV] PT_min at Ref. energy
+ SetPARP(83,0.5); // Core density in proton matter distribution (def.value)
+ SetPARP(84,0.5); // Core radius
+ SetPARP(85,0.9); // Regulates gluon prod. mechanism
+ SetPARP(90,0.2); // 2*epsilon (exponent in power law)
+
+ break;
case kPyMbNonDiffr:
// Minimum Bias pp-Collisions
//
SetMSEL(1);
// Pythia Tune A (CDF)
//
- SetPARP(67,4.); // Regulates Initial State Radiation
+ SetPARP(67,2.5); // Regulates Initial State Radiation (value from best fit to D0 dijet analysis)
SetMSTP(82,4); // Double Gaussian Model
SetPARP(82,2.0); // [GeV] PT_min at Ref. energy
SetPARP(84,0.4); // Core radius
//
// Initialize PYTHIA
SetMSTP(41,1); // all resonance decays switched on
-
Initialize("CMS","p","p",fEcms);
-
+
}
Int_t AliPythia::CheckedLuComp(Int_t kf)
return kc;
}
-void AliPythia::SetNuclei(Int_t a1, Int_t a2)
+void AliPythia::SetNuclei(Int_t a1, Int_t a2, Int_t pdf)
{
// Treat protons as inside nuclei with mass numbers a1 and a2
// The MSTP array in the PYPARS common block is used to enable and
// If the following mass number both not equal zero, nuclear corrections of the stf are used.
// MSTP(192) : Mass number of nucleus side 1
// MSTP(193) : Mass number of nucleus side 2
+// MSTP(194) : Nuclear structure function: 0: EKS98 1:EPS08
SetMSTP(52,2);
SetMSTP(192, a1);
- SetMSTP(193, a2);
+ SetMSTP(193, a2);
+ SetMSTP(194, pdf);
}
-void AliPythia::InitQuenching(Float_t cMin, Float_t cMax, Float_t k, Int_t iECMethod)
+void AliPythia::InitQuenching(Float_t cMin, Float_t cMax, Float_t k, Int_t iECMethod, Float_t zmax, Int_t ngmax)
{
// Initializes
// (1) The quenching model using quenching weights according to C. Salgado and U. Wiedemann
// (2) The nuclear geometry using the Glauber Model
//
-
-
- fGlauber = new AliFastGlauber();
+
+ fGlauber = AliFastGlauber::Instance();
fGlauber->Init(2);
fGlauber->SetCentralityClass(cMin, cMax);
fQuenchingWeights->InitMult();
fQuenchingWeights->SetK(k);
fQuenchingWeights->SetECMethod(AliQuenchingWeights::kECMethod(iECMethod));
+ fNGmax = ngmax;
+ fZmax = zmax;
+
}
//
// Avoid complete loss
//
- if (fZQuench[j] == 1.) fZQuench[j] = 0.95;
+ if (fZQuench[j] > fZmax) fZQuench[j] = fZmax;
//
// Some debug printing
if (!quenched[isys]) continue;
nGluon[isys] = 1 + Int_t(fZQuench[isys] / (1. - fZQuench[isys]));
- if (nGluon[isys] > 6) nGluon[isys] = 6;
+ if (nGluon[isys] > fNGmax) nGluon[isys] = fNGmax;
zquench[isys] = 1. - TMath::Power(1. - fZQuench[isys], 1./Double_t(nGluon[isys]));
wjtKick[isys] = wjtKick[isys] / TMath::Sqrt(Double_t(nGluon[isys]));
//
// Calculate new px, py
//
- Double_t pxNew = jtNew / jt * pxs;
- Double_t pyNew = jtNew / jt * pys;
+ Double_t pxNew = 0;
+ Double_t pyNew = 0;
+ if (jt>0) {
+ pxNew = jtNew / jt * pxs;
+ pyNew = jtNew / jt * pys;
+ }
// Double_t dpx = pxs - pxNew;
// Double_t dpy = pys - pyNew;
// Double_t dpz = pl - plNew;
//
// Isotropic decay ????
Double_t cost = 2. * gRandom->Rndm() - 1.;
- Double_t sint = TMath::Sqrt(1. - cost * cost);
- Double_t phi = 2. * TMath::Pi() * gRandom->Rndm();
+ Double_t sint = TMath::Sqrt((1.-cost)*(1.+cost));
+ Double_t phis = 2. * TMath::Pi() * gRandom->Rndm();
Double_t pz1 = pst * cost;
Double_t pz2 = -pst * cost;
Double_t pt1 = pst * sint;
Double_t pt2 = -pst * sint;
- Double_t px1 = pt1 * TMath::Cos(phi);
- Double_t py1 = pt1 * TMath::Sin(phi);
- Double_t px2 = pt2 * TMath::Cos(phi);
- Double_t py2 = pt2 * TMath::Sin(phi);
+ Double_t px1 = pt1 * TMath::Cos(phis);
+ Double_t py1 = pt1 * TMath::Sin(phis);
+ Double_t px2 = pt2 * TMath::Cos(phis);
+ Double_t py2 = pt2 * TMath::Sin(phis);
fPyjets->P[0][iGlu] = px1;
fPyjets->P[1][iGlu] = py1;
void AliPythia::Pyquen(Double_t a, Int_t ibf, Double_t b)
{
// Igor Lokthine's quenching routine
+ // http://lokhtin.web.cern.ch/lokhtin/pyquen/pyquen.txt
+
pyquen(a, ibf, b);
}
+void AliPythia::SetPyquenParameters(Double_t t0, Double_t tau0, Int_t nf, Int_t iengl, Int_t iangl)
+{
+ // Set the parameters for the PYQUEN package.
+ // See comments in PyquenCommon.h
+
+
+ PYQPAR.t0 = t0;
+ PYQPAR.tau0 = tau0;
+ PYQPAR.nf = nf;
+ PYQPAR.iengl = iengl;
+ PYQPAR.iangl = iangl;
+}
+
+
void AliPythia::Pyevnw()
{
// New multiple interaction scenario
// No multiple interactions
SetMSTP(81,0);
+ SetPARP(81, 0.);
+ SetPARP(82, 0.);
// Initial/final parton shower on (Pythia default)
SetMSTP(61,1);
SetMSTP(71,1);
// QCD scales
SetMSTP(32,2);
SetPARP(34,1.0);
- SetMSTU(16,2);
}
void AliPythia::AtlasTuning()
{
//
// Configuration for the ATLAS tuning
- SetMSTP(51, kCTEQ5L); // CTEQ5L pdf
+ SetMSTP(51, AliStructFuncType::PDFsetIndex(kCTEQ5L)); // CTEQ5L pdf
SetMSTP(81,1); // Multiple Interactions ON
SetMSTP(82,4); // Double Gaussian Model
+ SetPARP(81,1.9); // Min. pt for multiple interactions (default in 6.2-14)
SetPARP(82,1.8); // [GeV] PT_min at Ref. energy
SetPARP(89,1000.); // [GeV] Ref. energy
SetPARP(90,0.16); // 2*epsilon (exponent in power law)
SetPARP(86,0.66); // Regulates gluon prod. mechanism
SetPARP(67,1); // Regulates Initial State Radiation
}
+
+AliPythia& AliPythia::operator=(const AliPythia& rhs)
+{
+// Assignment operator
+ rhs.Copy(*this);
+ return *this;
+}
+
+ void AliPythia::Copy(TObject&) const
+{
+ //
+ // Copy
+ //
+ Fatal("Copy","Not implemented!\n");
+}