CMS 3D CMS Logo

DTSectCollPhCand.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00011 //
00012 //--------------------------------------------------
00013 #ifndef DT_SECT_COLL_PH_CAND_H
00014 #define DT_SECT_COLL_PH_CAND_H
00015 
00016 
00017 //----------------------
00018 // Base Class Headers --
00019 //----------------------
00020 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h"
00021 #include "L1Trigger/DTSectorCollector/interface/DTSC.h"
00022 #include "L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h"
00023 #include "L1Trigger/DTTraco/interface/DTTracoTrigData.h"
00024 #include "L1TriggerConfig/DTTPGConfig/interface/BitArray.h"
00025 //---------------
00026 // C++ Headers --
00027 //---------------
00028 #include <string>
00029 
00030 //              ---------------------
00031 //              -- Class Interface --
00032 //              ---------------------
00033 
00034 class DTSectCollPhCand {
00035 
00036  public:
00037   
00039   DTSectCollPhCand(DTSC* , const DTChambPhSegm*, int);
00040 
00042   DTSectCollPhCand();
00043 
00045   DTSectCollPhCand(const DTSectCollPhCand& tsccand);
00046   
00048   DTSectCollPhCand& operator=(const DTSectCollPhCand& tsccand);
00049 
00051   ~DTSectCollPhCand();
00052 
00053   // Non-const methods
00054 
00056   void setBitsSectColl();
00057 
00059   void clearBits(){ _dataword.assign(5,3,0x7); }
00060 
00062   void clearBitsSectColl(){ _dataword.assign(0,13,0x1fff); }
00063 
00065   void setSecondTrack() { _dataword.set(14); _isCarry=1; }
00066     
00068   void resetCarry() { _isCarry=0; }
00069 
00071   
00072   
00074   inline void clear();
00075 
00076   // Const methods
00077 
00079   inline DTConfigSectColl* config() const { return _tsc->config(); }
00080 
00082   inline DTSC* tsc() const { return _tsc; }
00083 
00085   inline int isFirst() const { return _dataword.element(14)==0; }
00086 
00088    inline const DTChambPhSegm* tsTr() const { return _tsmsegm; } 
00089 
00091   inline unsigned dataword() const { return _dataword.dataWord(0)&0x1ff; }
00092 
00094   bool operator < (const DTSectCollPhCand& c) const { return _dataword<c._dataword; }
00095 
00097   bool operator <= (const DTSectCollPhCand& c) const { return _dataword<=c._dataword; }
00098 
00100   void print() const; 
00101 
00103   int CoarseSync() const;
00104 
00105 
00106  private:
00107 
00108   DTSC* _tsc;
00109   const DTChambPhSegm* _tsmsegm;
00110 
00111   // BitArray<9> _dataword;   // the word on which sorting is done
00112   BitArray<15> _dataword;   // the word on which sorting is done. reserve space enough for Preview and full data
00113 
00114   int _isCarry;
00115 
00116 };
00117 #endif

Generated on Tue Jun 9 17:40:00 2009 for CMSSW by  doxygen 1.5.4