Skip to content

Commit

Permalink
EPOS pileup generator for bkg in embedding MCs
Browse files Browse the repository at this point in the history
Removing also "&" when generating EPOS event in fifo
  • Loading branch information
chiarazampolli authored and fprino committed Sep 8, 2020
1 parent 320da88 commit d9319d3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions MC/CustomGenerators/DPG/EPOS_Pileup_bkg.C
Original file line number Diff line number Diff line change
@@ -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;

}
2 changes: 1 addition & 1 deletion MC/GeneratorConfig.C
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit d9319d3

Please sign in to comment.