Skip to content

Commit

Permalink
Merge pull request #553 from hahassan7/master
Browse files Browse the repository at this point in the history
Adding pythia8jetjet MC for FOCAL simulation
  • Loading branch information
gconesab authored May 23, 2023
2 parents 8b2ed7b + 814b89f commit 5c1ad5c
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions MC/CustomGenerators/Upgrade/FOCAL_Generators.C
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum GenTypes {
pythia_dirgamma_trig,
pythia_gammajet_trig,
pythia_particle_trig,
pythia8_JetJet,
ntuple,
hijing,
hijingAP,
Expand All @@ -43,6 +44,7 @@ TString gGenTypeNames[kNGenTypes] = {
"pythia_dirgamma_trig",
"pythia_gammajet_trig",
"pythia_particle_trig",
"pythia8_JetJet",
"ntuple",
"hijing",
"hijingAP",
Expand Down Expand Up @@ -636,6 +638,58 @@ AliGenerator* GeneratorCustom(TString opt = "") {
}
break;

case pythia8_JetJet:
//*********************************************
// Example for Pythia8
//*********************************************
{
AliGenPythiaPlus *gener = new AliGenPythiaPlus(AliPythia8::Instance());

float energy = 14000; // GeV
if (gSystem->Getenv("CONFIG_ENERGY")) {
energy = atof(gSystem->Getenv("CONFIG_ENERGY"));
}

// pt-hard, pt-trigger and quenching configuration
float pthardminConfig = 0.;
if (gSystem->Getenv("CONFIG_PTHARDMIN"))
pthardminConfig = atof(gSystem->Getenv("CONFIG_PTHARDMIN"));
float pthardmaxConfig = -1.;
if (gSystem->Getenv("CONFIG_PTHARDMAX"))
pthardmaxConfig = atof(gSystem->Getenv("CONFIG_PTHARDMAX"));
if (pthardmaxConfig != -1 && pthardmaxConfig <= pthardminConfig) {
printf(">>>>> Invalid max pt-hard: %f \n", pthardmaxConfig);
abort();
}

gener->SetMomentumRange(0, 999999.);
gener->SetThetaRange(0.4, 5.);
gener->SetYRange(0., 7.);
gener->SetPtRange(0, 1000.);

gener->SetEnergyCMS(energy);
// jets settings
gener->SetProcess(kPyJets);
// Careful using detector acceptance cuts and jet acceptance,
gener->SetJetEtaRange(3.2, 5.8); // Final state kinematic cuts
gener->SetJetPhiRange(0., 360.);
gener->SetJetEtRange(0., 1000.);
gener->SetPtHard(pthardminConfig, pthardmaxConfig); // Pt transfer of the hard scattering
gener->SetStrucFunc(kCTEQ5L);
gener->SetTune(14); // Monash 2013 tune

long seedConfig = TDatime().Get();
if (gSystem->Getenv("CONFIG_SEED"))
seedConfig = atoi(gSystem->Getenv("CONFIG_SEED"));

(AliPythia8::Instance())->ReadString("Random:setSeed = on");
(AliPythia8::Instance())->ReadString(Form("Random:seed = %ld", seedConfig % 900000000));
(AliPythia8::Instance())->ReadString("111:mayDecay = on");

generator = gener;
}
break;

case ntuple:
// Example for reading from a external file *
{
Expand Down

0 comments on commit 5c1ad5c

Please sign in to comment.