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