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
std::shared_ptr< L1RPCConeBuilder::TConMap > m_connectionsMap
Definition: RPCStripsRing.h:92
void compressConnections()
int getTowerForRefRing()
void fillWithVirtualStrips()
void createOtherConnections(int tower, int PACno, int logplane, int logplanesize, float angle)
bool isReferenceRing()
Definition: RPCStripsRing.h:73
std::shared_ptr< L1RPCConeBuilder::TConMap > getConnectionsMap()
Definition: RPCStripsRing.h:77
void filterOverlapingChambers()
std::vector< TOtherConnStruct > TOtherConnStructVec
Definition: RPCStripsRing.h:48
TStrip(int rawId, int stripNo)
Definition: RPCStripsRing.h:30
bool isVirtual() const
Definition: RPCStripsRing.h:31
int getEtaPartition()
Definition: RPCStripsRing.h:72
unsigned char m_strip
Definition: RPCStripsRing.h:33
bool m_isReferenceRing
Definition: RPCStripsRing.h:88
void addRoll(const RPCRoll *roll)
uint32_t m_detRawId
Definition: RPCStripsRing.h:31
std::shared_ptr< L1RPCConeBuilder::TCompressedConMap > m_compressedConnectionMap
Definition: RPCStripsRing.h:93
std::map< int, RPCStripsRing > TIdToRindMap
Definition: RPCStripsRing.h:39
static int calculateHwPlane(const RPCRoll *roll)
Calculate ringId for any given RPCRoll.
void createRefConnections(TOtherConnStructVec &otherRings, int logplane, int logplaneSize)
TIdToRindMap::iterator m_it
Definition: RPCStripsRing.h:45
std::shared_ptr< L1RPCConeBuilder::TCompressedConMap > getCompressedConnectionsMap()
Definition: RPCStripsRing.h:79
virtual ~RPCStripsRing()
Definition: RPCStripsRing.h:53
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11