CMS 3D CMS Logo

TrackerTopologyEP.cc
Go to the documentation of this file.
12 
13 #include <memory>
14 
15 namespace edm {
17 }
18 
20 public:
22 
23  using ReturnType = std::unique_ptr<TrackerTopology>;
24 
25  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
26 
27  ReturnType produce(const TrackerTopologyRcd&);
28 
29 private:
30  void fillParameters(const PTrackerParameters&,
37 
39 };
40 
42  : token_(setWhatProduced(this).consumesFrom<PTrackerParameters, PTrackerParametersRcd>(edm::ESInputTag())) {
43  edm::LogInfo("TRACKER") << "TrackerTopologyEP::TrackerTopologyEP";
44 }
45 
48  descriptions.add("trackerTopology", ttc);
49 }
50 
52  edm::LogInfo("TrackerTopologyEP") << "TrackerTopologyEP::produce(const TrackerTopologyRcd& iRecord)";
53  auto ptp = iRecord.getRecord<PTrackerParametersRcd>().getTransientHandle(token_);
54 
61 
62  fillParameters(*ptp, pxbVals, pxfVals, tecVals, tibVals, tidVals, tobVals);
63 
64  return std::make_unique<TrackerTopology>(pxbVals, pxfVals, tecVals, tibVals, tidVals, tobVals);
65 }
66 
73  TrackerTopology::TOBValues& tobVals) {
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.layerMask_ = ptp.vitems[0].vpars[3]; // 0xF
78  pxbVals.ladderMask_ = ptp.vitems[0].vpars[4]; // 0xFF
79  pxbVals.moduleMask_ = ptp.vitems[0].vpars[5]; // 0x3F
80 
81  pxfVals.sideStartBit_ = ptp.vitems[1].vpars[0];
82  pxfVals.diskStartBit_ = ptp.vitems[1].vpars[1];
83  pxfVals.bladeStartBit_ = ptp.vitems[1].vpars[2];
84  pxfVals.panelStartBit_ = ptp.vitems[1].vpars[3];
85  pxfVals.moduleStartBit_ = ptp.vitems[1].vpars[4];
86  pxfVals.sideMask_ = ptp.vitems[1].vpars[5];
87  pxfVals.diskMask_ = ptp.vitems[1].vpars[6];
88  pxfVals.bladeMask_ = ptp.vitems[1].vpars[7];
89  pxfVals.panelMask_ = ptp.vitems[1].vpars[8];
90  pxfVals.moduleMask_ = ptp.vitems[1].vpars[9];
91 
92  // TEC: 6
93  tecVals.sideStartBit_ = ptp.vitems[5].vpars[0];
94  tecVals.wheelStartBit_ = ptp.vitems[5].vpars[1];
95  tecVals.petal_fw_bwStartBit_ = ptp.vitems[5].vpars[2];
96  tecVals.petalStartBit_ = ptp.vitems[5].vpars[3];
97  tecVals.ringStartBit_ = ptp.vitems[5].vpars[4];
98  tecVals.moduleStartBit_ = ptp.vitems[5].vpars[5];
99  tecVals.sterStartBit_ = ptp.vitems[5].vpars[6];
100  tecVals.sideMask_ = ptp.vitems[5].vpars[7];
101  tecVals.wheelMask_ = ptp.vitems[5].vpars[8];
102  tecVals.petal_fw_bwMask_ = ptp.vitems[5].vpars[9];
103  tecVals.petalMask_ = ptp.vitems[5].vpars[10];
104  tecVals.ringMask_ = ptp.vitems[5].vpars[11];
105  tecVals.moduleMask_ = ptp.vitems[5].vpars[12];
106  tecVals.sterMask_ = ptp.vitems[5].vpars[13];
107 
108  // TIB: 3
109  tibVals.layerStartBit_ = ptp.vitems[2].vpars[0];
110  tibVals.str_fw_bwStartBit_ = ptp.vitems[2].vpars[1];
111  tibVals.str_int_extStartBit_ = ptp.vitems[2].vpars[2];
112  tibVals.strStartBit_ = ptp.vitems[2].vpars[3];
113  tibVals.moduleStartBit_ = ptp.vitems[2].vpars[4];
114  tibVals.sterStartBit_ = ptp.vitems[2].vpars[5];
115  tibVals.layerMask_ = ptp.vitems[2].vpars[6];
116  tibVals.str_fw_bwMask_ = ptp.vitems[2].vpars[7];
117  tibVals.str_int_extMask_ = ptp.vitems[2].vpars[8];
118  tibVals.strMask_ = ptp.vitems[2].vpars[9];
119  tibVals.moduleMask_ = ptp.vitems[2].vpars[10];
120  tibVals.sterMask_ = ptp.vitems[2].vpars[11];
121 
122  // TID: 4
123  tidVals.sideStartBit_ = ptp.vitems[3].vpars[0];
124  tidVals.wheelStartBit_ = ptp.vitems[3].vpars[1];
125  tidVals.ringStartBit_ = ptp.vitems[3].vpars[2];
126  tidVals.module_fw_bwStartBit_ = ptp.vitems[3].vpars[3];
127  tidVals.moduleStartBit_ = ptp.vitems[3].vpars[4];
128  tidVals.sterStartBit_ = ptp.vitems[3].vpars[5];
129  tidVals.sideMask_ = ptp.vitems[3].vpars[6];
130  tidVals.wheelMask_ = ptp.vitems[3].vpars[7];
131  tidVals.ringMask_ = ptp.vitems[3].vpars[8];
132  tidVals.module_fw_bwMask_ = ptp.vitems[3].vpars[9];
133  tidVals.moduleMask_ = ptp.vitems[3].vpars[10];
134  tidVals.sterMask_ = ptp.vitems[3].vpars[11];
135 
136  // TOB: 5
137  tobVals.layerStartBit_ = ptp.vitems[4].vpars[0];
138  tobVals.rod_fw_bwStartBit_ = ptp.vitems[4].vpars[1];
139  tobVals.rodStartBit_ = ptp.vitems[4].vpars[2];
140  tobVals.moduleStartBit_ = ptp.vitems[4].vpars[3];
141  tobVals.sterStartBit_ = ptp.vitems[4].vpars[4];
142  tobVals.layerMask_ = ptp.vitems[4].vpars[5];
143  tobVals.rod_fw_bwMask_ = ptp.vitems[4].vpars[6];
144  tobVals.rodMask_ = ptp.vitems[4].vpars[7];
145  tobVals.moduleMask_ = ptp.vitems[4].vpars[8];
146  tobVals.sterMask_ = ptp.vitems[4].vpars[9];
147 }
148 
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:60
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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