#ifndef __JDETECTOR__JMODULECOMPARATOR__ #define __JDETECTOR__JMODULECOMPARATOR__ #include "JLang/JComparator.hh" #include "JDetector/JModule.hh" /** * \file * * Auxiliary classes to compare modules. * \author mdejong */ namespace JDETECTOR {} namespace JPP { using namespace JDETECTOR; } namespace JDETECTOR { /** * Type definition of a module comparator using 3D position information. */ typedef JLANG::JComparator JModuleComparator; /** * Module comparator according its z-position. */ struct JModuleComparator3Z_t : public JModuleComparator { /** * Default constructor. */ JModuleComparator3Z_t() : JModuleComparator(&JVector3D::getZ) {} }; /** * Module comparator according its distance to origin. */ struct JModuleComparator3D_t : public JModuleComparator { /** * Default constructor. */ JModuleComparator3D_t() : JModuleComparator(&JVector3D::getLength) {} }; } #endif