CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackerTopologyEP.cc
Go to the documentation of this file.
11 
12 #include <memory>
13 
14 namespace edm {
16 }
17 
19 public:
21 
22  using ReturnType = std::unique_ptr<TrackerTopology>;
23 
24  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
25 
27 
28 private:
36 
38 };
39 
41  : token_(setWhatProduced(this).consumesFrom<PTrackerParameters, PTrackerParametersRcd>(edm::ESInputTag())) {
42  edm::LogInfo("TRACKER") << "TrackerTopologyEP::TrackerTopologyEP";
43 }
44 
47  descriptions.add("trackerTopology", ttc);
48 }
49 
51  edm::LogInfo("TrackerTopologyEP") << "TrackerTopologyEP::produce(const TrackerTopologyRcd& iRecord)";
52  auto ptp = iRecord.getRecord<PTrackerParametersRcd>().getTransientHandle(token_);
53 
60 
61  fillParameters(*ptp, pxbVals, pxfVals, tecVals, tibVals, tidVals, tobVals);
62 
63  return std::make_unique<TrackerTopology>(pxbVals, pxfVals, tecVals, tibVals, tidVals, tobVals);
64 }
65 
72  TrackerTopology::TOBValues& tobVals) {
73  pxbVals.layerStartBit_ = ptp.vitems[0].vpars[0]; // 16
74  pxbVals.ladderStartBit_ = ptp.vitems[0].vpars[1]; // 8
75  pxbVals.moduleStartBit_ = ptp.vitems[0].vpars[2]; // 2
76  pxbVals.layerMask_ = ptp.vitems[0].vpars[3]; // 0xF
77  pxbVals.ladderMask_ = ptp.vitems[0].vpars[4]; // 0xFF
78  pxbVals.moduleMask_ = ptp.vitems[0].vpars[5]; // 0x3F
79 
80  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
81  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
82  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[2];
83  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[3];
84  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[4];
85  pxfVals.sideMask_ = ptp.vitems[1].vpars[5];
86  pxfVals.diskMask_ = ptp.vitems[1].vpars[6];
87  pxfVals.bladeMask_ = ptp.vitems[1].vpars[7];
88  pxfVals.panelMask_ = ptp.vitems[1].vpars[8];
89  pxfVals.moduleMask_ = ptp.vitems[1].vpars[9];
90 
91  // TEC: 6
92  tecVals.sideStartBit_ = ptp.vitems[5].vpars[0];
93  tecVals.wheelStartBit_ = ptp.vitems[5].vpars[1];
94  tecVals.petal_fw_bwStartBit_ = ptp.vitems[5].vpars[2];
95  tecVals.petalStartBit_ = ptp.vitems[5].vpars[3];
96  tecVals.ringStartBit_ = ptp.vitems[5].vpars[4];
97  tecVals.moduleStartBit_ = ptp.vitems[5].vpars[5];
98  tecVals.sterStartBit_ = ptp.vitems[5].vpars[6];
99  tecVals.sideMask_ = ptp.vitems[5].vpars[7];
100  tecVals.wheelMask_ = ptp.vitems[5].vpars[8];
101  tecVals.petal_fw_bwMask_ = ptp.vitems[5].vpars[9];
102  tecVals.petalMask_ = ptp.vitems[5].vpars[10];
103  tecVals.ringMask_ = ptp.vitems[5].vpars[11];
104  tecVals.moduleMask_ = ptp.vitems[5].vpars[12];
105  tecVals.sterMask_ = ptp.vitems[5].vpars[13];
106 
107  // TIB: 3
108  tibVals.layerStartBit_ = ptp.vitems[2].vpars[0];
109  tibVals.str_fw_bwStartBit_ = ptp.vitems[2].vpars[1];
110  tibVals.str_int_extStartBit_ = ptp.vitems[2].vpars[2];
111  tibVals.strStartBit_ = ptp.vitems[2].vpars[3];
112  tibVals.moduleStartBit_ = ptp.vitems[2].vpars[4];
113  tibVals.sterStartBit_ = ptp.vitems[2].vpars[5];
114  tibVals.layerMask_ = ptp.vitems[2].vpars[6];
115  tibVals.str_fw_bwMask_ = ptp.vitems[2].vpars[7];
116  tibVals.str_int_extMask_ = ptp.vitems[2].vpars[8];
117  tibVals.strMask_ = ptp.vitems[2].vpars[9];
118  tibVals.moduleMask_ = ptp.vitems[2].vpars[10];
119  tibVals.sterMask_ = ptp.vitems[2].vpars[11];
120 
121  // TID: 4
122  tidVals.sideStartBit_ = ptp.vitems[3].vpars[0];
123  tidVals.wheelStartBit_ = ptp.vitems[3].vpars[1];
124  tidVals.ringStartBit_ = ptp.vitems[3].vpars[2];
125  tidVals.module_fw_bwStartBit_ = ptp.vitems[3].vpars[3];
126  tidVals.moduleStartBit_ = ptp.vitems[3].vpars[4];
127  tidVals.sterStartBit_ = ptp.vitems[3].vpars[5];
128  tidVals.sideMask_ = ptp.vitems[3].vpars[6];
129  tidVals.wheelMask_ = ptp.vitems[3].vpars[7];
130  tidVals.ringMask_ = ptp.vitems[3].vpars[8];
131  tidVals.module_fw_bwMask_ = ptp.vitems[3].vpars[9];
132  tidVals.moduleMask_ = ptp.vitems[3].vpars[10];
133  tidVals.sterMask_ = ptp.vitems[3].vpars[11];
134 
135  // TOB: 5
136  tobVals.layerStartBit_ = ptp.vitems[4].vpars[0];
137  tobVals.rod_fw_bwStartBit_ = ptp.vitems[4].vpars[1];
138  tobVals.rodStartBit_ = ptp.vitems[4].vpars[2];
139  tobVals.moduleStartBit_ = ptp.vitems[4].vpars[3];
140  tobVals.sterStartBit_ = ptp.vitems[4].vpars[4];
141  tobVals.layerMask_ = ptp.vitems[4].vpars[5];
142  tobVals.rod_fw_bwMask_ = ptp.vitems[4].vpars[6];
143  tobVals.rodMask_ = ptp.vitems[4].vpars[7];
144  tobVals.moduleMask_ = ptp.vitems[4].vpars[8];
145  tobVals.sterMask_ = ptp.vitems[4].vpars[9];
146 }
147 
void fillParameters(const PTrackerParameters &, TrackerTopology::PixelBarrelValues &pxbVals, TrackerTopology::PixelEndcapValues &pxfVals, TrackerTopology::TECValues &tecVals, TrackerTopology::TIBValues &tibVals, TrackerTopology::TIDValues &tidVals, TrackerTopology::TOBValues &tobVals)
std::vector< Item > vitems
ReturnType produce(const TrackerTopologyRcd &)
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > token_
TrackerTopologyEP(const edm::ParameterSet &)
Log< level::Info, false > LogInfo
unsigned int module_fw_bwStartBit_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::unique_ptr< TrackerTopology > ReturnType