CMS 3D CMS Logo

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  if (ptp.vitems[1].vpars.size() >
81  11) { //Tracker with subdisk hierarchy level (additional hierarchy level wrt original)
82  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
83  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
84  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[3];
85  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[4];
86  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[5];
87  pxfVals.sideMask_ = ptp.vitems[1].vpars[6];
88  pxfVals.diskMask_ = ptp.vitems[1].vpars[7];
89  pxfVals.bladeMask_ = ptp.vitems[1].vpars[9];
90  pxfVals.panelMask_ = ptp.vitems[1].vpars[10];
91  pxfVals.moduleMask_ = ptp.vitems[1].vpars[11];
92  } else { //Original tracker
93  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
94  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
95  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[2];
96  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[3];
97  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[4];
98  pxfVals.sideMask_ = ptp.vitems[1].vpars[5];
99  pxfVals.diskMask_ = ptp.vitems[1].vpars[6];
100  pxfVals.bladeMask_ = ptp.vitems[1].vpars[7];
101  pxfVals.panelMask_ = ptp.vitems[1].vpars[8];
102  pxfVals.moduleMask_ = ptp.vitems[1].vpars[9];
103  }
104 
105  // TEC: 6
106  tecVals.sideStartBit_ = ptp.vitems[5].vpars[0];
107  tecVals.wheelStartBit_ = ptp.vitems[5].vpars[1];
108  tecVals.petal_fw_bwStartBit_ = ptp.vitems[5].vpars[2];
109  tecVals.petalStartBit_ = ptp.vitems[5].vpars[3];
110  tecVals.ringStartBit_ = ptp.vitems[5].vpars[4];
111  tecVals.moduleStartBit_ = ptp.vitems[5].vpars[5];
112  tecVals.sterStartBit_ = ptp.vitems[5].vpars[6];
113  tecVals.sideMask_ = ptp.vitems[5].vpars[7];
114  tecVals.wheelMask_ = ptp.vitems[5].vpars[8];
115  tecVals.petal_fw_bwMask_ = ptp.vitems[5].vpars[9];
116  tecVals.petalMask_ = ptp.vitems[5].vpars[10];
117  tecVals.ringMask_ = ptp.vitems[5].vpars[11];
118  tecVals.moduleMask_ = ptp.vitems[5].vpars[12];
119  tecVals.sterMask_ = ptp.vitems[5].vpars[13];
120 
121  // TIB: 3
122  tibVals.layerStartBit_ = ptp.vitems[2].vpars[0];
123  tibVals.str_fw_bwStartBit_ = ptp.vitems[2].vpars[1];
124  tibVals.str_int_extStartBit_ = ptp.vitems[2].vpars[2];
125  tibVals.strStartBit_ = ptp.vitems[2].vpars[3];
126  tibVals.moduleStartBit_ = ptp.vitems[2].vpars[4];
127  tibVals.sterStartBit_ = ptp.vitems[2].vpars[5];
128  tibVals.layerMask_ = ptp.vitems[2].vpars[6];
129  tibVals.str_fw_bwMask_ = ptp.vitems[2].vpars[7];
130  tibVals.str_int_extMask_ = ptp.vitems[2].vpars[8];
131  tibVals.strMask_ = ptp.vitems[2].vpars[9];
132  tibVals.moduleMask_ = ptp.vitems[2].vpars[10];
133  tibVals.sterMask_ = ptp.vitems[2].vpars[11];
134 
135  // TID: 4
136  tidVals.sideStartBit_ = ptp.vitems[3].vpars[0];
137  tidVals.wheelStartBit_ = ptp.vitems[3].vpars[1];
138  tidVals.ringStartBit_ = ptp.vitems[3].vpars[2];
139  tidVals.module_fw_bwStartBit_ = ptp.vitems[3].vpars[3];
140  tidVals.moduleStartBit_ = ptp.vitems[3].vpars[4];
141  tidVals.sterStartBit_ = ptp.vitems[3].vpars[5];
142  tidVals.sideMask_ = ptp.vitems[3].vpars[6];
143  tidVals.wheelMask_ = ptp.vitems[3].vpars[7];
144  tidVals.ringMask_ = ptp.vitems[3].vpars[8];
145  tidVals.module_fw_bwMask_ = ptp.vitems[3].vpars[9];
146  tidVals.moduleMask_ = ptp.vitems[3].vpars[10];
147  tidVals.sterMask_ = ptp.vitems[3].vpars[11];
148 
149  // TOB: 5
150  tobVals.layerStartBit_ = ptp.vitems[4].vpars[0];
151  tobVals.rod_fw_bwStartBit_ = ptp.vitems[4].vpars[1];
152  tobVals.rodStartBit_ = ptp.vitems[4].vpars[2];
153  tobVals.moduleStartBit_ = ptp.vitems[4].vpars[3];
154  tobVals.sterStartBit_ = ptp.vitems[4].vpars[4];
155  tobVals.layerMask_ = ptp.vitems[4].vpars[5];
156  tobVals.rod_fw_bwMask_ = ptp.vitems[4].vpars[6];
157  tobVals.rodMask_ = ptp.vitems[4].vpars[7];
158  tobVals.moduleMask_ = ptp.vitems[4].vpars[8];
159  tobVals.sterMask_ = ptp.vitems[4].vpars[9];
160 }
161 
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)
HLT enums.
std::unique_ptr< TrackerTopology > ReturnType