CMS 3D CMS Logo

TrackerTopologyEP.cc
Go to the documentation of this file.
1 #include "TrackerTopologyEP.h"
9 
11 {
12  edm::LogInfo("TRACKER") << "TrackerTopologyEP::TrackerTopologyEP";
13 
14  setWhatProduced(this);
15 }
16 
18 {
19 }
20 
21 void
23 {
25  descriptions.add( "trackerTopology", ttc );
26 }
27 
30 {
31  edm::LogInfo("TrackerTopologyEP") << "TrackerTopologyEP::produce(const TrackerTopologyRcd& iRecord)";
33  iRecord.getRecord<PTrackerParametersRcd>().get( ptp );
34  fillParameters( *ptp );
35 
36  return std::make_unique<TrackerTopology>( pxbVals_, pxfVals_, tecVals_, tibVals_, tidVals_, tobVals_ );
37 }
38 
39 void
41 {
42  pxbVals_.layerStartBit_ = ptp.vitems[0].vpars[0]; // 16
43  pxbVals_.ladderStartBit_ = ptp.vitems[0].vpars[1]; // 8
44  pxbVals_.moduleStartBit_ = ptp.vitems[0].vpars[2]; // 2
45  pxbVals_.layerMask_ = ptp.vitems[0].vpars[3]; // 0xF
46  pxbVals_.ladderMask_ = ptp.vitems[0].vpars[4]; // 0xFF
47  pxbVals_.moduleMask_ = ptp.vitems[0].vpars[5]; // 0x3F
48 
49  pxfVals_.sideStartBit_ = ptp.vitems[1].vpars[0];
50  pxfVals_.diskStartBit_ = ptp.vitems[1].vpars[1];
51  pxfVals_.bladeStartBit_ = ptp.vitems[1].vpars[2];
52  pxfVals_.panelStartBit_ = ptp.vitems[1].vpars[3];
53  pxfVals_.moduleStartBit_ = ptp.vitems[1].vpars[4];
54  pxfVals_.sideMask_ = ptp.vitems[1].vpars[5];
55  pxfVals_.diskMask_ = ptp.vitems[1].vpars[6];
56  pxfVals_.bladeMask_ = ptp.vitems[1].vpars[7];
57  pxfVals_.panelMask_ = ptp.vitems[1].vpars[8];
58  pxfVals_.moduleMask_ = ptp.vitems[1].vpars[9];
59 
60  // TEC: 6
61  tecVals_.sideStartBit_ = ptp.vitems[5].vpars[0];
62  tecVals_.wheelStartBit_ = ptp.vitems[5].vpars[1];
63  tecVals_.petal_fw_bwStartBit_ = ptp.vitems[5].vpars[2];
64  tecVals_.petalStartBit_ = ptp.vitems[5].vpars[3];
65  tecVals_.ringStartBit_ = ptp.vitems[5].vpars[4];
66  tecVals_.moduleStartBit_ = ptp.vitems[5].vpars[5];
67  tecVals_.sterStartBit_ = ptp.vitems[5].vpars[6];
68  tecVals_.sideMask_ = ptp.vitems[5].vpars[7];
69  tecVals_.wheelMask_ = ptp.vitems[5].vpars[8];
70  tecVals_.petal_fw_bwMask_ = ptp.vitems[5].vpars[9];
71  tecVals_.petalMask_ = ptp.vitems[5].vpars[10];
72  tecVals_.ringMask_ = ptp.vitems[5].vpars[11];
73  tecVals_.moduleMask_ = ptp.vitems[5].vpars[12];
74  tecVals_.sterMask_ = ptp.vitems[5].vpars[13];
75 
76  // TIB: 3
77  tibVals_.layerStartBit_ = ptp.vitems[2].vpars[0];
78  tibVals_.str_fw_bwStartBit_ = ptp.vitems[2].vpars[1];
79  tibVals_.str_int_extStartBit_ = ptp.vitems[2].vpars[2];
80  tibVals_.strStartBit_ = ptp.vitems[2].vpars[3];
81  tibVals_.moduleStartBit_ = ptp.vitems[2].vpars[4];
82  tibVals_.sterStartBit_ = ptp.vitems[2].vpars[5];
83  tibVals_.layerMask_ = ptp.vitems[2].vpars[6];
84  tibVals_.str_fw_bwMask_ = ptp.vitems[2].vpars[7];
85  tibVals_.str_int_extMask_ = ptp.vitems[2].vpars[8];
86  tibVals_.strMask_ = ptp.vitems[2].vpars[9];
87  tibVals_.moduleMask_ = ptp.vitems[2].vpars[10];
88  tibVals_.sterMask_ = ptp.vitems[2].vpars[11];
89 
90  // TID: 4
91  tidVals_.sideStartBit_= ptp.vitems[3].vpars[0];
92  tidVals_.wheelStartBit_= ptp.vitems[3].vpars[1];
93  tidVals_.ringStartBit_= ptp.vitems[3].vpars[2];
94  tidVals_.module_fw_bwStartBit_= ptp.vitems[3].vpars[3];
95  tidVals_.moduleStartBit_= ptp.vitems[3].vpars[4];
96  tidVals_.sterStartBit_= ptp.vitems[3].vpars[5];
97  tidVals_.sideMask_= ptp.vitems[3].vpars[6];
98  tidVals_.wheelMask_= ptp.vitems[3].vpars[7];
99  tidVals_.ringMask_= ptp.vitems[3].vpars[8];
100  tidVals_.module_fw_bwMask_= ptp.vitems[3].vpars[9];
101  tidVals_.moduleMask_= ptp.vitems[3].vpars[10];
102  tidVals_.sterMask_= ptp.vitems[3].vpars[11];
103 
104  // TOB: 5
105  tobVals_.layerStartBit_ = ptp.vitems[4].vpars[0];
106  tobVals_.rod_fw_bwStartBit_= ptp.vitems[4].vpars[1];
107  tobVals_.rodStartBit_= ptp.vitems[4].vpars[2];
108  tobVals_.moduleStartBit_= ptp.vitems[4].vpars[3];
109  tobVals_.sterStartBit_= ptp.vitems[4].vpars[4];
110  tobVals_.layerMask_= ptp.vitems[4].vpars[5];
111  tobVals_.rod_fw_bwMask_= ptp.vitems[4].vpars[6];
112  tobVals_.rodMask_= ptp.vitems[4].vpars[7];
113  tobVals_.moduleMask_= ptp.vitems[4].vpars[8];
114  tobVals_.sterMask_= ptp.vitems[4].vpars[9];
115 }
116 
118 
TrackerTopology::TOBValues tobVals_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::vector< Item > vitems
ReturnType produce(const TrackerTopologyRcd &)
~TrackerTopologyEP(void) override
TrackerTopology::TIBValues tibVals_
TrackerTopologyEP(const edm::ParameterSet &)
TrackerTopology::PixelBarrelValues pxbVals_
TrackerTopology::PixelEndcapValues pxfVals_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
unsigned int module_fw_bwStartBit_
TrackerTopology::TIDValues tidVals_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrackerTopology::TECValues tecVals_
void fillParameters(const PTrackerParameters &)
std::unique_ptr< TrackerTopology > ReturnType