Skip to content

Commit

Permalink
avoid unnecessary casting line (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
gconesab authored Jun 12, 2020
1 parent 98c7745 commit e436250
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
5 changes: 2 additions & 3 deletions MC/CustomGenerators/PWGGA/Dpmjet_Pythia_GammaTriggerAndJet.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ GeneratorCustom
(TString opt = "kFullDetector")
{
// Init cocktail
AliGenerator *gen = GeneratorCocktail(Form("Dpmjet_%s",processConfig.Data()));
AliGenCocktail *ctl = (AliGenCocktail*) gen;
AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail(Form("Dpmjet_%s",processConfig.Data()));

//
// DPMjet
Expand Down Expand Up @@ -99,5 +98,5 @@ GeneratorCustom

ctl->AddGenerator(gammajet, processConfig, 1.);

return gen;
return ctl;
}
5 changes: 2 additions & 3 deletions MC/CustomGenerators/PWGGA/EPOSLHC_Pythia_GammaTriggerAndJet.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ GeneratorCustom
(TString opt = "kFullDetector")
{
// Init cocktail
AliGenerator *gen = GeneratorCocktail(Form("EPOSLHC_%s",processConfig.Data()));
AliGenCocktail *ctl = (AliGenCocktail*) gen;
AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail(Form("EPOSLHC_%s",processConfig.Data()));

//
// EPOSLHC
Expand Down Expand Up @@ -99,5 +98,5 @@ GeneratorCustom

ctl->AddGenerator(gammajet, processConfig, 1.);

return gen;
return ctl;
}
5 changes: 2 additions & 3 deletions MC/CustomGenerators/PWGGA/Hijing_Gamma001.C
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
AliGenerator *
GeneratorCustom()
{
AliGenerator *gen = GeneratorCocktail("Hijing_Gamma001");
AliGenCocktail *ctl = (AliGenCocktail*) gen;
AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail("Hijing_Gamma001");

AliGenerator *hij = GeneratorHijing();
ctl->AddGenerator(hij, "Hijing", 1.);
Expand All @@ -26,5 +25,5 @@ GeneratorCustom()
ctl->AddGenerator(pi0d, "Injector (pi0d)", 1.);
ctl->AddGenerator(etaa, "Injector (etaa)", 1.);

return gen;
return ctl;
}
5 changes: 2 additions & 3 deletions MC/CustomGenerators/PWGGA/Hijing_Jets001.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ GeneratorCustom(TString opt = "")
iinj = iopt;
Int_t ninj = ninjlist[iinj];

AliGenerator *gen = GeneratorCocktail("Hijing_Jets001");
AliGenCocktail *ctl = (AliGenCocktail*) gen;
AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail("Hijing_Jets001");

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)));

return gen;
return ctl;
}

5 changes: 2 additions & 3 deletions MC/CustomGenerators/PWGGA/Hijing_Pythia_GammaTriggerAndJet.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ GeneratorCustom
(TString opt = "kFullDetector")
{
// Init cocktail
AliGenerator *gen = GeneratorCocktail(Form("HIJING_%s",processConfig.Data()));
AliGenCocktail *ctl = (AliGenCocktail*) gen;
AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail(Form("HIJING_%s",processConfig.Data()));

//
// HIJING
Expand Down Expand Up @@ -99,5 +98,5 @@ GeneratorCustom

ctl->AddGenerator(gammajet, processConfig, 1.);

return gen;
return ctl;
}
5 changes: 2 additions & 3 deletions MC/CustomGenerators/PWGGA/SingleParticleGun001.C
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
AliGenerator *GeneratorCustom(TString opt = "")
{
AliGenerator *gen = GeneratorCocktail("SingleParticleGun001");
AliGenCocktail *ctl = (AliGenCocktail*) gen;
AliGenCocktail *ctl = (AliGenCocktail*) GeneratorCocktail("SingleParticleGun001");

printf("INFO: Particle with PDG = %d will be injected in %2.1f < pT < %2.1f (GeV/c), %2.1f < y < %2.1f, %2.1f < phi < %2.1f \n",pdgConfig,ptminConfig,ptmaxConfig,yminConfig,ymaxConfig,phiminConfig,phimaxConfig);

AliGenerator *particle = GeneratorInjector(1, pdgConfig,ptminConfig,ptmaxConfig,yminConfig,ymaxConfig,phiminConfig,phimaxConfig);
ctl->AddGenerator(particle, Form("Injector (PDG %d)",pdgConfig), 1.);

return gen;
return ctl;
}

0 comments on commit e436250

Please sign in to comment.