CMS 3D CMS Logo

Public Member Functions

PixelEndcapLinkMaker::Order Struct Reference

List of all members.

Public Member Functions

bool operator() (const Item &, const Item &) const

Detailed Description

define order of link components. Highest priority to Endcap id (forward or backward endcpa) Second priority to disk id. Next blade Next panned To compare order of modules in one pannel plaquette id is used. The order of plaquettes define order of ROCs in link

Definition at line 56 of file PixelEndcapLinkMaker.h.


Member Function Documentation

bool PixelEndcapLinkMaker::Order::operator() ( const Item u1,
const Item u2 
) const

Definition at line 12 of file PixelEndcapLinkMaker.cc.

References PixelEndcapName::bladeName(), PixelEndcapName::diskName(), PixelEndcapName::halfCylinder(), PixelEndcapName::name(), PixelEndcapName::pannelName(), and PixelEndcapName::plaquetteName().

{
  bool res = true;
  const PixelEndcapName & n1 = *u1.name;
  const PixelEndcapName & n2 = *u2.name;

  if (n1.halfCylinder() < n2.halfCylinder() ) res = true;
  else if(n1.halfCylinder() > n2.halfCylinder() ) res = false;
  else if (n1.diskName() < n2.diskName() ) res =  true;
  else if (n1.diskName() > n2.diskName() ) res =  false;
  else if (n1.bladeName() < n2.bladeName() ) res =  true;
  else if (n1.bladeName() > n2.bladeName() ) res =  false;
  else if (n1.pannelName() < n2.pannelName() ) res =  true;
  else if (n1.pannelName() > n2.pannelName() ) res =  false;
  else if (n1.plaquetteName() < n2.plaquetteName() ) res =  true;
  else if (n1.plaquetteName() > n2.plaquetteName() ) res =  false;

  return res;
}