ATLAS Offline Software
Loading...
Searching...
No Matches
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
17
18// Local includes
20
21namespace ORUtils
22{
23
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;
46
47 private:
48
49 double m_dR;
51
55
56 }; // class DeltaRMatcher
57
58
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
100
104
105 }; // class SlidingDeltaRMatcher
106
107} // namespace ORUtils
108
109#endif
virtual StatusCode setObjectTypes(xAODType::ObjectType type1, xAODType::ObjectType type2) override
Set the object types to be used in the association.
columnar::MomentumAccessors< columnar::ContainerId::particle2 > m_momAcc2
DeltaRMatcher(double dR, bool useRapidity=true)
Constructor.
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const override
Check if particles match in dR.
columnar::MomentumAccessors< columnar::ContainerId::particle1 > m_momAcc1
Columnar accessors.
Interface for a class which checks for a match between IParticles.
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const =0
Test association between two IParticles.
double m_c1
Sliding dR constant c1.
columnar::MomentumAccessors< columnar::ContainerId::particle1 > m_momAcc1
Columnar accessors.
double m_c2
Sliding dR constant c2.
bool m_useRapidity
Toggle rapidity usage.
columnar::MomentumAccessors< columnar::ContainerId::particle2 > m_momAcc2
SlidingDeltaRMatcher(double c1, double c2, double maxCone=std::numeric_limits< double >::max(), bool useRapidity=true)
Constructor.
double m_maxCone
Maximum sliding cone size.
virtual StatusCode setObjectTypes(xAODType::ObjectType type1, xAODType::ObjectType type2) override
Set the object types to be used in the association.
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const override
Check if particles match in dR.
a handle to hold a IMomentumAccessors object
ObjectId< ContainerId::particle1 > Particle1Id
Definition ParticleDef.h:48
ObjectId< ContainerId::particle2 > Particle2Id
Definition ParticleDef.h:54
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32