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 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
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
104
105 }; // class SlidingDeltaRMatcher
106
107} // namespace ADD_CMODE(ORUtils)
108
109#endif
a handle to hold a IMomentumAccessors object
ObjectId< Particle1Def > Particle1Id
Definition ParticleDef.h:45
ObjectId< Particle2Def > Particle2Id
Definition ParticleDef.h:51
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32