Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:27

0001 #ifndef PixelEndcapLinkMaker_H
0002 #define PixelEndcapLinkMaker_H
0003 
0004 #include <vector>
0005 
0006 #include "CalibTracker/SiPixelConnectivity/interface/TRange.h"
0007 
0008 class PixelModuleName;
0009 class PixelEndcapName;
0010 #include "CondFormats/SiPixelObjects/interface/PixelFEDCabling.h"
0011 #include "CondFormats/SiPixelObjects/interface/PixelFEDLink.h"
0012 #include <cstdint>
0013 
0014 class PixelEndcapLinkMaker {
0015 public:
0016   typedef sipixelobjects::PixelFEDCabling PixelFEDCabling;
0017   typedef sipixelobjects::PixelFEDLink PixelFEDLink;
0018   typedef sipixelobjects::PixelROC PixelROC;
0019 
0020   typedef std::vector<PixelModuleName*> Names;
0021   typedef std::vector<uint32_t> DetUnits;
0022   typedef PixelFEDCabling::Links Links;
0023   typedef TRange<int> Range;
0024 
0025   /// ctor from owner
0026   PixelEndcapLinkMaker(const PixelFEDCabling* o) : theOwner(o) {}
0027 
0028   /// construct links
0029   /// Each Endcap module triggers one or two link Items.
0030   /// They are sorted according to Order().
0031   /// The ROCs corresponding to items are created. The link is
0032   /// form from link items and ROCS.
0033   Links links(const Names& n, const DetUnits& u) const;
0034 
0035 private:
0036   const PixelFEDCabling* theOwner;
0037 
0038   /// link item.
0039   /// defined by DetUnit with name (representing Pixel Detector module)
0040   /// and Ids of associated ROCs. The Id is the ROC number in module according
0041   /// to PixelDatabase.
0042   /// The Item represents one module (DetUnit+name) with the Plaquette type
0043   /// and associated ROCs Ids given explicitly (Id is the ROC number in module)
0044   struct Item {
0045     const PixelEndcapName* name;
0046     uint32_t unit;
0047     Range rocIds;
0048   };
0049 
0050   /// define order of link components.
0051   /// Highest priority to Endcap id (forward or backward endcpa)
0052   /// Second priority to disk id.
0053   /// Next blade
0054   /// Next panned
0055   /// To compare order of modules in one pannel plaquette id is used.
0056   /// The order of plaquettes define order of ROCs in link
0057   struct Order {
0058     bool operator()(const Item&, const Item&) const;
0059   };
0060 
0061 private:
0062 };
0063 
0064 #endif