CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
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  boost::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 
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 
83  int getTowerForRefRing();
84 
85  void compressConnections();
86  boost::shared_ptr<L1RPCConeBuilder::TConMap > getConnectionsMap()
87  { return m_connectionsMap;};
88 
89  boost::shared_ptr<L1RPCConeBuilder::TCompressedConMap> getCompressedConnectionsMap()
90  {
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  boost::shared_ptr<L1RPCConeBuilder::TConMap > m_connectionsMap;
106  boost::shared_ptr<L1RPCConeBuilder::TCompressedConMap > m_compressedConnectionMap;
107 };
108 
109 
110 #endif
bool isVirtual() const
Definition: RPCStripsRing.h:32
void compressConnections()
int getTowerForRefRing()
void fillWithVirtualStrips()
void createOtherConnections(int tower, int PACno, int logplane, int logplanesize, float angle)
bool isReferenceRing()
Definition: RPCStripsRing.h:82
void filterOverlapingChambers()
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
bool m_isReferenceRing
void addRoll(const RPCRoll *roll)
uint32_t m_detRawId
Definition: RPCStripsRing.h:32
boost::shared_ptr< L1RPCConeBuilder::TCompressedConMap > getCompressedConnectionsMap()
Definition: RPCStripsRing.h:89
std::map< int, RPCStripsRing > TIdToRindMap
Definition: RPCStripsRing.h:43
boost::shared_ptr< L1RPCConeBuilder::TConMap > getConnectionsMap()
Definition: RPCStripsRing.h:86
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:50
boost::shared_ptr< L1RPCConeBuilder::TCompressedConMap > m_compressedConnectionMap
boost::shared_ptr< L1RPCConeBuilder::TConMap > m_connectionsMap
virtual ~RPCStripsRing()
Definition: RPCStripsRing.h:60
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11