Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions MC/config/PWGEM/ini/pythia8_OO_536_VM2ll.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Diamond]
width[2]=6.0

[GeneratorExternal]
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C
funcName=generator_pythia8_ALICE3()

[GeneratorPythia8]
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/generator/pythia8_OO_536_VM2ll.cfg
56 changes: 56 additions & 0 deletions MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
int External() {
std::string path{"o2sim_Kine.root"};
// Check that file exists, can be opened and has the correct tree
TFile file(path.c_str(), "READ");
if (file.IsZombie())
{
std::cerr << "Cannot open ROOT file " << path << "\n";
return 1;
}
auto tree = (TTree *)file.Get("o2sim");
if (!tree)
{
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
return 1;
}
std::vector<o2::MCTrack> *tracks{};
tree->SetBranchAddress("MCTrack", &tracks);

// Check if all events are filled
auto nEvents = tree->GetEntries();
for (Long64_t i = 0; i < nEvents; ++i)
{
tree->GetEntry(i);
if (tracks->empty())
{
std::cerr << "Empty entry found at event " << i << "\n";
return 1;
}
}
// check if each event has at least two oxygen ions
for (int i = 0; i < nEvents; i++)
{
auto check = tree->GetEntry(i);
int count = 0;
for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
{
auto track = tracks->at(idxMCTrack);
if (track.GetPdgCode() == 1000080160)
{
count++;
}
}
if (count < 2)
{
std::cerr << "Event " << i << " has less than 2 oxygen ions\n";
return 1;
}
}

return 0;
}

//int Pythia8()
//{
// return External();
//}
21 changes: 21 additions & 0 deletions MC/config/PWGEM/pythia8/generator/pythia8_OO_536_VM2ll.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### OO beams
Beams:idA = 1000080160
Beams:idB = 1000080160
Beams:eCM = 5360.0 ### energy

Beams:frameType = 1
ParticleDecays:limitTau0 = on
ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c

### Save some CPU at init of jobs
### To avoid refitting, add the following lines to your configuration file:
HeavyIon:SigFitNGen = 0
HeavyIon:SigFitDefPar = 2.15,18.42,0.33

Random:setSeed = on

# change omega, phi meson's BR below
223:oneChannel = 1 0.5 0 -11 11
223:addChannel = 1 0.5 0 -13 13
333:oneChannel = 1 0.5 0 -11 11
333:addChannel = 1 0.5 0 -13 13