11AliGenerator *
22GeneratorCustom (TString opt = "" )
33{
4+
5+ // set the xmldoc path using PYTHIA8DATA enviroement var
6+ gSystem -> Setenv ("PYTHIA8DATA" , gSystem -> ExpandPathName ("$ALICE_ROOT/PYTHIA8/pythia8/xmldoc" ));
7+
48 AliGenCocktail * ctl = (AliGenCocktail * ) GeneratorCocktail ("HIJING_HF" );
59 Float_t randHF = gRandom -> Rndm ();
6- if (randHF > 0.176797 ){ // add HIJING generator for p-Pb
7- AliGenerator * hij = GeneratorHijing ();
8- ctl -> AddGenerator (hij , "Hijing" , 1. );
10+ if (randHF > 0.176797 )
11+ { // add HIJING generator for p-Pb
12+ AliGenerator * hijing = GeneratorHijing ();
13+ ctl -> AddGenerator (hijing , "HIJING" , 1. );
914 }
1015 //
1116 Int_t process [2 ] = {kPythia6HeavyProcess_Charm , kPythia6HeavyProcess_Beauty };
12- Int_t decay [4 ] = {kPythia6HeavyDecay_Hadrons , kPythia6HeavyDecay_HadronsWithV0 , kPythia6HeavyDecay_Electron , kPythia6HeavyDecay_All };
17+ Int_t decay [5 ] = {kPythia6HeavyDecay_Hadrons , kPythia6HeavyDecay_HadronsWithV0 , kPythia6HeavyDecay_Electron , kPythia6HeavyDecay_All , kPythia6HeavyDecay_All_bDecaysEvtGen };
1318
14- const Char_t * label [2 ][4 ] = {
15- "chadr PYTHIA" , "chadr PYTHIA" , "cele PYTHIA" , "ccbar PYTHIA" ,
16- "bchadr PYTHIA" , "bchadr PYTHIA" , "bele PYTHIA" , "bbbar PYTHIA"
19+ const Char_t * label [2 ][5 ] = {
20+ "chadr PYTHIA" , "chadr PYTHIA" , "cele PYTHIA" , "ccbar PYTHIA" , "ccbar PYTHIA+EvtGen" ,
21+ "bchadr PYTHIA" , "bchadr PYTHIA" , "bele PYTHIA" , "bbbar PYTHIA" , "bbbar PYTHIA+EvtGen"
1722 };
1823
1924 Int_t iprocess = -1 ;
@@ -22,15 +27,15 @@ GeneratorCustom(TString opt = "")
2227 else if (opt .Contains ("bb" )) {iprocess = 1 ; printf ("-- HF process = %s -- \n" ,opt .Data ());}
2328 else {printf ("-- no HF process set = %s -- \n" ,opt .Data ());}
2429
25- TString optList [5 ] = {"had" , "hv0" , "ele" , "all" , "jetjet" };
30+ TString optList [6 ] = {"had" , "hv0" , "ele" , "all" , "bEvtGen " , "jetjet" };
2631 Int_t idecay = 0 ;
27- for (Int_t iopt = 0 ; iopt < 5 ; iopt ++ ){
32+ for (Int_t iopt = 0 ; iopt < 6 ; iopt ++ ){
2833 if (opt .Contains (optList [iopt ]))
2934 idecay = iopt ;
3035 }
3136
3237 AliGenerator * phf ;
33- if (idecay < 4 ) {
38+ if (idecay < 5 ) {
3439 Float_t randHF = gRandom -> Rndm ();
3540 Int_t typeHF = -1 ;
3641 if (randHF < 0.9 ) {
@@ -44,11 +49,18 @@ GeneratorCustom(TString opt = "")
4449 printf (">>>>> added generator for HF production: %s \n" , label [iprocess ][2 ]);
4550 }
4651 }
47- else if (idecay == 4 ) {
52+ else if (idecay == 5 ) {
4853 phf = GeneratorPythia6Jets (kPythia6Tune_Perugia2011 );
4954 ctl -> AddGenerator (phf , "jetjet" , 1. );
5055 printf (">>>>> added generator for HF production: %s \n" , "jetjet" );
5156 }
57+
58+ if (idecay == 4 ) { //EvtGen for b-decays
59+ AliGenEvtGen * gener = new AliGenEvtGen ();
60+ gener -> SetParticleSwitchedOff (AliGenEvtGen ::kBeautyPart );
61+ ctl -> AddGenerator (gener ,"EvtGen" ,1. );
62+ }
63+
5264 return ctl ;
5365}
5466
0 commit comments