ATLAS Offline Software
Loading...
Searching...
No Matches
ORUtils::DeltaRMatcher Class Referencefinal

Encapsulates the delta-R matching strategy. More...

#include <DeltaRMatcher.h>

Inheritance diagram for ORUtils::DeltaRMatcher:
Collaboration diagram for ORUtils::DeltaRMatcher:

Public Member Functions

 DeltaRMatcher (double dR, bool useRapidity=true)
 Constructor.
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.
bool objectsMatch (columnar::Particle2Id p2, columnar::Particle1Id p1) const

Private Attributes

double m_dR
bool m_useRapidity
columnar::MomentumAccessors< columnar::ContainerId::particle1m_momAcc1
 Columnar accessors.
columnar::MomentumAccessors< columnar::ContainerId::particle2m_momAcc2

Detailed Description

Encapsulates the delta-R matching strategy.

I am considering abstracting matching with an interface.

Author
Steve Farrell Steve.nosp@m.n.Fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch

Definition at line 30 of file DeltaRMatcher.h.

Constructor & Destructor Documentation

◆ DeltaRMatcher()

ORUtils::DeltaRMatcher::DeltaRMatcher ( double dR,
bool useRapidity = true )

Constructor.

Definition at line 17 of file DeltaRMatcher.cxx.

18 : m_dR(dR),
19 m_useRapidity(useRapidity)
20 {}

Member Function Documentation

◆ objectsMatch() [1/2]

bool ORUtils::DeltaRMatcher::objectsMatch ( columnar::Particle1Id p1,
columnar::Particle2Id p2,
bool swapArgs = false ) const
overridevirtual

Check if particles match in dR.

Implements ORUtils::IParticleAssociator.

Definition at line 33 of file DeltaRMatcher.cxx.

36 {
38 }
columnar::MomentumAccessors< columnar::ContainerId::particle2 > m_momAcc2
columnar::MomentumAccessors< columnar::ContainerId::particle1 > m_momAcc1
Columnar accessors.
bool isInDeltaR(const MomentumAccessors< CI1, CM > &momAcc1, ObjectId< CI1, CM > p1, const MomentumAccessors< CI2, CM > &momAcc2, ObjectId< CI2, CM > p2, double dR, bool useRapidity=true)
Check if 2 particles are in a cone.

◆ objectsMatch() [2/2]

bool ORUtils::IParticleAssociator::objectsMatch ( columnar::Particle2Id p2,
columnar::Particle1Id p1 ) const
inline

Definition at line 37 of file IObjectAssociator.h.

39 { return objectsMatch(p1, p2, true); }
virtual bool objectsMatch(columnar::Particle1Id p1, columnar::Particle2Id p2, bool swapArgs=false) const override
Check if particles match in dR.

◆ setObjectTypes()

StatusCode ORUtils::DeltaRMatcher::setObjectTypes ( xAODType::ObjectType type1,
xAODType::ObjectType type2 )
overridevirtual

Set the object types to be used in the association.

Implements ORUtils::IParticleAssociator.

Definition at line 22 of file DeltaRMatcher.cxx.

24 {
27 return StatusCode::SUCCESS;
28 }
void resetObjectType(MomentumAccessors< CI, CM > &accessors, ColumnarTool< CM > &columnarTool, xAODType::ObjectType type)

Member Data Documentation

◆ m_dR

double ORUtils::DeltaRMatcher::m_dR
private

Definition at line 49 of file DeltaRMatcher.h.

◆ m_momAcc1

columnar::MomentumAccessors<columnar::ContainerId::particle1> ORUtils::DeltaRMatcher::m_momAcc1
private

Columnar accessors.

Definition at line 53 of file DeltaRMatcher.h.

◆ m_momAcc2

columnar::MomentumAccessors<columnar::ContainerId::particle2> ORUtils::DeltaRMatcher::m_momAcc2
private

Definition at line 54 of file DeltaRMatcher.h.

◆ m_useRapidity

bool ORUtils::DeltaRMatcher::m_useRapidity
private

Definition at line 50 of file DeltaRMatcher.h.


The documentation for this class was generated from the following files: