-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#if !defined(__CINT__) || defined(__MAKECINT__) | ||
//For ROOT6 | ||
R__ADD_INCLUDE_PATH($ALIDPG_ROOT) | ||
#include "Utils/GetTriggerBCMaskAndMu.C" | ||
#endif | ||
|
||
/// Standalone macro to generate MB Pythia8 events signal+pile-up background | ||
AliGenerator *GeneratorCustom(){ | ||
|
||
#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); | ||
|
||
// Set the pileup interaction generator | ||
// The second argument is the pileup rate | ||
// in terms of event rate per bunch crossing | ||
AliGenCocktail *ctl = (AliGenCocktail*)GeneratorCocktail("Pythia8_Pileup"); | ||
|
||
// this is the Pythia8 generator for the trigger event, | ||
// which could contain an impact parameter cut | ||
AliGenerator *pythia = GeneratorPythia8(); | ||
|
||
AliGenPileup *genpil = new AliGenPileup(); | ||
// this is the Pythia8 generator for the pileup events, | ||
// which is configured wihtout impact parameter cuts | ||
AliGenerator * pythiaPU = GeneratorPythia8(); | ||
genpil->SetGenerator(pythiaPU,mu); | ||
// Set the beam time structure | ||
// Details on the syntax in STEER/AliTriggerBCMask | ||
genpil->SetBCMask(bcm.Data()); | ||
// Do not generate the trigger interaction! | ||
genpil->GenerateTrigInteraction(kFALSE); | ||
genpil->Print(); | ||
|
||
ctl->AddGenerator(genpil, "Pileup" , 1.); | ||
ctl->AddGenerator(pythia, "Pythia8", 1.); | ||
|
||
return ctl; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 pp MB Pythia8 pileup generator for pileup background for embedded productions | ||
// The trigger event is the signal that will be added on top, generated with other macro | ||
|
||
#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 Pythia8 generator for the pileup events, | ||
// which is configured wihtout impact parameter cuts | ||
AliGenerator * pythia = GeneratorPythia8(); | ||
genpil->SetGenerator(pythia, 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; | ||
|
||
} |