CMS 3D CMS Logo

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

#include <ME0EMap.h>

Classes

struct  ME0EMapItem
 
struct  ME0VFatMapInPos
 
struct  ME0VFatMaptype
 

Public Member Functions

ME0ROmapconvert () const
 
ME0ROmapconvertDummy () const
 
 ME0EMap ()
 
 ME0EMap (const std::string &version)
 
const std::string & version () const
 
virtual ~ME0EMap ()
 

Public Attributes

std::vector< ME0EMapItemtheEMapItem
 
std::vector< ME0VFatMapInPostheVFatMapInPos
 
std::vector< ME0VFatMaptypetheVFatMaptype
 

Private Member Functions

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

Private Attributes

std::string theVersion
 

Static Private Attributes

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 maxVFat_ = 12
 

Friends

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

Detailed Description

Definition at line 10 of file ME0EMap.h.

Constructor & Destructor Documentation

ME0EMap::ME0EMap ( )

Definition at line 5 of file ME0EMap.cc.

5  :
6  theVersion("") {}
std::string theVersion
Definition: ME0EMap.h:54
ME0EMap::ME0EMap ( const std::string &  version)
explicit

Definition at line 8 of file ME0EMap.cc.

8  :
const std::string & version() const
Definition: ME0EMap.cc:13
std::string theVersion
Definition: ME0EMap.h:54
ME0EMap::~ME0EMap ( )
virtual

Definition at line 11 of file ME0EMap.cc.

11 {}

Member Function Documentation

ME0ROmap * ME0EMap::convert ( ) const

Definition at line 17 of file ME0EMap.cc.

References ME0ROmap::add(), ME0ROmap::eCoord::channelId, chipIdMask_, RecoEcal_EventContent_cff::ec, maxChan_, maxVFat_, ME0ROmap::dCoord::me0DetId, ME0ROmap::dCoord::stripId, theVFatMaptype, and ME0ROmap::eCoord::vfatId.

17  {
18  ME0ROmap* romap=new ME0ROmap();
19 
20  for (auto imap : theVFatMaptype){
21  for (unsigned int ix=0;ix<imap.strip_number.size();ix++){
23  ec.vfatId= imap.vfatId[ix] & chipIdMask_;// chip ID is 12 bits
24  ec.channelId=imap.vfat_chnnel_number[ix];
26  dc.stripId = 1 + imap.strip_number[ix]+(imap.iPhi[ix]-1)%maxVFat_*maxChan_;
27  dc.me0DetId = ME0DetId(imap.z_direction[ix], imap.depth[ix], imap.sec[ix], imap.iEta[ix]);
28  romap->add(ec,dc);
29  romap->add(dc,ec);
30  }
31  }
32  return romap;
33 }
static const int maxChan_
Definition: ME0EMap.h:64
std::vector< ME0VFatMaptype > theVFatMaptype
Definition: ME0EMap.h:50
static const int maxVFat_
Definition: ME0EMap.h:63
void add(eCoord e, dCoord d)
Definition: ME0ROmap.h:39
ME0DetId me0DetId
Definition: ME0ROmap.h:22
static const int chipIdMask_
Definition: ME0EMap.h:60
uint32_t vfatId
Definition: ME0ROmap.h:10
ME0ROmap * ME0EMap::convertDummy ( ) const

Definition at line 35 of file ME0EMap.cc.

References ME0ROmap::add(), ME0ROmap::addAMC(), ME0ROmap::addAMC2GEB(), officialStyle::chan, ME0ROmap::eCoord::channelId, chipIdBits_, RecoEcal_EventContent_cff::ec, gebIdBits_, ME0DetId::maxChamberId, maxChan_, maxGEBs_, ME0DetId::maxLayerId, ME0DetId::maxRollId, maxVFat_, ME0ROmap::dCoord::me0DetId, ME0DetId::minChamberId, ME0ROmap::dCoord::stripId, and ME0ROmap::eCoord::vfatId.

35  {
36  ME0ROmap* romap=new ME0ROmap();
37  uint16_t amcId = 1; //amc
38  uint16_t gebId = 1;
39  romap->addAMC(amcId);
40 
41  for (int re = -1; re <= 1; re = re+2) {
42  for (int ch = ME0DetId::minChamberId; ch<=ME0DetId::maxChamberId; ++ch) {
43  for (int ly = 1; ly<=ME0DetId::maxLayerId; ++ly) {
44 
45  // 1 geb per chamber
46  // 24 gebs per amc
47  // make new amcId once 24 gebs are used up
48  if (gebId > maxGEBs_){
49  gebId = 1;
50  amcId++;
51  romap->addAMC(amcId);
52  }
53 
54  romap->addAMC2GEB(amcId, gebId);
55 
56  ME0DetId chamDetId(re, ly, ch, 0);
57  uint32_t chamberId = (amcId << gebIdBits_) | gebId;
58  romap->add(chamDetId,chamberId);
59  romap->add(chamberId,chamDetId);
60 
61  uint16_t chipId = 0;
62  for (int roll = 1; roll<=ME0DetId::maxRollId; ++roll) {
63  int stripId = 0;
64  ME0DetId me0Id(re, ly, ch, roll);
65 
66  for (int nVfat = 0; nVfat < maxVFat_; ++nVfat){
67  chipId++;
68 
69  for (unsigned chan = 0; chan < maxChan_; ++chan){
71  dc.stripId = ++stripId;
72  dc.me0DetId = me0Id;
73 
74  // make 1 full vfat ID from amc + geb + chip Ids
75  uint32_t vfatId = (amcId << (gebIdBits_+chipIdBits_)) | (gebId << chipIdBits_) | chipId;
76 
78  ec.vfatId = vfatId;
79  ec.channelId = chan;
80  romap->add(ec,dc);
81  romap->add(dc,ec);
82 
83  }
84  }
85  }
86  gebId++;
87 
88  }
89  }
90  }
91 
92  return romap;
93 }
static const int minChamberId
Definition: ME0DetId.h:89
static const int maxChamberId
Definition: ME0DetId.h:90
static const int maxRollId
Definition: ME0DetId.h:96
static const int chipIdBits_
Definition: ME0EMap.h:59
void addAMC(uint16_t d)
Definition: ME0ROmap.h:50
static const int maxChan_
Definition: ME0EMap.h:64
static const int maxVFat_
Definition: ME0EMap.h:63
void add(eCoord e, dCoord d)
Definition: ME0ROmap.h:39
ME0DetId me0DetId
Definition: ME0ROmap.h:22
static const int gebIdBits_
Definition: ME0EMap.h:61
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
static const int maxGEBs_
Definition: ME0EMap.h:62
static const int maxLayerId
Definition: ME0DetId.h:93
uint32_t vfatId
Definition: ME0ROmap.h:10
void addAMC2GEB(uint16_t d, uint16_t c)
Definition: ME0ROmap.h:53
template<class Archive >
void ME0EMap::serialize ( Archive &  ar,
const unsigned int  version 
)
private
const std::string & ME0EMap::version ( ) const

Definition at line 13 of file ME0EMap.cc.

References theVersion.

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

13  {
14  return theVersion;
15 }
std::string theVersion
Definition: ME0EMap.h:54

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 56 of file ME0EMap.h.

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

Definition at line 56 of file ME0EMap.h.

Member Data Documentation

const int ME0EMap::chipIdBits_ = 12
staticprivate

Definition at line 59 of file ME0EMap.h.

Referenced by convertDummy().

const int ME0EMap::chipIdMask_ = 0xfff
staticprivate

Definition at line 60 of file ME0EMap.h.

Referenced by convert().

const int ME0EMap::gebIdBits_ = 5
staticprivate

Definition at line 61 of file ME0EMap.h.

Referenced by convertDummy().

const int ME0EMap::maxChan_ = 128
staticprivate

Definition at line 64 of file ME0EMap.h.

Referenced by convert(), and convertDummy().

const int ME0EMap::maxGEBs_ = 24
staticprivate

Definition at line 62 of file ME0EMap.h.

Referenced by convertDummy().

const int ME0EMap::maxVFat_ = 12
staticprivate

Definition at line 63 of file ME0EMap.h.

Referenced by convert(), and convertDummy().

std::vector<ME0EMapItem> ME0EMap::theEMapItem

Definition at line 49 of file ME0EMap.h.

std::string ME0EMap::theVersion
private

Definition at line 54 of file ME0EMap.h.

Referenced by version().

std::vector<ME0VFatMapInPos> ME0EMap::theVFatMapInPos

Definition at line 51 of file ME0EMap.h.

std::vector<ME0VFatMaptype> ME0EMap::theVFatMaptype

Definition at line 50 of file ME0EMap.h.

Referenced by convert().