CMS 3D CMS Logo

RPCStripsRing.h
Go to the documentation of this file.
1 #ifndef L1Trigger_RPCConeBuilder_RPCStripsRing_h
2 #define L1Trigger_RPCConeBuilder_RPCStripsRing_h
3 // -*- C++ -*-
4 //
5 // Package: RPCConeBuilder
6 // Class : RPCStripsRing
7 //
16 //
17 // Original Author: Tomasz Fruboes
18 // Created: Tue Feb 26 15:13:17 CET 2008
19 //
20 
21 #include <map>
22 #include <vector>
24 
25 class RPCRoll;
26 
27 // XXX TODO: move into namespace?
28 struct TStrip {
29  TStrip() : m_detRawId(0), m_strip(0){};
30  TStrip(int rawId, int stripNo) : m_detRawId(rawId), m_strip(stripNo){};
31  bool isVirtual() const { return m_detRawId == 0; };
32  uint32_t m_detRawId;
33  unsigned char m_strip;
34 };
35 
36 class RPCStripsRing : public std::map<float, TStrip> {
37 public:
38  // | ringId
39  typedef std::map<int, RPCStripsRing> TIdToRindMap;
40 
43  short m_logplane;
45  TIdToRindMap::iterator m_it;
46  };
47 
48  typedef std::vector<TOtherConnStruct> TOtherConnStructVec;
49 
50  RPCStripsRing(const RPCRoll* roll, std::shared_ptr<L1RPCConeBuilder::TConMap> cmap);
51 
52  RPCStripsRing();
53  virtual ~RPCStripsRing(){};
54 
55  void addRoll(const RPCRoll* roll);
56 
57  // RPCDetInfo::getRingFromRollsId()
58  static int getRingId(int etaPart, int hwPlane);
59  int getRingId();
60  static int getRingId(const RPCRoll* roll);
61 
62  static int calculateHwPlane(const RPCRoll* roll);
63 
65  void fillWithVirtualStrips();
66 
67  void createRefConnections(TOtherConnStructVec& otherRings, int logplane, int logplaneSize);
68  void createOtherConnections(int tower, int PACno, int logplane, int logplanesize, float angle);
69 
70  int getHwPlane() { return m_hwPlane; };
71 
72  int getEtaPartition() { return m_etaPartition; };
73  bool isReferenceRing() { return m_isReferenceRing; };
74  int getTowerForRefRing();
75 
76  void compressConnections();
77  std::shared_ptr<L1RPCConeBuilder::TConMap> getConnectionsMap() { return m_connectionsMap; };
78 
79  std::shared_ptr<L1RPCConeBuilder::TCompressedConMap> getCompressedConnectionsMap() {
81  };
82 
83 private:
84  int m_hwPlane;
85  int m_etaPartition; // m_globRoll previously
86  int m_region;
87 
88  bool m_isReferenceRing; // m_isRefPlane previously
89  bool m_didVirtuals; // m_isRefPlane previously
91 
92  std::shared_ptr<L1RPCConeBuilder::TConMap> m_connectionsMap;
93  std::shared_ptr<L1RPCConeBuilder::TCompressedConMap> m_compressedConnectionMap;
94 };
95 
96 #endif
RPCRoll
Definition: RPCRoll.h:12
RPCStripsRing::m_connectionsMap
std::shared_ptr< L1RPCConeBuilder::TConMap > m_connectionsMap
Definition: RPCStripsRing.h:92
RPCStripsRing::TOtherConnStructVec
std::vector< TOtherConnStruct > TOtherConnStructVec
Definition: RPCStripsRing.h:48
RPCStripsRing::getTowerForRefRing
int getTowerForRefRing()
Definition: RPCStripsRing.cc:399
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
RPCStripsRing::m_etaPartition
int m_etaPartition
Definition: RPCStripsRing.h:85
TStrip::TStrip
TStrip()
Definition: RPCStripsRing.h:29
TStrip::TStrip
TStrip(int rawId, int stripNo)
Definition: RPCStripsRing.h:30
RPCStripsRing::TIdToRindMap
std::map< int, RPCStripsRing > TIdToRindMap
Definition: RPCStripsRing.h:39
RPCStripsRing::getRingId
int getRingId()
Definition: RPCStripsRing.cc:87
RPCStripsRing::m_region
int m_region
Definition: RPCStripsRing.h:86
RPCStripsRing::calculateHwPlane
static int calculateHwPlane(const RPCRoll *roll)
Calculate ringId for any given RPCRoll.
Definition: RPCStripsRing.cc:100
RPCStripsRing::getHwPlane
int getHwPlane()
Definition: RPCStripsRing.h:70
RPCStripsRing::TOtherConnStruct::TOtherConnStruct
TOtherConnStruct()
Definition: RPCStripsRing.h:42
RPCStripsRing::m_compressedConnectionMap
std::shared_ptr< L1RPCConeBuilder::TCompressedConMap > m_compressedConnectionMap
Definition: RPCStripsRing.h:93
RPCStripsRing::getCompressedConnectionsMap
std::shared_ptr< L1RPCConeBuilder::TCompressedConMap > getCompressedConnectionsMap()
Definition: RPCStripsRing.h:79
RPCStripsRing::isReferenceRing
bool isReferenceRing()
Definition: RPCStripsRing.h:73
RPCStripsRing::RPCStripsRing
RPCStripsRing()
Definition: RPCStripsRing.cc:23
RPCStripsRing::TOtherConnStruct
Definition: RPCStripsRing.h:41
L1RPCConeBuilder.h
RPCStripsRing::TOtherConnStruct::m_logplane
short m_logplane
Definition: RPCStripsRing.h:42
TStrip::isVirtual
bool isVirtual() const
Definition: RPCStripsRing.h:31
RPCStripsRing::m_didVirtuals
bool m_didVirtuals
Definition: RPCStripsRing.h:89
RPCStripsRing::TOtherConnStruct::m_logplaneSize
short m_logplaneSize
Definition: RPCStripsRing.h:44
RPCStripsRing::createOtherConnections
void createOtherConnections(int tower, int PACno, int logplane, int logplanesize, float angle)
Definition: RPCStripsRing.cc:361
RPCStripsRing::compressConnections
void compressConnections()
Definition: RPCStripsRing.cc:443
TStrip::m_detRawId
uint32_t m_detRawId
Definition: RPCStripsRing.h:31
RPCStripsRing::getConnectionsMap
std::shared_ptr< L1RPCConeBuilder::TConMap > getConnectionsMap()
Definition: RPCStripsRing.h:77
RPCStripsRing::createRefConnections
void createRefConnections(TOtherConnStructVec &otherRings, int logplane, int logplaneSize)
Definition: RPCStripsRing.cc:249
TStrip
Definition: RPCStripsRing.h:28
RPCStripsRing::m_isReferenceRing
bool m_isReferenceRing
Definition: RPCStripsRing.h:88
RPCStripsRing
Definition: RPCStripsRing.h:36
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
RPCStripsRing::fillWithVirtualStrips
void fillWithVirtualStrips()
Definition: RPCStripsRing.cc:204
RPCStripsRing::addRoll
void addRoll(const RPCRoll *roll)
Definition: RPCStripsRing.cc:58
TStrip::m_strip
unsigned char m_strip
Definition: RPCStripsRing.h:33
RPCStripsRing::getEtaPartition
int getEtaPartition()
Definition: RPCStripsRing.h:72
genParticles_cff.map
map
Definition: genParticles_cff.py:11
RPCStripsRing::TOtherConnStruct::m_it
TIdToRindMap::iterator m_it
Definition: RPCStripsRing.h:45
RPCStripsRing::m_didFiltering
bool m_didFiltering
Definition: RPCStripsRing.h:90
RPCStripsRing::~RPCStripsRing
virtual ~RPCStripsRing()
Definition: RPCStripsRing.h:53
RPCStripsRing::filterOverlapingChambers
void filterOverlapingChambers()
Definition: RPCStripsRing.cc:135
RPCStripsRing::m_hwPlane
int m_hwPlane
Definition: RPCStripsRing.h:81