33 (
const std::string&
type,
34 const std::string& name,
35 const IInterface* parent)
39 declareProperty (
"Classifier",
m_classifier,
"Classifier tool instance.");
40 declareProperty (
"DRVar",
m_drvar,
41 "If not empty, the variable name to use for DR.");
52 CHECK( Base::initialize() );
54 return StatusCode::SUCCESS;
65 return StatusCode::SUCCESS;
80 if (
m_classifier->particleTruthClassifier (&p, &info).first !=
88 *
m_dr = p.p4().DeltaR(out->p4());
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Associate from a muon to a matched GenParticle via classification tool.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
SingleAssociationTool< xAOD::Muon, xAOD::TruthParticle > Base
MuonGenParticleAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
std::string m_drvar
Property: If not empty, the variable name to use for DR.
StatusCode initialize()
Standard Gaudi initialize method.
ToolHandle< IMCTruthClassifier > m_classifier
Property: classifier tool.
virtual const xAOD::TruthParticle * get(const xAOD::Muon &p)
Return the target object.
float * m_dr
Variable: DR between reco and truth.
StatusCode book()
Create any needed tuple variables.
Block filler tool for noisy FEB information.
TruthParticle_v1 TruthParticle
Typedef to implementation.
Muon_v1 Muon
Reference the current persistent version: