Skip to content

Commit

Permalink
Merge pull request #398 from gconesab/master
Browse files Browse the repository at this point in the history
adapt GA macros to embedding and pile-up configuration
  • Loading branch information
gconesab authored Jul 17, 2020
2 parents 8fde682 + 37b2726 commit f7dab1b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
33 changes: 29 additions & 4 deletions MC/CustomGenerators/PWGGA/Hijing_Gamma001.C
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,40 @@ GeneratorCustom()
{
AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail("Hijing_Gamma001");

AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
TString simulation = gSystem->Getenv("CONFIG_SIMULATION");
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_Gamma001_MCtoMCembedding","max impact parameter smaller than min impact parameter");
if ( bminConfig < 0. )
Fatal("Hijing_Gamma001_MCtoMCembedding","min impact parameter <0");
if ( bmaxConfig > 20 )
Fatal("Hijing_Gamma001_MCtoMCembedding","unphysical impact parameter");

bEvalFormula=(bmaxConfig+bminConfig)/2.;
}

// PCM
TFormula* neutralsF = new TFormula("neutrals", "30. + 30. * exp(- 0.5 * x * x / 5.12 / 5.12)");
Int_t ntimes = 1;
if ( isEmbedding )
{
ntimes=neutralsF->Eval(bEvalFormula);
delete neutralsF; neutralsF=0x0;
}
AliGenerator *pi0 = GeneratorInjector(1, 111, 0., 50., -1.2, 1.2);
AliGenerator *eta = GeneratorInjector(1, 221, 0., 50., -1.2, 1.2);
ctl->AddGenerator(pi0, "Injector (pi0)", 1., neutralsF);
ctl->AddGenerator(eta, "Injector (eta)", 1., neutralsF);
ctl->AddGenerator(pi0, "Injector (pi0)", 1., neutralsF,ntimes);
ctl->AddGenerator(eta, "Injector (eta)", 1., neutralsF,ntimes);

// PHOS
AliGenerator *pi0a = GeneratorInjector(1, 111, 0., 50., -0.155, 0.155, 240., 260.);
Expand Down
9 changes: 7 additions & 2 deletions MC/CustomGenerators/PWGGA/Hijing_Jets001.C
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ GeneratorCustom(TString opt = "")

AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail("Hijing_Jets001");

AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
TString simulation = gSystem->Getenv("CONFIG_SIMULATION");

if ( !simulation.Contains("Embed") )
{
AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
}

AliGenerator *jet = GeneratorPythia8Jets();
ctl->AddGenerator(jet, "Jets", 1., new TFormula(Form("ninj_%d", ninj), Form("%d", ninj)));
Expand Down
9 changes: 7 additions & 2 deletions MC/CustomGenerators/PWGGA/Hijing_Pythia_GammaTriggerAndJet.C
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ GeneratorCustom
//
// HIJING
//
AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
TString simulation = gSystem->Getenv("CONFIG_SIMULATION");

if ( !simulation.Contains("Embed") )
{
AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
}

//
// PYTHIA
Expand Down

0 comments on commit f7dab1b

Please sign in to comment.