Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 8 additions & 0 deletions MC/config/PWGHF/ini/GeneratorHFTrigger_BToDeuteron.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#NEV_TEST> 10
#O2DPG_TEST> ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_BToDeuteron.C
### The external generator derives from GeneratorPythia8.
[GeneratorExternal]
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C
funcName=generateHFHadToNuclei(3, {521}, {1000010020}, true, 0.5)
[GeneratorPythia8]
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_bminus_CRmode2.cfg
48 changes: 48 additions & 0 deletions MC/config/PWGHF/ini/tests/GeneratorHFTrigger_BToDeuteron.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
int External()
{
std::string path{"o2sim_Kine.root"};
std::vector<int> checkPdgHadron{521};
std::vector<int> nucleiDauPdg{1000010020};

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");
std::vector<o2::MCTrack> *tracks{};
tree->SetBranchAddress("MCTrack", &tracks);

int nSignals{}, nSignalGoodDecay{};
auto nEvents = tree->GetEntries();

for (int i = 0; i < nEvents; i++)
{
tree->GetEntry(i);
for (auto &track : *tracks)
{
auto pdg = track.GetPdgCode();
if (std::find(checkPdgHadron.begin(), checkPdgHadron.end(), std::abs(pdg)) != checkPdgHadron.end())
{
if(std::abs(track.GetRapidity()) > 1.5) continue;
nSignals++;
for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j)
{
auto pdgDau = tracks->at(j).GetPdgCode();
if (std::find(nucleiDauPdg.begin(), nucleiDauPdg.end(), std::abs(pdgDau)) != nucleiDauPdg.end())
{
nSignalGoodDecay++;
}
}
}
}
}
std::cout << "--------------------------------\n";
std::cout << "# Events: " << nEvents << "\n";
std::cout << "# signal hadrons: " << nSignals << "\n";
std::cout << "# signal hadrons decaying into nuclei: " << nSignalGoodDecay << "\n";

return 0;
}
84 changes: 84 additions & 0 deletions MC/config/PWGHF/pythia8/generator/pythia8_bminus_CRmode2.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
### beams
Beams:idA 2212 # proton
Beams:idB 2212 # proton
Beams:eCM 13600. # GeV

### processes
SoftQCD:inelastic on # all inelastic processes

### decays
ParticleDecays:limitTau0 on
ParticleDecays:tau0Max 10.

### switching on Pythia Mode2
ColourReconnection:mode 1
ColourReconnection:allowDoubleJunRem off
ColourReconnection:m0 0.3
ColourReconnection:allowJunctions on
ColourReconnection:junctionCorrection 1.20
ColourReconnection:timeDilationMode 2
ColourReconnection:timeDilationPar 0.18
StringPT:sigma 0.335
StringZ:aLund 0.36
StringZ:bLund 0.56
StringFlav:probQQtoQ 0.078
StringFlav:ProbStoUD 0.2
StringFlav:probQQ1toQQ0join 0.0275,0.0275,0.0275,0.0275
MultiPartonInteractions:pT0Ref 2.15
BeamRemnants:remnantMode 1
BeamRemnants:saturation 5
BeamRemnants:allowBeamJunction = off
BeamRemnants:beamJunction = off
ColourReconnection:allowDiquarkJunctionCR = off

# Correct decay lengths
# B+
521:tau0 = 0.4914 # PDG: 1.638 ps -> c*tau = 0.4914 mm

## B+ (521) decay modes – at least 2 nucleons in the final states
521:onMode = off
521:oneChannel = 1 3e-07 0 -2112 -2112 111 2112 2212
521:addChannel = 1 3e-07 0 -3122 -2212 213 2112 2212
521:addChannel = 1 3e-07 0 -2212 -2112 111 323 2112 2212
521:addChannel = 1 3e-07 0 -2212 -2112 -211 211 321 2112 2212
##521:addChannel = 1 2e-07 0 -3122 -2212 211 2112 2212
##521:addChannel = 1 2e-07 0 -3122 -2212 -211 111 111 211 211 221 2112 2212
##521:addChannel = 1 2e-07 0 -3122 -2112 111 2112 2212
##521:addChannel = 1 2e-07 0 -3122 -2112 -211 111 211 2112 2212
##521:addChannel = 1 2e-07 0 -2214 -2212 111 211 321 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2212 211 211 311 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2212 113 211 321 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2212 111 111 211 211 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2112 211 311 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2112 113 321 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2112 111 221 321 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2112 111 113 211 2112 2212
##521:addChannel = 1 2e-07 0 -2112 -2112 -211 211 311 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2112 -211 113 211 211 2112 2212
##521:addChannel = 1 2e-07 0 -2212 -2112 -211 111 211 211 2112 2212
##521:addChannel = 1 2e-07 0 -2112 -2112 221 223 2112 2212
##521:addChannel = 1 2e-07 0 -2112 -2112 111 221 2112 2212
521:onIfMatch = -2112 -2112 111 2112 2212
521:onIfMatch = -3122 -2212 213 2112 2212
521:onIfMatch = -2212 -2112 111 323 2112 2212
521:onIfMatch = -2212 -2112 -211 211 321 2112 2212
##521:onIfMatch = -3122 -2212 211 2112 2212
##521:onIfMatch = -3122 -2212 -211 111 111 211 211 221 2112 2212
##521:onIfMatch = -3122 -2112 111 2112 2212
##521:onIfMatch = -3122 -2112 -211 111 211 2112 2212
##521:onIfMatch = -2214 -2212 111 211 321 2112 2212
##521:onIfMatch = -2212 -2212 211 211 311 2112 2212
##521:onIfMatch = -2212 -2212 113 211 321 2112 2212
##521:onIfMatch = -2212 -2212 111 111 211 211 2112 2212
##521:onIfMatch = -2212 -2112 211 311 2112 2212
##521:onIfMatch = -2212 -2112 113 321 2112 2212
##521:onIfMatch = -2212 -2112 111 221 321 2112 2212
##521:onIfMatch = -2212 -2112 111 113 211 2112 2212
##521:onIfMatch = -2112 -2112 -211 211 311 2112 2212
##521:onIfMatch = -2212 -2112 -211 113 211 211 2112 2212
##521:onIfMatch = -2212 -2112 -211 111 211 211 2112 2212
##521:onIfMatch = -2112 -2112 221 223 2112 2212
##521:onIfMatch = -2112 -2112 111 221 2112 2212



Loading