CMS 3D CMS Logo

GEMELMap.cc
Go to the documentation of this file.
4 
5 GEMELMap::GEMELMap() : theVersion("") {}
6 
7 GEMELMap::GEMELMap(const std::string& version) : theVersion(version) {}
8 
10 
11 const std::string& GEMELMap::version() const { return theVersion; }
12 
14  for (auto imap : theVFatMap_) {
15  for (unsigned int ix = 0; ix < imap.vfatId.size(); ix++) {
17  ec.vfatId = imap.vfatId[ix] & chipIdMask_;
18  ec.gebId = imap.gebId[ix];
19  ec.amcId = imap.amcId[ix];
20 
21  int st = std::abs(imap.z_direction[ix]);
23  dc.gemDetId = GEMDetId(imap.z_direction[ix], 1, st, imap.depth[ix], imap.sec[ix], imap.iEta[ix]);
24  dc.vfatType = imap.vfatType[ix];
25  dc.iPhi = imap.iPhi[ix];
26 
27  romap.add(ec, dc);
28  romap.add(dc, ec);
29  }
30  }
31 
32  for (auto imap : theStripMap_) {
33  for (unsigned int ix = 0; ix < imap.vfatType.size(); ix++) {
35  cMap.vfatType = imap.vfatType[ix];
36  cMap.chNum = imap.vfatCh[ix];
37 
38  GEMROmap::stripNum sMap;
39  sMap.vfatType = imap.vfatType[ix];
40  sMap.stNum = imap.vfatStrip[ix];
41 
42  romap.add(cMap, sMap);
43  romap.add(sMap, cMap);
44  }
45  }
46 }
47 
49  // 12 bits for vfat, 5 bits for geb, 8 bit long GLIB serial number
50  uint16_t amcId = 1; //amc
51  uint16_t gebId = 0;
52 
53  for (int re = -1; re <= 1; re = re + 2) {
54  for (int st = GEMDetId::minStationId; st <= GEMDetId::maxStationId; ++st) {
55  int maxVFat = maxVFatGE11_;
56  if (st == 2)
57  maxVFat = maxVFatGE21_;
58  if (st == 0)
59  maxVFat = maxVFatGE0_;
60 
61  for (int ch = 1; ch <= GEMDetId::maxChamberId; ++ch) {
62  for (int ly = 1; ly <= GEMDetId::maxLayerId; ++ly) {
63  // 1 geb per chamber
64  gebId++;
65  uint16_t chipId = 0;
66  for (int roll = 1; roll <= GEMDetId::maxRollId; ++roll) {
67  GEMDetId gemId(re, 1, st, ly, ch, roll);
68 
69  for (int nphi = 1; nphi <= maxVFat; ++nphi) {
70  chipId++;
71 
73  ec.vfatId = chipId;
74  ec.gebId = gebId;
75  ec.amcId = amcId;
76 
78  dc.gemDetId = gemId;
79  dc.vfatType = 1;
80  dc.iPhi = nphi;
81 
82  romap.add(ec, dc);
83  romap.add(dc, ec);
84  }
85  }
86  // 5 bits for geb
87  if (gebId == maxGEBs_) {
88  // 24 gebs per amc
89  gebId = 0;
90  amcId++;
91  }
92  }
93  }
94  }
95  }
96 
97  for (int i = 0; i < maxChan_; ++i) {
98  // only 1 vfat type for dummy map
100  cMap.vfatType = 1;
101  cMap.chNum = i;
102 
103  GEMROmap::stripNum sMap;
104  sMap.vfatType = 1;
105  sMap.stNum = i + 1;
106 
107  romap.add(cMap, sMap);
108  romap.add(sMap, cMap);
109  }
110 }
GEMELMap::maxVFatGE21_
static const int maxVFatGE21_
Definition: GEMELMap.h:60
GEMROmap::stripNum::vfatType
int vfatType
Definition: GEMROmap.h:54
mps_fire.i
i
Definition: mps_fire.py:428
GEMELMap::maxVFatGE0_
static const int maxVFatGE0_
Definition: GEMELMap.h:58
GEMELMap::maxChan_
static const int maxChan_
Definition: GEMELMap.h:61
GEMELMap::theStripMap_
std::vector< GEMStripMap > theStripMap_
Definition: GEMELMap.h:45
GEMROmap.h
GEMDetId::maxStationId
static constexpr int32_t maxStationId
Definition: GEMDetId.h:27
GEMROmap::stripNum
Definition: GEMROmap.h:53
GEMELMap.h
GEMROmap::dCoord::gemDetId
GEMDetId gemDetId
Definition: GEMROmap.h:27
GEMROmap::dCoord::iPhi
int iPhi
Definition: GEMROmap.h:28
GEMDetId::maxRollId
static constexpr int32_t maxRollId
Definition: GEMDetId.h:34
nphi
const int nphi
Definition: CMTRawAnalyzer.h:424
GEMELMap::convert
void convert(GEMROmap &romap)
Definition: GEMELMap.cc:13
GEMROmap::dCoord::vfatType
int vfatType
Definition: GEMROmap.h:26
GEMELMap::maxGEBs_
static const int maxGEBs_
Definition: GEMELMap.h:57
GEMROmap
Definition: GEMROmap.h:6
GEMELMap::GEMELMap
GEMELMap()
Definition: GEMELMap.cc:5
GEMELMap::theVersion
std::string theVersion
Definition: GEMELMap.h:48
GEMROmap::dCoord
Definition: GEMROmap.h:25
GEMDetId::maxChamberId
static constexpr int32_t maxChamberId
Definition: GEMDetId.h:29
GEMELMap::version
const std::string & version() const
Definition: GEMELMap.cc:11
GEMELMap::convertDummy
void convertDummy(GEMROmap &romap)
Definition: GEMELMap.cc:48
GEMELMap::theVFatMap_
std::vector< GEMVFatMap > theVFatMap_
Definition: GEMELMap.h:44
GEMROmap::eCoord::amcId
uint16_t amcId
Definition: GEMROmap.h:9
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GEMROmap::channelNum::chNum
int chNum
Definition: GEMROmap.h:44
GEMDetId
Definition: GEMDetId.h:18
GEMELMap::chipIdMask_
static const int chipIdMask_
Definition: GEMELMap.h:55
GEMDetId.h
GEMROmap::channelNum::vfatType
int vfatType
Definition: GEMROmap.h:43
GEMDetId::maxLayerId
static constexpr int32_t maxLayerId
Definition: GEMDetId.h:32
GEMROmap::stripNum::stNum
int stNum
Definition: GEMROmap.h:55
GEMROmap::channelNum
Definition: GEMROmap.h:42
GEMELMap::~GEMELMap
virtual ~GEMELMap()
Definition: GEMELMap.cc:9
GEMDetId::minStationId
static constexpr int32_t minStationId
Definition: GEMDetId.h:25
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GEMROmap::add
void add(eCoord e, dCoord d)
Definition: GEMROmap.h:70
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
GEMROmap::eCoord
Definition: GEMROmap.h:8
GEMELMap::maxVFatGE11_
static const int maxVFatGE11_
Definition: GEMELMap.h:59
GEMROmap::eCoord::vfatId
uint16_t vfatId
Definition: GEMROmap.h:11
GEMROmap::eCoord::gebId
uint16_t gebId
Definition: GEMROmap.h:10