CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
HitParentTestComparison Class Reference

Public Member Functions

 HitParentTestComparison (const std::map< int, unsigned > &_particle_type_count)
 
bool operator() (int pid1, int pid2) const
 

Protected Attributes

const std::map< int, unsigned > & particle_type_count
 

Detailed Description

define the comparison for sorting the particle ids counting map

Definition at line 210 of file HitParentTest.cc.

Constructor & Destructor Documentation

◆ HitParentTestComparison()

HitParentTestComparison::HitParentTestComparison ( const std::map< int, unsigned > &  _particle_type_count)
inline

Definition at line 215 of file HitParentTest.cc.

216  : particle_type_count(_particle_type_count) {}
const std::map< int, unsigned > & particle_type_count

Member Function Documentation

◆ operator()()

bool HitParentTestComparison::operator() ( int  pid1,
int  pid2 
) const
inline

Definition at line 218 of file HitParentTest.cc.

References particle_type_count.

218 { return particle_type_count.at(pid1) > particle_type_count.at(pid2); }
const std::map< int, unsigned > & particle_type_count

Member Data Documentation

◆ particle_type_count

const std::map<int, unsigned>& HitParentTestComparison::particle_type_count
protected

Definition at line 212 of file HitParentTest.cc.

Referenced by operator()().