ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
IsolationSelection
IsolationSelection
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ISOLATIONSELECTION_DEFS_H
6
#define ISOLATIONSELECTION_DEFS_H
7
8
// EDM include(s):
9
#include <
AthContainers/AuxElement.h
>
10
#include <
xAODCaloEvent/CaloCluster.h
>
11
#include <
xAODPFlow/FlowElement.h
>
12
#include <
xAODPrimitives/IsolationType.h
>
13
#include <
xAODTracking/TrackParticle.h
>
14
15
#include <set>
16
#include <unordered_set>
17
namespace
CP
{
18
19
using
CharAccessor
=
SG::ConstAccessor<char>
;
20
using
CharDecorator
=
SG::Decorator<char>
;
21
22
using
FloatAccessor
=
SG::ConstAccessor<float>
;
23
using
FloatDecorator
=
SG::Decorator<float>
;
24
25
using
SelectionAccessor
= std::unique_ptr<CharAccessor>;
26
using
SelectionDecorator
= std::unique_ptr<CharDecorator>;
27
28
using
BoolDecorator
=
SG::Decorator<bool>
;
29
using
BoolAccessor
=
SG::ConstAccessor<bool>
;
30
31
using
IntDecorator
=
SG::Decorator<int>
;
32
using
IntAccessor
=
SG::ConstAccessor<int>
;
33
34
using
ShortDecorator
=
SG::Decorator<short>
;
35
using
ShortAccessor
=
SG::ConstAccessor<short>
;
36
37
using
IsoType
=
xAOD::Iso::IsolationType
;
38
using
IsoVector
= std::vector<IsoType>;
39
41
template
<
class
Obj>
struct
SortedObjPtr
{
42
SortedObjPtr
() =
default
;
43
SortedObjPtr
(
const
Obj* ptr) :
m_ptr
{ptr} {}
44
45
const
Obj*
get
()
const
{
return
m_ptr
; }
46
const
Obj*
operator->
()
const
{
return
m_ptr
; }
47
const
Obj&
operator*
()
const
{
return
*
m_ptr
; }
48
bool
operator!
()
const
{
return
!
m_ptr
; }
49
operator
bool
()
const
{
return
m_ptr
; }
50
operator
const
Obj*()
const
{
return
m_ptr
; }
51
bool
operator<
(
const
SortedObjPtr<Obj>
&
other
)
const
{
52
return
other
.get() !=
get
() &&
get
() &&
53
(!
other
||
other
->pt() <
get
()->
pt
() || (
other
->pt() ==
get
()->
pt
() &&
other
.get() <
get
()));
54
}
55
56
private
:
57
const
Obj*
m_ptr
{
nullptr
};
58
};
59
60
struct
FlowElementPtr
:
public
SortedObjPtr
<xAOD::FlowElement> {
61
FlowElementPtr
(
const
xAOD::FlowElement
* ele,
float
weight_) :
SortedObjPtr
<
xAOD
::
FlowElement
>{ele},
weight
{weight_} {}
62
FlowElementPtr
() =
default
;
63
bool
operator<
(
const
FlowElementPtr
&
other
)
const
{
64
if
(
other
.weight !=
weight
)
return
weight
<
other
.weight;
65
return
SortedObjPtr<xAOD::FlowElement>::operator<
(
other
);
66
}
67
float
weight
{1.f};
68
};
69
70
using
CaloClusterPtr
=
SortedObjPtr<xAOD::CaloCluster>
;
71
using
TrackPtr
=
SortedObjPtr<xAOD::TrackParticle>
;
72
73
using
TrackSet
= std::set<TrackPtr>;
74
using
ClusterSet
= std::set<CaloClusterPtr>;
75
using
PflowSet
= std::set<FlowElementPtr>;
76
77
using
UnorderedClusterSet
= std::unordered_set<const xAOD::CaloCluster*>;
78
using
UnorderedContainerSet
= std::unordered_set<const SG::AuxVectorData*>;
79
}
// namespace CP
80
81
#endif
AuxElement.h
Base class for elements of a container that can have aux data.
CaloCluster.h
TrackParticle.h
FlowElement.h
IsolationType.h
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition
ConstAccessor.h:55
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::IsoVector
std::vector< IsoType > IsoVector
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:38
CP::ShortDecorator
SG::Decorator< short > ShortDecorator
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:34
CP::FloatAccessor
SG::ConstAccessor< float > FloatAccessor
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:22
CP::ShortAccessor
SG::ConstAccessor< short > ShortAccessor
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:35
CP::UnorderedClusterSet
std::unordered_set< const xAOD::CaloCluster * > UnorderedClusterSet
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:77
CP::IsoType
xAOD::Iso::IsolationType IsoType
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:37
CP::IntAccessor
SG::ConstAccessor< int > IntAccessor
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:32
CP::FloatDecorator
SG::Decorator< float > FloatDecorator
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:23
CP::CharAccessor
SG::ConstAccessor< char > CharAccessor
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:19
CP::PflowSet
std::set< FlowElementPtr > PflowSet
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:75
CP::SelectionAccessor
std::unique_ptr< CharAccessor > SelectionAccessor
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:25
CP::TrackSet
std::set< TrackPtr > TrackSet
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:73
CP::IntDecorator
SG::Decorator< int > IntDecorator
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:31
CP::UnorderedContainerSet
std::unordered_set< const SG::AuxVectorData * > UnorderedContainerSet
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:78
CP::BoolAccessor
SG::ConstAccessor< bool > BoolAccessor
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:29
CP::CharDecorator
SG::Decorator< char > CharDecorator
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:20
CP::ClusterSet
std::set< CaloClusterPtr > ClusterSet
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:74
CP::CaloClusterPtr
SortedObjPtr< xAOD::CaloCluster > CaloClusterPtr
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:70
CP::TrackPtr
SortedObjPtr< xAOD::TrackParticle > TrackPtr
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:71
CP::BoolDecorator
SG::Decorator< bool > BoolDecorator
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:28
CP::SelectionDecorator
std::unique_ptr< CharDecorator > SelectionDecorator
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:26
SG::Decorator
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition
AuxElement.h:576
xAOD::Iso::IsolationType
IsolationType
Overall enumeration for isolation types in xAOD files.
Definition
IsolationType.h:26
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::pt
setRcore setEtHad setFside pt
Definition
TrigPhoton_v1.cxx:106
xAOD::other
@ other
Definition
TrackingPrimitives.h:523
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition
FlowElement.h:16
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition
TrigDecision_v1.cxx:60
CP::FlowElementPtr::FlowElementPtr
FlowElementPtr()=default
CP::FlowElementPtr::weight
float weight
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:67
CP::FlowElementPtr::operator<
bool operator<(const FlowElementPtr &other) const
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:63
CP::FlowElementPtr::FlowElementPtr
FlowElementPtr(const xAOD::FlowElement *ele, float weight_)
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:61
CP::SortedObjPtr
Small helper struct to have sets of particle pointers sorted by pt.
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:41
CP::SortedObjPtr::SortedObjPtr
SortedObjPtr(const Obj *ptr)
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:43
CP::SortedObjPtr< xAOD::CaloCluster >::m_ptr
const xAOD::CaloCluster * m_ptr
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:57
CP::SortedObjPtr::operator->
const Obj * operator->() const
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:46
CP::SortedObjPtr::get
const Obj * get() const
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:45
CP::SortedObjPtr::SortedObjPtr
SortedObjPtr()=default
CP::SortedObjPtr::operator*
const Obj & operator*() const
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:47
CP::SortedObjPtr::operator<
bool operator<(const SortedObjPtr< Obj > &other) const
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:51
CP::SortedObjPtr::operator!
bool operator!() const
Definition
PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:48
Generated on
for ATLAS Offline Software by
1.17.0