Loading src/objects/MCParticle.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -75,14 +75,21 @@ void MCParticle::setParent(const MCParticle* mc_particle) { } /** * Object is stored as TRef and can only be accessed if pointed object is in scope * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ const MCParticle* MCParticle::getParent() const { return parent_.get(); } /** * Object is stored as TRef and can only be accessed if pointed object is in scope * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ bool MCParticle::isPrimary() const { return (parent_.get() == nullptr); } /** * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ const MCParticle* MCParticle::getPrimary() const { auto* parent = parent_.get(); Loading @@ -94,7 +101,7 @@ void MCParticle::setTrack(const MCTrack* mc_track) { } /** * Object is stored as TRef and can only be accessed if pointed object is in scope * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ const MCTrack* MCParticle::getTrack() const { return track_.get(); Loading src/objects/MCParticle.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,12 @@ namespace allpix { */ ROOT::Math::XYZPoint getLocalReferencePoint() const; /** * @brief Check if this MCParticle is a primary particle by checking if the parent particle reference is a nullptr. * @return Bollean flag indicating whether this MCParticle is a primary particle */ bool isPrimary() const; /** * @brief Get PDG particle id for the particle * @return Particle id Loading Loading
src/objects/MCParticle.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -75,14 +75,21 @@ void MCParticle::setParent(const MCParticle* mc_particle) { } /** * Object is stored as TRef and can only be accessed if pointed object is in scope * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ const MCParticle* MCParticle::getParent() const { return parent_.get(); } /** * Object is stored as TRef and can only be accessed if pointed object is in scope * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ bool MCParticle::isPrimary() const { return (parent_.get() == nullptr); } /** * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ const MCParticle* MCParticle::getPrimary() const { auto* parent = parent_.get(); Loading @@ -94,7 +101,7 @@ void MCParticle::setTrack(const MCTrack* mc_track) { } /** * Object is stored as TRef and can only be accessed if pointed object is in scope * Object is stored as \ref allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope */ const MCTrack* MCParticle::getTrack() const { return track_.get(); Loading
src/objects/MCParticle.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,12 @@ namespace allpix { */ ROOT::Math::XYZPoint getLocalReferencePoint() const; /** * @brief Check if this MCParticle is a primary particle by checking if the parent particle reference is a nullptr. * @return Bollean flag indicating whether this MCParticle is a primary particle */ bool isPrimary() const; /** * @brief Get PDG particle id for the particle * @return Particle id Loading