#include <PrimaryParticleInformation.h>
simb::MCParticle const * g4b::PrimaryParticleInformation::GetMCParticle |
( |
| ) |
const |
Returns the original particle in the truth record.
- Returns
- pointer to the original particle, or
nullptr
if not available
- See also
- MCParticleIndex(), GetMCTruth()
Definition at line 16 of file PrimaryParticleInformation.cxx.
20 if (!truth)
return nullptr;
22 if (
index >= (std::size_t) truth->NParticles())
return nullptr;
23 return &(truth->GetParticle(
index));
const simb::MCTruth * GetMCTruth() const
GeneratedParticleIndex_t MCParticleIndex() const
Returns the index of the corresponding particle in truth record.
const simb::MCTruth* g4b::PrimaryParticleInformation::GetMCTruth |
( |
| ) |
const |
|
inline |
bool g4b::PrimaryParticleInformation::IsInMCTruth |
( |
| ) |
const |
|
inline |
Returns whether this particle has a corresponding truth record item.
- See also
- MCParticleIndex(), GetMCTruth()
Definition at line 123 of file PrimaryParticleInformation.h.
constexpr GeneratedParticleIndex_t NoGeneratedParticleIndex
Constant representing the absence of generator truth information.
GeneratedParticleIndex_t MCParticleIndex() const
Returns the index of the corresponding particle in truth record.
Returns the index of the corresponding particle in truth record.
- Returns
- an index within truth record,
NotInMCTruth
otherwise
- See also
- IsInMCTruth(), GetMCTruth()
This method returns the index in the truth record pointed by GetMCTruth()
of the particle (simb::MCParticle
) corresponding to this object. If this information is not set, or if there is no such a particle at all, the special value NotInMCTruth
is returned. This can be checked with the IsInMCTruth()
method. T
Definition at line 82 of file PrimaryParticleInformation.h.
GeneratedParticleIndex_t fMCParticleIndex
Index within the truth record.
size_t const& g4b::PrimaryParticleInformation::MCTruthIndex |
( |
| ) |
const |
|
inline |
void g4b::PrimaryParticleInformation::operator delete |
( |
void * |
aPrimaryParticleInformation | ) |
|
|
inline |
void * g4b::PrimaryParticleInformation::operator new |
( |
size_t |
| ) |
|
|
inline |
Definition at line 138 of file PrimaryParticleInformation.h.
140 void *aPrimaryParticleInformation;
142 return aPrimaryParticleInformation;
G4Allocator< PrimaryParticleInformation > PrimaryParticleInformationAllocator
void g4b::PrimaryParticleInformation::Print |
( |
| ) |
const |
|
overridevirtual |
Definition at line 127 of file PrimaryParticleInformation.h.
const simb::MCTruth * fMCTruth
GeneratedParticleIndex_t fMCParticleIndex
Index within the truth record.
size_t g4b::PrimaryParticleInformation::fMCTIndex = 0 |
|
private |
const simb::MCTruth* g4b::PrimaryParticleInformation::fMCTruth = nullptr |
|
private |
The documentation for this class was generated from the following files: