ATLAS Offline Software
Loading...
Searching...
No Matches
stepInfoDistCompare Class Reference
Collaboration diagram for stepInfoDistCompare:

Public Types

enum  CompareType { RHO , R , Z }

Public Member Functions

 stepInfoDistCompare (const CompareType type)
bool operator() (const ShowerLib::StepInfo *first, const ShowerLib::StepInfo *second) const

Private Member Functions

bool sortFunction (const ShowerLib::StepInfo *first, const ShowerLib::StepInfo *second, const CompareType type) const

Private Attributes

CompareType m_type

Detailed Description

Definition at line 59 of file LArG4GenShowerLib.cxx.

Member Enumeration Documentation

◆ CompareType

Constructor & Destructor Documentation

◆ stepInfoDistCompare()

stepInfoDistCompare::stepInfoDistCompare ( const CompareType type)
inlineexplicit

Definition at line 62 of file LArG4GenShowerLib.cxx.

62: m_type(type) {}

Member Function Documentation

◆ operator()()

bool stepInfoDistCompare::operator() ( const ShowerLib::StepInfo * first,
const ShowerLib::StepInfo * second ) const
inline

Definition at line 63 of file LArG4GenShowerLib.cxx.

63 {
64 return sortFunction(first, second, m_type );
65 }
bool sortFunction(const ShowerLib::StepInfo *first, const ShowerLib::StepInfo *second, const CompareType type) const

◆ sortFunction()

bool stepInfoDistCompare::sortFunction ( const ShowerLib::StepInfo * first,
const ShowerLib::StepInfo * second,
const CompareType type ) const
inlineprivate

Definition at line 69 of file LArG4GenShowerLib.cxx.

69 {
70 if (type == RHO) {
71 if (first->position().mag2() < second->position().mag2()) return true;
72 return false;
73 } else if (type == R) {
74 if (first->position().perp2() < second->position().perp2()) return true;
75 return false;
76 } else if (type == Z) {
77 if (first->position().z() < second->position().z()) return true;
78 return false;
79 }
80 return true; //it's here just to avoid warnings
81 }
bool first
Definition DeMoScan.py:534

Member Data Documentation

◆ m_type

CompareType stepInfoDistCompare::m_type
private

Definition at line 67 of file LArG4GenShowerLib.cxx.


The documentation for this class was generated from the following file: