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 105 of file TrackerTopology.h.

Constructor & Destructor Documentation

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

Definition at line 107 of file TrackerTopology.h.

107 : topo_(topo) {}

Member Function Documentation

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

Definition at line 109 of file TrackerTopology.h.

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

Referenced by operator()().

109  {
110  if(i1.det() == i2.det() &&
111  i1.subdetId() == i2.subdetId() &&
112  topo_->side(i1) == topo_->side(i2) &&
113  topo_->layer(i1) == topo_->layer(i2)) {
114  return false;
115  }
116  return i1 < i2;
117  }
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 119 of file TrackerTopology.h.

References operator()().

119  {
120  return operator()(DetId(i1), DetId(i2));
121  }
bool operator()(DetId i1, DetId i2) const
Definition: DetId.h:18

Member Data Documentation

const TrackerTopology* TrackerTopology::SameLayerComparator::topo_
private

Definition at line 123 of file TrackerTopology.h.

Referenced by operator()().