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 206 of file HitParentTest.cc.

Constructor & Destructor Documentation

◆ HitParentTestComparison()

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

Definition at line 211 of file HitParentTest.cc.

212  : particle_type_count(_particle_type_count) {}

Member Function Documentation

◆ operator()()

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

Definition at line 214 of file HitParentTest.cc.

214 { return particle_type_count.at(pid1) > particle_type_count.at(pid2); }

References particle_type_count.

Member Data Documentation

◆ particle_type_count

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

Definition at line 208 of file HitParentTest.cc.

Referenced by operator()().

HitParentTestComparison::particle_type_count
const std::map< int, unsigned > & particle_type_count
Definition: HitParentTest.cc:208