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

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

Definition at line 13 of file OmtfDataWord64.h.

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

Definition at line 13 of file OmtfLinkMappingCsc.h.

Definition at line 12 of file OmtfLinkMappingCsc.h.

Definition at line 18 of file OmtfLinkMappingRpc.h.

Definition at line 25 of file OmtfLinkMappingRpc.h.

typedef uint64_t omtf::Word64

Definition at line 11 of file OmtfDataWord64.h.

Function Documentation

MapCscDet2EleIndex omtf::mapCscDet2EleIndex ( )

Definition at line 67 of file OmtfLinkMappingCsc.cc.

References mapEleIndex2CscDet(), and mps_fire::result.

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

67  {
68 
71 
72  for (const auto & omtf2csc : omtf2cscs) {
73  uint32_t rawId = omtf2csc.second;
74  auto it = result.find(rawId);
75  if (result.end() == it) {
76  result[rawId]=std::make_pair(omtf2csc.first,EleIndex());
77  } else {
78  it->second.second = omtf2csc.first;
79  }
80  }
81 
82  return result;
83 }
MapEleIndex2CscDet mapEleIndex2CscDet()
std::map< EleIndex, CSCDetId > MapEleIndex2CscDet
std::map< uint32_t, std::pair< EleIndex, EleIndex > > MapCscDet2EleIndex
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  {
6 
8  for (unsigned int fed=1380; fed<=1381; fed++) {
9  //Endcap label. 1=forward (+Z); 2=backward (-Z)
10  unsigned int endcap = (fed==1380) ? 2 : 1;
11  for (unsigned int amc=1; amc<=6; amc++) {
12  for (unsigned int link=0; link <=34; link++) {
13  unsigned int stat=0;
14  unsigned int ring=0;
15  unsigned int cham=0;
16  switch (link) {
17  case ( 0) : { stat=1; ring=2; cham=3; break;} // (0, 9, 2, 3 ), --channel_0 OV1A_4 chamber_ME1/2/3 layer_9 input 2, 3
18  case ( 1) : { stat=1; ring=2; cham=4; break;} // (1, 9, 4, 5 ), --channel_1 OV1A_5 chamber_ME1/2/4 layer_9 input 4, 5
19  case ( 2) : { stat=1; ring=2; cham=5; break;} // (2, 9, 6, 7 ), --channel_2 OV1A_6 chamber_ME1/2/5 layer_9 input 6, 7
20  case ( 3) : { stat=1; ring=3; cham=3; break;} // (3, 6, 2, 3 ), --channel_3 OV1A_7 chamber_ME1/3/3 layer_6 input 2, 3
21  case ( 4) : { stat=1; ring=3; cham=4; break;} // (4, 6, 4, 5 ), --channel_4 OV1A_8 chamber_ME1/3/4 layer_6 input 4, 5
22  case ( 5) : { stat=1; ring=3; cham=5; break;} // (5, 6, 6, 7 ), --channel_5 OV1A_9 chamber_ME1/3/5 layer_6 input 6, 7
23  case ( 6) : { stat=1; ring=2; cham=6; break;} // (6, 9, 8, 9 ), --channel_6 OV1B_4 chamber_ME1/2/6 layer_9 input 8, 9
24  case ( 7) : { stat=1; ring=2; cham=7; break;} // (7, 9, 10,11), --channel_7 OV1B_5 chamber_ME1/2/7 layer_9 input 10,11
25  case ( 8) : { stat=1; ring=2; cham=8; break;} // (8, 9, 12,13), --channel_8 OV1B_6 chamber_ME1/2/8 layer_9 input 12,13
26  case ( 9) : { stat=1; ring=3; cham=6; break;} // (9, 6, 8, 9 ), --channel_9 OV1B_7 chamber_ME1/3/6 layer_6 input 8, 9
27  case (10) : { stat=1; ring=3; cham=7; break;} // (10, 6, 10,11), --channel_10 OV1B_8 chamber_ME1/3/7 layer_6 input 10,11
28  case (11) : { stat=1; ring=3; cham=8; break;} // (11, 6, 12,13), --channel_11 OV1B_9 chamber_ME1/3/8 layer_6 input 12,13
29  case (12) : { stat=2; ring=2; cham=3; break;} // (12, 7, 2, 3 ), --channel_0 OV2_4 chamber_ME2/2/3 layer_7 input 2, 3
30  case (13) : { stat=2; ring=2; cham=4; break;} // (13, 7, 4, 5 ), --channel_1 OV2_5 chamber_ME2/2/4 layer_7 input 4, 5
31  case (14) : { stat=2; ring=2; cham=5; break;} // (14, 7, 6, 7 ), --channel_2 OV2_6 chamber_ME2/2/5 layer_7 input 6, 7
32  case (15) : { stat=2; ring=2; cham=6; break;} // (15, 7, 8, 9 ), --channel_3 OV2_7 chamber_ME2/2/6 layer_7 input 8, 9
33  case (16) : { stat=2; ring=2; cham=7; break;} // (16, 7, 10,11), --channel_4 OV2_8 chamber_ME2/2/7 layer_7 input 10,11
34  case (17) : { stat=2; ring=2; cham=8; break;} // (17, 7, 12,13), --channel_5 OV2_9 chamber_ME2/2/8 layer_7 input 12,13
35  case (18) : { stat=3; ring=2; cham=3; break;} // (18, 8, 2, 3 ), --channel_6 OV3_4 chamber_ME3/2/3 layer_8 input 2, 3
36  case (19) : { stat=3; ring=2; cham=4; break;} // (19, 8, 4, 5 ), --channel_7 OV3_5 chamber_ME3/2/4 layer_8 input 4, 5
37  case (20) : { stat=3; ring=2; cham=5; break;} // (20, 8, 6, 7 ), --channel_8 OV3_6 chamber_ME3/2/5 layer_8 input 6, 7
38  case (21) : { stat=3; ring=2; cham=6; break;} // (21, 8, 8, 9 ), --channel_9 OV3_7 chamber_ME3/2/6 layer_8 input 8, 9
39  case (22) : { stat=3; ring=2; cham=7; break;} // (22, 8, 10,11), --channel_10 OV3_8 chamber_ME3/2/7 layer_8 input 10,11
40  case (23) : { stat=3; ring=2; cham=8; break;} // (23, 8, 12,13), --channel_11 OV3_9 chamber_ME3/2/8 layer_8 input 12,13
41  case (24) : { stat=4; ring=2; cham=3; break;} //--(24, , ), --channel_3 OV4_4 chamber_ME4/2/3 layer input
42  case (25) : { stat=4; ring=2; cham=4; break;} //--(25, , ), --channel_4 OV4_5 chamber_ME4/2/4 layer input
43  case (26) : { stat=4; ring=2; cham=5; break;} //--(26, , ), --channel_5 OV4_6 chamber_ME4/2/5 layer input
44  case (27) : { stat=4; ring=2; cham=6; break;} //--(27, , ), --channel_7 OV4_7 chamber_ME4/2/6 layer input
45  case (28) : { stat=4; ring=2; cham=7; break;} //--(28, , ), --channel_8 OV4_8 chamber_ME4/2/7 layer input
46  case (29) : { stat=4; ring=2; cham=8; break;} //--(29, , ), --channel_9 OV4_9 chamber_ME4/2/8 layer input
47  case (30) : { stat=1; ring=2; cham=2; break;} // (30, 9, 0, 1 ), --channel_0 OV1B_6 chamber_ME1/2/2 layer_9 input 0, 1
48  case (31) : { stat=1; ring=3; cham=2; break;} // (31, 6, 0, 1 ), --channel_1 OV1B_9 chamber_ME1/3/2 layer_6 input 0, 1
49  case (32) : { stat=2; ring=2; cham=2; break;} // (32, 7, 0, 1 ), --channel_2 OV2_9 chamber_ME2/2/2 layer_7 input 0, 1
50  case (33) : { stat=3; ring=2; cham=2; break;} // (33, 8, 0, 1 ), --channel_3 ON3_9 chamber_ME3/2/2 layer_8 input 0, 1
51  case (34) : { stat=4; ring=2; cham=2; break;} //--(34, , ), --channel_4 ON4_9 chamber_ME4/2/2 layer input
52  default : { stat=0; ring=0; cham=0; break;}
53  }
54  if (ring !=0) {
55  int chamber = cham+(amc-1)*6;
56  if (chamber > 36) chamber -= 36;
57  CSCDetId cscDetId(endcap, stat, ring, chamber,0);
58  EleIndex omtfEle(fed, amc, link);
59  result[omtfEle]=cscDetId;
60  }
61  }
62  }
63  }
64  return result;
65 }
std::map< EleIndex, CSCDetId > MapEleIndex2CscDet
Definition: AMCSpec.h:8
std::ostream& omtf::operator<< ( std::ostream &  out,
const CscDataWord64 o 
)

Definition at line 4 of file OmtfCscDataWord64.cc.

References omtf::CscDataWord64::bend(), omtf::CscDataWord64::bxNum(), omtf::CscDataWord64::clctPattern(), omtf::CscDataWord64::cscID(), omtf::CscDataWord64::halfStrip(), omtf::CscDataWord64::hitNum(), omtf::CscDataWord64::linkNum(), MillePedeFileConverter_cfg::out, omtf::CscDataWord64::quality(), omtf::CscDataWord64::station(), omtf::CscDataWord64::type(), omtf::DataWord64::type(), omtf::CscDataWord64::valid(), and omtf::CscDataWord64::wireGroup().

4  {
5  out << "CscDataWord64: "
6  <<" type: "<< DataWord64::type(o.type())
7  << " val: "<< o.valid()
8  << " bx: "<<o.bxNum()
9  << " lnk: "<< o.linkNum()
10  << " stat: "<<o.station()
11  << " cscId: " << o.cscID()
12  << " hit: "<< o.hitNum()
13  << " qual: "<< o.quality()
14  << " patt: " << o.clctPattern()
15  << " bending: " << o.bend()
16  << " hs: "<<o.halfStrip()
17  << " wg: "<< o.wireGroup();
18  return out;
19  }
type
Definition: HCALResponse.h:21
std::ostream& omtf::operator<< ( std::ostream &  out,
const DtDataWord64 o 
)

Definition at line 4 of file OmtfDtDataWord64.cc.

References omtf::DtDataWord64::bcnt_e0(), omtf::DtDataWord64::bcnt_e1(), omtf::DtDataWord64::bcnt_st(), omtf::DtDataWord64::bxNum(), omtf::DtDataWord64::eta(), omtf::DtDataWord64::etaQuality(), omtf::DtDataWord64::fiber(), MillePedeFileConverter_cfg::out, omtf::DtDataWord64::phi(), omtf::DtDataWord64::quality(), omtf::DtDataWord64::sector(), omtf::DtDataWord64::station(), omtf::DataWord64::type(), and omtf::DtDataWord64::type().

4  {
5  out << "DtDataWord64: "
6  <<" type: "<< DataWord64::type(o.type())
7  << " bx: "<<o.bxNum()
8  << " station: " << o.station()
9  << " sector: " << o.sector()
10  << " fiber: " << o.fiber()
11  << " phi: "<<o.phi()
12  << " quality: "<<o.quality()
13  << " eta: "<<o.eta()
14  << " etaQ: "<<o.etaQuality()
15  << " bcnt: "<<o.bcnt_st()<<"_"<<o.bcnt_e0()<<"_"<<o.bcnt_e1()
16  << "";
17  return out;
18  }
type
Definition: HCALResponse.h:21
std::ostream& omtf::operator<< ( std::ostream &  out,
const MuonDataWord64 o 
)

Definition at line 6 of file OmtfMuonDataWord64.cc.

References omtf::MuonDataWord64::bxNum(), omtf::MuonDataWord64::eta(), omtf::MuonDataWord64::layers(), MillePedeFileConverter_cfg::out, omtf::MuonDataWord64::phi(), omtf::MuonDataWord64::pT(), omtf::MuonDataWord64::quality(), omtf::DataWord64::type(), and omtf::MuonDataWord64::type().

6  {
7  out << "MuonDataWord64: "
8  <<" type: "<< DataWord64::type(o.type())
9  << " bx: "<<o.bxNum()
10  << " pT: "<<o.pT()
11  << " eta: "<<o.eta()
12  << " phi: "<<o.phi()
13  << " quality: "<<o.quality()
14  << " layers: "<< std::bitset<18>(o.layers())
15  << "";
16  return out;
17  }
type
Definition: HCALResponse.h:21
std::ostream& omtf::operator<< ( std::ostream &  out,
const RpcDataWord64 o 
)

Definition at line 6 of file OmtfRpcDataWrod64.cc.

References omtf::RpcDataWord64::bxNum_, TauDecayModes::dec, omtf::RpcDataWord64::frame1_, omtf::RpcDataWord64::frame2_, omtf::RpcDataWord64::frame3_, omtf::RpcDataWord64::linkNum_, MillePedeFileConverter_cfg::out, omtf::DataWord64::type(), and omtf::RpcDataWord64::type().

6  {
7  out << "RpcDataWord64: "
8  <<" type: "<< DataWord64::type(o.type())
9  << " bx: "<<o.bxNum_
10  << " lnk: "<< o.linkNum_;
11  out << std::hex;
12  out << " frame1: 0x"<< o.frame1_; if (o.frame1_ != 0) out <<" ("<< std::bitset<16>(o.frame1_)<<")";
13  out << " frame2: 0x"<< o.frame2_; if (o.frame2_ != 0) out <<" ("<< std::bitset<16>(o.frame2_)<<")";
14  out << " frame3: 0x"<< o.frame3_; if (o.frame3_ != 0) out <<" ("<< std::bitset<16>(o.frame3_)<<")";
15  out << std::dec;
16  return out;
17  }
type
Definition: HCALResponse.h:21
MapEleIndex2LBIndex omtf::translateOmtf2Pact ( const RpcLinkMap omtfLnks,
const RPCReadOutMapping pactCabling 
)

Definition at line 31 of file OmtfLinkMappingRpc.cc.

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

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

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

Definition at line 57 of file OmtfLinkMappingRpc.cc.

References translateOmtf2Pact().

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

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