|
| 1 | +@defgroup fatras Fatras |
| 2 | +@brief Fast track simulation on ACTS tracking geometries. |
| 3 | + |
| 4 | +# Fatras |
| 5 | + |
| 6 | +Fatras is the ACTS fast track simulation package. It uses the |
| 7 | +@ref Acts::Propagator and a reconstruction-oriented @ref Acts::TrackingGeometry |
| 8 | +to transport particles through the detector and to produce simulated hits on |
| 9 | +sensitive surfaces. It is intended for fast algorithm validation and detector |
| 10 | +studies that do not require a full, detailed detector simulation. |
| 11 | + |
| 12 | +Fatras uses parametrized material interactions, including multiple scattering, |
| 13 | +Bethe-Bloch energy loss, Bethe-Heitler energy loss, and photon conversion. Since |
| 14 | +it operates on tracking surfaces rather than a full volumetric detector model, |
| 15 | +it is faster than a detailed Geant4 simulation but also less complete. |
| 16 | + |
| 17 | +## Barcode identifiers {#fatras_barcode_identifiers} |
| 18 | + |
| 19 | +Fatras labels simulated particles and hits with @ref ActsFatras::Barcode. A |
| 20 | +barcode is the event-local particle identifier used by Fatras and by the ACTS |
| 21 | +examples framework for truth matching. It is not a geometry identifier; it |
| 22 | +answers "which simulated particle produced this object?". |
| 23 | + |
| 24 | +The barcode stores five integer components: |
| 25 | + |
| 26 | +| Component | Meaning | |
| 27 | +| --------- | ------- | |
| 28 | +| primary vertex | The primary interaction vertex. Ordinary simulated particles use a non-zero primary vertex. | |
| 29 | +| secondary vertex | A secondary vertex below the primary vertex. Zero means the particle comes directly from the primary vertex. | |
| 30 | +| particle | The particle number within the selected primary and secondary vertex. | |
| 31 | +| generation | The descendant generation. Particles produced at the vertex use generation zero. | |
| 32 | +| sub-particle | The particle number within a non-zero generation. Particles produced at the vertex use sub-particle zero. | |
| 33 | + |
| 34 | +The default-constructed barcode has all components set to zero and represents an |
| 35 | +invalid, missing, or unknown particle identifier. This value is useful as a |
| 36 | +sentinel, but it should not be used for ordinary simulated particles. |
| 37 | + |
| 38 | +For example, a particle from primary vertex `2` with particle number `14` is |
| 39 | +encoded as: |
| 40 | + |
| 41 | +```text |
| 42 | +vp=2|vs=0|p=14|g=0|sp=0 |
| 43 | +``` |
| 44 | + |
| 45 | +If a Fatras interaction creates two descendant particles from this particle, the |
| 46 | +new particles keep the same vertex and particle number. The generation is |
| 47 | +increased and the sub-particle number distinguishes the two descendants: |
| 48 | + |
| 49 | +```text |
| 50 | +vp=2|vs=0|p=14|g=1|sp=0 |
| 51 | +vp=2|vs=0|p=14|g=1|sp=1 |
| 52 | +``` |
| 53 | + |
| 54 | +The preserved vertex and particle components make it cheap to recover the |
| 55 | +initial simulated particle for truth matching, while the generation and |
| 56 | +sub-particle components distinguish particles created during the simulation. |
| 57 | + |
| 58 | +## Creating and reducing barcodes |
| 59 | + |
| 60 | +@ref ActsFatras::Barcode is immutable from the caller's point of view: modifier |
| 61 | +methods return a new barcode with one component changed. Typical construction |
| 62 | +therefore chains the `with...` methods: |
| 63 | + |
| 64 | +```cpp |
| 65 | +auto particleId = ActsFatras::Barcode() |
| 66 | + .withVertexPrimary(1) |
| 67 | + .withVertexSecondary(0) |
| 68 | + .withParticle(42); |
| 69 | +``` |
| 70 | + |
| 71 | +Interactions that create descendants can call |
| 72 | +@ref ActsFatras::Barcode::makeDescendant to increase the generation and set the |
| 73 | +sub-particle number: |
| 74 | + |
| 75 | +```cpp |
| 76 | +auto electronId = photonId.makeDescendant(0); |
| 77 | +auto positronId = photonId.makeDescendant(1); |
| 78 | +``` |
| 79 | + |
| 80 | +Two helper projections are commonly useful when grouping truth information: |
| 81 | + |
| 82 | +- @ref ActsFatras::Barcode::vertexId drops the particle and sub-particle |
| 83 | + components so objects can be grouped by production vertex. |
| 84 | +- @ref ActsFatras::Barcode::withoutSubparticle drops only the sub-particle |
| 85 | + component so generated descendants can be grouped by original particle and |
| 86 | + generation. |
| 87 | + |
| 88 | +Since barcodes are created locally by the code that produces particles, there is |
| 89 | +no global allocation service that stores the full decay tree. Independent |
| 90 | +interactions can therefore create overlapping descendant identifiers if they |
| 91 | +start from the same particle and generation. When the full set of particles is |
| 92 | +available, sub-particle numbers within a generation can be renumbered to make |
| 93 | +the identifiers unique. |
0 commit comments