ATLAS Offline Software
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 // Local includes
16 
17 namespace ORUtils
18 {
19 
27  {
28 
29  public:
30 
32  DeltaRMatcher(double dR, bool useRapidity=true);
33 
35  virtual bool objectsMatch
36  (const xAOD::IParticle& p1, const xAOD::IParticle& p2) const override;
37 
38  private:
39 
40  double m_dR;
42 
43  }; // class DeltaRMatcher
44 
45 
55  {
56 
57  public:
58 
63  SlidingDeltaRMatcher(double c1, double c2,
64  double maxCone = std::numeric_limits<double>::max(),
65  bool useRapidity=true);
66 
69  virtual bool objectsMatch
70  (const xAOD::IParticle& p1, const xAOD::IParticle& p2) const override;
71 
72  private:
73 
75  double m_c1;
77  double m_c2;
79  double m_maxCone;
80 
83 
84  }; // class SlidingDeltaRMatcher
85 
86 } // namespace ORUtils
87 
88 #endif
ORUtils::DeltaRMatcher::objectsMatch
virtual bool objectsMatch(const xAOD::IParticle &p1, const xAOD::IParticle &p2) const override
Check if particles match in dR.
Definition: DeltaRMatcher.cxx:25
max
#define max(a, b)
Definition: cfImp.cxx:41
IParticle.h
extractSporadic.c1
c1
Definition: extractSporadic.py:134
IObjectAssociator.h
ORUtils::SlidingDeltaRMatcher::m_useRapidity
bool m_useRapidity
Toggle rapidity usage.
Definition: DeltaRMatcher.h:82
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
ORUtils
Definition: AltMuJetOverlapTool.h:20
ORUtils::SlidingDeltaRMatcher
DR matching strategy where cone decreases with pt.
Definition: DeltaRMatcher.h:55
ORUtils::SlidingDeltaRMatcher::m_c2
double m_c2
Sliding dR constant c2.
Definition: DeltaRMatcher.h:77
ORUtils::SlidingDeltaRMatcher::SlidingDeltaRMatcher
SlidingDeltaRMatcher(double c1, double c2, double maxCone=std::numeric_limits< double >::max(), bool useRapidity=true)
Constructor.
Definition: DeltaRMatcher.cxx:34
ORUtils::DeltaRMatcher
Encapsulates the delta-R matching strategy.
Definition: DeltaRMatcher.h:27
ORUtils::SlidingDeltaRMatcher::m_maxCone
double m_maxCone
Maximum sliding cone size.
Definition: DeltaRMatcher.h:79
ORUtils::DeltaRMatcher::DeltaRMatcher
DeltaRMatcher(double dR, bool useRapidity=true)
Constructor.
Definition: DeltaRMatcher.cxx:17
ORUtils::DeltaRMatcher::m_dR
double m_dR
Definition: DeltaRMatcher.h:40
ORUtils::DeltaRMatcher::m_useRapidity
bool m_useRapidity
Definition: DeltaRMatcher.h:41
compileRPVLLRates.c2
c2
Definition: compileRPVLLRates.py:361
ORUtils::SlidingDeltaRMatcher::objectsMatch
virtual bool objectsMatch(const xAOD::IParticle &p1, const xAOD::IParticle &p2) const override
Check if particles match in dR.
Definition: DeltaRMatcher.cxx:42
ORUtils::IParticleAssociator
Interface for a class which checks for a match between IParticles.
Definition: IObjectAssociator.h:19
ORUtils::SlidingDeltaRMatcher::m_c1
double m_c1
Sliding dR constant c1.
Definition: DeltaRMatcher.h:75