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 
28 
29 private:
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 
ConfigurationDescriptions.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
TrackerTopology::TOBValues
Definition: TrackerTopology.h:88
TrackerTopology::TECValues::ringMask_
unsigned int ringMask_
Definition: TrackerTopology.h:52
TrackerTopology::TIBValues::layerStartBit_
unsigned int layerStartBit_
Definition: TrackerTopology.h:58
TrackerTopologyEP::produce
ReturnType produce(const TrackerTopologyRcd &)
Definition: TrackerTopologyEP.cc:51
TrackerTopology::TECValues::sideStartBit_
unsigned int sideStartBit_
Definition: TrackerTopology.h:41
TrackerTopology::TIDValues::sideMask_
unsigned int sideMask_
Definition: TrackerTopology.h:80
TrackerTopologyEP::ReturnType
std::unique_ptr< TrackerTopology > ReturnType
Definition: TrackerTopologyEP.cc:23
TrackerTopology::PixelEndcapValues::moduleStartBit_
unsigned int moduleStartBit_
Definition: TrackerTopology.h:32
TrackerTopology::PixelBarrelValues::ladderStartBit_
unsigned int ladderStartBit_
Definition: TrackerTopology.h:20
MessageLogger.h
TrackerTopology::PixelEndcapValues::sideMask_
unsigned int sideMask_
Definition: TrackerTopology.h:33
TrackerTopology::TIBValues::sterStartBit_
unsigned int sterStartBit_
Definition: TrackerTopology.h:63
TrackerTopology::PixelEndcapValues::panelStartBit_
unsigned int panelStartBit_
Definition: TrackerTopology.h:31
TrackerTopology::TECValues::sterMask_
unsigned int sterMask_
Definition: TrackerTopology.h:54
TrackerTopology::TOBValues::sterStartBit_
unsigned int sterStartBit_
Definition: TrackerTopology.h:93
TrackerTopology::TECValues::sterStartBit_
unsigned int sterStartBit_
Definition: TrackerTopology.h:47
PTrackerParameters
Definition: PTrackerParameters.h:6
ESHandle.h
ESInputTag
TrackerTopology::TIDValues::ringStartBit_
unsigned int ringStartBit_
Definition: TrackerTopology.h:76
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology::PixelEndcapValues::diskStartBit_
unsigned int diskStartBit_
Definition: TrackerTopology.h:29
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TrackerTopologyEP::fillParameters
void fillParameters(const PTrackerParameters &, TrackerTopology::PixelBarrelValues &pxbVals, TrackerTopology::PixelEndcapValues &pxfVals, TrackerTopology::TECValues &tecVals, TrackerTopology::TIBValues &tibVals, TrackerTopology::TIDValues &tidVals, TrackerTopology::TOBValues &tobVals)
Definition: TrackerTopologyEP.cc:67
ESProducer.h
TrackerTopology::PixelBarrelValues
Definition: TrackerTopology.h:18
TrackerTopology::PixelBarrelValues::moduleMask_
unsigned int moduleMask_
Definition: TrackerTopology.h:24
TrackerTopology::TOBValues::rodStartBit_
unsigned int rodStartBit_
Definition: TrackerTopology.h:91
TrackerTopology::TIDValues
Definition: TrackerTopology.h:73
TrackerTopology::TECValues::petal_fw_bwStartBit_
unsigned int petal_fw_bwStartBit_
Definition: TrackerTopology.h:43
PTrackerParameters.h
TrackerTopology::PixelEndcapValues::moduleMask_
unsigned int moduleMask_
Definition: TrackerTopology.h:37
TrackerTopology::TECValues
Definition: TrackerTopology.h:40
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
TrackerTopology::TECValues::petalStartBit_
unsigned int petalStartBit_
Definition: TrackerTopology.h:44
TrackerTopology::TOBValues::layerStartBit_
unsigned int layerStartBit_
Definition: TrackerTopology.h:89
PTrackerParametersRcd
Definition: PTrackerParametersRcd.h:9
TrackerTopology::PixelBarrelValues::layerStartBit_
unsigned int layerStartBit_
Definition: TrackerTopology.h:19
TrackerTopology::PixelEndcapValues::bladeStartBit_
unsigned int bladeStartBit_
Definition: TrackerTopology.h:30
TrackerTopologyEP::token_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > token_
Definition: TrackerTopologyEP.cc:38
TrackerTopology::TIBValues::strStartBit_
unsigned int strStartBit_
Definition: TrackerTopology.h:61
TrackerTopology.h
TrackerTopology::TECValues::petal_fw_bwMask_
unsigned int petal_fw_bwMask_
Definition: TrackerTopology.h:50
TrackerTopology::PixelEndcapValues
Definition: TrackerTopology.h:27
TrackerTopologyRcd.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TrackerTopology::TIBValues::moduleMask_
unsigned int moduleMask_
Definition: TrackerTopology.h:69
TrackerTopology::PixelEndcapValues::bladeMask_
unsigned int bladeMask_
Definition: TrackerTopology.h:35
TrackerTopology::TIDValues::sterStartBit_
unsigned int sterStartBit_
Definition: TrackerTopology.h:79
TrackerTopology::TIBValues::str_int_extMask_
unsigned int str_int_extMask_
Definition: TrackerTopology.h:67
TrackerTopology::TOBValues::rod_fw_bwMask_
unsigned int rod_fw_bwMask_
Definition: TrackerTopology.h:95
TrackerTopology::TOBValues::sterMask_
unsigned int sterMask_
Definition: TrackerTopology.h:98
TrackerTopology::TOBValues::moduleStartBit_
unsigned int moduleStartBit_
Definition: TrackerTopology.h:92
TrackerTopology::TIDValues::sterMask_
unsigned int sterMask_
Definition: TrackerTopology.h:85
ParameterSetDescription.h
TrackerTopology::PixelEndcapValues::panelMask_
unsigned int panelMask_
Definition: TrackerTopology.h:36
TrackerTopology::TIBValues::str_fw_bwStartBit_
unsigned int str_fw_bwStartBit_
Definition: TrackerTopology.h:59
PTrackerParameters::vitems
std::vector< Item > vitems
Definition: PTrackerParameters.h:18
TrackerTopology::TECValues::wheelMask_
unsigned int wheelMask_
Definition: TrackerTopology.h:49
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
TrackerTopology::PixelBarrelValues::ladderMask_
unsigned int ladderMask_
Definition: TrackerTopology.h:23
TrackerTopology::TECValues::wheelStartBit_
unsigned int wheelStartBit_
Definition: TrackerTopology.h:42
TrackerTopology::TIDValues::ringMask_
unsigned int ringMask_
Definition: TrackerTopology.h:82
edm::ParameterSet
Definition: ParameterSet.h:47
TrackerTopology::TECValues::sideMask_
unsigned int sideMask_
Definition: TrackerTopology.h:48
TrackerTopology::TOBValues::rodMask_
unsigned int rodMask_
Definition: TrackerTopology.h:96
TrackerTopology::PixelBarrelValues::moduleStartBit_
unsigned int moduleStartBit_
Definition: TrackerTopology.h:21
TrackerTopology::TIDValues::module_fw_bwStartBit_
unsigned int module_fw_bwStartBit_
Definition: TrackerTopology.h:77
TrackerTopology::TOBValues::rod_fw_bwStartBit_
unsigned int rod_fw_bwStartBit_
Definition: TrackerTopology.h:90
PTrackerParametersRcd.h
TrackerTopology::TECValues::petalMask_
unsigned int petalMask_
Definition: TrackerTopology.h:51
TrackerTopologyEP::TrackerTopologyEP
TrackerTopologyEP(const edm::ParameterSet &)
Definition: TrackerTopologyEP.cc:41
TrackerTopology::TIDValues::sideStartBit_
unsigned int sideStartBit_
Definition: TrackerTopology.h:74
TrackerTopology::TIDValues::moduleMask_
unsigned int moduleMask_
Definition: TrackerTopology.h:84
edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd >
TrackerTopology::TIBValues::moduleStartBit_
unsigned int moduleStartBit_
Definition: TrackerTopology.h:62
TrackerTopology::TIDValues::wheelMask_
unsigned int wheelMask_
Definition: TrackerTopology.h:81
TrackerTopology::TIBValues::sterMask_
unsigned int sterMask_
Definition: TrackerTopology.h:70
ModuleFactory.h
ConfigurationDescriptions
TrackerTopology::TECValues::moduleStartBit_
unsigned int moduleStartBit_
Definition: TrackerTopology.h:46
TrackerTopology::TIBValues::strMask_
unsigned int strMask_
Definition: TrackerTopology.h:68
TrackerTopology::TIDValues::moduleStartBit_
unsigned int moduleStartBit_
Definition: TrackerTopology.h:78
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
TrackerTopology::TECValues::ringStartBit_
unsigned int ringStartBit_
Definition: TrackerTopology.h:45
TrackerTopologyEP
Definition: TrackerTopologyEP.cc:19
Exception.h
edm::ESProducer
Definition: ESProducer.h:104
TrackerTopology::TECValues::moduleMask_
unsigned int moduleMask_
Definition: TrackerTopology.h:53
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
TrackerTopology::TIDValues::wheelStartBit_
unsigned int wheelStartBit_
Definition: TrackerTopology.h:75
TrackerTopology::TOBValues::moduleMask_
unsigned int moduleMask_
Definition: TrackerTopology.h:97
TrackerTopology::TIBValues
Definition: TrackerTopology.h:57
TrackerTopologyEP::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TrackerTopologyEP.cc:46
TrackerTopology::TIDValues::module_fw_bwMask_
unsigned int module_fw_bwMask_
Definition: TrackerTopology.h:83
TrackerTopology::TIBValues::layerMask_
unsigned int layerMask_
Definition: TrackerTopology.h:65
TrackerTopology::PixelBarrelValues::layerMask_
unsigned int layerMask_
Definition: TrackerTopology.h:22
TrackerTopology::TOBValues::layerMask_
unsigned int layerMask_
Definition: TrackerTopology.h:94
TrackerTopology::PixelEndcapValues::diskMask_
unsigned int diskMask_
Definition: TrackerTopology.h:34
TrackerTopology::PixelEndcapValues::sideStartBit_
unsigned int sideStartBit_
Definition: TrackerTopology.h:28
TrackerTopology::TIBValues::str_int_extStartBit_
unsigned int str_int_extStartBit_
Definition: TrackerTopology.h:60
TrackerTopology::TIBValues::str_fw_bwMask_
unsigned int str_fw_bwMask_
Definition: TrackerTopology.h:66