-
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
#include "AliPythiaRndm.h"
#include "AliFastGlauber.h"
#include "AliQuenchingWeights.h"
+#include "AliOmegaDalitz.h"
#include "TVector3.h"
+#include "TLorentzVector.h"
#include "PyquenCommon.h"
ClassImp(AliPythia)
# define pyquen pyquen_
# define pyevnw pyevnw_
# define pyshowq pyshowq_
+# define qpygin0 qpygin0_
# define pytune pytune_
+# define py2ent py2ent_
# define type_of_call
#else
# define pyclus PYCLUS
# define pyquen PYQUEN
# define pyevnw PYEVNW
# define pyshowq PYSHOWQ
-# define PYTUNE PYTUNE
+# define qpygin0 QPYGIN0
+# define pytune PYTUNE
+# define py2ent PY2ENT
# define type_of_call _stdcall
#endif
extern "C" void type_of_call pyevnw(){;}
extern "C" void type_of_call pyshowq(Int_t &, Int_t &, Double_t &);
extern "C" void type_of_call pytune(Int_t &);
-
+extern "C" void type_of_call py2ent(Int_t &, Int_t&, Int_t&, Double_t&);
+extern "C" void type_of_call qpygin0();
//_____________________________________________________________________________
AliPythia* AliPythia::fgAliPythia=NULL;
fNGmax(30),
fZmax(0.97),
fGlauber(0),
- fQuenchingWeights(0)
+ fQuenchingWeights(0),
+ fItune(-1),
+ fOmegaDalitz()
{
// Default Constructor
//
AliPythiaRndm::SetPythiaRandom(GetRandom());
fGlauber = 0;
fQuenchingWeights = 0;
+ Int_t i = 0;
+ for (i = 0; i < 501; i++) fDefMDCY[i] = 0;
+ for (i = 0; i < 2001; i++) fDefMDME[i] = 0;
+ for (i = 0; i < 4; i++) fZQuench[i] = 0;
}
AliPythia::AliPythia(const AliPythia& pythia):
fNGmax(30),
fZmax(0.97),
fGlauber(0),
- fQuenchingWeights(0)
+ fQuenchingWeights(0),
+ fItune(-1),
+ fOmegaDalitz()
{
// Copy Constructor
+ Int_t i;
+ for (i = 0; i < 501; i++) fDefMDCY[i] = 0;
+ for (i = 0; i < 2001; i++) fDefMDME[i] = 0;
+ for (i = 0; i < 4; i++) fZQuench[i] = 0;
pythia.Copy(*this);
}
if (!AliPythiaRndm::GetPythiaRandom())
AliPythiaRndm::SetPythiaRandom(GetRandom());
+ fItune = itune;
+
fProcess = process;
fEcms = energy;
fStrucFunc = strucfunc;
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
AtlasTuning();
break;
+
+ case kPyMbAtlasTuneMC09:
+// 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
+
+ AtlasTuning_MC09();
+ break;
case kPyMbWithDirectPhoton:
// Minimum Bias pp-Collisions with direct photon processes added
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
SetPARP(85,0.90) ; // Regulates gluon prod. mechanism
SetPARP(86,0.95); // Regulates gluon prod. mechanism
SetPARP(89,1800.); // [GeV] Ref. energy
- SetPARP(90,0.25); // 2*epsilon (exponent in power law)
+ SetPARP(90,0.25); // 2*epsilon (exponent in power law)
break;
case kPyDirectGamma:
SetMSEL(10);
case kPyD0ppMNR:
case kPyDPlusppMNR:
case kPyDPlusStrangeppMNR:
+ case kPyLambdacppMNR:
// Tuning of Pythia parameters aimed to get a resonable agreement
// between with the NLO calculation by Mangano, Nason, Ridolfi for the
// c-cbar single inclusive and double differential distributions.
//
SetMSTP(41,1); // all resonance decays switched on
Initialize("CMS","p","p",fEcms);
-
+ fOmegaDalitz.Init();
}
Int_t AliPythia::CheckedLuComp(Int_t kf)
pytune(itune);
}
+void AliPythia::Py2ent(Int_t idx, Int_t pdg1, Int_t pdg2, Double_t p){
+ // Inset 2-parton system at line idx
+ py2ent(idx, pdg1, pdg2, p);
+}
void AliPythia::InitQuenching(Float_t cMin, Float_t cMax, Float_t k, Int_t iECMethod, Float_t zmax, Int_t ngmax)
Double_t px = 0., py = 0., pz = 0., e = 0., m = 0., p = 0., pt = 0., theta = 0., phi = 0.;
Double_t pxq[4], pyq[4], pzq[4], eq[4], yq[4], mq[4], pq[4], phiq[4], thetaq[4], ptq[4];
Bool_t quenched[4];
- Double_t wjtKick[4];
+ Double_t wjtKick[4] = {0., 0., 0., 0.};
Int_t nGluon[4];
Int_t qPdg[4];
Int_t imo, kst, pdg;
//
pyshowq(ip1, ip2, qmax);
}
+ void AliPythia::Qpygin0()
+ {
+ // New multiple interaction scenario
+ qpygin0();
+ }
void AliPythia::GetQuenchingParameters(Double_t& xp, Double_t& yp, Double_t z[4])
{
//
SetMSEL(1);
- // No multiple interactions
- SetMSTP(81,0);
- SetPARP(81, 0.);
- SetPARP(82, 0.);
+
+ if (fItune < 0) {
+ // 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);
{
//
// Configuration for the ATLAS tuning
- 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(83,0.5); // Core density in proton matter distribution (def.value)
- SetPARP(84,0.5); // Core radius
- SetPARP(85,0.33); // Regulates gluon prod. mechanism
- SetPARP(86,0.66); // Regulates gluon prod. mechanism
- SetPARP(67,1); // Regulates Initial State Radiation
+ if (fItune > -1) return;
+ printf("ATLAS TUNE \n");
+
+ 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(83,0.5); // Core density in proton matter distribution (def.value)
+ SetPARP(84,0.5); // Core radius
+ SetPARP(85,0.33); // Regulates gluon prod. mechanism
+ SetPARP(86,0.66); // Regulates gluon prod. mechanism
+ SetPARP(67,1); // Regulates Initial State Radiation
+}
+
+void AliPythia::AtlasTuning_MC09()
+{
+ //
+ // Configuration for the ATLAS tuning
+ if (fItune > -1) return;
+ printf("ATLAS New TUNE MC09\n");
+ SetMSTP(81,21); // treatment for MI, ISR, FSR and beam remnants: MI on, new model
+ SetMSTP(82, 4); // Double Gaussian Model
+ SetMSTP(52, 2); // External PDF
+ SetMSTP(51, 20650); // MRST LO*
+
+
+ SetMSTP(70, 0); // (was 2: def manual 1, def code 0) virtuality scale for ISR
+ SetMSTP(72, 1); // (was 0: def 1) maximum scale for FSR
+ SetMSTP(88, 1); // (was 0: def 1) strategy for qq junction to di-quark or baryon in beam remnant
+ SetMSTP(90, 0); // (was 1: def 0) strategy of compensate the primordial kT
+
+ SetPARP(78, 0.3); // the amount of color reconnection in the final state
+ SetPARP(80, 0.1); // probability of color partons kicked out from beam remnant
+ SetPARP(82, 2.3); // [GeV] PT_min at Ref. energy
+ SetPARP(83, 0.8); // Core density in proton matter distribution (def.value)
+ SetPARP(84, 0.7); // Core radius
+ SetPARP(90, 0.25); // 2*epsilon (exponent in power law)
+ SetPARJ(81, 0.29); // (was 0.14: def 0.29) Labmda value in running alpha_s for parton showers
+
+ SetMSTP(95, 6);
+ SetPARJ(41, 0.3); // a and b parameters of the symmm. Lund FF
+ SetPARJ(42, 0.58);
+ SetPARJ(46, 0.75); // mod. of the Lund FF for heavy end-point quarks
+ SetPARP(89,1800.); // [GeV] Ref. energy
}
AliPythia& AliPythia::operator=(const AliPythia& rhs)
Fatal("Copy","Not implemented!\n");
}
+void AliPythia::DalitzDecays()
+{
+
+ //
+ // Replace all omega dalitz decays with the correct matrix element decays
+ //
+ Int_t nt = fPyjets->N;
+ for (Int_t i = 0; i < nt; i++) {
+ if (fPyjets->K[1][i] != 223) continue;
+ Int_t fd = fPyjets->K[3][i] - 1;
+ Int_t ld = fPyjets->K[4][i] - 1;
+ if (fd < 0) continue;
+ if ((ld - fd) != 2) continue;
+ if ((fPyjets->K[1][fd] != 111) ||
+ ((TMath::Abs(fPyjets->K[1][fd+1]) != 11) && (TMath::Abs(fPyjets->K[1][fd+1]) != 13)))
+ continue;
+ TLorentzVector omega(fPyjets->P[0][i], fPyjets->P[1][i], fPyjets->P[2][i], fPyjets->P[3][i]);
+ Int_t pdg = TMath::Abs(fPyjets->K[1][fd+1]);
+ fOmegaDalitz.Decay(pdg, &omega);
+ for (Int_t j = 0; j < 3; j++) {
+ for (Int_t k = 0; k < 4; k++) {
+ TLorentzVector vec = (fOmegaDalitz.Products())[2-j];
+ fPyjets->P[k][fd+j] = vec[k];
+ }
+ }
+ }
+}