ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
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

Enumerator
RHO 

Definition at line 61 of file LArG4GenShowerLib.cxx.

61 {RHO,R,Z};

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  }

◆ 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  }

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:
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
stepInfoDistCompare::sortFunction
bool sortFunction(const ShowerLib::StepInfo *first, const ShowerLib::StepInfo *second, const CompareType type) const
Definition: LArG4GenShowerLib.cxx:69
stepInfoDistCompare::Z
@ Z
Definition: LArG4GenShowerLib.cxx:61
stepInfoDistCompare::R
@ R
Definition: LArG4GenShowerLib.cxx:61
stepInfoDistCompare::m_type
CompareType m_type
Definition: LArG4GenShowerLib.cxx:67
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DeMoScan.first
bool first
Definition: DeMoScan.py:534
stepInfoDistCompare::RHO
@ RHO
Definition: LArG4GenShowerLib.cxx:61