Skip to content

Commit

Permalink
move embedding functionality from _EmbedB into _HF001.C. Remove now-o…
Browse files Browse the repository at this point in the history
…bsoleted "Embed" macros. (#253)
  • Loading branch information
jezwilkinson authored and chiarazampolli committed Mar 8, 2019
1 parent e2be46f commit 8c68158
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 156 deletions.
39 changes: 32 additions & 7 deletions MC/CustomGenerators/PWGHF/Hijing_HF001.C
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
AliGenerator *
GeneratorCustom(TString opt = "")
AliGenerator *GeneratorCustom(TString opt = "")
{
AliGenCocktail *ctl = GeneratorCocktail("Hijing_HF");
AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);

TString simulation = gSystem->Getenv("CONFIG_SIMULATION");
Int_t ntimes=1;

Double_t bEvalFormula=-1;
Bool_t isEmbedding=kFALSE;
if(!simulation.Contains("Embed")){
AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
}
else{
isEmbedding=kTRUE;

if(bminConfig>bmaxConfig)Fatal("Hijing_HF001_MCtoMCembedding","max impact parameter smaller than min impact parameter");
if(bminConfig<0.)Fatal("Hijing_HF001_MCtoMCembedding","min impact parameter <0");
if(bmaxConfig>20)Fatal("Hijing_HF001_MCtoMCembedding","unphysical impact parameter");
bEvalFormula=(bmaxConfig+bminConfig)/2.;
}

const Char_t *label[2][6] = {
"chadr PYTHIA", "chadr PYTHIA", "cele PYTHIA", "chadr PYTHIA", "chadr PYTHIA", "chadr PYTHIA",
Expand All @@ -23,13 +38,18 @@ GeneratorCustom(TString opt = "")
AliGenerator *phf = GeneratorPythia6Heavy(process[iprocess], decay[idecay], kPythia6Tune_Perugia2011);
//
TFormula *formula = new TFormula("Signals","max(1.,120.*(x<5.)+80.*(1.-x/20.)*(x>5.)*(x<11.)+240.*(1.-x/13.)*(x>11.))");
if(isEmbedding){
ntimes=formula->Eval(bEvalFormula);
delete formula; formula=0x0;
}
//
Float_t pth[4] = {2.76, 20., 50., 1000.};
Int_t ipt;
if ((uidConfig / 2) % 10 < 7) ipt = 0;
else if ((uidConfig / 2) % 10 < 9) ipt = 1;
else ipt = 2;
((AliGenPythia *)phf)->SetPtHard(pth[ipt], pth[ipt + 1]);

if(opt.EqualTo(optList[3])) {// Lc --> K0sp
((AliGenPythia *)phf)->SetTriggerParticle(4122, 999, 999, -1, 1000);
((AliGenPythia *)phf)->SetTriggerY(1.0);
Expand All @@ -48,22 +68,27 @@ GeneratorCustom(TString opt = "")
((AliGenPythia *)phf)->SetHeavyQuarkYRange(-1.5,1.5);
((AliGenPythia *)phf)->SetForceDecay(AliDecayer::kLcpKpi); //Force Lc decay mode in PYTHIA to Lc->pKpi
}
ctl->AddGenerator(phf, label[iprocess][idecay], 1., formula);
ctl->AddGenerator(phf, label[iprocess][idecay], 1., formula,ntimes);
printf(">>>>> added HF generator %s \n", label[iprocess][idecay]);

// add pi0 and eta enhancement
if (decay[idecay] == kPythia6HeavyDecay_Electron) {
TFormula* neutralsF = new TFormula("neutrals", "20.+ 80. * exp(- 0.5 * x * x / 5.12 / 5.12)");
if(isEmbedding){
ntimes=neutralsF->Eval(bEvalFormula);
delete neutralsF; neutralsF=0x0;
}
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., neutralsF);
ctl->AddGenerator(pi0, "pi0", 1., neutralsF,ntimes);
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., neutralsF);
ctl->AddGenerator(eta, "eta", 1., neutralsF,ntimes);
}
return ctl;
}
74 changes: 0 additions & 74 deletions MC/CustomGenerators/PWGHF/Hijing_HF001_EmbedA.C

This file was deleted.

75 changes: 0 additions & 75 deletions MC/CustomGenerators/PWGHF/Hijing_HF001_EmbedB.C

This file was deleted.

0 comments on commit 8c68158

Please sign in to comment.