CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Friends
GEMELMap Class Reference

#include <GEMELMap.h>

Classes

struct  GEMStripMap
 
struct  GEMVFatMap
 

Public Member Functions

void convert (GEMROmap &romap)
 
void convertDummy (GEMROmap &romap)
 
 GEMELMap ()
 
 GEMELMap (const std::string &version)
 
const std::string & version () const
 
virtual ~GEMELMap ()
 

Public Attributes

std::vector< GEMStripMaptheStripMap_
 
std::vector< GEMVFatMaptheVFatMap_
 

Static Public Attributes

static const int amcBX_ = 25
 
static const int chipIdBits_ = 12
 
static const int chipIdMask_ = 0xfff
 
static const int gebIdBits_ = 5
 
static const int maxChan_ = 128
 
static const int maxGEBs_ = 24
 
static const int maxVFatGE0_ = 12
 
static const int maxVFatGE11_ = 3
 
static const int maxVFatGE21_ = 6
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::string theVersion
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 10 of file GEMELMap.h.

Constructor & Destructor Documentation

◆ GEMELMap() [1/2]

GEMELMap::GEMELMap ( )

Definition at line 5 of file GEMELMap.cc.

5 : theVersion("") {}

◆ GEMELMap() [2/2]

GEMELMap::GEMELMap ( const std::string &  version)
explicit

Definition at line 7 of file GEMELMap.cc.

◆ ~GEMELMap()

GEMELMap::~GEMELMap ( )
virtual

Definition at line 9 of file GEMELMap.cc.

9 {}

Member Function Documentation

◆ convert()

void GEMELMap::convert ( GEMROmap romap)

Definition at line 13 of file GEMELMap.cc.

13  {
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 }

References funct::abs(), GEMROmap::add(), GEMROmap::eCoord::amcId, chipIdMask_, GEMROmap::channelNum::chNum, GEMROmap::eCoord::gebId, GEMROmap::dCoord::gemDetId, GEMROmap::dCoord::iPhi, GEMROmap::stripNum::stNum, theStripMap_, theVFatMap_, GEMROmap::eCoord::vfatId, GEMROmap::dCoord::vfatType, GEMROmap::channelNum::vfatType, and GEMROmap::stripNum::vfatType.

◆ convertDummy()

void GEMELMap::convertDummy ( GEMROmap romap)

Definition at line 48 of file GEMELMap.cc.

48  {
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 }

References GEMROmap::add(), GEMROmap::eCoord::amcId, GEMROmap::channelNum::chNum, GEMROmap::eCoord::gebId, GEMROmap::dCoord::gemDetId, mps_fire::i, GEMROmap::dCoord::iPhi, GEMDetId::maxChamberId, maxChan_, maxGEBs_, GEMDetId::maxLayerId, GEMDetId::maxRollId, GEMDetId::maxStationId, maxVFatGE0_, maxVFatGE11_, maxVFatGE21_, GEMDetId::minStationId, nphi, GEMROmap::stripNum::stNum, GEMROmap::eCoord::vfatId, GEMROmap::dCoord::vfatType, GEMROmap::channelNum::vfatType, and GEMROmap::stripNum::vfatType.

◆ serialize()

template<class Archive >
void GEMELMap::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ version()

const std::string & GEMELMap::version ( ) const

Definition at line 11 of file GEMELMap.cc.

11 { return theVersion; }

References theVersion.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 50 of file GEMELMap.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 50 of file GEMELMap.h.

Member Data Documentation

◆ amcBX_

const int GEMELMap::amcBX_ = 25
static

Definition at line 62 of file GEMELMap.h.

◆ chipIdBits_

const int GEMELMap::chipIdBits_ = 12
static

Definition at line 54 of file GEMELMap.h.

◆ chipIdMask_

const int GEMELMap::chipIdMask_ = 0xfff
static

Definition at line 55 of file GEMELMap.h.

Referenced by convert().

◆ gebIdBits_

const int GEMELMap::gebIdBits_ = 5
static

Definition at line 56 of file GEMELMap.h.

◆ maxChan_

const int GEMELMap::maxChan_ = 128
static

Definition at line 61 of file GEMELMap.h.

Referenced by convertDummy().

◆ maxGEBs_

const int GEMELMap::maxGEBs_ = 24
static

Definition at line 57 of file GEMELMap.h.

Referenced by convertDummy().

◆ maxVFatGE0_

const int GEMELMap::maxVFatGE0_ = 12
static

Definition at line 58 of file GEMELMap.h.

Referenced by convertDummy().

◆ maxVFatGE11_

const int GEMELMap::maxVFatGE11_ = 3
static

Definition at line 59 of file GEMELMap.h.

Referenced by convertDummy().

◆ maxVFatGE21_

const int GEMELMap::maxVFatGE21_ = 6
static

Definition at line 60 of file GEMELMap.h.

Referenced by convertDummy().

◆ theStripMap_

std::vector<GEMStripMap> GEMELMap::theStripMap_

Definition at line 45 of file GEMELMap.h.

Referenced by convert().

◆ theVersion

std::string GEMELMap::theVersion
private

Definition at line 48 of file GEMELMap.h.

Referenced by version().

◆ theVFatMap_

std::vector<GEMVFatMap> GEMELMap::theVFatMap_

Definition at line 44 of file GEMELMap.h.

Referenced by convert().

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
GEMDetId::maxStationId
static constexpr int32_t maxStationId
Definition: GEMDetId.h:27
GEMROmap::stripNum
Definition: GEMROmap.h:53
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:36
nphi
const int nphi
Definition: CMTRawAnalyzer.h:424
GEMROmap::dCoord::vfatType
int vfatType
Definition: GEMROmap.h:26
GEMELMap::maxGEBs_
static const int maxGEBs_
Definition: GEMELMap.h:57
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::theVFatMap_
std::vector< GEMVFatMap > theVFatMap_
Definition: GEMELMap.h:44
GEMROmap::eCoord::amcId
uint16_t amcId
Definition: GEMROmap.h:9
GEMROmap::channelNum::chNum
int chNum
Definition: GEMROmap.h:44
GEMDetId
Definition: GEMDetId.h:18
GEMELMap::chipIdMask_
static const int chipIdMask_
Definition: GEMELMap.h:55
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
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
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