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 
28 // XXX TODO: move into namespace?
29 struct TStrip {
30  TStrip() : m_detRawId(0), m_strip(0) {};
31  TStrip(int rawId, int stripNo) : m_detRawId(rawId), m_strip(stripNo) {};
32  bool isVirtual() const {return m_detRawId==0;};
33  uint32_t m_detRawId;
34  unsigned char m_strip;
35 };
36 
37 
38 class RPCStripsRing : public std::map<float, TStrip >
39 {
40 
41  public:
42  // | ringId
43  typedef std::map<int, RPCStripsRing> TIdToRindMap;
44 
46 
47  TOtherConnStruct() : m_logplane(0), m_logplaneSize(0), m_it(nullptr) {};
48  short m_logplane;
50  TIdToRindMap::iterator m_it;
51  };
52 
53  typedef std::vector<TOtherConnStruct> TOtherConnStructVec;
54 
55 
56  RPCStripsRing(const RPCRoll * roll,
57  std::shared_ptr<L1RPCConeBuilder::TConMap > cmap);
58 
59  RPCStripsRing();
60  virtual ~RPCStripsRing() {};
61 
62  void addRoll(const RPCRoll * roll);
63 
64  // RPCDetInfo::getRingFromRollsId()
65  static int getRingId(int etaPart, int hwPlane);
66  int getRingId();
67  static int getRingId(const RPCRoll * roll);
68 
69 
70  static int calculateHwPlane(const RPCRoll * roll);
71 
72  void filterOverlapingChambers();
73  void fillWithVirtualStrips();
74 
75  void createRefConnections(TOtherConnStructVec & otherRings, int logplane, int logplaneSize);
76  void createOtherConnections(int tower, int PACno, int logplane, int logplanesize, float angle);
77 
78 
79  int getHwPlane() {return m_hwPlane;};
80 
81  int getEtaPartition() {return m_etaPartition;};
82  bool isReferenceRing(){return m_isReferenceRing;};
83  int getTowerForRefRing();
84 
85  void compressConnections();
86  std::shared_ptr<L1RPCConeBuilder::TConMap > getConnectionsMap()
87  { return m_connectionsMap;};
88 
89  std::shared_ptr<L1RPCConeBuilder::TCompressedConMap> getCompressedConnectionsMap()
90  {
91  return m_compressedConnectionMap;
92  };
93 
94  private:
95 
96 
97  int m_hwPlane;
98  int m_etaPartition; // m_globRoll previously
99  int m_region;
100 
101  bool m_isReferenceRing; // m_isRefPlane previously
102  bool m_didVirtuals; // m_isRefPlane previously
104 
105  std::shared_ptr<L1RPCConeBuilder::TConMap > m_connectionsMap;
106  std::shared_ptr<L1RPCConeBuilder::TCompressedConMap > m_compressedConnectionMap;
107 };
108 
109 
110 #endif
bool isVirtual() const
Definition: RPCStripsRing.h:32
#define nullptr
bool isReferenceRing()
Definition: RPCStripsRing.h:82
std::vector< TOtherConnStruct > TOtherConnStructVec
Definition: RPCStripsRing.h:53
TStrip(int rawId, int stripNo)
Definition: RPCStripsRing.h:31
int getEtaPartition()
Definition: RPCStripsRing.h:81
unsigned char m_strip
Definition: RPCStripsRing.h:34
std::shared_ptr< L1RPCConeBuilder::TConMap > m_connectionsMap
bool m_isReferenceRing
uint32_t m_detRawId
Definition: RPCStripsRing.h:32
std::shared_ptr< L1RPCConeBuilder::TCompressedConMap > m_compressedConnectionMap
std::map< int, RPCStripsRing > TIdToRindMap
Definition: RPCStripsRing.h:43
std::shared_ptr< L1RPCConeBuilder::TConMap > getConnectionsMap()
Definition: RPCStripsRing.h:86
TIdToRindMap::iterator m_it
Definition: RPCStripsRing.h:50
std::shared_ptr< L1RPCConeBuilder::TCompressedConMap > getCompressedConnectionsMap()
Definition: RPCStripsRing.h:89
virtual ~RPCStripsRing()
Definition: RPCStripsRing.h:60
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11