CMS 3D CMS Logo

RPCStripsRing.h

Go to the documentation of this file.
00001 #ifndef L1TriggerConfig_RPCConeBuilder_RPCStripsRing_h
00002 #define L1TriggerConfig_RPCConeBuilder_RPCStripsRing_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     RPCConeBuilder
00006 // Class  :     RPCStripsRing
00007 // 
00016 //
00017 // Original Author:  Tomasz Fruboes
00018 //         Created:  Tue Feb 26 15:13:17 CET 2008
00019 // $Id: RPCStripsRing.h,v 1.1 2008/03/03 14:30:10 fruboes Exp $
00020 //
00021 
00022 #include <map>
00023 #include <vector>
00024 #include "CondFormats/RPCObjects/interface/L1RPCConeBuilder.h"
00025 
00026 class RPCRoll;
00027 
00028 
00029 // XXX TODO: move into namespace?
00030 struct TStrip {
00031   TStrip() : m_detRawId(0), m_strip(0) {};
00032   TStrip(int rawId, int stripNo) : m_detRawId(rawId), m_strip(stripNo) {};
00033   bool isVirtual() const {return  m_detRawId==0;};
00034   uint32_t m_detRawId;
00035   unsigned char m_strip;
00036 };
00037 
00038 
00039 class RPCStripsRing : public std::map<float, TStrip >
00040 {
00041 
00042    public:
00043       //                | ringId
00044       typedef std::map<int, RPCStripsRing> TIdToRindMap;
00045       
00046       struct TOtherConnStruct {
00047          
00048          TOtherConnStruct() : m_logplane(0), m_logplaneSize(0), m_it(0) {};
00049          short m_logplane;
00050          short m_logplaneSize;
00051          TIdToRindMap::iterator m_it;
00052       };
00053       
00054       typedef std::vector<TOtherConnStruct> TOtherConnStructVec;
00055       
00056             
00057       RPCStripsRing(const RPCRoll * roll);
00058       RPCStripsRing();
00059       virtual ~RPCStripsRing() {};
00060       
00061       void addRoll(const RPCRoll * roll);
00062       
00063       // RPCDetInfo::getRingFromRollsId()
00064       static int getRingId(int etaPart, int hwPlane);
00065       int getRingId();   
00066       static int getRingId(const RPCRoll * roll); 
00067       
00068 
00069       static int calculateHwPlane(const RPCRoll * roll);
00070             
00071       void filterOverlapingChambers();
00072       void fillWithVirtualStrips();
00073 
00074       void createRefConnections(TOtherConnStructVec & otherRings, int logplane, int logplaneSize);
00075       void createOtherConnections(int tower, int PACno, int logplane, int logplanesize, float angle);
00076       
00077       
00078       int getHwPlane() {return m_hwPlane;};
00079       
00080       int getEtaPartition() {return m_etaPartition;};
00081       bool isReferenceRing(){return m_isReferenceRing;};
00082       int getTowerForRefRing();
00083       
00084       L1RPCConeBuilder::TConMap & getConnectionsMap() { return m_connectionsMap;};
00085       
00086   private:
00087     
00088       
00089       int m_hwPlane;
00090       int m_etaPartition; // m_globRoll previously
00091       int m_region; 
00092 
00093       bool m_isReferenceRing; // m_isRefPlane previously
00094       bool m_didVirtuals; // m_isRefPlane previously
00095       bool m_didFiltering;    
00096       
00097       static L1RPCConeBuilder::TConMap m_connectionsMap;  
00098 };
00099 
00100 
00101 #endif

Generated on Tue Jun 9 17:40:30 2009 for CMSSW by  doxygen 1.5.4