Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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