CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DataFormats/L1DTTrackFinder/src/L1MuDTChambThDigi.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Class L1MuDTChambThDigi
00004 //
00005 //   Description: input data for PHTF trigger
00006 //
00007 //
00008 //   Author List: Jorge Troconiz  UAM Madrid
00009 //
00010 //
00011 //--------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThDigi.h"
00017 
00018 //-------------------------------
00019 // Collaborating Class Headers --
00020 //-------------------------------
00021 
00022 
00023 //---------------
00024 // C++ Headers --
00025 //---------------
00026 using namespace std;
00027 
00028 //-------------------
00029 // Initializations --
00030 //-------------------
00031 
00032 
00033 //----------------
00034 // Constructors --
00035 //----------------
00036 L1MuDTChambThDigi::L1MuDTChambThDigi() {
00037 
00038   bx              = -100;
00039   wheel           = 0;
00040   sector          = 0;
00041   station         = 0;
00042 
00043   for(int i=0;i<7;i++) {
00044     m_outPos[i] = 0;
00045     m_outQual[i] = 0;
00046   }
00047 }
00048 
00049 L1MuDTChambThDigi::L1MuDTChambThDigi( int ubx, int uwh, int usc, int ust,
00050                                       int* upos, int* uqual ) {
00051 
00052   bx              = ubx;
00053   wheel           = uwh;
00054   sector          = usc;
00055   station         = ust;
00056 
00057   for(int i=0;i<7;i++) {
00058     m_outPos[i] = upos[i];
00059     m_outQual[i] = uqual[i];
00060   }
00061 }
00062 
00063 L1MuDTChambThDigi::L1MuDTChambThDigi( int ubx, int uwh, int usc, int ust,
00064                                       int* upos ) {
00065 
00066   bx              = ubx;
00067   wheel           = uwh;
00068   sector          = usc;
00069   station         = ust;
00070 
00071   for(int i=0;i<7;i++) {
00072     m_outPos[i] = upos[i];
00073     m_outQual[i] = 0;
00074   }
00075 }
00076 
00077 //--------------
00078 // Destructor --
00079 //--------------
00080 L1MuDTChambThDigi::~L1MuDTChambThDigi() {
00081 }
00082 
00083 //--------------
00084 // Operations --
00085 //--------------
00086 int L1MuDTChambThDigi::bxNum() const {
00087   return bx;
00088 }
00089 
00090 int L1MuDTChambThDigi::whNum() const {
00091   return wheel;
00092 }
00093 int L1MuDTChambThDigi::scNum() const {
00094   return sector;
00095 }
00096 int L1MuDTChambThDigi::stNum() const {
00097   return station;
00098 }
00099 
00100 int L1MuDTChambThDigi::code(const int i) const {
00101   if (i<0||i>=7) return 0;
00102 
00103   return (int)(m_outPos[i]+m_outQual[i]);
00104 }
00105 
00106 int L1MuDTChambThDigi::position(const int i) const {
00107   if (i<0||i>=7) return 0;
00108 
00109   return (int)m_outPos[i];
00110 }
00111 
00112 int L1MuDTChambThDigi::quality(const int i) const {
00113   if (i<0||i>=7) return 0;
00114 
00115   return (int)m_outQual[i];
00116 }