CMS 3D CMS Logo

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

Constructor & Destructor Documentation

◆ SameLayerComparator()

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

Definition at line 116 of file TrackerTopology.h.

116 : topo_(topo) {}

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 118 of file TrackerTopology.h.

118  {
119  if (i1.det() == i2.det() && i1.subdetId() == i2.subdetId() && topo_->side(i1) == topo_->side(i2) &&
120  topo_->layer(i1) == topo_->layer(i2)) {
121  return false;
122  }
123  return i1 < i2;
124  }

References testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, TrackerTopology::layer(), TrackerTopology::side(), and topo_.

◆ operator()() [2/2]

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

Member Data Documentation

◆ topo_

const TrackerTopology* TrackerTopology::SameLayerComparator::topo_
private

Definition at line 129 of file TrackerTopology.h.

Referenced by operator()().

TrackerTopology::side
unsigned int side(const DetId &id) const
Definition: TrackerTopology.cc:28
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
DetId
Definition: DetId.h:17
TrackerTopology::SameLayerComparator::operator()
bool operator()(DetId i1, DetId i2) const
Definition: TrackerTopology.h:118
TrackerTopology::SameLayerComparator::topo_
const TrackerTopology * topo_
Definition: TrackerTopology.h:129