57 #ifndef ST_TRS_SECTOR_HH
58 #define ST_TRS_SECTOR_HH
63 #include "StTrsAnalogSignal.hh"
64 #include "StTpcGeometry.hh"
66 #include "StDbUtilities/StTpcPadCoordinate.hh"
68 typedef std::vector<StTrsAnalogSignal, std::allocator<StTrsAnalogSignal> > tpcTimeBins;
69 typedef std::vector<tpcTimeBins, std::allocator<tpcTimeBins> > tpcPadRow;
70 typedef std::vector<tpcPadRow, std::allocator<tpcPadRow> > tpcSector;
72 typedef std::vector<StTrsAnalogSignal, std::allocator<StTrsAnalogSignal> >::iterator timeBinIterator;
74 typedef tpcPadRow::iterator padRowIterator;
75 typedef tpcSector::iterator rowIterator;
86 tpcTimeBins& timeBinsOfRowAndPad(
int,
int);
87 tpcPadRow& padsOfRow(
int);
91 int numberOfRows()
const;
92 int numberOfPadsInRow(
int)
const;
99 void assignTimeBins(
int,
int, tpcTimeBins&);
106 inline tpcTimeBins& StTrsSector::timeBinsOfRowAndPad(
int rowN,
int padN) {
return (mSector[(rowN-1)][(padN-1)]); }
107 inline tpcPadRow& StTrsSector::padsOfRow(
int rowN) {
return (mSector[(rowN-1)]); }
108 inline tpcSector& StTrsSector::rows() {
return (mSector); }
109 inline int StTrsSector::size()
const {
return mSector.size();}
110 inline int StTrsSector::numberOfRows()
const {
return mSector.size();}
111 inline int StTrsSector::numberOfPadsInRow(
int rowN)
const {
return mSector[(rowN-1)].size();}
115 #ifdef ST_SECTOR_BOUNDS_CHECK
116 if( (rowN > 0 && row <= mSector.size()) )
117 if( (padN > 0 && pad <= mSector[(rowN-1)].size()) )
119 mSector[(rowN-1)][(padN-1)].push_back(signl);
121 inline void StTrsSector::assignTimeBins(
int rowN,
int padN, tpcTimeBins& tbins)
123 #ifdef ST_SECTOR_BOUNDS_CHECK
124 if( (rowIndex > 0 && rowIndex <= mSector.size()) )
125 if( (padIndex > 0 && padIndex <= mSector[rowIndex].size()) )
127 mSector[(rowN-1)][(padN-1)] = tbins;