Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
ionCode = -1010010030;
if (!db->GetParticle(ionCode)) {
db->AddParticle("AntiHyperTriton", "AntiHyperTriton", 2.991134, kFALSE,
2.5e-15, 3, "Ion", ionCode);
2.5e-15, -3, "Ion", ionCode);
}

//hyper hydrogen 4 ground state
Expand All @@ -357,7 +357,7 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
ionCode = -1010010040;
if (!db->GetParticle(ionCode)) {
db->AddParticle("AntiHyperhydrog4", "AntiHyperhydrog4", 3.922434, kFALSE,
2.5e-15, 3, "Ion", ionCode);
2.5e-15, -3, "Ion", ionCode);
}
//hyper helium 4 ground state
ionCode = 1010020040;
Expand All @@ -369,7 +369,7 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
ionCode = -1010020040;
if (!db->GetParticle(ionCode)) {
db->AddParticle("AntiHyperhelium4", "AntiHyperhelium4", 3.921728, kFALSE,
2.5e-15, 6, "Ion", ionCode);
2.5e-15, -6, "Ion", ionCode);
}

// Lithium 4 ground state
Expand All @@ -394,7 +394,7 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
ionCode = -1010020050;
if (!db->GetParticle(ionCode)) {
db->AddParticle("AntiHyperhelium5", "AntiHyperhelium5", 4.839961, kFALSE,
2.5e-15, 6, "Ion", ionCode);
2.5e-15, -6, "Ion", ionCode);
}

ionCode = 1020010040;
Expand Down
6 changes: 6 additions & 0 deletions Detectors/gconfig/g4Config.C
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ R__LOAD_LIBRARY(libgeant4vmc)
#include "G4UImanager.hh"
#include "G4RegionStore.hh"
#include "G4ProductionCuts.hh"
#include "G4HadronicParameters.hh"
#endif
#include "commonConfig.C"

Expand Down Expand Up @@ -184,6 +185,11 @@ void Config()
const char* nthreads = getenv("ALICE_NSIMWORKERS");
setenv("G4FORCENUMBEROFTHREADS", nthreads ? nthreads : "1", 1);
}
// Geant4 gives its light hypernuclei and their antiparticles (3LH, 4LH, 4LHe, 5LHe, ...)
// ionisation, multiple scattering and hadronic interactions only when enabled; otherwise they
// cross the detectors without depositing energy. It must be set before the physics is built.
G4HadronicParameters::Instance()->SetEnableHyperNuclei(true);

/// Create the G4 VMC
TGeant4* geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration);
std::cout << "Geant4 has been created." << std::endl;
Expand Down
1 change: 1 addition & 0 deletions Steer/include/Steer/O2MCApplicationBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class O2MCApplicationBase : public FairMCApplication
void InitGeometry() override;
bool MisalignGeometry() override;
void AddParticles() override;
void AddIons() override;

// specific implementation of our hard geometry limits
double TrackingRmax() const override { return mCutParams.maxRTracking; }
Expand Down
23 changes: 23 additions & 0 deletions Steer/src/O2MCApplication.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,29 @@ void addSpecialParticles()
TVirtualMC::GetMC()->DefineParticle(-4120000, "AntiMonopole_asymm", kPTUndefined, monopoleMass, 0.0, 1e10, "BSM", 0.0, 0, 0, 0, 0, 0, 0, 0, 0, kTRUE);
}

void O2MCApplicationBase::AddIons()
{
// dispatch first to function in FairRoot
FairMCApplication::AddIons();

// Geant4 VMC looks a primary up in Geant4's particle table, which holds d, t, 3He and alpha from
// the start but a heavier ion only once it is created (by Z and A); an unknown primary is
// skipped. These are the stable ions beyond alpha that generators make (coalescence,
// injection). Only for Geant4: Geant3's DefineIon gives an ion already in TDatabasePDG a new
// isomer code.
if (std::strcmp(TVirtualMC::GetMC()->GetName(), "TGeant4") != 0) {
return;
}
struct Ion {
const char* name; // TDatabasePDG's: Geant4 VMC finds the ion's charge by the particle's name
int z;
int a;
};
for (const auto& ion : {Ion{"Li6", 3, 6}, Ion{"Li7", 3, 7}}) {
TVirtualMC::GetMC()->DefineIon(ion.name, ion.z, ion.a, ion.z, 0., 0.);
}
}

void O2MCApplicationBase::AddParticles()
{
// dispatch first to function in FairRoot
Expand Down