Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:39

0001 #ifndef L1Trigger_RPCMuon_h
0002 #define L1Trigger_RPCMuon_h
0003 
0004 /** \class RPCMuon
0005  * Basic L1RPC muon candidate. Containes coordinates of LogCone, in which the
0006  * muon was found, ptCode (0 - 31, 0 means no muon), track quality (depends on
0007  * count of fired planes), sign and number of pattern, that was fit to hits by m_PAC
0008  * \author Karol Bunkowski (Warsaw)
0009  *
0010  */
0011 
0012 #include "L1Trigger/RPCTrigger/interface/RPCConst.h"
0013 #include <vector>
0014 //---------------------------------------------------------------------------
0015 class RPCMuon {
0016 public:
0017   ///Default constructor. No muon.
0018   RPCMuon();
0019 
0020   ///Constructor. All parameters are set.
0021   RPCMuon(const RPCConst::l1RpcConeCrdnts coneCrdnts,
0022           int ptCode,
0023           int quality,
0024           int sign,
0025           int patternNum,
0026           unsigned short firedPlanes);
0027 
0028   ///Constructor.
0029   RPCMuon(int ptCode, int quality, int sign, int patternNum, unsigned short firedPlanes);
0030 
0031   RPCConst::l1RpcConeCrdnts getConeCrdnts() const;
0032 
0033   void setConeCrdnts(const RPCConst::l1RpcConeCrdnts& coneCrdnts);
0034 
0035   int getTower() const;
0036 
0037   int getLogSector() const;
0038 
0039   int getLogSegment() const;
0040 
0041   void setPtCode(int ptCode);
0042 
0043   int getPtCode() const;
0044 
0045   void setQuality(int quality);
0046 
0047   int getQuality() const;
0048 
0049   void setSign(int sign);
0050 
0051   int getSign() const;
0052 
0053   int getPatternNum() const;
0054 
0055   void setPatternNum(int patternNum);
0056 
0057   void setLogConeIdx(int logConeIdx);
0058 
0059   ///the index in LogConesVec stored in L1RpcTrigg (accessed by GetActiveCones)
0060   int getLogConeIdx() const;
0061 
0062   ///bits of this number denotes fired planes that conform to pattern pattern
0063   unsigned short getFiredPlanes() const;
0064 
0065   void setRefStripNum(int refStripNum);
0066 
0067   /** continous number of strip in reference plane, set by  RPCPacData::run
0068   * int refStripNum =
0069   * getPattern(bestMuon.getPatternNum()).getStripFrom(m_REF_PLANE[abs(m_CurrConeCrdnts.m_Tower)])
0070   * + m_CurrConeCrdnts.m_LogSector * 96 + m_CurrConeCrdnts.m_LogSegment * 8;
0071   */
0072   int getRefStripNum() const;
0073 
0074   struct TDigiLink {
0075     TDigiLink(short int l, short int d) : m_layer(l), m_digiIdx(d){};
0076     short int m_layer;
0077     short int m_digiIdx;  // vec?
0078   };
0079 
0080   typedef std::vector<TDigiLink> TDigiLinkVec;
0081 
0082   TDigiLinkVec getDigiIdxVec() const { return m_digiIdxVec; };
0083   void setDigiIdxVec(const TDigiLinkVec& d) { m_digiIdxVec = d; };
0084 
0085 protected:
0086   ///The coordinates of LogCone, in which the muon was found.
0087   RPCConst::l1RpcConeCrdnts m_ConeCrdnts;
0088 
0089   ///5 bits, 0-31.
0090   unsigned int m_PtCode;
0091 
0092   ///3 bits, 0-7.
0093   unsigned int m_Quality;
0094 
0095   ///1 bit, 0 - negative, 1 - positive.
0096   unsigned int m_Sign;
0097 
0098   ///number of pattern (in given Pac), that was fit to this muon.
0099   int m_PatternNum;
0100 
0101   int m_LogConeIdx;
0102 
0103   ///bits of this number denotes fired planes that conform to pattern pattern
0104   unsigned short m_FiredPlanes;
0105 
0106   int m_RefStripNum;
0107 
0108   TDigiLinkVec m_digiIdxVec;
0109 };
0110 
0111 typedef std::vector<RPCMuon> L1RpcMuonsVec;
0112 #endif