103 #include "StEventTypes.h"
104 #include "StDetectorDbMaker/St_tpcPadConfigC.h"
109 if (!track)
return false;
112 if (!info)
return false;
114 const StPtrVecHit& hits = info->hits();
116 unsigned long word1 = 0;
117 unsigned long word2 = 0;
118 unsigned long long wordiTpc = 0;
121 if (track->type() == primary) word1 |= 1U;
127 if (info->numberOfReferencedPoints(kFtpcWestId) ||
128 info->numberOfReferencedPoints(kFtpcEastId)) {
134 for (i=0; i<hits.size(); i++) {
135 if (hits[i]->detector() == kFtpcEastId ||
136 hits[i]->detector() == kFtpcEastId) {
137 k =
dynamic_cast<const StFtpcHit*
>(hits[i])->plane();
138 if (word1 & 1U<<k) word2 |= 1U<<30;
146 if (info->numberOfReferencedPoints(kPxlId) ||
147 info->numberOfReferencedPoints(kSstId) ||
148 info->numberOfReferencedPoints(kIstId)) {
149 LOG_DEBUG<<
" HFT track!" << endm;
157 for (i=0; i<hits.size(); i++) {
158 if (hits[i]->detector() == kSvtId) {
159 k =
dynamic_cast<const StSvtHit*
>(hits[i])->layer();
160 if (word1 & 1U<<k) word2 |= 1U<<30;
163 else if (hits[i]->detector() == kPxlId) {
164 k =
dynamic_cast<const StPxlHit*
>(hits[i])->layer();
165 LOG_DEBUG<<
"track has hit in pixel detector, layer "<<k<<endm;
166 if (k==2 && (word1 & 1U<<k)) {
168 LOG_DEBUG<<
"set bit for PXL 3rd-layer to 1"<<endm;
171 LOG_DEBUG<<
"set bit for PXL "<<k<<
"th-layer to 1"<<endm;
173 LOG_DEBUG<<
"word1: "<<word1<<endm;
175 else if (hits[i]->detector() == kIstId) {
176 LOG_DEBUG<<
"track has hit in ist" << endm;
179 LOG_DEBUG<<
"set bit for IST 2nd-layer to 1"<<endm;
182 LOG_DEBUG<<
"set bit for IST 1st-layer to 1"<<endm;
184 LOG_DEBUG<<
"word1: "<<word1<<endm;
186 else if (hits[i]->detector() == kSsdId ||
187 hits[i]->detector() == kSstId) {
189 LOG_DEBUG<<
"HFT format for the SST hit map"<<endm;
192 LOG_DEBUG<<
"set bit for SST 2nd-layer to 1"<<endm;
195 LOG_DEBUG<<
"set bit for SST 1st-layer to 1"<<endm;
198 if (word1 & 1U<<7) word2 |= 1U<<30;
199 LOG_DEBUG<<
"track has hit in ssd"<<endm;
202 LOG_DEBUG<<
"word1: "<<word1<<endm;
204 else if (hits[i]->detector() == kTpcId) {
205 unsigned int sector =
static_cast<const StTpcHit*
>(hits[i])->sector();
206 unsigned int padrow =
static_cast<const StTpcHit*
>(hits[i])->padrow();
207 bool isiTpc = St_tpcPadConfigC::instance()->isiTpcSector(sector);
208 bool isInner = St_tpcPadConfigC::instance()->isInnerPadRow(sector, padrow);
209 if (isiTpc && isInner) {
211 k =
dynamic_cast<const StTpcHit*
>(hits[i])->padrow();
212 if (wordiTpc & 1ULL<<k) word2 |= 1U<<30;
216 k = isiTpc ? padrow - 40 + 13 : padrow;
218 if (word1 & 1U<<(k+7)) word2 |= 1U<<30;
222 if (word2 & 1U<<(k-25)) word2 |= 1U<<30;
226 else if (hits[i]->detector() == kiTpcId) {
227 k =
dynamic_cast<const StTpcHit*
>(hits[i])->padrow();
228 if (wordiTpc & 1ULL<<k) word2 |= 1U<<30;
235 track->setTopologyMap(newmap);