Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:46

0001 //-------------------------------------------------
0002 //
0003 //   Class L1MuDTChambThDigi
0004 //
0005 //   Description: input data for PHTF trigger
0006 //
0007 //
0008 //   Author List: Jorge Troconiz  UAM Madrid
0009 //
0010 //
0011 //--------------------------------------------------
0012 
0013 //-----------------------
0014 // This Class's Header --
0015 //-----------------------
0016 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThDigi.h"
0017 
0018 //-------------------------------
0019 // Collaborating Class Headers --
0020 //-------------------------------
0021 
0022 //---------------
0023 // C++ Headers --
0024 //---------------
0025 
0026 //-------------------
0027 // Initializations --
0028 //-------------------
0029 
0030 //----------------
0031 // Constructors --
0032 //----------------
0033 L1MuDTChambThDigi::L1MuDTChambThDigi() {
0034   bx = -100;
0035   wheel = 0;
0036   sector = 0;
0037   station = 0;
0038 
0039   for (int i = 0; i < 7; i++) {
0040     m_outPos[i] = 0;
0041     m_outQual[i] = 0;
0042   }
0043 }
0044 
0045 L1MuDTChambThDigi::L1MuDTChambThDigi(int ubx, int uwh, int usc, int ust, int* upos, int* uqual) {
0046   bx = ubx;
0047   wheel = uwh;
0048   sector = usc;
0049   station = ust;
0050 
0051   for (int i = 0; i < 7; i++) {
0052     m_outPos[i] = upos[i];
0053     m_outQual[i] = uqual[i];
0054   }
0055 }
0056 
0057 L1MuDTChambThDigi::L1MuDTChambThDigi(int ubx, int uwh, int usc, int ust, int* upos) {
0058   bx = ubx;
0059   wheel = uwh;
0060   sector = usc;
0061   station = ust;
0062 
0063   for (int i = 0; i < 7; i++) {
0064     m_outPos[i] = upos[i];
0065     m_outQual[i] = 0;
0066   }
0067 }
0068 
0069 //--------------
0070 // Destructor --
0071 //--------------
0072 L1MuDTChambThDigi::~L1MuDTChambThDigi() {}
0073 
0074 //--------------
0075 // Operations --
0076 //--------------
0077 int L1MuDTChambThDigi::bxNum() const { return bx; }
0078 
0079 int L1MuDTChambThDigi::whNum() const { return wheel; }
0080 int L1MuDTChambThDigi::scNum() const { return sector; }
0081 int L1MuDTChambThDigi::stNum() const { return station; }
0082 
0083 int L1MuDTChambThDigi::code(const int i) const {
0084   if (i < 0 || i >= 7)
0085     return 0;
0086 
0087   return (int)(m_outPos[i] + m_outQual[i]);
0088 }
0089 
0090 int L1MuDTChambThDigi::position(const int i) const {
0091   if (i < 0 || i >= 7)
0092     return 0;
0093 
0094   return (int)m_outPos[i];
0095 }
0096 
0097 int L1MuDTChambThDigi::quality(const int i) const {
0098   if (i < 0 || i >= 7)
0099     return 0;
0100 
0101   return (int)m_outQual[i];
0102 }