1 AliGenerator* AddMCGenPythia(Float_t e_cms = 2760., Double_t ptHardMin = 0., Double_t ptHardMax = 1., Int_t tune = 2,Int_t cr=1,Int_t ptWeight=0)
3 //Add Pythia generator: pt-hard bin or min bias
5 gSystem->Load("liblhapdf.so");
7 AliGenerator *genP = NULL;
8 genP = CreatePythia6Gen(e_cms, ptHardMin, ptHardMax, tune,cr,ptWeight);
13 AliGenerator* CreatePythia6Gen(Float_t e_cms, Int_t ptHardMin, Int_t ptHardMax, Int_t tune, Int_t cr,Int_t ptWeight) {
15 gSystem->Load("libpythia6.4.25.so");
16 gSystem->Load("libEGPythia6.so");
17 gSystem->Load("libAliPythia6.so");
19 AliGenPythia* genP = new AliGenPythia(1);
21 // vertex position and smearing
22 genP->SetVertexSmear(kPerEvent);
25 // use kCTEQ5l for Perugia tunes
26 // except for tunes: Perugia * (325, MRSTLO*), Perugia 6 (326, CTEQ6L),
27 // Perugia 11 M (355, MRST LO**), Perugia 11 C (356, CTEQ6L1)
28 genP->SetStrucFunc(kCTEQ5L);
30 // charm, beauty, charm_unforced, beauty_unforced, jpsi, jpsi_chi, mb
33 genP->SetProcess(kPyJets);
34 genP->SetPtHard((float)ptHardMin,(float)ptHardMax);
35 if(ptWeight>0) genP->SetWeightPower(ptWeight);
37 genP->SetProcess(kPyMb); // Minimum Bias
39 // Centre of mass energy
40 genP->SetEnergyCMS(e_cms); // in GeV
42 genP->UseNewMultipleInteractionsScenario(); // for all Pythia versions >= 6.3
44 if(tune == 0){ // tune Perugia0
46 if(cr==0) genP->SetTune(324);
48 if(tune == 1){ // tune Perugia2010
50 if(cr==0) genP->SetTune(324);
52 if(tune == 2){ // tune Perugia2011 ('central' Perugia 2011)
54 if(cr==0) genP->SetTune(354);