From 37b27267fe645b59d2bce3eba534609de02d550e Mon Sep 17 00:00:00 2001 From: Gustavo Conesa Date: Thu, 16 Jul 2020 18:21:02 +0200 Subject: [PATCH] adapt to embedding and pile-up configuration --- MC/CustomGenerators/PWGGA/Hijing_Gamma001.C | 33 ++++++++++++++++--- MC/CustomGenerators/PWGGA/Hijing_Jets001.C | 9 +++-- .../PWGGA/Hijing_Pythia_GammaTriggerAndJet.C | 9 +++-- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/MC/CustomGenerators/PWGGA/Hijing_Gamma001.C b/MC/CustomGenerators/PWGGA/Hijing_Gamma001.C index e858827f..3f2922ed 100644 --- a/MC/CustomGenerators/PWGGA/Hijing_Gamma001.C +++ b/MC/CustomGenerators/PWGGA/Hijing_Gamma001.C @@ -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.); diff --git a/MC/CustomGenerators/PWGGA/Hijing_Jets001.C b/MC/CustomGenerators/PWGGA/Hijing_Jets001.C index b300d615..efedb008 100644 --- a/MC/CustomGenerators/PWGGA/Hijing_Jets001.C +++ b/MC/CustomGenerators/PWGGA/Hijing_Jets001.C @@ -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))); diff --git a/MC/CustomGenerators/PWGGA/Hijing_Pythia_GammaTriggerAndJet.C b/MC/CustomGenerators/PWGGA/Hijing_Pythia_GammaTriggerAndJet.C index 41c91d74..1eb9eb54 100644 --- a/MC/CustomGenerators/PWGGA/Hijing_Pythia_GammaTriggerAndJet.C +++ b/MC/CustomGenerators/PWGGA/Hijing_Pythia_GammaTriggerAndJet.C @@ -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