Skip to content

Commit

Permalink
feat: Extend list of PdgParticles particles to include Pb (#2042)
Browse files Browse the repository at this point in the history
When the particle to collide is set to Pb `acts.PdgParticle.lead` the pythia invokes a HI collisions generator. 
This way one can test ACTS in this conditions by invoking the generator like this:
```python
  addPythia8(
        s,
        npileup=1,
        beam=acts.PdgParticle.lead, # lead
        cmsEnergy=5.0*u.TeV,
        vtxGen=acts.examples.GaussianVertexGenerator(
            stddev=acts.Vector4(0.0125 * u.mm, 0.0125 * u.mm, 55.5 * u.mm, 5.0 * u.ns),
            mean=acts.Vector4(0, 0, 0, 0),
        ),
        rnd=rnd,
        outputDirRoot=outputDir
    )
``` 
That should help with studies in needed for: #1778
Tagging @pbalek
  • Loading branch information
tboldagh committed Apr 23, 2023
1 parent f2d8c25 commit 2ffdeee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Core/include/Acts/Utilities/PdgParticle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum PdgParticle : int32_t {
eAntiNeutron = -eNeutron,
eProton = 2212,
eAntiProton = -eProton,
eLead = 1000822080
};

/// Convert an anti-particle to its particle and leave particles as-is.
Expand Down
3 changes: 2 additions & 1 deletion Examples/Python/src/Base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ void addPdgParticle(Acts::Python::Context& ctx) {
.value("eNeutron", Acts::PdgParticle::eNeutron)
.value("eAntiNeutron", Acts::PdgParticle::eAntiNeutron)
.value("eProton", Acts::PdgParticle::eProton)
.value("eAntiProton", Acts::PdgParticle::eAntiProton);
.value("eAntiProton", Acts::PdgParticle::eAntiProton)
.value("eLead", Acts::PdgParticle::eLead);
}

void addAlgebra(Acts::Python::Context& ctx) {
Expand Down
2 changes: 1 addition & 1 deletion Examples/Python/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_logging():


def test_pgd_particle():
assert len(acts.PdgParticle.__members__) == 16
assert len(acts.PdgParticle.__members__) == 17


def test_algebra():
Expand Down

0 comments on commit 2ffdeee

Please sign in to comment.