CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MTDTopology::SameLayerComparator Class Reference

#include <MTDTopology.h>

Public Member Functions

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

Private Attributes

const MTDTopologytopo_
 

Detailed Description

Definition at line 53 of file MTDTopology.h.

Constructor & Destructor Documentation

◆ SameLayerComparator()

MTDTopology::SameLayerComparator::SameLayerComparator ( const MTDTopology topo)
inlineexplicit

Definition at line 55 of file MTDTopology.h.

55 : topo_(topo) {}

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 57 of file MTDTopology.h.

57  {
58  if (i1.det() == i2.det() && i1.subdetId() == i2.subdetId() && topo_->side(i1) == topo_->side(i2) &&
59  topo_->layer(i1) == topo_->layer(i2)) {
60  return false;
61  }
62  return i1 < i2;
63  }

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

◆ operator()() [2/2]

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

Definition at line 65 of file MTDTopology.h.

65 { return operator()(DetId(i1), DetId(i2)); }

References testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, and operator()().

Referenced by operator()().

Member Data Documentation

◆ topo_

const MTDTopology* MTDTopology::SameLayerComparator::topo_
private

Definition at line 68 of file MTDTopology.h.

Referenced by operator()().

MTDTopology::side
unsigned int side(const DetId &id) const
Definition: MTDTopology.cc:24
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
MTDTopology::SameLayerComparator::operator()
bool operator()(DetId i1, DetId i2) const
Definition: MTDTopology.h:57
MTDTopology::SameLayerComparator::topo_
const MTDTopology * topo_
Definition: MTDTopology.h:68
DetId
Definition: DetId.h:17
MTDTopology::layer
unsigned int layer(const DetId &id) const
Definition: MTDTopology.cc:37