Skip to content
Snippets Groups Projects
Commit c378498f authored by John Derek Chapman's avatar John Derek Chapman Committed by Tadej Novak
Browse files

Add new TruthBinding::childTruthBinding method

Add new TruthBinding::childTruthBinding method to simplify creating TruthBindings for child particles
parent 4c7dc894
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,9 @@ namespace ISF {
inline HepMC::ConstGenParticlePtr getGenerationZeroTruthParticle() const;
inline void setGenerationZeroTruthParticle(HepMC::GenParticlePtr p);
/** Create a TruthBinding for a child particle */
inline TruthBinding* childTruthBinding(HepMC::GenParticlePtr childP) const;
private:
HepMC::GenParticlePtr m_truthParticle{}; //!< pointer to particle in MC truth
HepMC::GenParticlePtr m_primaryTruthParticle{}; //!< pointer to corresponding primary (generator) particle
......
......@@ -88,4 +88,9 @@ namespace ISF {
HepMC::ConstGenParticlePtr TruthBinding::getGenerationZeroTruthParticle() const { return m_generationZeroTruthParticle; }
void TruthBinding::setGenerationZeroTruthParticle(HepMC::GenParticlePtr p) { m_generationZeroTruthParticle = p; }
/** Create a TruthBinding for a child particle */
TruthBinding* TruthBinding::childTruthBinding(HepMC::GenParticlePtr childP) const {
return new TruthBinding(childP, m_primaryTruthParticle, childP);
}
} // end ISF namespace
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment