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 57 of file PixelEndcapLinkMaker.h.

Member Function Documentation

◆ operator()()

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

Definition at line 11 of file PixelEndcapLinkMaker.cc.

References PixelEndcapName::bladeName(), PixelEndcapName::diskName(), PixelEndcapName::halfCylinder(), PixelEndcapName::pannelName(), PixelEndcapName::plaquetteName(), testProducerWithPsetDescEmpty_cfi::u1, and MetAnalyzer::u2.

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