diff --git a/MC/CustomGenerators/DPG/EPOS_Pileup_bkg.C b/MC/CustomGenerators/DPG/EPOS_Pileup_bkg.C new file mode 100644 index 00000000..b56fd4a2 --- /dev/null +++ b/MC/CustomGenerators/DPG/EPOS_Pileup_bkg.C @@ -0,0 +1,38 @@ +#if !defined(__CINT__) || defined(__MAKECINT__) +//For ROOT6 +R__ADD_INCLUDE_PATH($ALIDPG_ROOT) +#include "Utils/GetTriggerBCMaskAndMu.C" +#endif + +AliGenerator *GeneratorCustom(){ + + // This is the EPOS pileup generator for background of embedded productions + // The trigger event is the signal that will be added on top + +#if defined(__CINT__) + // For ROOT5 + gROOT->LoadMacro("$ALIDPG_ROOT/Utils/GetTriggerBCMaskAndMu.C++"); +#endif + + Double_t mu = 0.001; + TString bcm = GetTriggerBCMaskAndMu(mu); + + //printf(" BC mask = %s\n",bcm.Data()); + //printf(" mu = %f\n",mu); + //printf(" Energy = %f\n",energyConfig); + + AliGenPileup *genpil = new AliGenPileup(); + // this is the EPOS-LHC generator for the pileup events, + // which is configured wihtout impact parameter cuts + AliGenerator * eposPU = GeneratorEPOSLHC(kTRUE); + genpil->SetGenerator(eposPU, mu); + // Set the beam time structure + // Details on the syntax in STEER/AliTriggerBCMask + genpil->SetBCMask(bcm.Data()); + // Do not generate the trigger interaction! This will go in the signal + genpil->GenerateTrigInteraction(kFALSE); + genpil->Print(); + + return genpil; + +} diff --git a/MC/GeneratorConfig.C b/MC/GeneratorConfig.C index 38122d5c..d4c2b4d3 100644 --- a/MC/GeneratorConfig.C +++ b/MC/GeneratorConfig.C @@ -1034,7 +1034,7 @@ GeneratorEPOSLHC(Bool_t pileup) if ( pileup ) nEventsEpos*=100; gROOT->ProcessLine(Form(".! rm -rf %s", fifoname.Data())); gROOT->ProcessLine(Form(".! mkfifo %s", fifoname.Data())); - gROOT->ProcessLine(Form(".! sh $ALIDPG_ROOT/MC/EXTRA/gen_eposlhc.sh %s %d %d %f %d %f &> gen_eposlhc%d.log &", + gROOT->ProcessLine(Form(".! bash $ALIDPG_ROOT/MC/EXTRA/gen_eposlhc.sh %s %d %d %f %d %f &> gen_eposlhc%d.log &", fifoname.Data(), nEventsEpos, projectileId, projectileEnergy, targetId, targetEnergy,pileup));