CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
PixelBarrelLinkMaker Class Reference

#include <PixelBarrelLinkMaker.h>

Classes

struct  Item
 
struct  Order
 

Public Types

typedef std::vector< uint32_t > DetUnits
 
typedef PixelFEDCabling::Links Links
 
typedef std::vector< PixelModuleName * > Names
 
typedef sipixelobjects::PixelFEDCabling PixelFEDCabling
 
typedef sipixelobjects::PixelFEDLink PixelFEDLink
 
typedef sipixelobjects::PixelROC PixelROC
 
typedef TRange< int > Range
 

Public Member Functions

Links links (const Names &n, const DetUnits &u) const
 
 PixelBarrelLinkMaker (const PixelFEDCabling *o)
 ctor from owner More...
 

Private Attributes

const PixelFEDCablingtheOwner
 

Detailed Description

Assign barrel pixel modules (defined by name and unit) to links

Definition at line 18 of file PixelBarrelLinkMaker.h.

Member Typedef Documentation

◆ DetUnits

typedef std::vector<uint32_t> PixelBarrelLinkMaker::DetUnits

Definition at line 25 of file PixelBarrelLinkMaker.h.

◆ Links

Definition at line 26 of file PixelBarrelLinkMaker.h.

◆ Names

Definition at line 24 of file PixelBarrelLinkMaker.h.

◆ PixelFEDCabling

Definition at line 20 of file PixelBarrelLinkMaker.h.

◆ PixelFEDLink

Definition at line 21 of file PixelBarrelLinkMaker.h.

◆ PixelROC

Definition at line 22 of file PixelBarrelLinkMaker.h.

◆ Range

Definition at line 27 of file PixelBarrelLinkMaker.h.

Constructor & Destructor Documentation

◆ PixelBarrelLinkMaker()

PixelBarrelLinkMaker::PixelBarrelLinkMaker ( const PixelFEDCabling o)
inline

ctor from owner

Definition at line 30 of file PixelBarrelLinkMaker.h.

30 : theOwner(o) {}

Member Function Documentation

◆ links()

PixelBarrelLinkMaker::Links PixelBarrelLinkMaker::links ( const Names n,
const DetUnits u 
) const

construct links Each barrel module triggers one or two link Items. They are sorted according to Order(). The ROCs corresponding to items are created. The link is form from link items and ROCS.

Definition at line 38 of file PixelBarrelLinkMaker.cc.

38  {
39  Links result;
40  typedef Names::const_iterator CIN;
41 
42  //
43  // construct link items from names.
44  // the item is equivalent to name for layer=3.
45  // for layer=1,2 each module has 2 links
46  //
47  vector<Item> linkItems;
48  typedef vector<Item>::const_iterator CIU;
49 
50  for (unsigned int idx = 0; idx < n.size(); idx++) {
51  Item item;
52  PixelBarrelName* b = dynamic_cast<PixelBarrelName*>(n[idx]);
53  uint32_t d = u[idx];
54  item.name = b;
55  item.unit = d;
56 
57  if (b->isHalfModule()) {
58  item.rocIds = Range(0, 7); // half modules
59  linkItems.push_back(item);
60  } else if (b->layerName() <= 2) {
61  item.rocIds = Range(0, 7); // first link for modules in Layer=1,2
62  linkItems.push_back(item);
63  item.rocIds = Range(8, 15); // second link for modules in Layer=1,2
64  linkItems.push_back(item);
65  } else {
66  item.rocIds = Range(0, 15); // one module per link
67  linkItems.push_back(item);
68  }
69  }
70 
71  //
72  // sort link items to get the order as in links
73  //
74 
75  Order myLess;
76  sort(linkItems.begin(), linkItems.end(), myLess);
77 
78  //
79  // DEBUG
80  //
81  ostringstream str;
82  for (CIU it = linkItems.begin(); it != linkItems.end(); it++) {
83  str << (*it).name->name() << " r=" << (*it).rocIds << endl;
84  }
85  LogDebug(" sorted BARREL links: ") << str.str();
86 
87  //
88  // create corresponding PixelROC and link
89  //
90  int idLink = 0;
91  result.reserve(linkItems.size());
92  for (CIU it = linkItems.begin(); it != linkItems.end(); it++) {
94  PixelFEDLink link(++idLink);
95  int idRoc = 0;
96  for (int id = (*it).rocIds.min(); id <= (*it).rocIds.max(); id++) {
97  idRoc++;
98  rocs.push_back(PixelROC(it->unit, id, idRoc));
99  }
100  link.add(rocs);
101  result.push_back(link);
102  }
103 
104  return result;
105 }

References b, ztail::d, heavyIonCSV_trainingSettings::idx, B2GTnPMonitor_cfi::item, MainPageGenerator::link, LogDebug, dqmiodumpmetadata::n, mps_fire::result, PixelMapPlotter::rocs, jetUpdater_cfi::sort, and str.

Member Data Documentation

◆ theOwner

const PixelFEDCabling* PixelBarrelLinkMaker::theOwner
private

Definition at line 40 of file PixelBarrelLinkMaker.h.

PixelMapPlotter.rocs
rocs
Definition: PixelMapPlotter.py:497
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
PixelBarrelLinkMaker::theOwner
const PixelFEDCabling * theOwner
Definition: PixelBarrelLinkMaker.h:40
PixelBarrelName
Definition: PixelBarrelName.h:16
PixelBarrelLinkMaker::Links
PixelFEDCabling::Links Links
Definition: PixelBarrelLinkMaker.h:26
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
str
#define str(s)
Definition: TestProcessor.cc:53
b
double b
Definition: hdecay.h:118
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
PixelBarrelLinkMaker::PixelROC
sipixelobjects::PixelROC PixelROC
Definition: PixelBarrelLinkMaker.h:22
PixelBarrelLinkMaker::Range
TRange< int > Range
Definition: PixelBarrelLinkMaker.h:27
ztail.d
d
Definition: ztail.py:151
mps_fire.result
result
Definition: mps_fire.py:311