ATLAS Offline Software
Toggle main menu visibility
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
ADD_CMODE(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::Particle1Def>
m_momAcc1;
54
columnar::MomentumAccessors<columnar::Particle2Def>
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::Particle1Def>
m_momAcc1;
103
columnar::MomentumAccessors<columnar::Particle2Def>
m_momAcc2;
104
105
};
// class SlidingDeltaRMatcher
106
107
}
// namespace ADD_CMODE(ORUtils)
108
109
#endif
IParticle.h
IObjectAssociator.h
MomentumAccessors.h
ParticleDef.h
DeltaRMatcher
Definition
DeltaRMatcher.h:21
IParticleAssociator
Definition
IObjectAssociator.h:15
SlidingDeltaRMatcher
columnar::MomentumAccessors
a handle to hold a IMomentumAccessors object
Definition
MomentumAccessors.h:290
columnar::Particle1Id
ObjectId< Particle1Def > Particle1Id
Definition
ParticleDef.h:45
columnar::Particle2Id
ObjectId< Particle2Def > Particle2Id
Definition
ParticleDef.h:51
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.17.0