Skip to content

Commit

Permalink
Merge pull request #573 from gconesab/master
Browse files Browse the repository at this point in the history
Updates for jet pPb production and Muon Starlight production
  • Loading branch information
gconesab authored Jul 25, 2024
2 parents 7c9560b + 974d70a commit 3398bef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
34 changes: 23 additions & 11 deletions MC/CustomGenerators/PWGHF/HIJING_HFbjetpPb.C
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
AliGenerator *
GeneratorCustom(TString opt = "")
{

// set the xmldoc path using PYTHIA8DATA enviroement var
gSystem->Setenv("PYTHIA8DATA", gSystem->ExpandPathName("$ALICE_ROOT/PYTHIA8/pythia8/xmldoc"));

AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail("HIJING_HF");
Float_t randHF = gRandom->Rndm();
if(randHF>0.176797){ // add HIJING generator for p-Pb
AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
if(randHF>0.176797)
{ // add HIJING generator for p-Pb
AliGenerator *hijing = GeneratorHijing();
ctl->AddGenerator(hijing, "HIJING", 1.);
}
//
Int_t process[2] = {kPythia6HeavyProcess_Charm, kPythia6HeavyProcess_Beauty};
Int_t decay[4] = {kPythia6HeavyDecay_Hadrons, kPythia6HeavyDecay_HadronsWithV0, kPythia6HeavyDecay_Electron, kPythia6HeavyDecay_All};
Int_t decay[5] = {kPythia6HeavyDecay_Hadrons, kPythia6HeavyDecay_HadronsWithV0, kPythia6HeavyDecay_Electron, kPythia6HeavyDecay_All, kPythia6HeavyDecay_All_bDecaysEvtGen};

const Char_t *label[2][4] = {
"chadr PYTHIA", "chadr PYTHIA", "cele PYTHIA", "ccbar PYTHIA",
"bchadr PYTHIA", "bchadr PYTHIA", "bele PYTHIA", "bbbar PYTHIA"
const Char_t *label[2][5] = {
"chadr PYTHIA", "chadr PYTHIA", "cele PYTHIA", "ccbar PYTHIA", "ccbar PYTHIA+EvtGen",
"bchadr PYTHIA", "bchadr PYTHIA", "bele PYTHIA", "bbbar PYTHIA", "bbbar PYTHIA+EvtGen"
};

Int_t iprocess = -1;
Expand All @@ -22,15 +27,15 @@ GeneratorCustom(TString opt = "")
else if(opt.Contains("bb")) {iprocess = 1; printf("-- HF process = %s -- \n",opt.Data());}
else {printf("-- no HF process set = %s -- \n",opt.Data());}

TString optList[5] = {"had", "hv0", "ele", "all", "jetjet"};
TString optList[6] = {"had", "hv0", "ele", "all", "bEvtGen", "jetjet"};
Int_t idecay = 0;
for (Int_t iopt = 0; iopt < 5; iopt++){
for (Int_t iopt = 0; iopt < 6; iopt++){
if (opt.Contains(optList[iopt]))
idecay = iopt;
}

AliGenerator *phf;
if(idecay < 4) {
if(idecay < 5) {
Float_t randHF = gRandom->Rndm();
Int_t typeHF = -1;
if(randHF < 0.9) {
Expand All @@ -44,11 +49,18 @@ GeneratorCustom(TString opt = "")
printf(">>>>> added generator for HF production: %s \n", label[iprocess][2]);
}
}
else if(idecay == 4) {
else if(idecay == 5) {
phf = GeneratorPythia6Jets(kPythia6Tune_Perugia2011);
ctl->AddGenerator(phf, "jetjet", 1.);
printf(">>>>> added generator for HF production: %s \n", "jetjet");
}

if(idecay == 4) { //EvtGen for b-decays
AliGenEvtGen *gener = new AliGenEvtGen();
gener->SetParticleSwitchedOff(AliGenEvtGen::kBeautyPart);
ctl->AddGenerator(gener,"EvtGen",1.);
}

return ctl;
}

10 changes: 5 additions & 5 deletions MC/GeneratorConfig.C
Original file line number Diff line number Diff line change
Expand Up @@ -1256,10 +1256,10 @@ GeneratorHijing()

AliGenerator *
GeneratorStarlight(){
#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
printf("ERROR: Starlight not yet compatible with ROOT 6!\n");
return NULL;
#else
//#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
// printf("ERROR: Starlight not yet compatible with ROOT 6!\n");
// return NULL;
//#else
gSystem->Load("libStarLight.so");
gSystem->Load("libAliStarLight.so");

Expand Down Expand Up @@ -1504,7 +1504,7 @@ GeneratorStarlight(){
genCocktail->AddGenerator(genStarLight,"StarLight",1.);
genCocktail->AddGenerator(genEvtGen,"EvtGen",1.);
return genCocktail;
#endif
//#endif
}


Expand Down

0 comments on commit 3398bef

Please sign in to comment.