User Tools

Site Tools


davinci:mcassoc

This is an old revision of the document!


How to implement a MC associator

Implementation

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.

davinci/mcassoc.1279201208.txt.gz · Last modified: 2010/07/15 15:40 by decianm