This is an old revision of the document!
To associate a MCParticle to a Particle in DaVinci, implement the following.
Header:
#include "Kernel/IParticle2MCAssociator.h" ... IParticle2MCAssociator* m_p2mcAssoc;
cpp-file:
std::string p2mcAssocType("DaVinciSmartAssociator");
m_p2mcAssoc = tool<IParticle2MCAssociator>(p2mcAssocType,this);
...
const LHCb::MCParticle* mcp;
mcp = m_p2mcAssoc->relatedMCP(*iParticle);
where *iParticle is a pointer to a Particle.