Skip to content

Commit 34f5956

Browse files
committed
[PWGDQ] Add pythia8 prompt J/psi generator at forward rapidity
1 parent 7340626 commit 34f5956

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

MC/config/PWGDQ/external/generator/generator_pythia8Onia_PromptSignals_gaptriggered.C

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,37 @@ FairGenerator*
173173
// gen->PrintDebug();
174174

175175
return gen;
176-
}
176+
}
177+
178+
FairGenerator*
179+
GeneratorPromptJpsi_EvtGenFwdy(int triggerGap, double rapidityMin = -4.3, double rapidityMax = -2.3, bool verbose = false)
180+
{
181+
auto gen = new o2::eventgen::GeneratorEvtGen<o2::eventgen::GeneratorPythia8OniaPromptSignalsGapTriggered>();
182+
gen->setTriggerGap(triggerGap);
183+
gen->setRapidityRange(rapidityMin, rapidityMax);
184+
gen->addHadronPDGs(443);
185+
gen->setVerbose(verbose);
186+
187+
TString pathO2table = gSystem->ExpandPathName("${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/pythia8/decayer/switchOffJpsi.cfg");
188+
gen->readFile(pathO2table.Data());
189+
gen->setConfigMBdecays(pathO2table);
190+
gen->PrintDebug(true);
191+
192+
gen->SetSizePdg(1);
193+
gen->AddPdg(443, 0);
194+
195+
gen->SetForceDecay(kEvtDiMuon);
196+
197+
// set random seed
198+
gen->readString("Random:setSeed on");
199+
uint random_seed;
200+
unsigned long long int random_value = 0;
201+
ifstream urandom("/dev/urandom", ios::in|ios::binary);
202+
urandom.read(reinterpret_cast<char*>(&random_value), sizeof(random_seed));
203+
gen->readString(Form("Random:seed = %llu", random_value % 900000001));
204+
205+
// print debug
206+
// gen->PrintDebug();
207+
208+
return gen;
209+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### The external generator derives from GeneratorPythia8.
2+
[GeneratorExternal]
3+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/external/generator/generator_pythia8Onia_PromptSignals_gaptriggered.C
4+
funcName=GeneratorPromptJpsi_EvtGenFwdy(5,-4.3,-2.3)
5+
6+
[GeneratorPythia8]
7+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/pythia8/generator/pythia8_onia_triggerGap.cfg

MC/config/common/pythia8/generator/pythia8_hf.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### beams
22
Beams:idA 2212 # proton
33
Beams:idB 2212 # proton
4-
Beams:eCM 14000. # GeV
4+
Beams:eCM 13600. # GeV
55

66
### processes
77
HardQCD:hardccbar on # scatterings g-g / q-qbar -> c-cbar

0 commit comments

Comments
 (0)