Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:40

0001 //-------------------------------------------------
0002 //
0003 /**   \class DTSectCollPhSegm
0004  *
0005  *    Muon Sector Collector Trigger Phi candidate 
0006  *
0007  *    
0008  *
0009  *   \author S. Marcellini, D. Bonacorsi
0010  * 
0011  */
0012 //
0013 //--------------------------------------------------
0014 #ifndef DT_SECT_COLL_PH_SEGM_H
0015 #define DT_SECT_COLL_PH_SEGM_H
0016 
0017 //------------------------------------
0018 // Collaborating Class Declarations --
0019 //------------------------------------
0020 
0021 //----------------------
0022 // Base Class Headers --
0023 //----------------------
0024 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0025 #include "DataFormats/MuonDetId/interface/DTSectCollId.h"
0026 #include "L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h"
0027 #include "L1Trigger/DTUtilities/interface/DTTrigData.h"
0028 
0029 //---------------
0030 // C++ Headers --
0031 //---------------
0032 #include <vector>
0033 //              ---------------------
0034 //              -- Class Interface --
0035 //              ---------------------
0036 
0037 typedef unsigned char myint8;
0038 
0039 class DTSectCollPhSegm : public DTTrigData {
0040 public:
0041   //!  Constructor
0042   DTSectCollPhSegm(DTSectCollId scId, int step);
0043 
0044   //!  Constructor
0045   DTSectCollPhSegm(DTSectCollId scId, int step, const DTChambPhSegm* tsPhiTrig, int isFirst);
0046   //!  Constructor
0047   DTSectCollPhSegm(const DTSectCollPhSegm&);
0048 
0049   //!  Destructor
0050   ~DTSectCollPhSegm() override;
0051 
0052   // Non-const methods
0053 
0054   //! Assignment operator
0055   DTSectCollPhSegm& operator=(const DTSectCollPhSegm& seg);
0056 
0057   //! Associate a Trigger Server Phi trigger
0058   inline void setTsPhiTrig(const DTChambPhSegm* tsphitrig, int isFirst) {
0059     m_tsphitrig = tsphitrig;
0060     m_isFirst = isFirst;
0061   }
0062 
0063   //! Clear
0064   void clear();
0065 
0066   // Const methods
0067 
0068   // //! Return associated TRACO trigger
0069   // inline const DTTracoTrigData* tracoTrig() const { return m_tsphitrig->TracoTrigData(); }
0070 
0071   //! Return associated Trigger Server Phi trigger
0072   inline const DTChambPhSegm* tsPhiTrig() const { return m_tsphitrig; }
0073 
0074   //! Return step number
0075   inline int step() const { return m_step; }
0076 
0077   //! Return SC identifier
0078   DTSectCollId SCId() const { return m_sectcollid; }
0079 
0080   //! Return chamber identifier
0081   DTChamberId ChamberId() const override { return m_tsphitrig->ChamberId(); }
0082 
0083   //! Print
0084   void print() const override;
0085 
0086   //! Return parent TRACO number
0087   inline int tracoNumber() const { return m_tsphitrig->tracoNumber(); }
0088 
0089   //! Return if it is a first track
0090   inline int isFirst() const { return m_isFirst == 1; }
0091 
0092   //! Return trigger code (MTTF input format [0,7])
0093   int code() const { return m_tsphitrig->code(); }
0094 
0095   //! Return trigger code (10*inner_code+outer_code; X_code=1,2,3,4,8)
0096   inline int oldCode() const { return m_tsphitrig->oldCode(); }
0097 
0098   //! Return trigger K parameter
0099   inline float K() const { return m_tsphitrig->K(); }
0100 
0101   //! Return trigger X parameter
0102   inline float X() const { return m_tsphitrig->X(); }
0103 
0104   //! Return trigger K parameter converted to angle (bit pattern)
0105   inline int psi() const { return m_tsphitrig->psi(); }
0106 
0107   //! Return trigger X parameter converted to angle (bit pattern)
0108   inline int psiR() const { return m_tsphitrig->psiR(); }
0109 
0110   //! Return trigger X parameter converted to angle (bit pattern)
0111   inline int phi() const { return m_tsphitrig->psiR(); }
0112 
0113   //! Return bending angle (bit pattern)
0114   inline int DeltaPsiR() const { return m_tsphitrig->DeltaPsiR(); }
0115 
0116   //! Return bending angle (bit pattern)
0117   inline int phiB() const { return m_tsphitrig->DeltaPsiR(); }
0118 
0119   //! Return correlator output code (position of segments)
0120   inline int posMask() const { return m_tsphitrig->posMask(); }
0121 
0122   //! Return the preview code (10*inner_code or outer_code; X_code=1,2,3,4,8)
0123   inline int pvCode() const { return m_tsphitrig->pvCode(); }
0124 
0125   //! Return the preview K
0126   inline int pvK() const { return m_tsphitrig->pvK(); }
0127 
0128 private:
0129   // parent sectcoll
0130   DTSectCollId m_sectcollid;
0131 
0132   // step number
0133   myint8 m_step;
0134 
0135   // first or second track
0136   myint8 m_isFirst;
0137 
0138   // the corresponding traco trigger
0139   const DTChambPhSegm* m_tsphitrig;
0140 };
0141 #endif