00001 #ifndef ATHENA_UTIL_SORT_UTIL_H
00002 #define ATHENA_UTIL_SORT_UTIL_H
00003
00004 #include "particle/Particle.h"
00005 #include <cmath>
00006
00007
00008
00009 class High2LowByParticleClassPt
00010 {
00011 public:
00012 bool operator () (const Particle *t1, const Particle *t2) const {
00013 return (t1->pt() > t2->pt());
00014 }
00015 };
00016
00017
00018 class Low2HighByParticleClassPt
00019 {
00020 public:
00021 bool operator () (const Particle *t1, const Particle *t2) const {
00022 return (t1->pt() < t2->pt());
00023 }
00024 };
00025
00026
00027 class High2LowByParticleClassP
00028 {
00029 public:
00030 bool operator () (const Particle *t1, const Particle *t2) const {
00031 return (t1->p().vect().mag() > t2->p().vect().mag());
00032 }
00033 };
00034
00035
00036 class Low2HighByParticleClassP
00037 {
00038 public:
00039 bool operator () (const Particle *t1, const Particle *t2) const {
00040 return (t1->p().vect().mag() < t2->p().vect().mag());
00041 }
00042 };
00043
00044
00045 class High2LowByParticleClassEnergy
00046 {
00047 public:
00048 bool operator () (const Particle *t1, const Particle *t2) const {
00049 return (t1->e() > t2->e());
00050 }
00051 };
00052
00053
00054 class Low2HighByParticleClassEnergy
00055 {
00056 public:
00057 bool operator () (const Particle *t1, const Particle *t2) const {
00058 return (t1->e() < t2->e());
00059 }
00060 };
00061
00062
00063 class Low2HighByParticleClassEta
00064 {
00065 public:
00066 bool operator () (const Particle *t1, const Particle *t2) const {
00067 return (t1->eta() < t2->eta());
00068 }
00069 };
00070
00071
00072 class High2LowByParticleClassEta
00073 {
00074 public:
00075 bool operator () (const Particle *t1, const Particle *t2) const {
00076 return (t1->eta() > t2->eta());
00077 }
00078 };
00079
00080
00081 class Low2HighByParticleClassAbsEta
00082 {
00083 public:
00084 bool operator () (const Particle *t1, const Particle *t2) const {
00085 return (fabs(t1->eta()) < fabs(t2->eta()));
00086 }
00087 };
00088
00089
00090 class High2LowByParticleClassAbsEta
00091 {
00092 public:
00093 bool operator () (const Particle *t1, const Particle *t2) const {
00094 return (fabs(t1->eta()) > fabs(t2->eta()));
00095 }
00096 };
00097
00098 #endif // ATHENA_UTIL_SORT_UTIL_H