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 50 of file MTDTopology.h.

Constructor & Destructor Documentation

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

Definition at line 52 of file MTDTopology.h.

52 : topo_(topo) {}
const MTDTopology * topo_
Definition: MTDTopology.h:68

Member Function Documentation

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

Definition at line 54 of file MTDTopology.h.

References DetId::det(), and DetId::subdetId().

54  {
55  if(i1.det() == i2.det() &&
56  i1.subdetId() == i2.subdetId() &&
57  topo_->side(i1) == topo_->side(i2) &&
58  topo_->layer(i1) == topo_->layer(i2)) {
59  return false;
60  }
61  return i1 < i2;
62  }
const MTDTopology * topo_
Definition: MTDTopology.h:68
unsigned int layer(const DetId &id) const
Definition: MTDTopology.cc:41
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
unsigned int side(const DetId &id) const
Definition: MTDTopology.cc:28
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
bool MTDTopology::SameLayerComparator::operator() ( uint32_t  i1,
uint32_t  i2 
) const
inline

Definition at line 64 of file MTDTopology.h.

64  {
65  return operator()(DetId(i1), DetId(i2));
66  }
Definition: DetId.h:18
bool operator()(DetId i1, DetId i2) const
Definition: MTDTopology.h:54

Member Data Documentation

const MTDTopology* MTDTopology::SameLayerComparator::topo_
private

Definition at line 68 of file MTDTopology.h.