CMS 3D CMS Logo

PixelBarrelLinkMaker::Order Struct Reference

define order of items in a link. More...

List of all members.

Public Member Functions

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


Detailed Description

define order of items in a link.

Highest priority to layer id. Second priority for ladder id (phi). Third priority by abs(module) (ie. along |z|) If all equal id of ROC matters

Definition at line 54 of file PixelBarrelLinkMaker.h.


Member Function Documentation

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

Definition at line 13 of file PixelBarrelLinkMaker.cc.

References funct::abs(), PixelBarrelName::ladderName(), PixelBarrelName::layerName(), TRange< T >::min(), PixelBarrelName::moduleName(), PixelBarrelName::name(), PixelBarrelLinkMaker::Item::name, res, and PixelBarrelLinkMaker::Item::rocIds.

00014 {
00015   const PixelBarrelName & n1 = *u1.name;
00016   const PixelBarrelName & n2 = *u2.name;
00017 
00018   bool res = false;
00019 
00020        if ( n1.layerName() < n2.layerName() ) res = true;
00021   else if ( n1.layerName() > n2.layerName() ) res = false;
00022   else if ( n1.ladderName() < n2.ladderName() ) res = true;
00023   else if ( n1.ladderName() > n2.ladderName() ) res = false;
00024   else if ( abs(n1.moduleName()) < abs(n2.moduleName()) ) res =  true;
00025   else if ( abs(n1.moduleName()) > abs(n2.moduleName()) ) res =  false;
00026   else if ( u1.rocIds.min() < u2.rocIds.min() ) res = true;
00027   else if ( u1.rocIds.min() > u2.rocIds.min() ) res = false;
00028 
00029   return res;
00030 }


The documentation for this struct was generated from the following files:
Generated on Tue Jun 9 18:29:58 2009 for CMSSW by  doxygen 1.5.4