Skip to content

Commit

Permalink
update centrality dep. injection based on bmin / bmax
Browse files Browse the repository at this point in the history
  • Loading branch information
ffionda committed Jul 16, 2020
1 parent f86990b commit a83f723
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions MC/CustomGenerators/PWGDQ/Hijing_Jpsiee002.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AliGenerator *
GeneratorCustom(TString ptParamPrompt="UserParam_PbPb5TeV_0010")
GeneratorCustom(TString ptParamPrompt="UserParam_PbPb5TeV_0010", Bool_t useEventbyEventCent = kFALSE)
{
TString simulation = gSystem->Getenv("CONFIG_SIMULATION");

Expand All @@ -11,17 +11,29 @@ GeneratorCustom(TString ptParamPrompt="UserParam_PbPb5TeV_0010")
}

// centrality dependent injection
TFormula *formula = new TFormula("Signals","(x<14.0)*(11.0-0.4*x-0.02*x*x) + (x>14.0)*2.0");
Int_t ntimes = 1;
Double_t bEvalFormula = -1.;

TFormula *formula = new TFormula("Signals","(x<14.0)*(11.0-0.4*x-0.02*x*x) + (x>14.0)*2.0");
if(!useEventbyEventCent){
if(bminConfig>bmaxConfig)Fatal("Hijing_Jpsiee002","max impact parameter smaller than min impact parameter");
if(bminConfig<0.)Fatal("Hijing_Jpsiee002","min impact parameter <0");
if(bmaxConfig>20)Fatal("Hijing_Jpsiee002","unphysical impact parameter");
bEvalFormula=(bmaxConfig+bminConfig)/2.;
ntimes=TMath::Nint(formula->Eval(bEvalFormula));
delete formula; formula=0x0;
}


if (uidConfig % 10 < 7) {
AliGenerator *jpsi = Generator_Jpsiee(ptParamPrompt, 1.0, 0.0, 0.0, 0.0);
ctl->AddGenerator(jpsi, "Jpsi2ee", 1., formula);
ctl->AddGenerator(jpsi, "Jpsi2ee", 1., formula,ntimes);
TFile *file = new TFile("typeHF_4.proc", "recreate");
file->Close();
}
else {
AliGenerator *bjpsi = Generator_Jpsiee("Pythia BBar", 0.0, 0.0, 0.0, 1.0, kTRUE /*useEvtGenForBdecays*/);
ctl->AddGenerator(bjpsi, "B2Jpsi2ee", 1., formula);
ctl->AddGenerator(bjpsi, "B2Jpsi2ee", 1., formula,ntimes);
TFile *file = new TFile("typeHF_5.proc", "recreate");
file->Close();
}
Expand Down

0 comments on commit a83f723

Please sign in to comment.