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 82 of file TrackingHelpers.h.

Member Function Documentation

◆ operator()()

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

Definition at line 143 of file TrackingHelpers.cxx.

144 {
145
146 if (const float dPt = a->pt() - b->pt();
147 std::abs(dPt) > std::numeric_limits<float>::epsilon()) {
148 return dPt < 0.;
149 }
150 if (const float dEta = a->eta() - b->eta();
151 std::abs(dEta) > std::numeric_limits<float>::epsilon()) {
152 return dEta < 0.;
153 }
154 const float dPhi = xAOD::P4Helpers::deltaPhi(a, b);
155 return dPhi < 0.;
156 }
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: