From a6c43ec113d494f83d205467970b6560cda3b7c1 Mon Sep 17 00:00:00 2001 From: Roberto Preghenella Date: Thu, 6 Apr 2017 14:22:16 +0200 Subject: [PATCH] Merge pull request #9 from afestant/master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding custom generator configuration for HF p-Pb Monte Carlo product… --- MC/CustomGenerators/PWGHF/Hijing_HF002.C | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 MC/CustomGenerators/PWGHF/Hijing_HF002.C diff --git a/MC/CustomGenerators/PWGHF/Hijing_HF002.C b/MC/CustomGenerators/PWGHF/Hijing_HF002.C new file mode 100644 index 00000000..cfb266b5 --- /dev/null +++ b/MC/CustomGenerators/PWGHF/Hijing_HF002.C @@ -0,0 +1,45 @@ +AliGenerator * +GeneratorCustom(TString opt = "") +{ + AliGenCocktail *ctl = GeneratorCocktail("Hijing_HF"); + Float_t randHF = gRandom->Rndm(); + if(randHF>0.176797){ + AliGenerator *hij = GeneratorHijing(); + ctl->AddGenerator(hij, "Hijing", 1.); + } + // + Int_t process[2] = {kPythia6HeavyProcess_Charm, kPythia6HeavyProcess_Beauty}; + Int_t decay[3] = {kPythia6HeavyDecay_Hadrons, kPythia6HeavyDecay_HadronsWithV0, kPythia6HeavyDecay_Electron}; + + const Char_t *label[2][3] = { + "chadr PYTHIA", "chadr PYTHIA", "cele PYTHIA", + "bchadr PYTHIA", "bchadr PYTHIA", "bele PYTHIA" + }; + Int_t iprocess = uidConfig % 2; + TString optList[3] = {"had", "hv0", "ele"}; + Int_t idecay = 0; + for (Int_t iopt = 0; iopt < 3; iopt++){ + if (opt.EqualTo(optList[iopt])) + idecay = iopt; + } + // + AliGenerator *phf = GeneratorPythia6Heavy(process[iprocess], decay[idecay], kPythia6Tune_Perugia2011, kFALSE); + // + ctl->AddGenerator(phf, label[iprocess][idecay], 1.); + printf(">>>>> added HF generator %s \n", label[iprocess][idecay]); + // add pi0 and eta enhancement + if (decay[idecay] == kPythia6HeavyDecay_Electron) { + AliGenPHOSlib *plib = new AliGenPHOSlib(); + AliGenParam *pi0 = new AliGenParam(1, plib, AliGenPHOSlib::kPi0Flat); + pi0->SetPhiRange(0., 360.) ; + pi0->SetYRange(-1.2, 1.2) ; + pi0->SetPtRange(0., 50.) ; + ctl->AddGenerator(pi0, "pi0", 1.); + AliGenParam *eta = new AliGenParam(1, plib, AliGenPHOSlib::kEtaFlat); + eta->SetPhiRange(0., 360.) ; + eta->SetYRange(-1.2, 1.2) ; + eta->SetPtRange(0., 50.) ; + ctl->AddGenerator(eta, "eta", 1.); + } + return ctl; +}