16 const std::string&
name,
17 const IInterface* parent)
20 declareInterface<ITruthParticlesInConeTool>(
this);
28 const std::string tableName =
name() +
"LookUpTable";
33 return StatusCode::SUCCESS;
45 if (!truthParticles.
isValid()) {
46 ATH_MSG_ERROR(
"Could not open a TruthParticle container with key "
50 auto lut = std::make_unique<LookUpTable>();
51 lut->init(*truthParticles);
53 return wh.put(std::move(lut),
true);
58 const EventContext& ctx,
62 std::vector<const TruthParticle*>& output)
const
66 return lut->iParticlesInCone(
eta,
phi, dr, output);
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteHandleKey< LookUpTable > m_LookUpTableCacheWrite
TruthParticlesInConeTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
const LookUpTable * getTable(const EventContext &ctx) const
SG::ReadHandleKey< TruthParticleContainer > m_truthParticleLocation
Truth Particle collection name.
virtual bool particlesInCone(const EventContext &ctx, float eta, float phi, float dr, std::vector< const TruthParticle * > &output) const override final
ITruthParticlesInConeTool interface.
SG::ReadHandleKey< LookUpTable > m_LookUpTableCacheRead
IParticlesLookUpTable< TruthParticle > LookUpTable
virtual StatusCode initialize() override final
initialize
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.