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

Member Function Documentation

◆ operator()()

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

Definition at line 119 of file TrackingHelpers.cxx.

120 {
121
122 if (const float dPt = a->pt() - b->pt();
123 std::abs(dPt) > std::numeric_limits<float>::epsilon()) {
124 return dPt < 0.;
125 }
126 if (const float dEta = a->eta() - b->eta();
127 std::abs(dEta) > std::numeric_limits<float>::epsilon()) {
128 return dEta < 0.;
129 }
130 const float dPhi = xAOD::P4Helpers::deltaPhi(a, b);
131 return dPhi < 0.;
132 }
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: