00001 //------------------------------------------------- 00002 // 00003 // Class L1MuDTTrackContainer 00004 // 00005 // Description: output data for DTTF 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/L1MuDTTrackContainer.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 L1MuDTTrackContainer::L1MuDTTrackContainer() {} 00037 00038 //-------------- 00039 // Destructor -- 00040 //-------------- 00041 L1MuDTTrackContainer::~L1MuDTTrackContainer() {} 00042 00043 //-------------- 00044 // Operations -- 00045 //-------------- 00046 void L1MuDTTrackContainer::setContainer(TrackContainer inputTracks) { 00047 00048 dtTracks = inputTracks; 00049 } 00050 00051 L1MuDTTrackContainer::TrackContainer* L1MuDTTrackContainer::getContainer() const { 00052 00053 TrackContainer* rT=0; 00054 00055 rT = const_cast<TrackContainer*>(&dtTracks); 00056 00057 return(rT); 00058 } 00059 00060 bool L1MuDTTrackContainer::bxEmpty(int step) const { 00061 00062 bool empty = true; 00063 00064 for ( Trackiterator i = dtTracks.begin(); 00065 i != dtTracks.end(); 00066 i++ ) { 00067 if (step == i->bx()) empty = false; 00068 } 00069 00070 return(empty); 00071 } 00072 00073 int L1MuDTTrackContainer::bxSize(int step1, int step2) const { 00074 00075 int size = 0; 00076 00077 for ( Trackiterator i = dtTracks.begin(); 00078 i != dtTracks.end(); 00079 i++ ) { 00080 if (step1 <= i->bx() && step2 >= i->bx() 00081 && i->quality_packed() != 0) size++; 00082 } 00083 00084 return(size); 00085 } 00086 00087 L1MuDTTrackCand* L1MuDTTrackContainer::dtTrackCand1(int wheel, int sect, int step) const { 00088 00089 L1MuDTTrackCand* rT=0; 00090 00091 for ( Trackiterator i = dtTracks.begin(); 00092 i != dtTracks.end(); 00093 i++ ) { 00094 if (step == i->bx() && wheel == i->whNum() && sect == i->scNum() 00095 && i->TrkTag() == 0) 00096 rT = const_cast<L1MuDTTrackCand*>(&(*i)); 00097 } 00098 00099 return(rT); 00100 } 00101 00102 L1MuDTTrackCand* L1MuDTTrackContainer::dtTrackCand2(int wheel, int sect, int step) const { 00103 00104 L1MuDTTrackCand* rT=0; 00105 00106 for ( Trackiterator i = dtTracks.begin(); 00107 i != dtTracks.end(); 00108 i++ ) { 00109 if (step == i->bx() && wheel == i->whNum() && sect == i->scNum() 00110 && i->TrkTag() == 1) 00111 rT = const_cast<L1MuDTTrackCand*>(&(*i)); 00112 } 00113 00114 return(rT); 00115 }