CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TrackerTopology::SameLayerComparator Class Reference

#include <TrackerTopology.h>

Public Member Functions

bool operator() (DetId i1, DetId i2) const
 
bool operator() (uint32_t i1, uint32_t i2) const
 
 SameLayerComparator (const TrackerTopology *topo)
 

Private Attributes

const TrackerTopologytopo_
 

Detailed Description

Definition at line 112 of file TrackerTopology.h.

Constructor & Destructor Documentation

TrackerTopology::SameLayerComparator::SameLayerComparator ( const TrackerTopology topo)
inlineexplicit

Definition at line 114 of file TrackerTopology.h.

114 : topo_(topo) {}

Member Function Documentation

bool TrackerTopology::SameLayerComparator::operator() ( DetId  i1,
DetId  i2 
) const
inline

Definition at line 116 of file TrackerTopology.h.

References DetId::det(), TrackerTopology::layer(), TrackerTopology::side(), DetId::subdetId(), and topo_.

Referenced by operator()().

116  {
117  if(i1.det() == i2.det() &&
118  i1.subdetId() == i2.subdetId() &&
119  topo_->side(i1) == topo_->side(i2) &&
120  topo_->layer(i1) == topo_->layer(i2)) {
121  return false;
122  }
123  return i1 < i2;
124  }
unsigned int side(const DetId &id) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
unsigned int layer(const DetId &id) const
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
bool TrackerTopology::SameLayerComparator::operator() ( uint32_t  i1,
uint32_t  i2 
) const
inline

Definition at line 126 of file TrackerTopology.h.

References operator()().

126  {
127  return operator()(DetId(i1), DetId(i2));
128  }
bool operator()(DetId i1, DetId i2) const
Definition: DetId.h:18

Member Data Documentation

const TrackerTopology* TrackerTopology::SameLayerComparator::topo_
private

Definition at line 130 of file TrackerTopology.h.

Referenced by operator()().