32 #ifndef G4BASE_PrimaryParticleInformation_h 33 #define G4BASE_PrimaryParticleInformation_h 39 #include "Geant4/G4VUserPrimaryParticleInformation.hh" 40 #include "Geant4/G4Allocator.hh" 64 inline void*
operator new(size_t);
65 inline void operator delete(
void*);
83 {
return fMCParticleIndex; }
92 bool IsInMCTruth()
const;
100 virtual void Print()
const override;
112 size_t fMCTIndex = 0;
123 inline bool PrimaryParticleInformation::IsInMCTruth()
const 127 inline void PrimaryParticleInformation::SetMCTruth(
135 fMCParticleIndex = indexInTruth;
138 inline void* PrimaryParticleInformation::operator
new(size_t)
140 void *aPrimaryParticleInformation;
141 aPrimaryParticleInformation = (
void *) PrimaryParticleInformationAllocator.MallocSingle();
142 return aPrimaryParticleInformation;
145 inline void PrimaryParticleInformation::operator
delete(
void *aPrimaryParticleInformation)
152 #endif // G4BASE_PrimaryParticleInformation_h const simb::MCTruth * GetMCTruth() const
constexpr GeneratedParticleIndex_t NoGeneratedParticleIndex
Constant representing the absence of generator truth information.
simb::GeneratedParticleIndex_t GeneratedParticleIndex_t
Type of the stored index of particle within the truth record.
G4Allocator< PrimaryParticleInformation > PrimaryParticleInformationAllocator
basic interface to Geant4 for ART-based software
void Print(G4Element &ele)
Event generator information.
Common type definitions for data products (and a bit beyond).
size_t const & MCTruthIndex() const
GeneratedParticleIndex_t MCParticleIndex() const
Returns the index of the corresponding particle in truth record.
std::size_t GeneratedParticleIndex_t
Type of particle index in the generator truth record (simb::MCTruth).