ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::ParticleSorter Struct Reference

Auxiliary class to sort the particles by momentum First sorting is by pt, then eta and finally by phi. More...

#include <TrackingHelpers.h>

Collaboration diagram for MuonR4::ParticleSorter:

Public Member Functions

bool operator() (const xAOD::IParticle *a, const xAOD::IParticle *b) const

Detailed Description

Auxiliary class to sort the particles by momentum First sorting is by pt, then eta and finally by phi.

Definition at line 45 of file TrackingHelpers.h.

Member Function Documentation

◆ operator()()

bool MuonR4::ParticleSorter::operator() ( const xAOD::IParticle * a,
const xAOD::IParticle * b ) const

Definition at line 76 of file TrackingHelpers.cxx.

77 {
78
79 if (const float dPt = a->pt() - b->pt();
80 std::abs(dPt) > std::numeric_limits<float>::epsilon()) {
81 return dPt < 0.;
82 }
83 if (const float dEta = a->eta() - b->eta();
84 std::abs(dEta) > std::numeric_limits<float>::epsilon()) {
85 return dEta < 0.;
86 }
87 const float dPhi = xAOD::P4Helpers::deltaPhi(a, b);
88 return dPhi < 0.;
89 }
static Double_t a
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[

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