00001 #ifndef ASSOCIATIONUTILS_DELTARMATCHER_H
00002 #define ASSOCIATIONUTILS_DELTARMATCHER_H
00003
00004
00005 #include <limits>
00006
00007
00008 #include "xAODBase/IParticle.h"
00009
00010
00011 #include "AssociationUtils/IObjectAssociator.h"
00012
00013 namespace ORUtils
00014 {
00015
00022 class DeltaRMatcher : public IParticleAssociator
00023 {
00024
00025 public:
00026
00028 DeltaRMatcher(double dR, bool useRapidity=true);
00029
00031 virtual bool objectsMatch
00032 (const xAOD::IParticle& p1, const xAOD::IParticle& p2) const override;
00033
00034 private:
00035
00036 double m_dR;
00037 bool m_useRapidity;
00038
00039 };
00040
00041
00050 class SlidingDeltaRMatcher : public IParticleAssociator
00051 {
00052
00053 public:
00054
00059 SlidingDeltaRMatcher(double c1, double c2,
00060 double maxCone = std::numeric_limits<double>::max(),
00061 bool useRapidity=true);
00062
00065 virtual bool objectsMatch
00066 (const xAOD::IParticle& p1, const xAOD::IParticle& p2) const override;
00067
00068 private:
00069
00071 double m_c1;
00073 double m_c2;
00075 double m_maxCone;
00076
00078 bool m_useRapidity;
00079
00080 };
00081
00082 }
00083
00084 #endif