ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
AssociationUtils
AssociationUtils
DeltaRMatcher.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ASSOCIATIONUTILS_DELTARMATCHER_H
6
#define ASSOCIATIONUTILS_DELTARMATCHER_H
7
8
// System includes
9
#include <limits>
10
11
// EDM includes
12
#include "
xAODBase/IParticle.h
"
13
14
// Columnar includes
15
#include "
ColumnarCore/ParticleDef.h
"
16
#include "
ColumnarCore/MomentumAccessors.h
"
17
18
// Local includes
19
#include "
AssociationUtils/IObjectAssociator.h
"
20
21
namespace
ORUtils
22
{
23
30
class
DeltaRMatcher
final :
public
IParticleAssociator
31
{
32
33
public
:
34
36
DeltaRMatcher
(
double
dR,
bool
useRapidity=
true
);
37
39
virtual
StatusCode
setObjectTypes
(
xAODType::ObjectType
type1,
40
xAODType::ObjectType
type2)
override
;
41
43
virtual
bool
objectsMatch
44
(
columnar::Particle1Id
p1,
columnar::Particle2Id
p2,
bool
swapArgs =
false
)
const override
;
45
using
IParticleAssociator::objectsMatch
;
46
47
private
:
48
49
double
m_dR
;
50
bool
m_useRapidity
;
51
53
columnar::MomentumAccessors<columnar::ContainerId::particle1>
m_momAcc1
;
54
columnar::MomentumAccessors<columnar::ContainerId::particle2>
m_momAcc2
;
55
56
};
// class DeltaRMatcher
57
58
67
class
SlidingDeltaRMatcher
final :
public
IParticleAssociator
68
{
69
70
public
:
71
76
SlidingDeltaRMatcher
(
double
c1,
double
c2,
77
double
maxCone = std::numeric_limits<double>::max(),
78
bool
useRapidity=
true
);
79
81
virtual
StatusCode
setObjectTypes
(
xAODType::ObjectType
type1,
82
xAODType::ObjectType
type2)
override
;
83
86
virtual
bool
objectsMatch
87
(
columnar::Particle1Id
p1,
columnar::Particle2Id
p2,
bool
swapArgs =
false
)
const override
;
88
89
private
:
90
92
double
m_c1
;
94
double
m_c2
;
96
double
m_maxCone
;
97
99
bool
m_useRapidity
;
100
102
columnar::MomentumAccessors<columnar::ContainerId::particle1>
m_momAcc1
;
103
columnar::MomentumAccessors<columnar::ContainerId::particle2>
m_momAcc2
;
104
105
};
// class SlidingDeltaRMatcher
106
107
}
// namespace ORUtils
108
109
#endif
IParticle.h
IObjectAssociator.h
MomentumAccessors.h
ParticleDef.h
ORUtils::DeltaRMatcher::setObjectTypes
virtual StatusCode setObjectTypes(xAODType::ObjectType type1, xAODType::ObjectType type2) override
Set the object types to be used in the association.
Definition
DeltaRMatcher.cxx:22
ORUtils::DeltaRMatcher::m_momAcc2
columnar::MomentumAccessors< columnar::ContainerId::particle2 > m_momAcc2
Definition
DeltaRMatcher.h:54
ORUtils::DeltaRMatcher::DeltaRMatcher
DeltaRMatcher(double dR, bool useRapidity=true)
Constructor.
Definition
DeltaRMatcher.cxx:17
ORUtils::DeltaRMatcher::objectsMatch
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const override
Check if particles match in dR.
Definition
DeltaRMatcher.cxx:33
ORUtils::DeltaRMatcher::m_useRapidity
bool m_useRapidity
Definition
DeltaRMatcher.h:50
ORUtils::DeltaRMatcher::m_momAcc1
columnar::MomentumAccessors< columnar::ContainerId::particle1 > m_momAcc1
Columnar accessors.
Definition
DeltaRMatcher.h:53
ORUtils::DeltaRMatcher::m_dR
double m_dR
Definition
DeltaRMatcher.h:49
ORUtils::IParticleAssociator
Interface for a class which checks for a match between IParticles.
Definition
IObjectAssociator.h:23
ORUtils::IParticleAssociator::objectsMatch
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const =0
Test association between two IParticles.
ORUtils::SlidingDeltaRMatcher::m_c1
double m_c1
Sliding dR constant c1.
Definition
DeltaRMatcher.h:92
ORUtils::SlidingDeltaRMatcher::m_momAcc1
columnar::MomentumAccessors< columnar::ContainerId::particle1 > m_momAcc1
Columnar accessors.
Definition
DeltaRMatcher.h:102
ORUtils::SlidingDeltaRMatcher::m_c2
double m_c2
Sliding dR constant c2.
Definition
DeltaRMatcher.h:94
ORUtils::SlidingDeltaRMatcher::m_useRapidity
bool m_useRapidity
Toggle rapidity usage.
Definition
DeltaRMatcher.h:99
ORUtils::SlidingDeltaRMatcher::m_momAcc2
columnar::MomentumAccessors< columnar::ContainerId::particle2 > m_momAcc2
Definition
DeltaRMatcher.h:103
ORUtils::SlidingDeltaRMatcher::SlidingDeltaRMatcher
SlidingDeltaRMatcher(double c1, double c2, double maxCone=std::numeric_limits< double >::max(), bool useRapidity=true)
Constructor.
Definition
DeltaRMatcher.cxx:43
ORUtils::SlidingDeltaRMatcher::m_maxCone
double m_maxCone
Maximum sliding cone size.
Definition
DeltaRMatcher.h:96
ORUtils::SlidingDeltaRMatcher::setObjectTypes
virtual StatusCode setObjectTypes(xAODType::ObjectType type1, xAODType::ObjectType type2) override
Set the object types to be used in the association.
Definition
DeltaRMatcher.cxx:48
ORUtils::SlidingDeltaRMatcher::objectsMatch
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const override
Check if particles match in dR.
Definition
DeltaRMatcher.cxx:59
columnar::MomentumAccessors
a handle to hold a IMomentumAccessors object
Definition
MomentumAccessors.h:290
ORUtils
Definition
AltMuJetOverlapTool.h:30
columnar::Particle1Id
ObjectId< ContainerId::particle1 > Particle1Id
Definition
ParticleDef.h:48
columnar::Particle2Id
ObjectId< ContainerId::particle2 > Particle2Id
Definition
ParticleDef.h:54
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition
ObjectType.h:32
Generated on
for ATLAS Offline Software by
1.14.0