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

Member Function Documentation

◆ operator()()

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

Definition at line 103 of file TrackingHelpers.cxx.

104 {
105
106 if (const float dPt = a->pt() - b->pt();
107 std::abs(dPt) > std::numeric_limits<float>::epsilon()) {
108 return dPt < 0.;
109 }
110 if (const float dEta = a->eta() - b->eta();
111 std::abs(dEta) > std::numeric_limits<float>::epsilon()) {
112 return dEta < 0.;
113 }
114 const float dPhi = xAOD::P4Helpers::deltaPhi(a, b);
115 return dPhi < 0.;
116 }
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: