00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #include "StTofCollection.h"
00051
00052 static const char rcsid[] = "$Id: StTofCollection.cxx,v 2.10 2008/06/03 17:41:28 ullrich Exp $";
00053
00054 ClassImp(StTofCollection)
00055
00056 StTofCollection::StTofCollection() {
00057 mVpdEast = 0;
00058 mVpdWest = 0;
00059 mTstart = -999.;
00060 mTdiff = -999.;
00061 mVzVpd = -999.;
00062 }
00063
00064 StTofCollection::~StTofCollection() { }
00065
00066 const StSPtrVecTofCell&
00067 StTofCollection::tofCells() const
00068 {
00069 return mTofCells;
00070 }
00071
00072 StSPtrVecTofCell&
00073 StTofCollection::tofCells()
00074 {
00075 return mTofCells;
00076 }
00077
00078 const StSPtrVecTofSlat&
00079 StTofCollection::tofSlats() const
00080 {
00081 return mTofSlats;
00082 }
00083
00084 StSPtrVecTofSlat&
00085 StTofCollection::tofSlats()
00086 {
00087 return mTofSlats;
00088 }
00089
00090 const StSPtrVecTofHit&
00091 StTofCollection::tofHits() const
00092 {
00093 return mTofHits;
00094 }
00095
00096 StSPtrVecTofHit&
00097 StTofCollection::tofHits()
00098 {
00099 return mTofHits;
00100 }
00101
00102 const StSPtrVecTofData&
00103 StTofCollection::tofData() const
00104 {
00105 return mTofData;
00106 }
00107
00108 StSPtrVecTofData&
00109 StTofCollection::tofData()
00110 {
00111 return mTofData;
00112 }
00113
00114 const StSPtrVecTofRawData&
00115 StTofCollection::tofRawData() const
00116 {
00117 return mTofRawData;
00118 }
00119
00120 StSPtrVecTofRawData&
00121 StTofCollection::tofRawData()
00122 {
00123 return mTofRawData;
00124 }
00125
00126 void
00127 StTofCollection::addCell(const StTofCell* aCell)
00128 {
00129 if (aCell) mTofCells.push_back(aCell);
00130 }
00131
00132 void
00133 StTofCollection::addSlat(const StTofSlat* aSlat)
00134 {
00135 if (aSlat) mTofSlats.push_back(aSlat);
00136 }
00137
00138 void
00139 StTofCollection::addHit(const StTofHit* aHit)
00140 {
00141 if (aHit) mTofHits.push_back(aHit);
00142 }
00143
00144 void
00145 StTofCollection::addData(const StTofData* aData)
00146 {
00147 if (aData) mTofData.push_back(aData);
00148 }
00149
00150 void
00151 StTofCollection::addRawData(const StTofRawData* aRawData)
00152 {
00153 if (aRawData) mTofRawData.push_back(aRawData);
00154 }
00155
00156
00157 bool
00158 StTofCollection::cellsPresent() const
00159 {
00160 return mTofCells.size();
00161 }
00162
00163 bool
00164 StTofCollection::slatsPresent() const
00165 {
00166 return mTofSlats.size();
00167 }
00168
00169 bool
00170 StTofCollection::hitsPresent() const
00171 {
00172 return mTofHits.size();
00173 }
00174
00175 bool
00176 StTofCollection::dataPresent() const
00177 {
00178 return mTofData.size();
00179 }
00180
00181 bool
00182 StTofCollection::rawdataPresent() const
00183 {
00184 return mTofRawData.size();
00185 }
00186
00187 unsigned int
00188 StTofCollection::numberOfVpdEast() const
00189 {
00190 unsigned int num = 0;
00191 for(int i=0;i<32;i++) {
00192 num += mVpdEast>>i & 1;
00193 }
00194 return num;
00195 }
00196
00197 unsigned int
00198 StTofCollection::numberOfVpdWest() const
00199 {
00200 unsigned int num = 0;
00201 for(int i=0;i<32;i++) {
00202 num += mVpdWest>>i & 1;
00203 }
00204 return num;
00205 }