CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions
omtf Namespace Reference

Namespaces

 DataWord64
 

Classes

class  CscDataWord64
 
class  CscPacker
 
class  CscUnpacker
 
class  DtDataWord64
 
class  DtPacker
 
class  DtUnpacker
 
class  EleIndex
 
struct  lessLinkBoardElectronicIndex
 
class  MuonDataWord64
 
class  MuonUnpacker
 
class  OmtfPacker
 
class  OmtfUnpacker
 
class  RpcDataWord64
 
class  RpcLinkMap
 
class  RpcPacker
 
class  RpcUnpacker
 

Typedefs

typedef std::map< std::pair< unsigned int, unsigned int >, std::vector< Word64 > > FedAmcRawsMap
 
typedef std::map< uint32_t, std::pair< EleIndex, EleIndex > > MapCscDet2EleIndex
 
typedef std::map< EleIndex, CSCDetIdMapEleIndex2CscDet
 
typedef std::map< EleIndex, LinkBoardElectronicIndexMapEleIndex2LBIndex
 
typedef std::map< LinkBoardElectronicIndex, std::pair< EleIndex, EleIndex >, lessLinkBoardElectronicIndexMapLBIndex2EleIndex
 
typedef uint64_t Word64
 

Functions

MapCscDet2EleIndex mapCscDet2EleIndex ()
 
MapEleIndex2CscDet mapEleIndex2CscDet ()
 
std::ostream & operator<< (std::ostream &out, const CscDataWord64 &o)
 
std::ostream & operator<< (std::ostream &out, const DtDataWord64 &o)
 
std::ostream & operator<< (std::ostream &out, const MuonDataWord64 &o)
 
std::ostream & operator<< (std::ostream &out, const RpcDataWord64 &o)
 
MapEleIndex2LBIndex translateOmtf2Pact (const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
 
MapLBIndex2EleIndex translatePact2Omtf (const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)
 

Typedef Documentation

◆ FedAmcRawsMap

typedef std::map<std::pair<unsigned int, unsigned int>, std::vector<Word64> > omtf::FedAmcRawsMap

Definition at line 13 of file OmtfDataWord64.h.

◆ MapCscDet2EleIndex

typedef std::map<uint32_t, std::pair<EleIndex, EleIndex> > omtf::MapCscDet2EleIndex

Definition at line 12 of file OmtfLinkMappingCsc.h.

◆ MapEleIndex2CscDet

Definition at line 11 of file OmtfLinkMappingCsc.h.

◆ MapEleIndex2LBIndex

Definition at line 18 of file OmtfLinkMappingRpc.h.

◆ MapLBIndex2EleIndex

Definition at line 27 of file OmtfLinkMappingRpc.h.

◆ Word64

typedef uint64_t omtf::Word64

Definition at line 11 of file OmtfDataWord64.h.

Function Documentation

◆ mapCscDet2EleIndex()

MapCscDet2EleIndex omtf::mapCscDet2EleIndex ( )

Definition at line 247 of file OmtfLinkMappingCsc.cc.

References mapEleIndex2CscDet(), and mps_fire::result.

Referenced by omtf::CscPacker::init().

247  {
250 
251  for (const auto& omtf2csc : omtf2cscs) {
252  uint32_t rawId = omtf2csc.second;
253  auto it = result.find(rawId);
254  if (result.end() == it) {
255  result[rawId] = std::make_pair(omtf2csc.first, EleIndex());
256  } else {
257  it->second.second = omtf2csc.first;
258  }
259  }
260 
261  return result;
262  }
std::map< uint32_t, std::pair< EleIndex, EleIndex > > MapCscDet2EleIndex
MapEleIndex2CscDet mapEleIndex2CscDet()
std::map< EleIndex, CSCDetId > MapEleIndex2CscDet

◆ mapEleIndex2CscDet()

MapEleIndex2CscDet omtf::mapEleIndex2CscDet ( )

Definition at line 5 of file OmtfLinkMappingCsc.cc.

References relativeConstraints::cham, relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, mps_fire::result, and relativeConstraints::ring.

Referenced by omtf::CscUnpacker::init(), and mapCscDet2EleIndex().

5  {
7  for (unsigned int fed = 1380; fed <= 1381; fed++) {
8  //Endcap label. 1=forward (+Z); 2=backward (-Z)
9  unsigned int endcap = (fed == 1380) ? 2 : 1;
10  for (unsigned int amc = 1; amc <= 6; amc++) {
11  for (unsigned int link = 0; link <= 34; link++) {
12  unsigned int stat = 0;
13  unsigned int ring = 0;
14  unsigned int cham = 0;
15  switch (link) {
16  case (0): {
17  stat = 1;
18  ring = 2;
19  cham = 3;
20  break;
21  } // (0, 9, 2, 3 ), --channel_0 OV1A_4 chamber_ME1/2/3 layer_9 input 2, 3
22  case (1): {
23  stat = 1;
24  ring = 2;
25  cham = 4;
26  break;
27  } // (1, 9, 4, 5 ), --channel_1 OV1A_5 chamber_ME1/2/4 layer_9 input 4, 5
28  case (2): {
29  stat = 1;
30  ring = 2;
31  cham = 5;
32  break;
33  } // (2, 9, 6, 7 ), --channel_2 OV1A_6 chamber_ME1/2/5 layer_9 input 6, 7
34  case (3): {
35  stat = 1;
36  ring = 3;
37  cham = 3;
38  break;
39  } // (3, 6, 2, 3 ), --channel_3 OV1A_7 chamber_ME1/3/3 layer_6 input 2, 3
40  case (4): {
41  stat = 1;
42  ring = 3;
43  cham = 4;
44  break;
45  } // (4, 6, 4, 5 ), --channel_4 OV1A_8 chamber_ME1/3/4 layer_6 input 4, 5
46  case (5): {
47  stat = 1;
48  ring = 3;
49  cham = 5;
50  break;
51  } // (5, 6, 6, 7 ), --channel_5 OV1A_9 chamber_ME1/3/5 layer_6 input 6, 7
52  case (6): {
53  stat = 1;
54  ring = 2;
55  cham = 6;
56  break;
57  } // (6, 9, 8, 9 ), --channel_6 OV1B_4 chamber_ME1/2/6 layer_9 input 8, 9
58  case (7): {
59  stat = 1;
60  ring = 2;
61  cham = 7;
62  break;
63  } // (7, 9, 10,11), --channel_7 OV1B_5 chamber_ME1/2/7 layer_9 input 10,11
64  case (8): {
65  stat = 1;
66  ring = 2;
67  cham = 8;
68  break;
69  } // (8, 9, 12,13), --channel_8 OV1B_6 chamber_ME1/2/8 layer_9 input 12,13
70  case (9): {
71  stat = 1;
72  ring = 3;
73  cham = 6;
74  break;
75  } // (9, 6, 8, 9 ), --channel_9 OV1B_7 chamber_ME1/3/6 layer_6 input 8, 9
76  case (10): {
77  stat = 1;
78  ring = 3;
79  cham = 7;
80  break;
81  } // (10, 6, 10,11), --channel_10 OV1B_8 chamber_ME1/3/7 layer_6 input 10,11
82  case (11): {
83  stat = 1;
84  ring = 3;
85  cham = 8;
86  break;
87  } // (11, 6, 12,13), --channel_11 OV1B_9 chamber_ME1/3/8 layer_6 input 12,13
88  case (12): {
89  stat = 2;
90  ring = 2;
91  cham = 3;
92  break;
93  } // (12, 7, 2, 3 ), --channel_0 OV2_4 chamber_ME2/2/3 layer_7 input 2, 3
94  case (13): {
95  stat = 2;
96  ring = 2;
97  cham = 4;
98  break;
99  } // (13, 7, 4, 5 ), --channel_1 OV2_5 chamber_ME2/2/4 layer_7 input 4, 5
100  case (14): {
101  stat = 2;
102  ring = 2;
103  cham = 5;
104  break;
105  } // (14, 7, 6, 7 ), --channel_2 OV2_6 chamber_ME2/2/5 layer_7 input 6, 7
106  case (15): {
107  stat = 2;
108  ring = 2;
109  cham = 6;
110  break;
111  } // (15, 7, 8, 9 ), --channel_3 OV2_7 chamber_ME2/2/6 layer_7 input 8, 9
112  case (16): {
113  stat = 2;
114  ring = 2;
115  cham = 7;
116  break;
117  } // (16, 7, 10,11), --channel_4 OV2_8 chamber_ME2/2/7 layer_7 input 10,11
118  case (17): {
119  stat = 2;
120  ring = 2;
121  cham = 8;
122  break;
123  } // (17, 7, 12,13), --channel_5 OV2_9 chamber_ME2/2/8 layer_7 input 12,13
124  case (18): {
125  stat = 3;
126  ring = 2;
127  cham = 3;
128  break;
129  } // (18, 8, 2, 3 ), --channel_6 OV3_4 chamber_ME3/2/3 layer_8 input 2, 3
130  case (19): {
131  stat = 3;
132  ring = 2;
133  cham = 4;
134  break;
135  } // (19, 8, 4, 5 ), --channel_7 OV3_5 chamber_ME3/2/4 layer_8 input 4, 5
136  case (20): {
137  stat = 3;
138  ring = 2;
139  cham = 5;
140  break;
141  } // (20, 8, 6, 7 ), --channel_8 OV3_6 chamber_ME3/2/5 layer_8 input 6, 7
142  case (21): {
143  stat = 3;
144  ring = 2;
145  cham = 6;
146  break;
147  } // (21, 8, 8, 9 ), --channel_9 OV3_7 chamber_ME3/2/6 layer_8 input 8, 9
148  case (22): {
149  stat = 3;
150  ring = 2;
151  cham = 7;
152  break;
153  } // (22, 8, 10,11), --channel_10 OV3_8 chamber_ME3/2/7 layer_8 input 10,11
154  case (23): {
155  stat = 3;
156  ring = 2;
157  cham = 8;
158  break;
159  } // (23, 8, 12,13), --channel_11 OV3_9 chamber_ME3/2/8 layer_8 input 12,13
160  case (24): {
161  stat = 4;
162  ring = 2;
163  cham = 3;
164  break;
165  } //--(24, , ), --channel_3 OV4_4 chamber_ME4/2/3 layer input
166  case (25): {
167  stat = 4;
168  ring = 2;
169  cham = 4;
170  break;
171  } //--(25, , ), --channel_4 OV4_5 chamber_ME4/2/4 layer input
172  case (26): {
173  stat = 4;
174  ring = 2;
175  cham = 5;
176  break;
177  } //--(26, , ), --channel_5 OV4_6 chamber_ME4/2/5 layer input
178  case (27): {
179  stat = 4;
180  ring = 2;
181  cham = 6;
182  break;
183  } //--(27, , ), --channel_7 OV4_7 chamber_ME4/2/6 layer input
184  case (28): {
185  stat = 4;
186  ring = 2;
187  cham = 7;
188  break;
189  } //--(28, , ), --channel_8 OV4_8 chamber_ME4/2/7 layer input
190  case (29): {
191  stat = 4;
192  ring = 2;
193  cham = 8;
194  break;
195  } //--(29, , ), --channel_9 OV4_9 chamber_ME4/2/8 layer input
196  case (30): {
197  stat = 1;
198  ring = 2;
199  cham = 2;
200  break;
201  } // (30, 9, 0, 1 ), --channel_0 OV1B_6 chamber_ME1/2/2 layer_9 input 0, 1
202  case (31): {
203  stat = 1;
204  ring = 3;
205  cham = 2;
206  break;
207  } // (31, 6, 0, 1 ), --channel_1 OV1B_9 chamber_ME1/3/2 layer_6 input 0, 1
208  case (32): {
209  stat = 2;
210  ring = 2;
211  cham = 2;
212  break;
213  } // (32, 7, 0, 1 ), --channel_2 OV2_9 chamber_ME2/2/2 layer_7 input 0, 1
214  case (33): {
215  stat = 3;
216  ring = 2;
217  cham = 2;
218  break;
219  } // (33, 8, 0, 1 ), --channel_3 ON3_9 chamber_ME3/2/2 layer_8 input 0, 1
220  case (34): {
221  stat = 4;
222  ring = 2;
223  cham = 2;
224  break;
225  } //--(34, , ), --channel_4 ON4_9 chamber_ME4/2/2 layer input
226  default: {
227  stat = 0;
228  ring = 0;
229  cham = 0;
230  break;
231  }
232  }
233  if (ring != 0) {
234  int chamber = cham + (amc - 1) * 6;
235  if (chamber > 36)
236  chamber -= 36;
237  CSCDetId cscDetId(endcap, stat, ring, chamber, 0);
238  EleIndex omtfEle(fed, amc, link);
239  result[omtfEle] = cscDetId;
240  }
241  }
242  }
243  }
244  return result;
245  }
std::map< EleIndex, CSCDetId > MapEleIndex2CscDet
Definition: AMCSpec.h:8

◆ operator<<() [1/4]

std::ostream& omtf::operator<< ( std::ostream &  out,
const CscDataWord64 o 
)

Definition at line 4 of file OmtfCscDataWord64.cc.

References EcalTangentSkim_cfg::o, MillePedeFileConverter_cfg::out, and omtf::DataWord64::type().

4  {
5  out << "CscDataWord64: "
6  << " type: " << DataWord64::type(o.type()) << " val: " << o.valid() << " bx: " << o.bxNum()
7  << " lnk: " << o.linkNum() << " stat: " << o.station() << " cscId: " << o.cscID() << " hit: " << o.hitNum()
8  << " qual: " << o.quality() << " patt: " << o.clctPattern() << " bending: " << o.bend()
9  << " hs: " << o.halfStrip() << " wg: " << o.wireGroup();
10  return out;
11  }

◆ operator<<() [2/4]

std::ostream& omtf::operator<< ( std::ostream &  out,
const DtDataWord64 o 
)

Definition at line 4 of file OmtfDtDataWord64.cc.

References EcalTangentSkim_cfg::o, MillePedeFileConverter_cfg::out, and omtf::DataWord64::type().

4  {
5  out << "DtDataWord64: "
6  << " type: " << DataWord64::type(o.type()) << " bx: " << o.bxNum() << " station: " << o.station()
7  << " sector: " << o.sector() << " fiber: " << o.fiber() << " phi: " << o.phi() << " quality: " << o.quality()
8  << " eta: " << o.eta() << " etaQ: " << o.etaQuality() << " bcnt: " << o.bcnt_st() << "_" << o.bcnt_e0() << "_"
9  << o.bcnt_e1() << "";
10  return out;
11  }

◆ operator<<() [3/4]

std::ostream& omtf::operator<< ( std::ostream &  out,
const MuonDataWord64 o 
)

Definition at line 6 of file OmtfMuonDataWord64.cc.

References EcalTangentSkim_cfg::o, MillePedeFileConverter_cfg::out, and omtf::DataWord64::type().

6  {
7  out << "MuonDataWord64: "
8  << " type: " << DataWord64::type(o.type()) << " bx: " << o.bxNum() << " pT: " << o.pT() << " eta: " << o.eta()
9  << " phi: " << o.phi() << " quality: " << o.quality() << " layers: " << std::bitset<18>(o.layers()) << "";
10  return out;
11  }

◆ operator<<() [4/4]

std::ostream& omtf::operator<< ( std::ostream &  out,
const RpcDataWord64 o 
)

Definition at line 6 of file OmtfRpcDataWrod64.cc.

References TauDecayModes::dec, if(), EcalTangentSkim_cfg::o, MillePedeFileConverter_cfg::out, and omtf::DataWord64::type().

6  {
7  out << "RpcDataWord64: "
8  << " type: " << DataWord64::type(o.type()) << " bx: " << o.bxNum_ << " lnk: " << o.linkNum_;
9  out << std::hex;
10  out << " frame1: 0x" << o.frame1_;
11  if (o.frame1_ != 0)
12  out << " (" << std::bitset<16>(o.frame1_) << ")";
13  out << " frame2: 0x" << o.frame2_;
14  if (o.frame2_ != 0)
15  out << " (" << std::bitset<16>(o.frame2_) << ")";
16  out << " frame3: 0x" << o.frame3_;
17  if (o.frame3_ != 0)
18  out << " (" << std::bitset<16>(o.frame3_) << ")";
19  out << std::dec;
20  return out;
21  }

◆ translateOmtf2Pact()

MapEleIndex2LBIndex omtf::translateOmtf2Pact ( const RpcLinkMap omtfLnks,
const RPCReadOutMapping pactCabling 
)

Definition at line 33 of file OmtfLinkMappingRpc.cc.

References LinkBoardElectronicIndex::dccInputChannelNum, RPCReadOutMapping::dccList(), heavyFlavorDQMFirstStep_cff::lbName, electronStore::links, LogTrace, omtf::RpcLinkMap::omtfEleIndex(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by omtf::RpcUnpacker::init(), and translatePact2Omtf().

33  {
34  MapEleIndex2LBIndex omtf2rpc;
35 
36  std::vector<const DccSpec*> dccs = pactCabling->dccList();
37  for (auto it1 : dccs) {
38  const std::vector<TriggerBoardSpec>& rmbs = it1->triggerBoards();
39  for (auto const& it2 : rmbs) {
40  const std::vector<LinkConnSpec>& links = it2.linkConns();
41  for (auto const& it3 : links) {
42  const std::vector<LinkBoardSpec>& lbs = it3.linkBoards();
43  for (std::vector<LinkBoardSpec>::const_iterator it4 = lbs.begin(); it4 != lbs.end(); ++it4) {
44  std::string lbNameCH = it4->linkBoardName();
45  std::string lbName = lbNameCH.substr(0, lbNameCH.size() - 4);
46  std::vector<EleIndex> omtfEles = omtfLink2Ele.omtfEleIndex(lbName);
47  // if (!omtfEles.empty()) std::cout <<" isOK ! " << it4->linkBoardName() <<" has: " << omtfEles.size() << " first: "<< omtfEles[0] << std::endl;
48  LinkBoardElectronicIndex rpcEle = {
49  it1->id(), it2.dccInputChannelNum(), it3.triggerBoardInputNumber(), it4->linkBoardNumInLink()};
50  for (const auto& omtfEle : omtfEles)
51  omtf2rpc[omtfEle] = rpcEle;
52  }
53  }
54  }
55  }
56  LogTrace(" ") << " SIZE OF OMTF to RPC map TRANSLATION is: " << omtf2rpc.size() << std::endl;
57  return omtf2rpc;
58  }
std::map< EleIndex, LinkBoardElectronicIndex > MapEleIndex2LBIndex
#define LogTrace(id)
std::vector< const DccSpec * > dccList() const
all FEDs in map

◆ translatePact2Omtf()

MapLBIndex2EleIndex omtf::translatePact2Omtf ( const RpcLinkMap omtfLnks,
const RPCReadOutMapping pactCabling 
)

Definition at line 60 of file OmtfLinkMappingRpc.cc.

References if(), and translateOmtf2Pact().

Referenced by omtf::RpcPacker::init().

60  {
61  MapLBIndex2EleIndex pact2omtfs;
62  MapEleIndex2LBIndex omtf2rpcs = translateOmtf2Pact(omtfLink2Ele, pactCabling);
63  for (const auto& omtf2rpc : omtf2rpcs) {
64  std::pair<EleIndex, EleIndex>& omtfs = pact2omtfs[omtf2rpc.second];
65  if (omtfs.first.fed() == 0)
66  omtfs.first = omtf2rpc.first;
67  else if (omtfs.second.fed() == 0)
68  omtfs.second = omtf2rpc.first;
69  else
70  edm::LogError(" translatePact2Omtf ") << " PROBLEM LinkBoardElectronicIndex already USED!!!! ";
71  }
72  return pact2omtfs;
73  }
std::map< LinkBoardElectronicIndex, std::pair< EleIndex, EleIndex >, lessLinkBoardElectronicIndex > MapLBIndex2EleIndex
std::map< EleIndex, LinkBoardElectronicIndex > MapEleIndex2LBIndex
MapEleIndex2LBIndex translateOmtf2Pact(const RpcLinkMap &omtfLnks, const RPCReadOutMapping *pactCabling)