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  if (ptp.vitems[0].vpars.size() > 6) { //Phase 2: extra hierarchy level for 3D sensors
74  pxbVals.layerStartBit_ = ptp.vitems[0].vpars[0]; // 16
75  pxbVals.ladderStartBit_ = ptp.vitems[0].vpars[1]; // 8
76  pxbVals.moduleStartBit_ = ptp.vitems[0].vpars[2]; // 2
77  pxbVals.doubleStartBit_ = ptp.vitems[0].vpars[3]; // 0
78  pxbVals.layerMask_ = ptp.vitems[0].vpars[4]; // 0xF
79  pxbVals.ladderMask_ = ptp.vitems[0].vpars[5]; // 0xFF
80  pxbVals.moduleMask_ = ptp.vitems[0].vpars[6]; // 0x3F
81  pxbVals.doubleMask_ = ptp.vitems[0].vpars[7]; // 0x3
82  } else { //Phase 1
83  pxbVals.layerStartBit_ = ptp.vitems[0].vpars[0]; // 16
84  pxbVals.ladderStartBit_ = ptp.vitems[0].vpars[1]; // 8
85  pxbVals.moduleStartBit_ = ptp.vitems[0].vpars[2]; // 2
86  pxbVals.layerMask_ = ptp.vitems[0].vpars[3]; // 0xF
87  pxbVals.ladderMask_ = ptp.vitems[0].vpars[4]; // 0xFF
88  pxbVals.moduleMask_ = ptp.vitems[0].vpars[5]; // 0x3F
89  }
90 
91  if (ptp.vitems[1].vpars.size() >
92  11) { //Tracker with subdisk hierarchy level (additional hierarchy level wrt original)
93  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
94  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
95  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[3];
96  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[4];
97  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[5];
98  pxfVals.sideMask_ = ptp.vitems[1].vpars[6];
99  pxfVals.diskMask_ = ptp.vitems[1].vpars[7];
100  pxfVals.bladeMask_ = ptp.vitems[1].vpars[9];
101  pxfVals.panelMask_ = ptp.vitems[1].vpars[10];
102  pxfVals.moduleMask_ = ptp.vitems[1].vpars[11];
103  } else { //Original tracker
104  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
105  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
106  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[2];
107  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[3];
108  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[4];
109  pxfVals.sideMask_ = ptp.vitems[1].vpars[5];
110  pxfVals.diskMask_ = ptp.vitems[1].vpars[6];
111  pxfVals.bladeMask_ = ptp.vitems[1].vpars[7];
112  pxfVals.panelMask_ = ptp.vitems[1].vpars[8];
113  pxfVals.moduleMask_ = ptp.vitems[1].vpars[9];
114  }
115 
116  // TEC: 6
117  tecVals.sideStartBit_ = ptp.vitems[5].vpars[0];
118  tecVals.wheelStartBit_ = ptp.vitems[5].vpars[1];
119  tecVals.petal_fw_bwStartBit_ = ptp.vitems[5].vpars[2];
120  tecVals.petalStartBit_ = ptp.vitems[5].vpars[3];
121  tecVals.ringStartBit_ = ptp.vitems[5].vpars[4];
122  tecVals.moduleStartBit_ = ptp.vitems[5].vpars[5];
123  tecVals.sterStartBit_ = ptp.vitems[5].vpars[6];
124  tecVals.sideMask_ = ptp.vitems[5].vpars[7];
125  tecVals.wheelMask_ = ptp.vitems[5].vpars[8];
126  tecVals.petal_fw_bwMask_ = ptp.vitems[5].vpars[9];
127  tecVals.petalMask_ = ptp.vitems[5].vpars[10];
128  tecVals.ringMask_ = ptp.vitems[5].vpars[11];
129  tecVals.moduleMask_ = ptp.vitems[5].vpars[12];
130  tecVals.sterMask_ = ptp.vitems[5].vpars[13];
131 
132  // TIB: 3
133  tibVals.layerStartBit_ = ptp.vitems[2].vpars[0];
134  tibVals.str_fw_bwStartBit_ = ptp.vitems[2].vpars[1];
135  tibVals.str_int_extStartBit_ = ptp.vitems[2].vpars[2];
136  tibVals.strStartBit_ = ptp.vitems[2].vpars[3];
137  tibVals.moduleStartBit_ = ptp.vitems[2].vpars[4];
138  tibVals.sterStartBit_ = ptp.vitems[2].vpars[5];
139  tibVals.layerMask_ = ptp.vitems[2].vpars[6];
140  tibVals.str_fw_bwMask_ = ptp.vitems[2].vpars[7];
141  tibVals.str_int_extMask_ = ptp.vitems[2].vpars[8];
142  tibVals.strMask_ = ptp.vitems[2].vpars[9];
143  tibVals.moduleMask_ = ptp.vitems[2].vpars[10];
144  tibVals.sterMask_ = ptp.vitems[2].vpars[11];
145 
146  // TID: 4
147  tidVals.sideStartBit_ = ptp.vitems[3].vpars[0];
148  tidVals.wheelStartBit_ = ptp.vitems[3].vpars[1];
149  tidVals.ringStartBit_ = ptp.vitems[3].vpars[2];
150  tidVals.module_fw_bwStartBit_ = ptp.vitems[3].vpars[3];
151  tidVals.moduleStartBit_ = ptp.vitems[3].vpars[4];
152  tidVals.sterStartBit_ = ptp.vitems[3].vpars[5];
153  tidVals.sideMask_ = ptp.vitems[3].vpars[6];
154  tidVals.wheelMask_ = ptp.vitems[3].vpars[7];
155  tidVals.ringMask_ = ptp.vitems[3].vpars[8];
156  tidVals.module_fw_bwMask_ = ptp.vitems[3].vpars[9];
157  tidVals.moduleMask_ = ptp.vitems[3].vpars[10];
158  tidVals.sterMask_ = ptp.vitems[3].vpars[11];
159 
160  // TOB: 5
161  tobVals.layerStartBit_ = ptp.vitems[4].vpars[0];
162  tobVals.rod_fw_bwStartBit_ = ptp.vitems[4].vpars[1];
163  tobVals.rodStartBit_ = ptp.vitems[4].vpars[2];
164  tobVals.moduleStartBit_ = ptp.vitems[4].vpars[3];
165  tobVals.sterStartBit_ = ptp.vitems[4].vpars[4];
166  tobVals.layerMask_ = ptp.vitems[4].vpars[5];
167  tobVals.rod_fw_bwMask_ = ptp.vitems[4].vpars[6];
168  tobVals.rodMask_ = ptp.vitems[4].vpars[7];
169  tobVals.moduleMask_ = ptp.vitems[4].vpars[8];
170  tobVals.sterMask_ = ptp.vitems[4].vpars[9];
171 }
172 
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 &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
Log< level::Info, false > LogInfo
unsigned int module_fw_bwStartBit_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HLT enums.
std::unique_ptr< TrackerTopology > ReturnType