]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/macros/train/AddMCGenPythia.C
Fix in physics selection OADB
[u/mrichter/AliRoot.git] / ANALYSIS / macros / train / AddMCGenPythia.C
CommitLineData
54ea8cdd 1AliGenerator* AddMCGenPythia(Float_t e_cms = 2760., Double_t ptHardMin = 0., Double_t ptHardMax = 1., Int_t tune = 2,Int_t cr=1)
76b640d3 2{
3 //Add Pythia generator: pt-hard bin or min bias
4
5 gSystem->Load("liblhapdf.so");
6
7 AliGenerator *genP = NULL;
54ea8cdd 8 genP = CreatePythia6Gen(e_cms, ptHardMin, ptHardMax, tune,cr);
76b640d3 9
10 return genP;
11}
12
54ea8cdd 13AliGenerator* CreatePythia6Gen(Float_t e_cms, Int_t ptHardMin, Int_t ptHardMax, Int_t tune, Int_t cr) {
76b640d3 14
15 gSystem->Load("libpythia6.4.25.so");
16 gSystem->Load("libEGPythia6.so");
17 gSystem->Load("libAliPythia6.so");
18
19 AliGenPythia* genP = new AliGenPythia(1);
20
21 // vertex position and smearing
22 genP->SetVertexSmear(kPerEvent);
23
24 // structure function
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);
29
30 // charm, beauty, charm_unforced, beauty_unforced, jpsi, jpsi_chi, mb
31 if(ptHardMin>0.) {
32 genP->SetProcess(kPyJets);
33 genP->SetPtHard((float)ptHardMin,(float)ptHardMax);
34 } else
35 genP->SetProcess(kPyMb); // Minimum Bias
36
37 // Centre of mass energy
38 genP->SetEnergyCMS(e_cms); // in GeV
39
40 genP->UseNewMultipleInteractionsScenario(); // for all Pythia versions >= 6.3
41
42 if(tune == 0){ // tune Perugia0
43 genP->SetTune(320);
54ea8cdd 44 if(cr==0) genP->SetTune(324);
76b640d3 45 }
46 if(tune == 1){ // tune Perugia2010
47 genP->SetTune(327);
54ea8cdd 48 if(cr==0) genP->SetTune(324);
76b640d3 49 }
50 if(tune == 2){ // tune Perugia2011 ('central' Perugia 2011)
51 genP->SetTune(350);
54ea8cdd 52 if(cr==0) genP->SetTune(354);
76b640d3 53 }
54ea8cdd 54 genP->Print();
76b640d3 55 return genP;
56}