CMS 3D CMS Logo

List of all members | Public Member Functions
PixelEndcapLinkMaker::Order Struct Reference

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(), PixelEndcapLinkMaker::Item::name, PixelEndcapName::pannelName(), PixelEndcapName::plaquetteName(), and MetAnalyzer::u2.

13 {
14  bool res = true;
15  const PixelEndcapName & n1 = *u1.name;
16  const PixelEndcapName & n2 = *u2.name;
17 
18  if (n1.halfCylinder() < n2.halfCylinder() ) res = true;
19  else if(n1.halfCylinder() > n2.halfCylinder() ) res = false;
20  else if (n1.diskName() < n2.diskName() ) res = true;
21  else if (n1.diskName() > n2.diskName() ) res = false;
22  else if (n1.bladeName() < n2.bladeName() ) res = true;
23  else if (n1.bladeName() > n2.bladeName() ) res = false;
24  else if (n1.pannelName() < n2.pannelName() ) res = true;
25  else if (n1.pannelName() > n2.pannelName() ) res = false;
26  else if (n1.plaquetteName() < n2.plaquetteName() ) res = true;
27  else if (n1.plaquetteName() > n2.plaquetteName() ) res = false;
28 
29  return res;
30 }
int plaquetteName() const
plaquetteId (in pannel)
Definition: Electron.h:4
int bladeName() const
blade id
int pannelName() const
pannel id
int diskName() const
disk id
HalfCylinder halfCylinder() const