ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
Interfaces
AsgAnalysisInterfaces
AsgAnalysisInterfaces
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
11
#include <
AsgAnalysisInterfaces/IClassificationTool.h
>
12
#include <
xAODBase/IParticle.h
>
13
14
15
namespace
Truth
16
{
17
19
enum class
Type
{
20
Unknown
,
21
KnownUnknown
,
22
IsoElectron
,
23
ChargeFlipIsoElectron
,
24
PromptMuon
,
25
PromptPhotonConversion
,
26
ElectronFromMuon
,
27
TauDecay
,
28
BHadronDecay
,
29
CHadronDecay
,
30
LightFlavorDecay
,
31
ChargeFlipMuon
,
32
NonMuonlike
,
33
TauDecayLike
= 70,
34
BHadronDecayLike
= 80,
35
CHadronDecayLike
= 90,
36
};
37
38
}
// namespace Truth
39
40
inline
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
54
class
ITruthClassificationTool
:
virtual
public
CP::IClassificationTool
55
{
56
ASG_TOOL_INTERFACE
(
ITruthClassificationTool
)
57
58
public
:
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_
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition
AsgToolMacros.h:40
IParticle.h
IClassificationTool.h
operator<<
std::ostream & operator<<(std::ostream &os, const Truth::Type &obj)
Definition
ITruthClassificationTool.h:40
CP::IClassificationTool
a tool interface to classify particles into multiple categories by assigning them an unsigned integer
Definition
IClassificationTool.h:20
ITruthClassificationTool
a tool interface to classify particles into multiple categories based on their truth information
Definition
ITruthClassificationTool.h:55
ITruthClassificationTool::~ITruthClassificationTool
virtual ~ITruthClassificationTool()=default
ITruthClassificationTool::classify
virtual StatusCode classify(const xAOD::IParticle &particle, Truth::Type &classification) const =0
classify and return Truth::Type
ITruthClassificationTool::classify
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
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Truth
Definition
ITruthClassificationTool.h:16
Truth::Type
Type
truth classification type enum
Definition
ITruthClassificationTool.h:19
Truth::Type::PromptMuon
@ PromptMuon
Definition
ITruthClassificationTool.h:24
Truth::Type::CHadronDecayLike
@ CHadronDecayLike
Definition
ITruthClassificationTool.h:35
Truth::Type::TauDecayLike
@ TauDecayLike
Definition
ITruthClassificationTool.h:33
Truth::Type::CHadronDecay
@ CHadronDecay
Definition
ITruthClassificationTool.h:29
Truth::Type::ChargeFlipMuon
@ ChargeFlipMuon
Definition
ITruthClassificationTool.h:31
Truth::Type::ChargeFlipIsoElectron
@ ChargeFlipIsoElectron
Definition
ITruthClassificationTool.h:23
Truth::Type::BHadronDecay
@ BHadronDecay
Definition
ITruthClassificationTool.h:28
Truth::Type::ElectronFromMuon
@ ElectronFromMuon
Definition
ITruthClassificationTool.h:26
Truth::Type::PromptPhotonConversion
@ PromptPhotonConversion
Definition
ITruthClassificationTool.h:25
Truth::Type::BHadronDecayLike
@ BHadronDecayLike
Definition
ITruthClassificationTool.h:34
Truth::Type::Unknown
@ Unknown
Definition
ITruthClassificationTool.h:20
Truth::Type::IsoElectron
@ IsoElectron
Definition
ITruthClassificationTool.h:22
Truth::Type::NonMuonlike
@ NonMuonlike
Definition
ITruthClassificationTool.h:32
Truth::Type::TauDecay
@ TauDecay
Definition
ITruthClassificationTool.h:27
Truth::Type::KnownUnknown
@ KnownUnknown
Definition
ITruthClassificationTool.h:21
Truth::Type::LightFlavorDecay
@ LightFlavorDecay
Definition
ITruthClassificationTool.h:30
Generated on
for ATLAS Offline Software by
1.14.0