50 unsigned int address = 0;
51 unsigned int iEta, iPt;
53 for (
unsigned int iGP = 0; iGP < nGPs; ++iGP) {
56 iCharge = chargeLUT->
data(address) == 0 ? -1 : 1;
57 iPt = ptLUT->
data(address);
69 meanDistPhi1D[iRefLayer] = meanDistPhiLUT->
data(address) - (1 << (meanDistPhiLUT->
nrBitsData() - 1));
71 meanDistPhi2D[iLayer] = meanDistPhi1D;
79 pdf1D[iPdf] = pdfLUT->
data(address);
81 pdf2D[iRefLayer] = pdf1D;
83 pdf3D[iLayer] = pdf2D;
85 Key aKey(
iEta, iPt, iCharge, iGP);
99 <<
"OMTFProcessor::addGP(...) "
100 <<
" Reading two Golden Patterns with the same key: " << aGP->
key() << std::endl;
107 itRegion[aGP->
key()] = aResult;
127 aGP2 =
theGPs.find(aKey)->second;
134 aGP3 =
theGPs.find(aKey)->second;
140 aGP4 =
theGPs.find(aKey)->second;
161 meanDistPhi[iLayer][iRefLayer] += meanDistPhi2[iLayer][iRefLayer];
162 meanDistPhi[iLayer][iRefLayer] += meanDistPhi3[iLayer][iRefLayer];
163 meanDistPhi[iLayer][iRefLayer] += meanDistPhi4[iLayer][iRefLayer];
164 meanDistPhi[iLayer][iRefLayer] /= 4;
171 shiftGP(aGP1, meanDistPhi, meanDistPhi1);
172 shiftGP(aGP2, meanDistPhi, meanDistPhi2);
173 if (aGP3 != aGP1 && aGP4 != aGP2) {
176 shiftGP(aGP3, meanDistPhi, meanDistPhi3);
177 shiftGP(aGP4, meanDistPhi, meanDistPhi4);
194 indexShift = meanDistPhiOld[iLayer][iRefLayer] - meanDistPhiNew[iLayer][iRefLayer];
195 for (
unsigned int iPdfBin = 0; iPdfBin < nPdfBins; ++iPdfBin)
196 pdfAllRef[iLayer][iRefLayer][iPdfBin] = 0;
197 for (
unsigned int iPdfBin = 0; iPdfBin < nPdfBins; ++iPdfBin) {
198 if ((
int)(iPdfBin) + indexShift >= 0 && iPdfBin + indexShift < nPdfBins)
199 pdfAllRef[iLayer][iRefLayer][iPdfBin + indexShift] = aGP->
pdfValue(iLayer, iRefLayer, iPdfBin);
213 for (
auto &itKey : itRegion)
214 itKey.second.clear();
218 std::bitset<128> refHitsBits = aInput.
getRefHits(iProcessor);
219 if (refHitsBits.none())
224 if (layerHits.empty())
229 if (!refHitsBits[iRefHit])
231 if (nTestedRefHits-- == 0)
238 unsigned int iRegion = aRefHitDef.
iRegion;
243 for (
auto itGP :
theGPs) {
245 itGP.second->process1Layer1RefLayer(aRefHitDef.
iRefLayer, iLayer, phiRef, restrictedLayerHits);
246 int phiRefSt2 = itGP.second->propagateRefPhi(phiRef, etaRef, aRefHitDef.
iRefLayer);
250 aRefHitDef.
iRefLayer, iLayer, aLayerResult.first, phiRefSt2, etaRef);
257 for (
auto &itKey : itRefHit)
258 itKey.second.finalise();
260 std::ostringstream myStr;
261 myStr <<
"iProcessor: " << iProcessor << std::endl;
262 myStr <<
"Input: ------------" << std::endl;
263 myStr << aInput << std::endl;
271 unsigned int iRegion,
279 for (
unsigned int iInput = 0; iInput < 14; ++iInput) {
280 if (iInput < iStart || iInput > iEnd)
301 std::bitset<128> refHitsBits = aInput.
getRefHits(iProcessor);
302 if (refHitsBits.none())
305 std::ostringstream myStr;
306 myStr <<
"iProcessor: " << iProcessor << std::endl;
307 myStr <<
"Input: ------------" << std::endl;
308 myStr << aInput << std::endl;
313 if (layerHits.empty())
317 if (!refHitsBits[iRefHit])
321 unsigned int iRegion = aRefHitDef.
iRegion;
325 for (
auto itGP :
theGPs) {
328 if (itGP.first.thePtCode != iPt)
330 itGP.second->addCount(aRefHitDef.
iRefLayer, iLayer, phiRef, restrictedLayerHits);