ATLAS Offline Software
Loading...
Searching...
No Matches
ITruthClassificationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ITRUTHCLASSIFICATIONTOOL_H_
6#define ITRUTHCLASSIFICATIONTOOL_H_
7
8#include <iostream>
9#include <type_traits>
10
12#include <xAODBase/IParticle.h>
13
14
39
40inline std::ostream &operator<<(std::ostream &os, const Truth::Type &obj)
41{
42 os << static_cast<std::underlying_type<Truth::Type>::type>(obj);
43 return os;
44}
45
46
47
55{
57
58public:
59 virtual ~ITruthClassificationTool() = default;
60
63 virtual StatusCode classify(const xAOD::IParticle &particle,
64 unsigned int &classification) const = 0;
65
67 virtual StatusCode classify(const xAOD::IParticle &particle,
68 Truth::Type &classification) const = 0;
69};
70
71#endif // ITRUTHCLASSIFICATIONTOOL_H_
#define ASG_TOOL_INTERFACE(CLASSNAME)
std::ostream & operator<<(std::ostream &os, const Truth::Type &obj)
a tool interface to classify particles into multiple categories by assigning them an unsigned integer
a tool interface to classify particles into multiple categories based on their truth information
virtual ~ITruthClassificationTool()=default
virtual StatusCode classify(const xAOD::IParticle &particle, Truth::Type &classification) const =0
classify and return Truth::Type
virtual StatusCode classify(const xAOD::IParticle &particle, unsigned int &classification) const =0
classify and return unsigned int re-declaration needed due to the same name used
Class providing the definition of the 4-vector interface.
Type
truth classification type enum