Public Member Functions | |
bool | operator() (const Item &, const Item &) const |
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.
Definition at line 13 of file PixelBarrelLinkMaker.cc.
References abs, PixelBarrelName::ladderName(), PixelBarrelName::layerName(), PixelBarrelName::moduleName(), and PixelBarrelName::name().
{ const PixelBarrelName & n1 = *u1.name; const PixelBarrelName & n2 = *u2.name; bool res = false; if ( n1.layerName() < n2.layerName() ) res = true; else if ( n1.layerName() > n2.layerName() ) res = false; else if ( n1.ladderName() < n2.ladderName() ) res = true; else if ( n1.ladderName() > n2.ladderName() ) res = false; else if ( abs(n1.moduleName()) < abs(n2.moduleName()) ) res = true; else if ( abs(n1.moduleName()) > abs(n2.moduleName()) ) res = false; else if ( u1.rocIds.min() < u2.rocIds.min() ) res = true; else if ( u1.rocIds.min() > u2.rocIds.min() ) res = false; return res; }