diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 34e9b5bc0f5b9ff96a80cb786fa39fbfbc34f8b5..5f92db9b6f641369696ed4e35909324addabd940 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -893,8 +893,8 @@ void CbmL1::Reconstruct(CbmEvent* event) int nStsHits = 0; if (fUseSTS && listStsHits) { nStsHits = listStsHits->GetEntriesFast(); } - L1Vector<std::pair<double, int>> SortStsHits("CbmL1::SortStsHits"); - SortStsHits.reserve(nStsHits); + L1Vector<std::pair<double, int>> SortHits("CbmL1::SortHits"); + SortHits.reserve(nStsHits); float start_t = 10000000000; @@ -910,16 +910,16 @@ void CbmL1::Reconstruct(CbmEvent* event) CbmStsHit* sh = L1_DYNAMIC_CAST<CbmStsHit*>(listStsHits->At(j)); double t = sh->GetTime(); if (t < start_t) start_t = t; - SortStsHits.push_back(std::pair<double, int>(t, j)); + SortHits.push_back(std::pair<double, int>(t, j)); } TsStart = start_t; ///reco TS start time is set to smallest hit time - std::sort(SortStsHits.begin(), SortStsHits.end()); + std::sort(SortHits.begin(), SortHits.end()); StsIndex.clear(); - StsIndex.reserve(SortStsHits.size()); - for (unsigned int i = 0; i < SortStsHits.size(); i++) { - int j = SortStsHits[i].second; + StsIndex.reserve(SortHits.size()); + for (unsigned int i = 0; i < SortHits.size(); i++) { + int j = SortHits[i].second; StsIndex.push_back(j); }; @@ -980,8 +980,8 @@ void CbmL1::Reconstruct(CbmEvent* event) if (fSTAPDataMode >= 2) { // 2,3 fData->ReadHitsFromFile(fSTAPDataDir.Data(), 1, fVerbose); - algo->SetData(fData->GetStsHits(), fData->GetNStsStrips(), fData->GetSFlag(), fData->GetStsHitsStartIndex(), - fData->GetStsHitsStopIndex()); + algo->SetData(fData->GetHits(), fData->GetNstrips(), fData->GetSFlag(), fData->GetHitsStartIndex(), + fData->GetHitsStopIndex()); } else { ReadEvent(fData, TsStart, TsLength, TsOverlap, FstHitinTs, areDataLeft, event); @@ -990,14 +990,14 @@ void CbmL1::Reconstruct(CbmEvent* event) if constexpr (0) { // correct hits on MC // dbg TRandom3 random; L1Vector<int> strips("CbmL1::strips"); - for (unsigned int iH = 0; iH < (*algo->vStsHits).size(); ++iH) { - L1Hit& h = const_cast<L1Hit&>((*algo->vStsHits)[iH]); + for (unsigned int iH = 0; iH < (*algo->vHits).size(); ++iH) { + L1Hit& h = const_cast<L1Hit&>((*algo->vHits)[iH]); #ifdef USE_EVENT_NUMBER h.n = -1; #endif - if (vStsHits[iH].mcPointIds.size() == 0) continue; + if (vHits[iH].mcPointIds.size() == 0) continue; - const CbmL1MCPoint& mcp = vMCPoints[vStsHits[iH].mcPointIds[0]]; + const CbmL1MCPoint& mcp = vMCPoints[vHits[iH].mcPointIds[0]]; #ifdef USE_EVENT_NUMBER h.n = mcp.event; @@ -1008,14 +1008,14 @@ void CbmL1::Reconstruct(CbmEvent* event) (*algo->fStripFlag).push_back((*algo->fStripFlag)[h.f]); - h.f = algo->NStsStrips; - algo->NStsStrips++; + h.f = algo->fNstrips; + algo->fNstrips++; } strips.push_back(h.f); if (std::find(strips.begin(), strips.end(), h.b) != strips.end()) { (*algo->fStripFlag).push_back((*algo->fStripFlag)[h.b]); - h.b = algo->NStsStrips; - algo->NStsStrips++; + h.b = algo->fNstrips; + algo->fNstrips++; } strips.push_back(h.b); @@ -1057,14 +1057,14 @@ void CbmL1::Reconstruct(CbmEvent* event) // FieldApproxCheck(); // FieldIntegralCheck(); - for (unsigned int iH = 0; iH < (*algo->vStsHits).size(); ++iH) { + for (unsigned int iH = 0; iH < (*algo->vHits).size(); ++iH) { #ifdef USE_EVENT_NUMBER - L1Hit& h = const_cast<L1Hit&>((*algo->vStsHits)[iH]); + L1Hit& h = const_cast<L1Hit&>((*algo->vHits)[iH]); h.n = -1; #endif - if (vStsHits[iH].mcPointIds.size() == 0) continue; + if (vHits[iH].mcPointIds.size() == 0) continue; #ifdef USE_EVENT_NUMBER - const CbmL1MCPoint& mcp = vMCPoints[vStsHits[iH].mcPointIds[0]]; + const CbmL1MCPoint& mcp = vMCPoints[vHits[iH].mcPointIds[0]]; h.n = mcp.event; #endif } @@ -1119,22 +1119,22 @@ void CbmL1::Reconstruct(CbmEvent* event) t.chi2 = it->chi2; t.NDF = it->NDF; //t.T[4] = it->Momentum; - t.StsHits.clear(); + t.Hits.clear(); t.fTrackTime = it->fTrackTime; - L1Vector<int> StsHitsLocal("CbmL1::StsHitsLocal"); - StsHitsLocal.reserve(it->NHits); + L1Vector<int> HitsLocal("CbmL1::HitsLocal"); + HitsLocal.reserve(it->NHits); for (int i = 0; i < it->NHits; i++) { int start_hit1 = start_hit; - if (algo->fRecoHits[start_hit1] > vStsHits.size() - 1) start_hit++; + if (algo->fRecoHits[start_hit1] > vHits.size() - 1) start_hit++; else if (!fLegacyEventMode) { - t.StsHits.push_back(((*algo->vStsHits)[algo->fRecoHits[start_hit]]).ID); + t.Hits.push_back(((*algo->vHits)[algo->fRecoHits[start_hit]]).ID); } else { - t.StsHits.push_back(algo->fRecoHits[start_hit]); + t.Hits.push_back(algo->fRecoHits[start_hit]); } - StsHitsLocal.push_back(algo->fRecoHits[start_hit++]); + HitsLocal.push_back(algo->fRecoHits[start_hit++]); } t.mass = algo->fDefaultMass; // pion mass @@ -1147,20 +1147,20 @@ void CbmL1::Reconstruct(CbmEvent* event) bool isInOverlap = 0; - for (unsigned int i = 0; i < StsHitsLocal.size(); i++) { - // if ((*ih) > int(vStsHits.size() - 1)) { + for (unsigned int i = 0; i < HitsLocal.size(); i++) { + // if ((*ih) > int(vHits.size() - 1)) { // indd = 1; // break; // } - if (vStsHits[StsHitsLocal[i]].t >= (TsStart + TsLength - TsOverlap)) { + if (vHits[HitsLocal[i]].t >= (TsStart + TsLength - TsOverlap)) { isInOverlap = 1; - if (TsStart_new > vStsHits[StsHitsLocal[i]].t) TsStart_new = vStsHits[StsHitsLocal[i]].t; + if (TsStart_new > vHits[HitsLocal[i]].t) TsStart_new = vHits[HitsLocal[i]].t; } - int nMCPoints = vStsHits[StsHitsLocal[i]].mcPointIds.size(); + int nMCPoints = vHits[HitsLocal[i]].mcPointIds.size(); for (int iP = 0; iP < nMCPoints; iP++) { - int iMC = vStsHits[StsHitsLocal[i]].mcPointIds[iP]; + int iMC = vHits[HitsLocal[i]].mcPointIds[iP]; if (iMC > int(vMCPoints.size() - 1)) { // cout << " iMC " << iMC << " vMCPoints.size() " << vMCPoints.size() << endl; indd = 1; @@ -1175,9 +1175,9 @@ void CbmL1::Reconstruct(CbmEvent* event) continue; ///Discard tracks from overlap region /// set strips as unused - for (unsigned int i = 0; i < StsHitsLocal.size(); i++) { - algo->SetFUnUsed(const_cast<unsigned char&>((*algo->fStripFlag)[vStsHits[StsHitsLocal[i]].f])); - algo->SetFUnUsed(const_cast<unsigned char&>((*algo->fStripFlag)[vStsHits[StsHitsLocal[i]].b])); + for (unsigned int i = 0; i < HitsLocal.size(); i++) { + algo->SetFUnUsed(const_cast<unsigned char&>((*algo->fStripFlag)[vHits[HitsLocal[i]].f])); + algo->SetFUnUsed(const_cast<unsigned char&>((*algo->fStripFlag)[vHits[HitsLocal[i]].b])); } } vRTracksCur.push_back(t); @@ -1229,8 +1229,8 @@ void CbmL1::Reconstruct(CbmEvent* event) vRTracks.reserve(vRTracksCur.size()); for (unsigned int iTrack = 0; iTrack < vRTracksCur.size(); iTrack++) { - for (unsigned int iHit = 0; iHit < vRTracksCur[iTrack].StsHits.size(); iHit++) - if (!fLegacyEventMode) vRTracksCur[iTrack].StsHits[iHit] = SortedIndex[vRTracksCur[iTrack].StsHits[iHit]]; + for (unsigned int iHit = 0; iHit < vRTracksCur[iTrack].Hits.size(); iHit++) + if (!fLegacyEventMode) vRTracksCur[iTrack].Hits[iHit] = SortedIndex[vRTracksCur[iTrack].Hits[iHit]]; vRTracks.push_back(vRTracksCur[iTrack]); } @@ -1239,14 +1239,14 @@ void CbmL1::Reconstruct(CbmEvent* event) if ((fPerformance) && (fSTAPDataMode < 2)) { InputPerformance(); } - for (unsigned int iH = 0; iH < (*algo->vStsHits).size(); ++iH) { + for (unsigned int iH = 0; iH < (*algo->vHits).size(); ++iH) { #ifdef USE_EVENT_NUMBER - L1Hit& h = const_cast<L1Hit&>((*algo->vStsHits)[iH]); + L1Hit& h = const_cast<L1Hit&>((*algo->vHits)[iH]); h.n = -1; #endif - if (vStsHits[iH].mcPointIds.size() == 0) continue; + if (vHits[iH].mcPointIds.size() == 0) continue; #ifdef USE_EVENT_NUMBER - const CbmL1MCPoint& mcp = vMCPoints[vStsHits[iH].mcPointIds[0]]; + const CbmL1MCPoint& mcp = vMCPoints[vHits[iH].mcPointIds[0]]; h.n = mcp.event; #endif } @@ -1334,16 +1334,16 @@ void CbmL1::IdealTrackFinder() if (!MC.IsReconstructable()) continue; if (!(MC.ID >= 0)) continue; - if (MC.StsHits.size() < 4) continue; + if (MC.Hits.size() < 4) continue; L1Track algoTr; algoTr.NHits = 0; L1Vector<int> hitIndices("CbmL1::hitIndices", algo->GetNstations(), -1); - for (unsigned int iH = 0; iH < MC.StsHits.size(); iH++) { - const int hitI = MC.StsHits[iH]; - const CbmL1Hit& hit = vStsHits[hitI]; + for (unsigned int iH = 0; iH < MC.Hits.size(); iH++) { + const int hitI = MC.Hits[iH]; + const CbmL1Hit& hit = vHits[hitI]; const int iStation = vMCPoints[hit.mcPointIds[0]].iStation; @@ -1417,11 +1417,11 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent fadata << "Event:" << " "; fadata << vNEvent << endl; - // write vStsStrips - int n = algo->NStsStrips; + // write vStrips + int n = algo->fNstrips; fadata << n << endl; if (fVerbose >= 4) { - cout << "vStsStrips[" << n << "]" + cout << "vStrips[" << n << "]" << " have been written." << endl; } // write fStripFlag @@ -1440,11 +1440,11 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent cout << "fStripFlagB[" << n << "]" << " have been written." << endl; } - // write vStsHits - n = (*algo->vStsHits).size(); + // write vHits + n = (*algo->vHits).size(); fadata << n << endl; for (int i = 0; i < n; i++) { - const L1Hit& h = (*algo->vStsHits)[i]; + const L1Hit& h = (*algo->vHits)[i]; fadata << static_cast<int>(h.f) << " "; fadata << static_cast<int>(h.b) << " "; #ifdef USE_EVENT_NUMBER @@ -1453,23 +1453,23 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent fadata << h.z << " "; fadata << h.u << " "; fadata << h.v << " "; - // fadata << (*algo->vStsHits)[i].time << endl; + // fadata << (*algo->vHits)[i].time << endl; fadata << h.t << endl; }; if (fVerbose >= 4) { - cout << "vStsHits[" << n << "]" + cout << "vHits[" << n << "]" << " have been written." << endl; } - // write StsHitsStartIndex and StsHitsStopIndex + // write HitsStartIndex and HitsStopIndex n = 20; for (int i = 0; i < n; i++) { - if (int(L1Constants::size::kMaxNstations) + 1 > i) { fadata << algo->StsHitsStartIndex[i] << endl; } + if (int(L1Constants::size::kMaxNstations) + 1 > i) { fadata << algo->HitsStartIndex[i] << endl; } else { fadata << 0 << endl; } }; for (int i = 0; i < n; i++) { - if (int(L1Constants::size::kMaxNstations) + 1 > i) fadata << algo->StsHitsStopIndex[i] << endl; + if (int(L1Constants::size::kMaxNstations) + 1 > i) fadata << algo->HitsStopIndex[i] << endl; else fadata << 0 << endl; }; @@ -1558,10 +1558,10 @@ void CbmL1::WriteSTAPPerfData() // must be called after ReadEvent fpdata << vMCTracks[i].ID << " "; fpdata << vMCTracks[i].mother_ID << endl; - int nhits = vMCTracks[i].StsHits.size(); + int nhits = vMCTracks[i].Hits.size(); fpdata << " " << nhits << endl << " "; for (int k = 0; k < nhits; k++) { - fpdata << vMCTracks[i].StsHits[k] << " "; + fpdata << vMCTracks[i].Hits[k] << " "; }; fpdata << endl; @@ -1607,22 +1607,22 @@ void CbmL1::WriteSTAPPerfData() // must be called after ReadEvent cout << "vHitStore[" << n << "]" << " have been written." << endl; } - // write vStsHits - n = vStsHits.size(); // number of elements + // write vHits + n = vHits.size(); // number of elements fpdata << n << endl; for (int i = 0; i < n; i++) { - fpdata << vStsHits[i].hitId << " "; - fpdata << vStsHits[i].extIndex << endl; + fpdata << vHits[i].hitId << " "; + fpdata << vHits[i].extIndex << endl; - const int nPoints = vStsHits[i].mcPointIds.size(); + const int nPoints = vHits[i].mcPointIds.size(); fpdata << nPoints << endl << " "; for (int k = 0; k < nPoints; k++) { - fpdata << vStsHits[i].mcPointIds[k] << " "; + fpdata << vHits[i].mcPointIds[k] << " "; }; fpdata << endl; }; if (fVerbose >= 4) { - cout << "vStsHits[" << n << "]" + cout << "vHits[" << n << "]" << " have been written." << endl; } fpdata.close(); @@ -1672,8 +1672,8 @@ void CbmL1::ReadSTAPAlgoData() if (1) { if (nEvent == 1) fadata.open(fadata_name, std::fstream::in); - if (algo->vStsHits) algo->vStsHits->clear(); - algo->NStsStrips = 0; + if (algo->vHits) algo->vHits->clear(); + algo->fNstrips = 0; if (algo->fStripFlag) algo->fStripFlag->clear(); // check correct position in file @@ -1684,12 +1684,12 @@ void CbmL1::ReadSTAPAlgoData() if (nEv != nEvent) cout << "-E- CbmL1: Can't read event number " << nEvent << " from file " << fadata_name << endl; int n; // number of elements - // read algo->vStsStrips + // read algo->vStrips fadata >> n; cout << " n " << n << endl; - algo->NStsStrips = n; + algo->fNstrips = n; if (fVerbose >= 4) { - cout << "vStsStrips[" << n << "]" + cout << "vStrips[" << n << "]" << " have been read." << endl; } // read algo->fStripFlag @@ -1703,7 +1703,7 @@ void CbmL1::ReadSTAPAlgoData() cout << "fStripFlag[" << n << "]" << " have been read." << endl; } - // read algo->vStsHits + // read algo->vHits fadata >> n; int element_f; // for convert int element_b; @@ -1713,23 +1713,23 @@ void CbmL1::ReadSTAPAlgoData() fadata >> element_f >> element_b >> element_n >> element.z >> element.u >> element.v >> element.t; element.f = static_cast<L1HitIndex_t>(element_f); element.b = static_cast<L1HitIndex_t>(element_b); - algo->vStsHits->push_back(element); + algo->vHits->push_back(element); } if (fVerbose >= 4) { - cout << "vStsHits[" << n << "]" + cout << "vHits[" << n << "]" << " have been read." << endl; } - // read StsHitsStartIndex and StsHitsStopIndex + // read HitsStartIndex and HitsStopIndex n = 20; // TODO: Why 20? (S.Zh.) for (int i = 0; i < n; i++) { int tmp; fadata >> tmp; - if (int(L1Constants::size::kMaxNstations) + 1 > i) (const_cast<unsigned int&>(algo->StsHitsStartIndex[i]) = tmp); + if (int(L1Constants::size::kMaxNstations) + 1 > i) (const_cast<unsigned int&>(algo->HitsStartIndex[i]) = tmp); } for (int i = 0; i < n; i++) { int tmp; fadata >> tmp; - if (int(L1Constants::size::kMaxNstations) + 1 > i) (const_cast<unsigned int&>(algo->StsHitsStopIndex[i]) = tmp); + if (int(L1Constants::size::kMaxNstations) + 1 > i) (const_cast<unsigned int&>(algo->HitsStopIndex[i]) = tmp); } cout << "-I- CbmL1: CATrackFinder data for event " << nEvent << " has been read from file " << fadata_name @@ -1751,7 +1751,7 @@ void CbmL1::ReadSTAPPerfData() vMCTracks.clear(); vHitMCRef.clear(); vHitStore.clear(); - vStsHits.clear(); + vHits.clear(); dFEI2vMCPoints.clear(); dFEI2vMCTracks.clear(); // check if it is right position in file @@ -1832,7 +1832,7 @@ void CbmL1::ReadSTAPPerfData() for (int k = 0; k < nhits; k++) { int helement; fpdata >> helement; - element.StsHits.push_back(helement); + element.Hits.push_back(helement); }; fpdata >> nhits; for (int k = 0; k < nhits; k++) { @@ -1883,7 +1883,7 @@ void CbmL1::ReadSTAPPerfData() cout << "vHitStore[" << n << "]" << " have been read." << endl; } - // vStsHits + // vHits fpdata >> n; for (int i = 0; i < n; i++) { CbmL1Hit element; @@ -1897,10 +1897,10 @@ void CbmL1::ReadSTAPPerfData() fpdata >> id; element.mcPointIds.push_back(id); }; - vStsHits.push_back(element); + vHits.push_back(element); }; if (fVerbose >= 4) { - cout << "vStsHits[" << n << "]" + cout << "vHits[" << n << "]" << " have been read." << endl; } @@ -2109,12 +2109,12 @@ void CbmL1::WriteSIMDKFData() CbmL1MCTrack* MCTrack = RecTrack->GetMCTrack(); if (!(MCTrack->IsPrimary())) continue; - int NHits = (RecTrack->StsHits).size(); + int NHits = (RecTrack->Hits).size(); float x[20], y[20], z[20]; int st[20]; int jHit = 0; for (int iHit = 0; iHit < NHits; iHit++) { - CbmL1HitStore& h = vHitStore[RecTrack->StsHits[iHit]]; + CbmL1HitStore& h = vHitStore[RecTrack->Hits[iHit]]; st[jHit] = h.iStation; if (h.ExtIndex < 0) { CbmMvdHit* MvdH = (CbmMvdHit*) listMvdHits->At(-h.ExtIndex - 1); diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index eb4a137877b4300c4c53335e38e8d92248db700f..27a6e2b0c80661a13ea9ccd725f925761a3dcf80 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -487,14 +487,14 @@ private: TH1F* fGhostHisto[fNGhostHistos] {nullptr}; /// Used data = Repacked input data - L1Vector<CbmL1Hit> vStsHits {"CbmL1::vStsHits"}; // hits with hit-mcpoint match information + L1Vector<CbmL1Hit> vHits {"CbmL1::vHits"}; // hits with hit-mcpoint match information L1Vector<int> SortedIndex {"CbmL1::SortedIndex"}; L1Vector<int> StsIndex {"CbmL1::StsIndex"}; L1Vector<CbmL1MCTrack> vMCTracks {"CbmL1::vMCTracks"}; L1Vector<int> vHitMCRef { - "CbmL1::vHitMCRef"}; // indices of MCPoints in vMCPoints, indexed by index of hit in algo->vStsHits array. According to StsMatch. Used for IdealResponce + "CbmL1::vHitMCRef"}; // indices of MCPoints in vMCPoints, indexed by index of hit in algo->vHits array. According to StsMatch. Used for IdealResponce // L1Vector<int> vHitMCRef1; - // CbmMatch stsHitMatch; + // CbmMatch HitMatch; DFEI2I dFEI2vMCPoints {}; DFEI2I dFEI2vMCTracks {}; diff --git a/reco/L1/CbmL1MCTrack.cxx b/reco/L1/CbmL1MCTrack.cxx index 996cef6bb2fddbe8f618f50790c28dd440ce6929..86dd7e6cf0dd4f75be632a6ded70198c47a4286b 100644 --- a/reco/L1/CbmL1MCTrack.cxx +++ b/reco/L1/CbmL1MCTrack.cxx @@ -61,13 +61,13 @@ CbmL1MCTrack::CbmL1MCTrack(double mass_, double q_, TVector3 vr, TLorentzVector void CbmL1MCTrack::Init() { CbmL1* L1 = CbmL1::Instance(); - // get stsHits - StsHits.clear(); + // get Hits + Hits.clear(); for (unsigned int iP = 0; iP < Points.size(); iP++) { CbmL1MCPoint* point = &(L1->vMCPoints[Points[iP]]); for (unsigned int iH = 0; iH < point->hitIds.size(); iH++) { const int iih = point->hitIds[iH]; - if (std::find(StsHits.begin(), StsHits.end(), iih) == StsHits.end()) StsHits.push_back_no_warning(iih); + if (std::find(Hits.begin(), Hits.end(), iih) == Hits.end()) Hits.push_back_no_warning(iih); } } @@ -118,13 +118,13 @@ void CbmL1MCTrack::CalculateHitCont() CbmL1* L1 = CbmL1::Instance(); L1Algo* algo = L1->algo; - int nhits = StsHits.size(); + int nhits = Hits.size(); nHitContStations = 0; int istaold = -1, ncont = 0; { for (int ih = 0; ih < nhits; ih++) { - int jh = StsHits[ih]; - const L1Hit& h = (*algo->vStsHits)[jh]; + int jh = Hits[ih]; + const L1Hit& h = (*algo->vHits)[jh]; int ista = (*algo->fStripFlag)[h.f] / 4; if (ista - istaold == 1) ncont++; @@ -154,8 +154,8 @@ void CbmL1MCTrack::CalculateMaxNStaHits() nStations = 0; int lastSta = -1; int cur_maxNStaHits = 0; - for (unsigned int iH = 0; iH < StsHits.size(); iH++) { - CbmL1HitStore& sh = L1->vHitStore[StsHits[iH]]; + for (unsigned int iH = 0; iH < Hits.size(); iH++) { + CbmL1HitStore& sh = L1->vHitStore[Hits[iH]]; if (sh.iStation == lastSta) { cur_maxNStaHits++; } else { // new station if (!(sh.iStation > lastSta)) { // tracks going in backward direction are not reconstructable @@ -169,7 +169,7 @@ void CbmL1MCTrack::CalculateMaxNStaHits() } }; if (cur_maxNStaHits > maxNStaHits) maxNStaHits = cur_maxNStaHits; - // cout << pdg << " " << p << " " << StsHits.size() << " > " << maxNStaHits << endl; + // cout << pdg << " " << p << " " << Hits.size() << " > " << maxNStaHits << endl; }; // void CbmL1MCTrack::CalculateHitCont() void CbmL1MCTrack::CalculateMaxNStaMC() diff --git a/reco/L1/CbmL1MCTrack.h b/reco/L1/CbmL1MCTrack.h index 02458d19beef1f7df2e56c6c8fdd05fb28d431d8..3e4d4ec2a860672efb9cf79afa13b7a777807bb5 100644 --- a/reco/L1/CbmL1MCTrack.h +++ b/reco/L1/CbmL1MCTrack.h @@ -86,7 +86,7 @@ public: int pdg = -1; bool isSignal {0}; L1Vector<int> Points {"CbmL1MCTrack::Points"}; // indices of pints in L1::vMCPoints - L1Vector<int> StsHits {"CbmL1MCTrack::StsHits"}; // indices of hits in algo->vStsHits or L1::vStsHits + L1Vector<int> Hits {"CbmL1MCTrack::Hits"}; // indices of hits in algo->vHits or L1::vHits private: int nMCContStations = 0; // number of consecutive stations with mcPoints diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index d650160dfbe5bcb5361381fb8e2b34d97856d833..86b242569c21329a02729b329882b578cc22c6be 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -82,15 +82,15 @@ void CbmL1::TrackMatch() // cout<<iR<<" iR"<<endl; - int hitsum = prtra->StsHits.size(); // number of hits in track + int hitsum = prtra->Hits.size(); // number of hits in track // count how many hits from each mcTrack belong to current recoTrack map<int, int>& hitmap = prtra->hitMap; // how many hits from each mcTrack belong to current recoTrack - for (vector<int>::iterator ih = (prtra->StsHits).begin(); ih != (prtra->StsHits).end(); ++ih) { + for (vector<int>::iterator ih = (prtra->Hits).begin(); ih != (prtra->Hits).end(); ++ih) { - const int nMCPoints = vStsHits[*ih].mcPointIds.size(); + const int nMCPoints = vHits[*ih].mcPointIds.size(); for (int iP = 0; iP < nMCPoints; iP++) { - int iMC = vStsHits[*ih].mcPointIds[iP]; + int iMC = vHits[*ih].mcPointIds[iP]; // cout<<iMC<<" iMC"<<endl; int ID = -1; @@ -359,7 +359,7 @@ void CbmL1::EfficienciesPerformance() if (reco) nclones = mtra.GetNClones(); // if (nclones){ // Debug. Look at clones // for (int irt = 0; irt < rTracks.size(); irt++){ - // const int ista = vHitStore[rTracks[irt]->StsHits[0]].iStation; + // const int ista = vHitStore[rTracks[irt]->Hits[0]].iStation; // cout << rTracks[irt]->GetNOfHits() << "(" << ista << ") "; // } // cout << mtra.NStations() << endl; @@ -761,11 +761,11 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe // for (vector<CbmL1Track>::iterator rtraIt = vRTracks.begin(); rtraIt != vRTracks.end(); ++rtraIt) { CbmL1Track* prtra = &(*rtraIt); - if ((prtra->StsHits).size() < 1) continue; + if ((prtra->Hits).size() < 1) continue; { // fill histos if (fabs(prtra->T[4]) > 1.e-10) h_reco_mom->Fill(fabs(1.0 / prtra->T[4])); - h_reco_nhits->Fill((prtra->StsHits).size()); - CbmL1HitStore& mh = vHitStore[prtra->StsHits[0]]; + h_reco_nhits->Fill((prtra->Hits).size()); + CbmL1HitStore& mh = vHitStore[prtra->Hits[0]]; h_reco_station->Fill(mh.iStation); } @@ -795,9 +795,9 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe h_ghost_mom->Fill(fabs(1.0 / prtra->T[4])); h_ghost_Rmom->Fill(fabs(1.0 / prtra->T[4])); } - h_ghost_nhits->Fill((prtra->StsHits).size()); - CbmL1HitStore& h1 = vHitStore[prtra->StsHits[0]]; - CbmL1HitStore& h2 = vHitStore[prtra->StsHits[1]]; + h_ghost_nhits->Fill((prtra->Hits).size()); + CbmL1HitStore& h1 = vHitStore[prtra->Hits[0]]; + CbmL1HitStore& h2 = vHitStore[prtra->Hits[1]]; h_ghost_fstation->Fill(h1.iStation); h_ghost_r->Fill(sqrt(fabs(h1.x * h1.x + h1.y * h1.y))); double z1 = algo->GetParameters()->GetStation(h1.iStation).z[0]; @@ -807,9 +807,9 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe h_ghost_ty->Fill((h2.y - h1.y) / (z2 - z1)); } - if (fabs(prtra->T[4]) > 1.e-10) h2_ghost_nhits_vs_mom->Fill(fabs(1.0 / prtra->T[4]), (prtra->StsHits).size()); - CbmL1HitStore& hf = vHitStore[prtra->StsHits[0]]; - CbmL1HitStore& hl = vHitStore[prtra->StsHits[(prtra->StsHits).size() - 1]]; + if (fabs(prtra->T[4]) > 1.e-10) h2_ghost_nhits_vs_mom->Fill(fabs(1.0 / prtra->T[4]), (prtra->Hits).size()); + CbmL1HitStore& hf = vHitStore[prtra->Hits[0]]; + CbmL1HitStore& hl = vHitStore[prtra->Hits[(prtra->Hits).size() - 1]]; if (fabs(prtra->T[4]) > 1.e-10) h2_ghost_fstation_vs_mom->Fill(fabs(1.0 / prtra->T[4]), hf.iStation + 1); if (hl.iStation >= hf.iStation) h2_ghost_lstation_vs_fstation->Fill(hf.iStation + 1, hl.iStation + 1); } @@ -822,7 +822,7 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe // if( !( mtra.pdg == -11 && mtra.mother_ID == -1 ) ) continue; // electrons only // No Sts hits? - int nmchits = mtra.StsHits.size(); + int nmchits = mtra.Hits.size(); if (nmchits == 0) continue; double momentum = mtra.p; @@ -834,8 +834,8 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe int nSta = mtra.NStations(); - CbmL1HitStore& fh = vHitStore[*(mtra.StsHits.begin())]; - CbmL1HitStore& lh = vHitStore[*(mtra.StsHits.rbegin())]; + CbmL1HitStore& fh = vHitStore[*(mtra.Hits.begin())]; + CbmL1HitStore& lh = vHitStore[*(mtra.Hits.rbegin())]; h_reg_MCmom->Fill(momentum); if (mtra.IsPrimary()) { @@ -896,7 +896,7 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe } - int iph = mtra.StsHits[0]; + int iph = mtra.Hits[0]; CbmL1HitStore& ph = vHitStore[iph]; h_sec_r->Fill(sqrt(fabs(ph.x * ph.x + ph.y * ph.y))); @@ -989,8 +989,8 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe h_notfound_ty->Fill(pMC.py / pMC.pz); } - // CbmL1HitStore &ph21 = vHitStore[mtra.StsHits[0]]; - // CbmL1HitStore &ph22 = vHitStore[mtra.StsHits[1]]; + // CbmL1HitStore &ph21 = vHitStore[mtra.Hits[0]]; + // CbmL1HitStore &ph22 = vHitStore[mtra.Hits[1]]; // double z21 = algo->GetParameters()->GetStation(ph21.iStation).z[0]; // double z22 = algo->GetParameters()->GetStation(ph22.iStation).z[0]; @@ -1013,17 +1013,17 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe } // for mcTracks int NFakes = 0; - for (unsigned int ih = 0; ih < algo->vStsHits->size(); ih++) { + for (unsigned int ih = 0; ih < algo->vHits->size(); ih++) { int iMC = vHitMCRef[ih]; // TODO2: adapt to linking if (iMC < 0) NFakes++; } h_reco_time->Fill(fTrackingTime); h_reco_timeNtr->Fill(mc_total, fTrackingTime); - h_reco_timeNhit->Fill(algo->vStsHits->size(), fTrackingTime); + h_reco_timeNhit->Fill(algo->vHits->size(), fTrackingTime); h_reco_fakeNtr->Fill(mc_total, NFakes); - h_reco_fakeNhit->Fill(algo->vStsHits->size() - NFakes, NFakes); + h_reco_fakeNhit->Fill(algo->vHits->size() - NFakes, NFakes); h_reg_MCmom->Scale(1.f / NEvents); @@ -1182,7 +1182,7 @@ void CbmL1::TrackFitPerformance() #define L1FSTPARAMEXTRAPOLATE #ifdef L1FSTPARAMEXTRAPOLATE - const int last_station = vHitStore[it->StsHits.back()].iStation; + const int last_station = vHitStore[it->Hits.back()].iStation; CbmL1MCTrack mc = *(it->GetMCTracks()[0]); L1TrackPar trPar(it->T, it->C); @@ -1256,7 +1256,7 @@ void CbmL1::TrackFitPerformance() if (finite(trPar.C55[0]) && trPar.C55[0] > 0) h_fit[13]->Fill((trPar.t[0] - mcP.time) / sqrt(trPar.C55[0])); #else - int iMC = vHitMCRef[it->StsHits.front()]; // TODO2: adapt to linking + int iMC = vHitMCRef[it->Hits.front()]; // TODO2: adapt to linking if (iMC < 0) continue; CbmL1MCPoint& mc = vMCPoints[iMC]; // if( !( mc.pdg == -11 && mc.mother_ID == -1 ) ) continue; // electrons only @@ -1287,13 +1287,13 @@ void CbmL1::TrackFitPerformance() { // last hit - int iMC = vHitMCRef[it->StsHits.back()]; // TODO2: adapt to linking + int iMC = vHitMCRef[it->Hits.back()]; // TODO2: adapt to linking if (iMC < 0) continue; #define L1FSTPARAMEXTRAPOLATE #ifdef L1FSTPARAMEXTRAPOLATE - const int last_station = vHitStore[it->StsHits.back()].iStation; + const int last_station = vHitStore[it->Hits.back()].iStation; CbmL1MCTrack mc = *(it->GetMCTracks()[0]); L1TrackPar trPar(it->TLast, it->CLast); @@ -1383,7 +1383,7 @@ void CbmL1::TrackFitPerformance() L1Extrapolate(trPar, mc.z, trPar.qp, fld); // add material - const int fSta = vHitStore[it->StsHits[0]].iStation; + const int fSta = vHitStore[it->Hits[0]].iStation; const int dir = int((mc.z - algo->GetParameters()->GetStation(fSta).z[0]) / fabs(mc.z - algo->GetParameters()->GetStation(fSta).z[0])); // if (abs(mc.z - algo->GetParameters()->GetStation(fSta).z[0]) > 10.) continue; // can't extrapolate on large distance @@ -1438,18 +1438,18 @@ void CbmL1::TrackFitPerformance() targB = algo->GetParameters()->GetVertexFieldValue(); int ih = 1; - for (unsigned int iHit = 0; iHit < it->StsHits.size(); iHit++) { - const int iStation = vHitStore[it->StsHits[iHit]].iStation; + for (unsigned int iHit = 0; iHit < it->Hits.size(); iHit++) { + const int iStation = vHitStore[it->Hits[iHit]].iStation; const L1Station& st = algo->GetParameters()->GetStation(iStation); z[ih] = st.z[0]; - st.fieldSlice.GetFieldValue(vHitStore[it->StsHits[iHit]].x, vHitStore[it->StsHits[iHit]].y, B[ih]); + st.fieldSlice.GetFieldValue(vHitStore[it->Hits[iHit]].x, vHitStore[it->Hits[iHit]].y, B[ih]); ih++; if (ih == 3) break; } if (ih < 3) continue; // add material - const int fSta = vHitStore[it->StsHits[0]].iStation; + const int fSta = vHitStore[it->Hits[0]].iStation; const int dir = (mc.z - algo->GetParameters()->GetStation(fSta).z[0]) / abs(mc.z - algo->GetParameters()->GetStation(fSta).z[0]); @@ -1920,8 +1920,8 @@ void CbmL1::InputPerformance() map<unsigned int, unsigned int>::iterator it; if (listStsHits && listStsHitMatch) { - for (unsigned int iH = 0; iH < vStsHits.size(); iH++) { - const CbmL1Hit& h = vStsHits[iH]; + for (unsigned int iH = 0; iH < vHits.size(); iH++) { + const CbmL1Hit& h = vHits[iH]; if (h.Det != 1) continue; // mvd hit const CbmStsHit* sh = L1_DYNAMIC_CAST<CbmStsHit*>(listStsHits->At(h.extIndex)); @@ -2049,8 +2049,8 @@ void CbmL1::InputPerformance() if (fMuchPixelHits && listMuchHitMatches) { - for (unsigned int iH = 0; iH < vStsHits.size(); iH++) { - const CbmL1Hit& h = vStsHits[iH]; + for (unsigned int iH = 0; iH < vHits.size(); iH++) { + const CbmL1Hit& h = vHits[iH]; if (h.Det != 2) continue; // mvd hit @@ -2118,8 +2118,8 @@ void CbmL1::InputPerformance() if (listTrdHits && fTrdHitMatches) { - for (unsigned int iH = 0; iH < vStsHits.size(); iH++) { - const CbmL1Hit& h = vStsHits[iH]; + for (unsigned int iH = 0; iH < vHits.size(); iH++) { + const CbmL1Hit& h = vHits[iH]; if (h.Det != 3) continue; // mvd hit const CbmTrdHit* sh = L1_DYNAMIC_CAST<CbmTrdHit*>(listTrdHits->At(h.extIndex)); @@ -2186,8 +2186,8 @@ void CbmL1::InputPerformance() if (fTofHits && fTofHitDigiMatches) { - for (unsigned int iH = 0; iH < vStsHits.size(); iH++) { - const CbmL1Hit& h = vStsHits[iH]; + for (unsigned int iH = 0; iH < vHits.size(); iH++) { + const CbmL1Hit& h = vHits[iH]; if (h.Det != 4) continue; // mvd hit diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx index 2588913575c546b4967f84311b4cdf2c5afdd3a6..6246b84b0c6b753cb066222312a896d94093f060 100644 --- a/reco/L1/CbmL1ReadEvent.cxx +++ b/reco/L1/CbmL1ReadEvent.cxx @@ -180,9 +180,9 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, vMCPoints.clear(); /* <CbmL1MCPoint> */ vMCPoints_in_Time_Slice.clear(); /* <int> */ vMCTracks.clear(); /* <CbmL1MCTrack> */ - vStsHits.clear(); /* <CbmL1Hit> */ + vHits.clear(); /* <CbmL1Hit> */ vRTracks.clear(); /* <CbmL1Track> */ - vHitMCRef.clear(); /* <int>: indexes of MC-points in vMCPoints (by index of algo->vStsHits) */ + vHitMCRef.clear(); /* <int>: indexes of MC-points in vMCPoints (by index of algo->vHits) */ vHitStore.clear(); /* <CbmL1HitStore> */ dFEI2vMCPoints.clear(); /* dFEI vs MC-point index: dFEI = index * 10000 + fileID + eventID * 0.0001 */ dFEI2vMCTracks.clear(); /* dFEI vs MC-track index: dFEI = index * 10000 + fileID + eventID * 0.0001 */ @@ -213,8 +213,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, for (int i = 0; i < NStation; i++) { - fData_->StsHitsStartIndex[i] = static_cast<L1HitIndex_t>(-1); - fData_->StsHitsStopIndex[i] = 0; + fData_->HitsStartIndex[i] = static_cast<L1HitIndex_t>(-1); + fData_->HitsStopIndex[i] = 0; } @@ -1124,7 +1124,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, /* * Save strips into L1Algo */ - fData_->NStsStrips = NStrips; + fData_->fNstrips = NStrips; fData_->fStripFlag.reset(NStrips, 0); int maxHitIndex = 0; @@ -1139,14 +1139,14 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, if (fVerbose >= 10) { cout << "ReadEvent: strips are read." << endl; } /* - * Fill and save vStsHits, vHitStore and vHitMCRef vectors as well as fData->vStsHits + * Fill and save vHits, vHitStore and vHitMCRef vectors as well as fData->vHits */ int nEffHits = 0; SortedIndex.reset(maxHitIndex + 1); - vStsHits.reserve(nHits); - fData_->vStsHits.reserve(nHits); + vHits.reserve(nHits); + fData_->vHits.reserve(nHits); vHitStore.reserve(nHits); vHitMCRef.reserve(nHits); @@ -1195,34 +1195,34 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, // save hit - vStsHits.push_back(CbmL1Hit(fData->vStsHits.size(), th.ExtIndex, th.Det)); + vHits.push_back(CbmL1Hit(fData->vHits.size(), th.ExtIndex, th.Det)); - vStsHits[vStsHits.size() - 1].x = th.x; - vStsHits[vStsHits.size() - 1].y = th.y; - vStsHits[vStsHits.size() - 1].t = th.time; + vHits[vHits.size() - 1].x = th.x; + vHits[vHits.size() - 1].y = th.y; + vHits[vHits.size() - 1].t = th.time; - vStsHits[vStsHits.size() - 1].ID = th.id; + vHits[vHits.size() - 1].ID = th.id; - vStsHits[vStsHits.size() - 1].f = th.iStripF; - vStsHits[vStsHits.size() - 1].b = th.iStripB; + vHits[vHits.size() - 1].f = th.iStripF; + vHits[vHits.size() - 1].b = th.iStripB; - fData_->vStsHits.push_back(h); + fData_->vHits.push_back(h); int iSt = th.iStation; - if (fData_->StsHitsStartIndex[iSt] == static_cast<L1HitIndex_t>(-1)) fData_->StsHitsStartIndex[iSt] = nEffHits; + if (fData_->HitsStartIndex[iSt] == static_cast<L1HitIndex_t>(-1)) fData_->HitsStartIndex[iSt] = nEffHits; nEffHits++; - fData_->StsHitsStopIndex[iSt] = nEffHits; + fData_->HitsStopIndex[iSt] = nEffHits; vHitStore.push_back(s); vHitMCRef.push_back(th.iMC); } for (int i = 0; i < NStation; i++) { - if (fData_->StsHitsStartIndex[i] == static_cast<L1HitIndex_t>(-1)) { - fData_->StsHitsStartIndex[i] = fData_->StsHitsStopIndex[i]; + if (fData_->HitsStartIndex[i] == static_cast<L1HitIndex_t>(-1)) { + fData_->HitsStartIndex[i] = fData_->HitsStopIndex[i]; } } @@ -1232,8 +1232,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, * Translate gathered hits data to the L1Algo object. TODO: raplace it with L1DataManager functionality (S.Zharko) */ - algo->SetData(fData_->GetStsHits(), fData_->GetNStsStrips(), fData_->GetSFlag(), fData_->GetStsHitsStartIndex(), - fData_->GetStsHitsStopIndex()); + algo->SetData(fData_->GetHits(), fData_->GetNstrips(), fData_->GetSFlag(), fData_->GetHitsStartIndex(), + fData_->GetHitsStopIndex()); if (fPerformance) { if (fVerbose >= 10) cout << "HitMatch is done." << endl; @@ -1475,12 +1475,12 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* /*MC*/, int /*iPoint*/, int /*MVD*/) { ret // void CbmL1::HitMatch() { - const int NHits = vStsHits.size(); + const int NHits = vHits.size(); for (int iH = 0; iH < NHits; iH++) { - CbmL1Hit& hit = vStsHits[iH]; + CbmL1Hit& hit = vHits[iH]; if ((hit.Det == 1) && (2 != fStsUseMcHit)) { - CbmStsHit* sh = L1_DYNAMIC_CAST<CbmStsHit*>(listStsHits->At(vStsHits[iH].extIndex)); + CbmStsHit* sh = L1_DYNAMIC_CAST<CbmStsHit*>(listStsHits->At(vHits[iH].extIndex)); int iP = -1; diff --git a/reco/L1/CbmL1Track.h b/reco/L1/CbmL1Track.h index f774c3274f6599f31f8e9206578344bce8b07c0a..4286a905adb66e20960ef68cbc438764cf8a63d2 100644 --- a/reco/L1/CbmL1Track.h +++ b/reco/L1/CbmL1Track.h @@ -34,9 +34,9 @@ class CbmL1MCTrack; class CbmL1Track : public CbmL1TrackPar { public: - CbmL1Track() : StsHits(), nStations(0), index(0), fTrackTime(0.), hitMap(), mcTracks(), maxPurity(-1) {} + CbmL1Track() : Hits(), nStations(0), index(0), fTrackTime(0.), hitMap(), mcTracks(), maxPurity(-1) {} - int GetNOfHits() { return StsHits.size(); } + int GetNOfHits() { return Hits.size(); } void AddMCTrack(CbmL1MCTrack* mcTr) { mcTracks.push_back(mcTr); } vector<CbmL1MCTrack*>& GetMCTracks() { return mcTracks; } @@ -55,7 +55,7 @@ public: double TLast[7], CLast[21]; - vector<int> StsHits; + vector<int> Hits; int nStations; int index; diff --git a/reco/L1/L1Algo/L1Algo.cxx b/reco/L1/L1Algo/L1Algo.cxx index c6e238a358bc8a1548e9a24043a007d4b860cf2b..88268ca1bb59c393ef9a915c24e4717689fba125 100644 --- a/reco/L1/L1Algo/L1Algo.cxx +++ b/reco/L1/L1Algo/L1Algo.cxx @@ -100,36 +100,36 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M } -void L1Algo::SetData(L1Vector<L1Hit>& StsHits_, int nStsStrips_, L1Vector<unsigned char>& SFlag_, - const L1HitIndex_t* StsHitsStartIndex_, const L1HitIndex_t* StsHitsStopIndex_) +void L1Algo::SetData(L1Vector<L1Hit>& Hits_, int nStrips_, L1Vector<unsigned char>& SFlag_, + const L1HitIndex_t* HitsStartIndex_, const L1HitIndex_t* HitsStopIndex_) { - vStsHits = &StsHits_; - NStsStrips = nStsStrips_; + vHits = &Hits_; + fNstrips = nStrips_; fStripFlag = &SFlag_; - StsHitsStartIndex = StsHitsStartIndex_; - StsHitsStopIndex = StsHitsStopIndex_; + HitsStartIndex = HitsStartIndex_; + HitsStopIndex = HitsStopIndex_; // TODO: maximal array sizes need to be adjusted - int nHits = vStsHits->size(); + int nHits = vHits->size(); NHitsIsecAll = nHits; - vStsDontUsedHits_A.reset(nHits); - vStsDontUsedHits_B.reset(nHits); - vStsDontUsedHits_Buf.reset(nHits); - vStsDontUsedHitsxy_A.reset(nHits); - vStsDontUsedHitsxy_buf.reset(nHits); - vStsDontUsedHitsxy_B.reset(nHits); + vDontUsedHits_A.reset(nHits); + vDontUsedHits_B.reset(nHits); + vDontUsedHits_Buf.reset(nHits); + vDontUsedHitsxy_A.reset(nHits); + vDontUsedHitsxy_buf.reset(nHits); + vDontUsedHitsxy_B.reset(nHits); RealIHit_v.reset(nHits); RealIHit_v_buf.reset(nHits); RealIHit_v_buf2.reset(nHits); #ifdef _OPENMP - fHitToBestTrackF.reset(NStsStrips); - fHitToBestTrackB.reset(NStsStrips); + fHitToBestTrackF.reset(fNstrips); + fHitToBestTrackB.reset(fNstrips); for (unsigned int j = 0; j < fHitToBestTrackB.size(); j++) { omp_init_lock(&fHitToBestTrackB[j]); omp_init_lock(&fHitToBestTrackF[j]); @@ -137,10 +137,10 @@ void L1Algo::SetData(L1Vector<L1Hit>& StsHits_, int nStsStrips_, L1Vector<unsign #endif fStripToTrack.clear(); - fStripToTrack.reserve(NStsStrips); + fStripToTrack.reserve(fNstrips); fStripToTrackB.clear(); - fStripToTrackB.reserve(NStsStrips); + fStripToTrackB.reserve(fNstrips); TripForHit[0].reset(nHits); TripForHit[1].reset(nHits); diff --git a/reco/L1/L1Algo/L1Algo.h b/reco/L1/L1Algo/L1Algo.h index eaac253f8ad1d83584fc5c02cdf56b971c408469..0f59d2ca8353241f4e3ca8715551f5932ceb17db 100644 --- a/reco/L1/L1Algo/L1Algo.h +++ b/reco/L1/L1Algo/L1Algo.h @@ -201,8 +201,8 @@ public: void Init(const bool UseHitErrors, const TrackingMode mode, const bool MissingHits); - void SetData(L1Vector<L1Hit>& StsHits_, int nStsStrips_, L1Vector<unsigned char>& SFlag_, - const L1HitIndex_t* StsHitsStartIndex_, const L1HitIndex_t* StsHitsStopIndex_); + void SetData(L1Vector<L1Hit>& Hits_, int nStrips_, L1Vector<unsigned char>& SFlag_, + const L1HitIndex_t* HitsStartIndex_, const L1HitIndex_t* HitsStopIndex_); void PrintHits(); @@ -240,8 +240,8 @@ public: int GetNfieldStations() const { return fNfieldStations; } public: - int NStsStrips {0}; ///> number of strips - L1Vector<L1Hit>* vStsHits {nullptr}; ///> hits as a combination of front-, backstrips and z-position + int fNstrips {0}; ///> number of strips + L1Vector<L1Hit>* vHits {nullptr}; ///> hits as a combination of front-, backstrips and z-position L1Grid vGrid[L1Constants::size::kMaxNstations]; ///> hits as a combination of front-, backstrips and z-position L1Grid vGridTime[L1Constants::size::kMaxNstations]; ///> @@ -252,19 +252,19 @@ public: L1Vector<L1Track> fTracks {"L1Algo::fTracks"}; // reconstructed tracks L1Vector<L1HitIndex_t> fRecoHits {"L1Algo::fRecoHits"}; // packed hits of reconstructed tracks - const L1HitIndex_t* StsHitsStartIndex {nullptr}; // station-bounders in vStsHits array - const L1HitIndex_t* StsHitsStopIndex {nullptr}; // station-bounders in vStsHits array + const L1HitIndex_t* HitsStartIndex {nullptr}; // station-bounders in vHits array + const L1HitIndex_t* HitsStopIndex {nullptr}; // station-bounders in vHits array // L1Branch* pointer; unsigned int NHitsIsecAll {0}; - L1Vector<L1Hit> vStsDontUsedHits_A {"L1Algo::vStsDontUsedHits_A"}; - L1Vector<L1Hit> vStsDontUsedHits_B {"L1Algo::vStsDontUsedHits_B"}; - L1Vector<L1Hit> vStsDontUsedHits_Buf {"L1Algo::vStsDontUsedHits_Buf"}; - L1Vector<L1HitPoint> vStsDontUsedHitsxy_A {"L1Algo::vStsDontUsedHitsxy_A"}; - L1Vector<L1HitPoint> vStsDontUsedHitsxy_buf {"L1Algo::vStsDontUsedHitsxy_buf"}; - L1Vector<L1HitPoint> vStsDontUsedHitsxy_B {"L1Algo::vStsDontUsedHitsxy_B"}; + L1Vector<L1Hit> vDontUsedHits_A {"L1Algo::vDontUsedHits_A"}; + L1Vector<L1Hit> vDontUsedHits_B {"L1Algo::vDontUsedHits_B"}; + L1Vector<L1Hit> vDontUsedHits_Buf {"L1Algo::vDontUsedHits_Buf"}; + L1Vector<L1HitPoint> vDontUsedHitsxy_A {"L1Algo::vDontUsedHitsxy_A"}; + L1Vector<L1HitPoint> vDontUsedHitsxy_buf {"L1Algo::vDontUsedHitsxy_buf"}; + L1Vector<L1HitPoint> vDontUsedHitsxy_B {"L1Algo::vDontUsedHitsxy_B"}; L1Vector<L1Track> fTracks_local[L1Constants::size::kMaxNthreads] {"L1Algo::fTracks_local"}; L1Vector<L1HitIndex_t> fRecoHits_local[L1Constants::size::kMaxNthreads] {"L1Algo::fRecoHits_local"}; @@ -312,16 +312,16 @@ public: /// --- data used during finding iterations int isec {0}; // iteration - L1Vector<L1Hit>* vStsHitsUnused {nullptr}; + L1Vector<L1Hit>* vHitsUnused {nullptr}; L1Vector<L1HitIndex_t>* RealIHitP {nullptr}; L1Vector<L1HitIndex_t>* RealIHitPBuf {nullptr}; - L1Vector<L1HitPoint>* vStsHitPointsUnused {nullptr}; - L1HitIndex_t* RealIHit {nullptr}; // index in vStsHits indexed by index in vStsHitsUnused + L1Vector<L1HitPoint>* vHitPointsUnused {nullptr}; + L1HitIndex_t* RealIHit {nullptr}; // index in vHits indexed by index in vHitsUnused - L1HitIndex_t StsHitsUnusedStartIndex[L1Constants::size::kMaxNstations + 1] {0}; - L1HitIndex_t StsHitsUnusedStopIndex[L1Constants::size::kMaxNstations + 1] {0}; - L1HitIndex_t StsHitsUnusedStartIndexEnd[L1Constants::size::kMaxNstations + 1] {0}; - L1HitIndex_t StsHitsUnusedStopIndexEnd[L1Constants::size::kMaxNstations + 1] {0}; + L1HitIndex_t HitsUnusedStartIndex[L1Constants::size::kMaxNstations + 1] {0}; + L1HitIndex_t HitsUnusedStopIndex[L1Constants::size::kMaxNstations + 1] {0}; + L1HitIndex_t HitsUnusedStartIndexEnd[L1Constants::size::kMaxNstations + 1] {0}; + L1HitIndex_t HitsUnusedStopIndexEnd[L1Constants::size::kMaxNstations + 1] {0}; L1Vector<int> TripForHit[2] {"L1Algo::TripForHit"}; // TODO: what does '2' stand for? @@ -481,7 +481,7 @@ private: /// Prepare the portion of left hits data void findSingletsStep0( // input - Tindex start_lh, Tindex n1_l, L1HitPoint* StsHits_l, + Tindex start_lh, Tindex n1_l, L1HitPoint* Hits_l, // output fvec* u_front_l, fvec* u_back_l, fvec* zPos_l, L1HitIndex_t* hitsl, fvec* HitTime_l, fvec* HitTimeEr, fvec* Event_l, fvec* d_x, fvec* d_y, fvec* d_xy, fvec* d_u, fvec* d_v); @@ -496,7 +496,7 @@ private: /// Find the doublets. Reformat data in the portion of doublets. void findDoubletsStep0( // input - Tindex n1, const L1Station& stal, const L1Station& stam, L1HitPoint* vStsHits_m, L1TrackPar* T_1, + Tindex n1, const L1Station& stal, const L1Station& stam, L1HitPoint* vHits_m, L1TrackPar* T_1, L1HitIndex_t* hitsl_1, // output @@ -510,9 +510,9 @@ private: /// Add the middle hits to parameters estimation. Propagate to right station. /// Find the triplets (right hit). Reformat data in the portion of triplets. void findTripletsStep0( // input - L1HitPoint* vStsHits_r, const L1Station& stam, const L1Station& star, + L1HitPoint* vHits_r, const L1Station& stam, const L1Station& star, - int istam, int istar, L1HitPoint* vStsHits_m, L1TrackPar* T_1, L1FieldRegion* fld_1, L1HitIndex_t* hitsl_1, + int istam, int istar, L1HitPoint* vHits_m, L1TrackPar* T_1, L1FieldRegion* fld_1, L1HitIndex_t* hitsl_1, Tindex n2, L1Vector<L1HitIndex_t>& hitsm_2, L1Vector<L1HitIndex_t>& i1_2, diff --git a/reco/L1/L1Algo/L1AlgoTBB.h b/reco/L1/L1Algo/L1AlgoTBB.h index 32f27fa24d692a5607dbe039fcb3bd3931aa89b2..6954212feff88c234378bff9fcfe2c65591aed08 100644 --- a/reco/L1/L1Algo/L1AlgoTBB.h +++ b/reco/L1/L1Algo/L1AlgoTBB.h @@ -22,11 +22,11 @@ namespace tbb int isec; L1Station* vStations; int NStations; - Tindex* StsHitsStartIndex; - Tindex* StsHitsStopIndex; + Tindex* HitsStartIndex; + Tindex* HitsStopIndex; vector<unsigned char>& vSFlag; vector<unsigned char>& vSFlagB; - std::vector<L1HitPoint>& vStsHits; + std::vector<L1HitPoint>& vHits; double Pick_r; double Pick_m; double MaxInvMom; @@ -60,9 +60,9 @@ namespace tbb ParalleledDup( // input - int isec_, L1Station* vStations_, int NStations_, Tindex* StsHitsStartIndex_, Tindex* StsHitsStopIndex_, - vector<unsigned char>& vSFlag_, vector<unsigned char>& vSFlagB_, std::vector<L1HitPoint>& vStsHits_, - double Pick_r_, double Pick_m_, double MaxInvMom_, fvec targX_, fvec targY_, fvec targZ_, L1FieldValue& targB_, + int isec_, L1Station* vStations_, int NStations_, Tindex* HitsStartIndex_, Tindex* HitsStopIndex_, + vector<unsigned char>& vSFlag_, vector<unsigned char>& vSFlagB_, std::vector<L1HitPoint>& vHits_, double Pick_r_, + double Pick_m_, double MaxInvMom_, fvec targX_, fvec targY_, fvec targZ_, L1FieldValue& targB_, L1XYMeasurementInfo& TargetXYInfo_, Tindex* n_g1_, unsigned* portionStopIndex_, L1TrackPar* T_g1_, L1FieldRegion* fld_g1_, L1HitIndex_t* hitsl_g1_, @@ -81,11 +81,11 @@ namespace tbb : isec(isec_) , vStations(vStations_) , NStations(NStations_) - , StsHitsStartIndex(StsHitsStartIndex_) - , StsHitsStopIndex(StsHitsStopIndex_) + , HitsStartIndex(HitsStartIndex_) + , HitsStopIndex(HitsStopIndex_) , vSFlag(vSFlag_) , vSFlagB(vSFlagB_) - , vStsHits(vStsHits_) + , vHits(vHits_) , Pick_r(Pick_r_) , Pick_m(Pick_m_) , MaxInvMom(MaxInvMom_) @@ -128,7 +128,7 @@ namespace tbb for (Tindex istal = r.begin(); istal < (Tindex) r.end(); ++istal) { // cout<< " ParalleledDup::operator(). Station: " << istal << endl; DupletsStaPort( // input - isec, istal, vStsHits, targX, targY, targZ, targB, TargetXYInfo, + isec, istal, vHits, targX, targY, targZ, targB, TargetXYInfo, n_g1, portionStopIndex, T_g1, fld_g1, hitsl_g1, // x_minusV_g1, x_plusV_g1, y_minusV_g1, y_plusV_g1, @@ -152,9 +152,9 @@ namespace tbb int isec; L1Station* vStations; int NStations; - Tindex* StsHitsStartIndex; - Tindex* StsHitsStopIndex; - std::vector<L1HitPoint>& svStsHits; + Tindex* HitsStartIndex; + Tindex* HitsStopIndex; + std::vector<L1HitPoint>& svHits; double Pick_r; double TRACK_CHI2_CUT; double MaxInvMom; @@ -185,8 +185,8 @@ namespace tbb ParalleledTrip( // input - int isec_, L1Station* vStations_, int NStations_, Tindex* StsHitsStartIndex_, Tindex* StsHitsStopIndex_, - std::vector<L1HitPoint>& vStsHits_, double Pick_r_, double TRACK_CHI2_CUT_, double MaxInvMom_, + int isec_, L1Station* vStations_, int NStations_, Tindex* HitsStartIndex_, Tindex* HitsStopIndex_, + std::vector<L1HitPoint>& vHits_, double Pick_r_, double TRACK_CHI2_CUT_, double MaxInvMom_, Tindex* n_g1_, L1TrackPar* T_g1_, L1FieldRegion* fld_g1_, L1HitIndex_t* hitsl_g1_, @@ -205,9 +205,9 @@ namespace tbb isec(isec_) , vStations(vStations_) , NStations(NStations_) - , StsHitsStartIndex(StsHitsStartIndex_) - , StsHitsStopIndex(StsHitsStopIndex_) - , svStsHits(vStsHits_) + , HitsStartIndex(HitsStartIndex_) + , HitsStopIndex(HitsStopIndex_) + , svHits(vHits_) , Pick_r(Pick_r_) , TRACK_CHI2_CUT(TRACK_CHI2_CUT_) , MaxInvMom(MaxInvMom_) @@ -246,7 +246,7 @@ namespace tbb for (Tindex istal = r.begin(); istal < (Tindex) r.end(); ++istal) { // cout<< " ParalleledTrip::operator(). Station: " << istal << endl; TripletsStaPort( // input - isec, istal, svStsHits, n_g1, T_g1, fld_g1, hitsl_g1, + isec, istal, svHits, n_g1, T_g1, fld_g1, hitsl_g1, n_g2, portionStopIndex, i1_g2, /* fld_g2, diff --git a/reco/L1/L1Algo/L1Branch.h b/reco/L1/L1Algo/L1Branch.h index ae6bd63d19684151b026fff4cd5b0015899bed00..3ed84aa7e7e049b6927cabc212ed793bb9e3b8a1 100644 --- a/reco/L1/L1Algo/L1Branch.h +++ b/reco/L1/L1Algo/L1Branch.h @@ -17,14 +17,14 @@ /// struct L1Branch { /// default constructor - L1Branch() { fStsHits.reserve(25); } + L1Branch() { fHits.reserve(25); } unsigned char ista {0}; char Momentum {0}; char NHits {0}; fscal chi2 {0.}; int CandIndex {0}; - L1Vector<L1HitIndex_t> fStsHits {"L1Branch::fStsHits"}; + L1Vector<L1HitIndex_t> fHits {"L1Branch::fHits"}; // static bool compareCand(const L1Branch *a, const L1Branch *b){ // diff --git a/reco/L1/L1Algo/L1CAMergeClones.cxx b/reco/L1/L1Algo/L1CAMergeClones.cxx index 5df44eceff05b1c0dd09889dcdb1bd3a5a659e0e..a5476902ae895c573bd8fba36a5cb0779518c3db 100644 --- a/reco/L1/L1Algo/L1CAMergeClones.cxx +++ b/reco/L1/L1Algo/L1CAMergeClones.cxx @@ -240,10 +240,10 @@ void L1Algo::CAMergeClones() #endif for (int iTr = 0; iTr < nTracks; iTr++) { firstHit[iTr] = start_hit; - firstStation[iTr] = (*fStripFlag)[(*vStsHits)[fRecoHits[start_hit]].f] / 4; + firstStation[iTr] = (*fStripFlag)[(*vHits)[fRecoHits[start_hit]].f] / 4; start_hit += fTracks[iTr].NHits - 1; lastHit[iTr] = start_hit; - lastStation[iTr] = (*fStripFlag)[(*vStsHits)[fRecoHits[start_hit]].f] / 4; + lastStation[iTr] = (*fStripFlag)[(*vHits)[fRecoHits[start_hit]].f] / 4; start_hit++; isStored[iTr] = false; diff --git a/reco/L1/L1Algo/L1CATrackFinder.cxx b/reco/L1/L1Algo/L1CATrackFinder.cxx index 5e8a05c4dcc38851db038e04f999048085ba7dff..80b7f17093e0fd150a5f4a9bb2afad03fd575afe 100644 --- a/reco/L1/L1Algo/L1CATrackFinder.cxx +++ b/reco/L1/L1Algo/L1CATrackFinder.cxx @@ -76,7 +76,7 @@ using std::endl; /// Prepare the portion of data of left hits of a triplet: all hits except the last and the second last station will be procesesed in the algorythm, /// the data is orginesed in order to be used by SIMD inline void L1Algo::findSingletsStep0( // input - Tindex start_lh, Tindex n1_l, L1HitPoint* StsHits_l, + Tindex start_lh, Tindex n1_l, L1HitPoint* Hits_l, // output fvec* u_front_l, fvec* u_back_l, fvec* zPos_l, L1HitIndex_t* hitsl, fvec* HitTime_l, fvec* HitTimeEr, // comment unused parameters, FU, 18.01.21 @@ -88,7 +88,7 @@ inline void L1Algo::findSingletsStep0( // input for (Tindex ilh = start_lh, i1 = 0; ilh < end_lh; ++ilh, ++i1) { Tindex i1_V = i1 / fvecLen; Tindex i1_4 = i1 % fvecLen; - L1HitPoint& hitl = StsHits_l[ilh]; + L1HitPoint& hitl = Hits_l[ilh]; #ifdef USE_EVENT_NUMBER @@ -352,8 +352,7 @@ inline void L1Algo::findSingletsStep1( /// input 1st stage of singlet search /// Find the doublets. Reformat data in the portion of doublets. inline void L1Algo::findDoubletsStep0( /// input - Tindex n1, const L1Station& stal, const L1Station& stam, L1HitPoint* vStsHits_m, L1TrackPar* T_1, - L1HitIndex_t* hitsl_1, + Tindex n1, const L1Station& stal, const L1Station& stam, L1HitPoint* vHits_m, L1TrackPar* T_1, L1HitIndex_t* hitsl_1, /// output Tindex& n2, L1Vector<L1HitIndex_t>& i1_2, #ifdef DOUB_PERFORMANCE @@ -391,8 +390,8 @@ inline void L1Algo::findDoubletsStep0( while (true) { if (fParameters.IsIgnoreHitSearchAreas()) { irm1++; - if ((L1HitIndex_t) irm1 >= (StsHitsUnusedStopIndex[&stam - fParameters.GetStations().begin()] - - StsHitsUnusedStartIndex[&stam - fParameters.GetStations().begin()])) + if ((L1HitIndex_t) irm1 >= (HitsUnusedStopIndex[&stam - fParameters.GetStations().begin()] + - HitsUnusedStartIndex[&stam - fParameters.GetStations().begin()])) break; imh = irm1; } @@ -400,7 +399,7 @@ inline void L1Algo::findDoubletsStep0( if (!areaTime.GetNext(imh)) break; } - const L1HitPoint& hitm = vStsHits_m[imh]; + const L1HitPoint& hitm = vHits_m[imh]; // check y-boundaries if ((stam.timeInfo) && (stal.timeInfo)) @@ -522,7 +521,7 @@ inline void L1Algo::findDoubletsStep0( /// Add the middle hits to parameters estimation. Propagate to right station. /// Find the triplets(right hit). Reformat data in the portion of triplets. inline void L1Algo::findTripletsStep0( // input - L1HitPoint* vStsHits_r, const L1Station& stam, const L1Station& star, int istam, int istar, L1HitPoint* vStsHits_m, + L1HitPoint* vHits_r, const L1Station& stam, const L1Station& star, int istam, int istar, L1HitPoint* vHits_m, L1TrackPar* T_1, L1FieldRegion* fld_1, L1HitIndex_t* hitsl_1, Tindex n2, L1Vector<L1HitIndex_t>& hitsm_2, L1Vector<L1HitIndex_t>& i1_2, const L1Vector<char>& /*mrDuplets*/, // output @@ -591,7 +590,7 @@ inline void L1Algo::findTripletsStep0( // input f2.SetOneEntry(n2_4, f1, i1_4); const Tindex& imh = hitsm_2[i2]; - const L1HitPoint& hitm = vStsHits_m[imh]; + const L1HitPoint& hitm = vHits_m[imh]; u_front_2[n2_4] = hitm.U(); u_back_2[n2_4] = hitm.V(); zPos_2[n2_4] = hitm.Z(); @@ -689,7 +688,7 @@ inline void L1Algo::findTripletsStep0( // input while (true) { if (fParameters.IsIgnoreHitSearchAreas()) { irh1++; - if ((L1HitIndex_t) irh1 >= (StsHitsUnusedStopIndex[istar] - StsHitsUnusedStartIndex[istar])) break; + if ((L1HitIndex_t) irh1 >= (HitsUnusedStopIndex[istar] - HitsUnusedStartIndex[istar])) break; irh = irh1; } else { @@ -697,8 +696,8 @@ inline void L1Algo::findTripletsStep0( // input } // while (area.GetNext(irh)) { - //for (int irh = 0; irh < ( StsHitsUnusedStopIndex[istar] - StsHitsUnusedStartIndex[istar] ); irh++){ - const L1HitPoint& hitr = vStsHits_r[irh]; + //for (int irh = 0; irh < ( HitsUnusedStopIndex[istar] - HitsUnusedStartIndex[istar] ); irh++){ + const L1HitPoint& hitr = vHits_r[irh]; #ifdef USE_EVENT_NUMBER // NOTE: if ((T2.n[i2_4] != hitr.n)) continue; @@ -926,13 +925,13 @@ inline void L1Algo::findTripletsStep2( // input // TODO not updated after gaps fscal& qp0 = T3.qp[i3_4]; // prepare data - L1HitIndex_t ihit[NHits] = {(*RealIHitP)[hitsl_3[i3] + StsHitsUnusedStartIndex[ista[0]]], - (*RealIHitP)[hitsm_3[i3] + StsHitsUnusedStartIndex[ista[1]]], - (*RealIHitP)[hitsr_3[i3] + StsHitsUnusedStartIndex[ista[2]]]}; + L1HitIndex_t ihit[NHits] = {(*RealIHitP)[hitsl_3[i3] + HitsUnusedStartIndex[ista[0]]], + (*RealIHitP)[hitsm_3[i3] + HitsUnusedStartIndex[ista[1]]], + (*RealIHitP)[hitsr_3[i3] + HitsUnusedStartIndex[ista[2]]]}; fscal u[NHits], v[NHits], x[NHits], y[NHits], z[NHits]; for (int ih = 0; ih < NHits; ++ih) { - const L1Hit& hit = (*vStsHits)[ihit[ih]]; + const L1Hit& hit = (*vHits)[ihit[ih]]; u[ih] = hit.u; v[ih] = hit.v; StripsToCoor(u[ih], v[ih], x[ih], y[ih], sta[ih]); @@ -1092,12 +1091,12 @@ inline void L1Algo::findTripletsStep3( // input // select fscal& chi2 = T3.chi2[i3_4]; - const L1HitIndex_t ihitl = hitsl_3[i3] + StsHitsUnusedStartIndex[istal]; - const L1HitIndex_t ihitm = hitsm_3[i3] + StsHitsUnusedStartIndex[istam]; - const L1HitIndex_t ihitr = hitsr_3[i3] + StsHitsUnusedStartIndex[istar]; - L1_ASSERT(ihitl < StsHitsUnusedStopIndex[istal], ihitl << " < " << StsHitsUnusedStopIndex[istal]); - L1_ASSERT(ihitm < StsHitsUnusedStopIndex[istam], ihitm << " < " << StsHitsUnusedStopIndex[istam]); - L1_ASSERT(ihitr < StsHitsUnusedStopIndex[istar], ihitr << " < " << StsHitsUnusedStopIndex[istar]); + const L1HitIndex_t ihitl = hitsl_3[i3] + HitsUnusedStartIndex[istal]; + const L1HitIndex_t ihitm = hitsm_3[i3] + HitsUnusedStartIndex[istam]; + const L1HitIndex_t ihitr = hitsr_3[i3] + HitsUnusedStartIndex[istar]; + L1_ASSERT(ihitl < HitsUnusedStopIndex[istal], ihitl << " < " << HitsUnusedStopIndex[istal]); + L1_ASSERT(ihitm < HitsUnusedStopIndex[istam], ihitm << " < " << HitsUnusedStopIndex[istam]); + L1_ASSERT(ihitr < HitsUnusedStopIndex[istar], ihitr << " < " << HitsUnusedStopIndex[istar]); unsigned int Location = PackTripletId(istal, Thread, fTriplets[istal][Thread].size()); @@ -1217,9 +1216,9 @@ inline void L1Algo::f5( // input L1HitIndex_t ihitl = trip.GetLHit(); L1HitIndex_t ihitm = trip.GetMHit(); L1HitIndex_t ihitr = trip.GetRHit(); - L1_ASSERT(ihitl < StsHitsUnusedStopIndex[istal], ihitl << " < " << StsHitsUnusedStopIndex[istal]); - L1_ASSERT(ihitm < StsHitsUnusedStopIndex[istam], ihitm << " < " << StsHitsUnusedStopIndex[istam]); - L1_ASSERT(ihitr < StsHitsUnusedStopIndex[istar], ihitr << " < " << StsHitsUnusedStopIndex[istar]); + L1_ASSERT(ihitl < HitsUnusedStopIndex[istal], ihitl << " < " << HitsUnusedStopIndex[istal]); + L1_ASSERT(ihitm < HitsUnusedStopIndex[istam], ihitm << " < " << HitsUnusedStopIndex[istam]); + L1_ASSERT(ihitr < HitsUnusedStopIndex[istar], ihitr << " < " << HitsUnusedStopIndex[istar]); L1Vector<unsigned int> neighCands("L1CATrackFinder::neighCands"); // save neighbour candidates neighCands.reserve(8); // ~average is 1-2 for central, up to 5 @@ -1294,8 +1293,8 @@ inline void L1Algo::DupletsStaPort( const L1Station& stam = fParameters.GetStation(istam); // prepare data - L1HitPoint* vStsHits_l = &((*vStsHitPointsUnused)[0]) + StsHitsUnusedStartIndex[istal]; - L1HitPoint* vStsHits_m = &((*vStsHitPointsUnused)[0]) + StsHitsUnusedStartIndex[istam]; + L1HitPoint* vHits_l = &((*vHitPointsUnused)[0]) + HitsUnusedStartIndex[istal]; + L1HitPoint* vHits_m = &((*vHitPointsUnused)[0]) + HitsUnusedStartIndex[istam]; fvec u_front[Portion / fvecLen], u_back[Portion / fvecLen]; fvec dx0[Portion / fvecLen], dy0[Portion / fvecLen], dxy0[Portion / fvecLen]; @@ -1309,13 +1308,13 @@ inline void L1Algo::DupletsStaPort( Tindex& n1 = n_g[ip]; findSingletsStep0( // input - (ip - portionStopIndex_[istal + 1]) * Portion, n1, vStsHits_l, + (ip - portionStopIndex_[istal + 1]) * Portion, n1, vHits_l, // output u_front, u_back, zPos, hitsl_1, HitTime, HitTimeEr, Event, dx0, dy0, dxy0, du0, dv0); for (Tindex i = 0; i < n1; ++i) - L1_ASSERT(hitsl_1[i] < StsHitsUnusedStopIndex[istal] - StsHitsUnusedStartIndex[istal], - hitsl_1[i] << " < " << StsHitsUnusedStopIndex[istal] - StsHitsUnusedStartIndex[istal]); + L1_ASSERT(hitsl_1[i] < HitsUnusedStopIndex[istal] - HitsUnusedStartIndex[istal], + hitsl_1[i] << " < " << HitsUnusedStopIndex[istal] - HitsUnusedStartIndex[istal]); Tindex n1_V = (n1 + fvecLen - 1) / fvecLen; @@ -1335,7 +1334,7 @@ inline void L1Algo::DupletsStaPort( #endif // DOUB_PERFORMANCE findDoubletsStep0( // input - n1, stal, stam, vStsHits_m, T_1, hitsl_1, + n1, stal, stam, vHits_m, T_1, hitsl_1, // output n_2, i1_2, #ifdef DOUB_PERFORMANCE @@ -1344,12 +1343,12 @@ inline void L1Algo::DupletsStaPort( hitsm_2, Event, lmDuplets); for (Tindex i = 0; i < static_cast<Tindex>(hitsm_2.size()); ++i) - L1_ASSERT(hitsm_2[i] < StsHitsUnusedStopIndex[istam] - StsHitsUnusedStartIndex[istam], - hitsm_2[i] << " " << StsHitsUnusedStopIndex[istam] - StsHitsUnusedStartIndex[istam]); + L1_ASSERT(hitsm_2[i] < HitsUnusedStopIndex[istam] - HitsUnusedStartIndex[istam], + hitsm_2[i] << " " << HitsUnusedStopIndex[istam] - HitsUnusedStartIndex[istam]); #ifdef DOUB_PERFORMANCE - L1HitIndex_t* RealIHitL = &((*RealIHitP)[StsHitsUnusedStartIndex[istal]]); - L1HitIndex_t* RealIHitM = &((*RealIHitP)[StsHitsUnusedStartIndex[istam]]); + L1HitIndex_t* RealIHitL = &((*RealIHitP)[HitsUnusedStartIndex[istal]]); + L1HitIndex_t* RealIHitM = &((*RealIHitP)[HitsUnusedStartIndex[istam]]); for (Tindex i = 0; i < n2; ++i) { // int i_4 = i%4; // int i_V = i/4; @@ -1386,10 +1385,10 @@ L1Algo::TripletsStaPort( /// creates triplets: input: @istal - start station nu const L1Station& stam = fParameters.GetStation(istam); const L1Station& star = fParameters.GetStation(istar); - L1HitPoint* vStsHits_m = &((*vStsHitPointsUnused)[0]) + StsHitsUnusedStartIndex[istam]; + L1HitPoint* vHits_m = &((*vHitPointsUnused)[0]) + HitsUnusedStartIndex[istam]; - L1HitPoint* vStsHits_r = 0; - vStsHits_r = &((*vStsHitPointsUnused)[0]) + StsHitsUnusedStartIndex[istar]; + L1HitPoint* vHits_r = 0; + vHits_r = &((*vHitPointsUnused)[0]) + HitsUnusedStartIndex[istar]; Tindex n3 = 0, n3_V; @@ -1434,9 +1433,9 @@ L1Algo::TripletsStaPort( /// creates triplets: input: @istal - start station nu findTripletsStep0( // input - vStsHits_r, stam, star, + vHits_r, stam, star, - istam, istar, vStsHits_m, T_1, fld_1, hitsl_1, + istam, istar, vHits_m, T_1, fld_1, hitsl_1, n_2, hitsm_2, i1_2, @@ -1451,11 +1450,11 @@ L1Algo::TripletsStaPort( /// creates triplets: input: @istal - start station nu n3_V = (n3 + fvecLen - 1) / fvecLen; for (Tindex i = 0; i < static_cast<Tindex>(hitsl_3.size()); ++i) - L1_assert(hitsl_3[i] < StsHitsUnusedStopIndex[istal] - StsHitsUnusedStartIndex[istal]); + L1_assert(hitsl_3[i] < HitsUnusedStopIndex[istal] - HitsUnusedStartIndex[istal]); for (Tindex i = 0; i < static_cast<Tindex>(hitsm_3.size()); ++i) - L1_assert(hitsm_3[i] < StsHitsUnusedStopIndex[istam] - StsHitsUnusedStartIndex[istam]); + L1_assert(hitsm_3[i] < HitsUnusedStopIndex[istam] - HitsUnusedStartIndex[istam]); for (Tindex i = 0; i < static_cast<Tindex>(hitsr_3.size()); ++i) - L1_assert(hitsr_3[i] < StsHitsUnusedStopIndex[istar] - StsHitsUnusedStartIndex[istar]); + L1_assert(hitsr_3[i] < HitsUnusedStopIndex[istar] - HitsUnusedStartIndex[istar]); // if (n3 >= MaxPortionTriplets) cout << "isec: " << isec << " station: " << istal << " portion number: " << ip << " CATrackFinder: Warning: Too many Triplets created in portion" << endl; @@ -1473,9 +1472,9 @@ L1Algo::TripletsStaPort( /// creates triplets: input: @istal - start station nu // findTripletsStep2( n3, istal, _RealIHit, T_3, hitsl_3, hitsm_3, hitsr_3, 0 ); #ifdef TRIP_PERFORMANCE - L1HitIndex_t* RealIHitL = &((*RealIHitP)[StsHitsUnusedStartIndex[istal]]); - L1HitIndex_t* RealIHitM = &((*RealIHitP)[StsHitsUnusedStartIndex[istam]]); - L1HitIndex_t* RealIHitR = &((*RealIHitP)[StsHitsUnusedStartIndex[istar]]); + L1HitIndex_t* RealIHitL = &((*RealIHitP)[HitsUnusedStartIndex[istal]]); + L1HitIndex_t* RealIHitM = &((*RealIHitP)[HitsUnusedStartIndex[istam]]); + L1HitIndex_t* RealIHitR = &((*RealIHitP)[HitsUnusedStartIndex[istar]]); for (Tindex i = 0; i < n3; ++i) { Tindex i_4 = i % 4; Tindex i_V = i / 4; @@ -1611,35 +1610,35 @@ void L1Algo::CATrackFinder() RealIHitP = &RealIHit_v; RealIHitPBuf = &RealIHit_v_buf; - vStsHitsUnused = &vStsDontUsedHits_B; /// array of hits used on current iteration - L1Vector<L1Hit>* vStsHitsUnused_buf = &vStsDontUsedHits_A; /// buffer for copy + vHitsUnused = &vDontUsedHits_B; /// array of hits used on current iteration + L1Vector<L1Hit>* vHitsUnused_buf = &vDontUsedHits_A; /// buffer for copy - vStsHitPointsUnused = &vStsDontUsedHitsxy_B; /// array of info for hits used on current iteration - L1Vector<L1HitPoint>* vStsHitPointsUnused_buf = &vStsDontUsedHitsxy_A; + vHitPointsUnused = &vDontUsedHitsxy_B; /// array of info for hits used on current iteration + L1Vector<L1HitPoint>* vHitPointsUnused_buf = &vDontUsedHitsxy_A; NHitsIsecAll = 0; fTracks.clear(); fRecoHits.clear(); - fRecoHits.reserve(2 * vStsHits->size()); - fTracks.reserve(2 * vStsHits->size() / fNstations); + fRecoHits.reserve(2 * vHits->size()); + fTracks.reserve(2 * vHits->size() / fNstations); int nDontUsedHits = 0; // #pragma omp parallel for reduction(+:nDontUsedHits) for (int ista = 0; ista < fNstations; ++ista) { - nDontUsedHits += (StsHitsStopIndex[ista] - StsHitsStartIndex[ista]); - StsHitsUnusedStartIndex[ista] = StsHitsStartIndex[ista]; - StsHitsUnusedStopIndex[ista] = StsHitsStopIndex[ista]; + nDontUsedHits += (HitsStopIndex[ista] - HitsStartIndex[ista]); + HitsUnusedStartIndex[ista] = HitsStartIndex[ista]; + HitsUnusedStopIndex[ista] = HitsStopIndex[ista]; } float lasttime = 0; float starttime = std::numeric_limits<float>::max(); for (int ist = 0; ist < fNstations; ++ist) - for (L1HitIndex_t ih = StsHitsStartIndex[ist]; ih < StsHitsStopIndex[ist]; ++ih) { + for (L1HitIndex_t ih = HitsStartIndex[ist]; ih < HitsStopIndex[ist]; ++ih) { - const float& time = (*vStsHits)[ih].t; + const float& time = (*vHits)[ih].t; if ((lasttime < time) && (!std::isinf(time))) lasttime = time; if ((starttime > time) && (time > 0)) starttime = time; } @@ -1666,17 +1665,17 @@ void L1Algo::CATrackFinder() // yStep = 1.25; // xStep = 2.05; - vStsHitsUnused = &vStsDontUsedHits_Buf; + vHitsUnused = &vDontUsedHits_Buf; for (int iS = 0; iS < fNstations; ++iS) { vGridTime[iS].BuildBins(-1, 1, -0.6, 0.6, starttime, lasttime, xStep, yStep, (lasttime - starttime + 1)); - int start = StsHitsUnusedStartIndex[iS]; - int nhits = StsHitsUnusedStopIndex[iS] - start; + int start = HitsUnusedStartIndex[iS]; + int nhits = HitsUnusedStopIndex[iS] - start; if (nhits > 0) { - vGridTime[iS].StoreHits(nhits, &((*vStsHits)[start]), iS, *this, start, &(vStsDontUsedHits_Buf[start]), - &((*vStsHits)[start]), &(RealIHit_v[start])); + vGridTime[iS].StoreHits(nhits, &((*vHits)[start]), iS, *this, start, &(vDontUsedHits_Buf[start]), + &((*vHits)[start]), &(RealIHit_v[start])); } else { // to avoid out-of-range crash in array[start] vGridTime[iS].StoreHits(nhits, nullptr, iS, *this, start, nullptr, nullptr, nullptr); @@ -1685,8 +1684,8 @@ void L1Algo::CATrackFinder() for (int ist = 0; ist < fNstations; ++ist) - for (L1HitIndex_t ih = StsHitsStartIndex[ist]; ih < StsHitsStopIndex[ist]; ++ih) { - L1Hit& h = (*vStsHits)[ih]; + for (L1HitIndex_t ih = HitsStartIndex[ist]; ih < HitsStopIndex[ist]; ++ih) { + L1Hit& h = (*vHits)[ih]; SetFUnUsed((*fStripFlag)[h.f]); SetFUnUsed((*fStripFlag)[h.b]); } @@ -1695,8 +1694,8 @@ void L1Algo::CATrackFinder() #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 5) #endif - for (L1HitIndex_t ih = StsHitsStartIndex[ista]; ih < StsHitsStopIndex[ista]; ++ih) { - CreateHitPoint(vStsDontUsedHits_Buf[ih], vStsDontUsedHitsxy_B[ih]); + for (L1HitIndex_t ih = HitsStartIndex[ista]; ih < HitsStopIndex[ista]; ++ih) { + CreateHitPoint(vDontUsedHits_Buf[ih], vDontUsedHitsxy_B[ih]); } } @@ -1743,25 +1742,25 @@ void L1Algo::CATrackFinder() RealIHitP = RealIHitPBuf; RealIHitPBuf = RealIHitPTmp; - L1Vector<L1Hit>* vStsHitsUnused_temp = vStsHitsUnused; - vStsHitsUnused = vStsHitsUnused_buf; - vStsHitsUnused_buf = vStsHitsUnused_temp; + L1Vector<L1Hit>* vHitsUnused_temp = vHitsUnused; + vHitsUnused = vHitsUnused_buf; + vHitsUnused_buf = vHitsUnused_temp; - L1Vector<L1HitPoint>* vStsHitsUnused_temp2 = vStsHitPointsUnused; - vStsHitPointsUnused = vStsHitPointsUnused_buf; - vStsHitPointsUnused_buf = vStsHitsUnused_temp2; + L1Vector<L1HitPoint>* vHitsUnused_temp2 = vHitPointsUnused; + vHitPointsUnused = vHitPointsUnused_buf; + vHitPointsUnused_buf = vHitsUnused_temp2; } // TODO: Replace NStations with fInitManager.GetNstationsGeom() (S.Zharko) for (int ist = 0; ist < fNstations; ++ist) { - for (L1HitIndex_t ih = StsHitsUnusedStartIndex[ist]; ih < StsHitsUnusedStopIndex[ist]; ++ih) { + for (L1HitIndex_t ih = HitsUnusedStartIndex[ist]; ih < HitsUnusedStopIndex[ist]; ++ih) { //SG!! TripForHit[0][ih] = 0; TripForHit[1][ih] = 0; } } /* - TripForHit[0].assign(StsHitsUnusedStopIndex[fNstations-1],0); - TripForHit[1].assign(StsHitsUnusedStopIndex[fNstations-1],0); + TripForHit[0].assign(HitsUnusedStopIndex[fNstations-1],0); + TripForHit[1].assign(HitsUnusedStopIndex[fNstations-1],0); */ { // #pragma omp task @@ -1880,10 +1879,10 @@ void L1Algo::CATrackFinder() #ifndef L1_NO_ASSERT for (int istal = fNstations - 1; istal >= 0; istal--) { - L1_ASSERT(StsHitsUnusedStopIndex[istal] >= StsHitsUnusedStartIndex[istal], - StsHitsUnusedStopIndex[istal] << " >= " << StsHitsUnusedStartIndex[istal]); - L1_ASSERT(StsHitsUnusedStopIndex[istal] <= (*vStsHitsUnused).size(), - StsHitsUnusedStopIndex[istal] << " <= " << (*vStsHitsUnused).size()); + L1_ASSERT(HitsUnusedStopIndex[istal] >= HitsUnusedStartIndex[istal], + HitsUnusedStopIndex[istal] << " >= " << HitsUnusedStartIndex[istal]); + L1_ASSERT(HitsUnusedStopIndex[istal] <= (*vHitsUnused).size(), + HitsUnusedStopIndex[istal] << " <= " << (*vHitsUnused).size()); } #endif // L1_NO_ASSERT } @@ -1894,7 +1893,7 @@ void L1Algo::CATrackFinder() fDupletPortionStopIndex[fNstations - 1] = 0; fDupletPortionSize.clear(); for (int istal = fNstations - 2; istal >= FIRSTCASTATION; istal--) { //start downstream chambers - int NHits_l = StsHitsUnusedStopIndex[istal] - StsHitsUnusedStartIndex[istal]; + int NHits_l = HitsUnusedStopIndex[istal] - HitsUnusedStartIndex[istal]; int nPortions = NHits_l / Portion; int rest = NHits_l - nPortions * Portion; for (int ipp = 0; ipp < nPortions; ipp++) { @@ -1917,7 +1916,7 @@ void L1Algo::CATrackFinder() for (int istal = fNstations-2; istal >= FIRSTCASTATION; istal--) //start downstream chambers { - int nHits = StsHitsUnusedStopIndex[istal] - StsHitsUnusedStartIndex[istal]; + int nHits = HitsUnusedStopIndex[istal] - HitsUnusedStartIndex[istal]; int NHits_P = nHits/Portion; @@ -1985,7 +1984,7 @@ void L1Algo::CATrackFinder() #endif for (Tindex ip = fDupletPortionStopIndex[istal + 1]; ip < fDupletPortionStopIndex[istal]; ++ip) { Tindex n_2; /// number of doublets in portion - int NHitsSta = StsHitsStopIndex[istal] - StsHitsStartIndex[istal]; + int NHitsSta = HitsStopIndex[istal] - HitsStartIndex[istal]; lmDuplets[istal].reset(NHitsSta); lmDupletsG[istal].reset(NHitsSta); @@ -2115,8 +2114,8 @@ void L1Algo::CATrackFinder() fTrackCandidates[i].clear(); } - fStripToTrack.reset(NStsStrips, -1); - fStripToTrackB.reset(NStsStrips, -1); + fStripToTrack.reset(fNstrips, -1); + fStripToTrackB.reset(fNstrips, -1); for (int istaF = FIRSTCASTATION; istaF <= fNstations - 3 - ilev; ++istaF) { @@ -2133,8 +2132,8 @@ void L1Algo::CATrackFinder() int thread_num = 0; #endif L1Triplet& first_trip = (fTriplets[istaF][iThread][itrip]); - if (GetFUsed((*fStripFlag)[(*vStsHitsUnused)[first_trip.GetLHit()].f] - | (*fStripFlag)[(*vStsHitsUnused)[first_trip.GetLHit()].b])) + if (GetFUsed((*fStripFlag)[(*vHitsUnused)[first_trip.GetLHit()].f] + | (*fStripFlag)[(*vHitsUnused)[first_trip.GetLHit()].b])) continue; @@ -2156,7 +2155,7 @@ void L1Algo::CATrackFinder() continue; // ghost suppression // find track with 3 hits only if it was created from a chain of triplets, but not from only one triplet if (kGlobal != fTrackingMode && kMcbm != fTrackingMode) { - if ((ilev == 0) && (GetFStation((*fStripFlag)[(*vStsHitsUnused)[first_trip.GetLHit()].f]) != 0)) + if ((ilev == 0) && (GetFStation((*fStripFlag)[(*vHitsUnused)[first_trip.GetLHit()].f]) != 0)) continue; // ghost supression // collect only MAPS tracks-triplets CHECK!!! } } @@ -2169,8 +2168,8 @@ void L1Algo::CATrackFinder() curr_tr.chi2 = 0.f; // curr_tr.Lengtha = 0; curr_tr.ista = 0; - curr_tr.fStsHits.clear(); - curr_tr.fStsHits.push_back((*RealIHitP)[first_trip.GetLHit()]); + curr_tr.fHits.clear(); + curr_tr.fHits.push_back((*RealIHitP)[first_trip.GetLHit()]); curr_tr.NHits = 1; curr_L = 1; @@ -2211,9 +2210,9 @@ void L1Algo::CATrackFinder() bool check = 1; - for (L1Vector<L1HitIndex_t>::iterator phitIt = tr.fStsHits.begin(); /// used strips are marked - phitIt != tr.fStsHits.end(); ++phitIt) { - const L1Hit& h = (*vStsHits)[*phitIt]; + for (L1Vector<L1HitIndex_t>::iterator phitIt = tr.fHits.begin(); /// used strips are marked + phitIt != tr.fHits.end(); ++phitIt) { + const L1Hit& h = (*vHits)[*phitIt]; #ifdef _OPENMP omp_set_lock(&fHitToBestTrackB[h.b]); #endif @@ -2293,9 +2292,9 @@ void L1Algo::CATrackFinder() bool check = 1; if (fTrackCandidates[i][iCandidate].CandIndex != -1) { - for (L1Vector<L1HitIndex_t>::iterator phIt = tr.fStsHits.begin(); /// used strips are marked - phIt != tr.fStsHits.end(); ++phIt) { - const L1Hit& h = (((*vStsHits))[*phIt]); + for (L1Vector<L1HitIndex_t>::iterator phIt = tr.fHits.begin(); /// used strips are marked + phIt != tr.fHits.end(); ++phIt) { + const L1Hit& h = (((*vHits))[*phIt]); if (((fStripToTrackB)[h.b] != tr.CandIndex) || ((fStripToTrack)[h.f] != tr.CandIndex)) { check = 0; break; @@ -2332,11 +2331,11 @@ void L1Algo::CATrackFinder() #endif if (kGlobal == fTrackingMode) { //SGtrd2d!! - if (tr.fStsHits.size() < 4) continue; + if (tr.fHits.size() < 4) continue; } - for (L1Vector<L1HitIndex_t>::iterator phIt = tr.fStsHits.begin(); /// used strips are marked - phIt != tr.fStsHits.end(); ++phIt) { - L1Hit& h = (*vStsHits)[*phIt]; + for (L1Vector<L1HitIndex_t>::iterator phIt = tr.fHits.begin(); /// used strips are marked + phIt != tr.fHits.end(); ++phIt) { + L1Hit& h = (*vHits)[*phIt]; SetFUsed((*fStripFlag)[h.f]); @@ -2344,7 +2343,7 @@ void L1Algo::CATrackFinder() fRecoHits_local[num_thread].push_back(*phIt); - const L1Hit& hit = (*vStsHits)[*phIt]; + const L1Hit& hit = (*vHits)[*phIt]; L1HitPoint tempPoint = CreateHitPoint(hit); //TODO take number of station from hit @@ -2416,24 +2415,24 @@ void L1Algo::CATrackFinder() int NHitsOnStation = 0; for (int ista = 0; ista < fNstations; ++ista) { - int start = StsHitsUnusedStartIndex[ista]; - int Nelements = StsHitsUnusedStopIndex[ista] - start; + int start = HitsUnusedStartIndex[ista]; + int Nelements = HitsUnusedStopIndex[ista] - start; L1Hit* staHits = nullptr; // to avoid out-of-range error in ..[start] L1HitIndex_t* staHitIndices = nullptr; L1HitPoint* staHitPoints = nullptr; if (Nelements > 0) { - staHits = &((*vStsHitsUnused)[start]); + staHits = &((*vHitsUnused)[start]); staHitIndices = &((*RealIHitP)[start]); - staHitPoints = &((*vStsHitPointsUnused)[start]); + staHitPoints = &((*vHitPointsUnused)[start]); } int NHitsOnStationTmp = NHitsOnStation; - vGridTime[ista].UpdateIterGrid(Nelements, staHits, RealIHitPBuf, staHitIndices, vStsHitsUnused_buf, - vStsHitPointsUnused_buf, staHitPoints, NHitsOnStation, ista, *this, fStripFlag); + vGridTime[ista].UpdateIterGrid(Nelements, staHits, RealIHitPBuf, staHitIndices, vHitsUnused_buf, + vHitPointsUnused_buf, staHitPoints, NHitsOnStation, ista, *this, fStripFlag); - StsHitsUnusedStartIndex[ista] = NHitsOnStationTmp; - StsHitsUnusedStopIndex[ista] = NHitsOnStation; + HitsUnusedStartIndex[ista] = NHitsOnStationTmp; + HitsUnusedStopIndex[ista] = NHitsOnStation; } #ifdef XXX @@ -2449,7 +2448,7 @@ void L1Algo::CATrackFinder() // #ifdef DRAW // draw->ClearVeiw(); // // draw->DrawInfo(); - // draw->DrawRestHits(StsHitsUnusedStartIndex, StsHitsUnusedStopIndex, RealIHit); + // draw->DrawRestHits(HitsUnusedStartIndex, HitsUnusedStopIndex, RealIHit); // draw->DrawRecoTracks(); // draw->SaveCanvas("Reco_"+isec+"_"); // draw->DrawAsk(); @@ -2459,7 +2458,7 @@ void L1Algo::CATrackFinder() // fL1Pulls->Build(1); // #endif #ifdef COUNTERS - // stat_nHits[isec] += (vStsHitsUnused*)->Size(); + // stat_nHits[isec] += (vHitsUnused*)->Size(); cout << "iter = " << isec << endl; cout << " NSinglets = " << stat_nSinglets[isec] / stat_N << endl; @@ -2518,12 +2517,12 @@ void L1Algo::CATrackFinder() NDup=0, DupSize=0, NTrip=0, TripSize=0, NBranches=0, BranchSize=0, NTracks=0, TrackSize=0 ; NTimes++; - NHits += vStsHitsUnused->size(); - HitSize += vStsHitsUnused->size()*sizeof(L1Hit); - NStrips+= vStsStrips.size(); - StripSize += vStsStrips.size()*sizeof(fscal) + (*fStripFlag).size()*sizeof(unsigned char); + NHits += vHitsUnused->size(); + HitSize += vHitsUnused->size()*sizeof(L1Hit); + NStrips+= vStrips.size(); + StripSize += vStrips.size()*sizeof(fscal) + (*fStripFlag).size()*sizeof(unsigned char); NStripsB+= (*fStripFlagB).size(); - StripSizeB += vStsStripsB.size()*sizeof(fscal) + (*fStripFlagB).size()*sizeof(unsigned char); + StripSizeB += vStripsB.size()*sizeof(fscal) + (*fStripFlagB).size()*sizeof(unsigned char); NDup += stat_max_n_dup; DupSize += stat_max_n_dup*sizeof(/*short*/ int); NTrip += stat_max_n_trip; @@ -2600,21 +2599,21 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best const L1HitIndex_t& ihitr = curr_trip->GetRHit(); - if (!GetFUsed((*fStripFlag)[(*vStsHitsUnused)[ihitm].f] | (*fStripFlag)[(*vStsHitsUnused)[ihitm].b])) { + if (!GetFUsed((*fStripFlag)[(*vHitsUnused)[ihitm].f] | (*fStripFlag)[(*vHitsUnused)[ihitm].b])) { - // curr_tr.StsHits.push_back((*RealIHitP)[ihitm]); + // curr_tr.Hits.push_back((*RealIHitP)[ihitm]); - curr_tr.fStsHits.push_back((*RealIHitP)[ihitm]); + curr_tr.fHits.push_back((*RealIHitP)[ihitm]); curr_tr.NHits++; curr_L++; } - if (!GetFUsed((*fStripFlag)[(*vStsHitsUnused)[ihitr].f] | (*fStripFlag)[(*vStsHitsUnused)[ihitr].b])) { + if (!GetFUsed((*fStripFlag)[(*vHitsUnused)[ihitr].f] | (*fStripFlag)[(*vHitsUnused)[ihitr].b])) { - //curr_tr.StsHits.push_back((*RealIHitP)[ihitr]); - curr_tr.fStsHits.push_back((*RealIHitP)[ihitr]); + //curr_tr.Hits.push_back((*RealIHitP)[ihitr]); + curr_tr.fHits.push_back((*RealIHitP)[ihitr]); curr_tr.NHits++; @@ -2631,7 +2630,7 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best // if (isec != kFastPrimJumpIter && isec != kAllPrimJumpIter && isec != kAllSecJumpIter && curr_L >= 3){ // //curr_chi2 = BranchExtender(curr_tr); // BranchExtender(curr_tr); - // curr_L = curr_tr.StsHits.size(); + // curr_L = curr_tr.Hits.size(); // // if( 2*curr_chi2 > (2*(curr_L*2-5) + 1) * 4*4 ) return; // } // #endif // EXTEND_TRACKS @@ -2700,8 +2699,8 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best if (dtx > 7 * sqrt(Ctx)) continue; } - if (GetFUsed((*fStripFlag)[(*vStsHitsUnused)[new_trip.GetLHit()].f] - | (*fStripFlag)[(*vStsHitsUnused)[new_trip.GetLHit()].b])) { //hits are used + if (GetFUsed((*fStripFlag)[(*vHitsUnused)[new_trip.GetLHit()].f] + | (*fStripFlag)[(*vHitsUnused)[new_trip.GetLHit()].b])) { //hits are used // no used hits allowed -> compare and store track if ((curr_L > best_L) || ((curr_L == best_L) && (curr_chi2 < best_chi2))) { best_tr = curr_tr; @@ -2718,7 +2717,7 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best fscal new_chi2 = curr_chi2; // add new hit - new_tr[ista].fStsHits.push_back((*RealIHitP)[new_trip.GetLHit()]); + new_tr[ista].fHits.push_back((*RealIHitP)[new_trip.GetLHit()]); new_tr[ista].NHits++; new_L += 1; diff --git a/reco/L1/L1Algo/L1Event.cxx b/reco/L1/L1Algo/L1Event.cxx index 0f5eb9de53114e70ce0ad98fb037370642946dfc..935fa82dc8f20b648cb6da1454859e48c7f0bdc1 100644 --- a/reco/L1/L1Algo/L1Event.cxx +++ b/reco/L1/L1Algo/L1Event.cxx @@ -4,7 +4,7 @@ #include "L1Event.h" -void L1Event::Clear() { fStsHit.clear(); } +void L1Event::Clear() { fHit.clear(); } void L1Event::TopoReconstructor() { diff --git a/reco/L1/L1Algo/L1Event.h b/reco/L1/L1Algo/L1Event.h index 220c1bb448298ebb66da503e30d2c03d2b45d494..e490ebe6099dca6ca789cff11149c7896a961323 100644 --- a/reco/L1/L1Algo/L1Event.h +++ b/reco/L1/L1Algo/L1Event.h @@ -17,31 +17,31 @@ using std::vector; class L1Event { public: - L1Event() : fTopoReconstructor(), fKFPTrack(), fStsHit(0) {}; + L1Event() : fTopoReconstructor(), fKFPTrack(), fHit(0) {}; void Clear(); void TopoReconstructor(); const KFPTrackVector& getTracks() const { return fKFPTrack; } KFPTrackVector& getTracks() { return fKFPTrack; } - const vector<int>& getHits() const { return fStsHit; } - vector<int>& getHits() { return fStsHit; } + const vector<int>& getHits() const { return fHit; } + vector<int>& getHits() { return fHit; } const KFParticleTopoReconstructor* getTopoReconstructor() const { return &fTopoReconstructor; } L1Event(const L1Event& event) : fTopoReconstructor(event.fTopoReconstructor) , fKFPTrack(event.fKFPTrack) - , fStsHit(event.fStsHit) + , fHit(event.fHit) { fKFPTrack = event.fKFPTrack; - fStsHit = event.fStsHit; + fHit = event.fHit; } L1Event& operator=(const L1Event& event) { fTopoReconstructor = event.fTopoReconstructor; fKFPTrack = event.fKFPTrack; - fStsHit = event.fStsHit; + fHit = event.fHit; return *this; } @@ -50,7 +50,7 @@ private: KFParticleTopoReconstructor fTopoReconstructor; KFPTrackVector fKFPTrack; - vector<int> fStsHit; + vector<int> fHit; }; #endif diff --git a/reco/L1/L1Algo/L1HitsSortHelper.cxx b/reco/L1/L1Algo/L1HitsSortHelper.cxx index e0c2ccf5eecc4912ce17a241e8899eb185f0f75e..185427d61c453567a796e5ff78d611b4ad97a690 100644 --- a/reco/L1/L1Algo/L1HitsSortHelper.cxx +++ b/reco/L1/L1Algo/L1HitsSortHelper.cxx @@ -21,8 +21,8 @@ L1HitsSortHelper::L1HitsSortHelper(vector<L1Hit>& hits, vector<L1HitPoint>& poin , fPoints(points) , fIndices(indices) , fGrid(grid) - , fStsHitsUnusedStartIndex(iStart) - , fStsHitsUnusedStopIndex(iStop) + , fHitsUnusedStartIndex(iStart) + , fHitsUnusedStopIndex(iStop) , fNStations(nStations) , fnDontUsedHits(nDontUsedHits) { @@ -31,7 +31,7 @@ L1HitsSortHelper::L1HitsSortHelper(vector<L1Hit>& hits, vector<L1HitPoint>& poin fD.resize(NHits); //float x,y=0; for (int iS = 0; iS < fNStations; ++iS) - for (L1HitIndex_t i = fStsHitsUnusedStartIndex[iS]; i < fStsHitsUnusedStopIndex[iS]; i++) { + for (L1HitIndex_t i = fHitsUnusedStartIndex[iS]; i < fHitsUnusedStopIndex[iS]; i++) { fD[i].h = &(hits[i]); fD[i].p = &(points[i]); fD[i].i = indices[i]; @@ -43,7 +43,7 @@ L1HitsSortHelper::L1HitsSortHelper(vector<L1Hit>& hits, vector<L1HitPoint>& poin void L1HitsSortHelper::Sort() { for (int iS = 0; iS < fNStations; ++iS) { - std::sort(fD.begin() + fStsHitsUnusedStartIndex[iS], fD.begin() + fStsHitsUnusedStopIndex[iS], + std::sort(fD.begin() + fHitsUnusedStartIndex[iS], fD.begin() + fHitsUnusedStopIndex[iS], L1HitsSortHelperData::compare); } diff --git a/reco/L1/L1Algo/L1HitsSortHelper.h b/reco/L1/L1Algo/L1HitsSortHelper.h index 6461be2cab9d8e5bb6ac591d1fcc50c078d68d3b..50236c95735258ed3fb2cf893a48f6e8242ce478 100644 --- a/reco/L1/L1Algo/L1HitsSortHelper.h +++ b/reco/L1/L1Algo/L1HitsSortHelper.h @@ -39,7 +39,7 @@ private: vector<L1HitPoint>& fPoints; vector<L1HitIndex_t>& fIndices; const L1Grid* fGrid; - L1HitIndex_t *fStsHitsUnusedStartIndex, *fStsHitsUnusedStopIndex; + L1HitIndex_t *fHitsUnusedStartIndex, *fHitsUnusedStopIndex; int fNStations; int fnDontUsedHits; diff --git a/reco/L1/L1Algo/L1TrackExtender.cxx b/reco/L1/L1Algo/L1TrackExtender.cxx index accccec0203c3345e07fe39c6a4d6ce91135c0a5..c865df9494bdb103c4a402bf6e706319e1d31763 100644 --- a/reco/L1/L1Algo/L1TrackExtender.cxx +++ b/reco/L1/L1Algo/L1TrackExtender.cxx @@ -33,16 +33,16 @@ void L1Algo::BranchFitterFast(const L1Branch& t, L1TrackPar& T, const bool dir, fit.SetParticleMass(GetDefaultParticleMass()); // get hits of current track - const L1Vector<L1HitIndex_t>& hits = t.fStsHits; // array of indeses of hits of current track + const L1Vector<L1HitIndex_t>& hits = t.fHits; // array of indeses of hits of current track const int nHits = t.NHits; const signed short int step = -2 * static_cast<int>(dir) + 1; // increment for station index const int iFirstHit = (dir) ? nHits - 1 : 0; const int iLastHit = (dir) ? 0 : nHits - 1; - const L1Hit& hit0 = (*vStsHits)[hits[iFirstHit]]; - const L1Hit& hit1 = (*vStsHits)[hits[iFirstHit + step]]; - const L1Hit& hit2 = (*vStsHits)[hits[iFirstHit + 2 * step]]; + const L1Hit& hit0 = (*vHits)[hits[iFirstHit]]; + const L1Hit& hit1 = (*vHits)[hits[iFirstHit + step]]; + const L1Hit& hit2 = (*vHits)[hits[iFirstHit + 2 * step]]; int ista0 = GetFStation((*fStripFlag)[hit0.f]); int ista1 = GetFStation((*fStripFlag)[hit1.f]); @@ -122,7 +122,7 @@ void L1Algo::BranchFitterFast(const L1Branch& t, L1TrackPar& T, const bool dir, int ista = ista2; for (int i = iFirstHit + step; step * i <= step * iLastHit; i += step) { - const L1Hit& hit = (*vStsHits)[hits[i]]; + const L1Hit& hit = (*vHits)[hits[i]]; ista_prev = ista; ista = GetFStation((*fStripFlag)[hit.f]); @@ -203,11 +203,11 @@ void L1Algo::FindMoreHits(L1Branch& t, L1TrackPar& T, const bool dir, const signed short int step = -2 * static_cast<int>(dir) + 1; // increment for station index const int iFirstHit = (dir) ? 2 : t.NHits - 3; - // int ista = GetFStation((*fStripFlag)[(*vStsHits)[t.StsHits[iFirstHit]].f]) + 2*step; // current station. set to the end of track + // int ista = GetFStation((*fStripFlag)[(*vHits)[t.Hits[iFirstHit]].f]) + 2*step; // current station. set to the end of track - const L1Hit& hit0 = (*vStsHits)[t.fStsHits[iFirstHit]]; // optimize - const L1Hit& hit1 = (*vStsHits)[t.fStsHits[iFirstHit + step]]; - const L1Hit& hit2 = (*vStsHits)[t.fStsHits[iFirstHit + 2 * step]]; + const L1Hit& hit0 = (*vHits)[t.fHits[iFirstHit]]; // optimize + const L1Hit& hit1 = (*vHits)[t.fHits[iFirstHit + step]]; + const L1Hit& hit2 = (*vHits)[t.fHits[iFirstHit + 2 * step]]; const int ista0 = GetFStation((*fStripFlag)[hit0.f]); const int ista1 = GetFStation((*fStripFlag)[hit1.f]); @@ -278,8 +278,8 @@ void L1Algo::FindMoreHits(L1Branch& t, L1TrackPar& T, const bool dir, L1HitIndex_t ih = 0; while (area.GetNext(ih)) { - ih += StsHitsUnusedStartIndex[ista]; - const L1Hit& hit = (*vStsHitsUnused)[ih]; + ih += HitsUnusedStartIndex[ista]; + const L1Hit& hit = (*vHitsUnused)[ih]; //TODO: bug, it should be hit.dt*hit.dt if (fabs(hit.t - T.t[0]) > sqrt(T.C55[0] + hit.dt * hit.dt) * 5) continue; @@ -313,7 +313,7 @@ void L1Algo::FindMoreHits(L1Branch& t, L1TrackPar& T, const bool dir, newHits.push_back((*RealIHitP)[iHit_best]); - const L1Hit& hit = (*vStsHitsUnused)[iHit_best]; + const L1Hit& hit = (*vHitsUnused)[iHit_best]; fvec u = hit.u; fvec v = hit.v; fvec x, y, z; @@ -355,20 +355,20 @@ void L1Algo::FindMoreHits(L1Branch& t, L1TrackPar& T, const bool dir, // save hits const unsigned int NOldHits = t.NHits; const unsigned int NNewHits = newHits.size(); - t.fStsHits.enlarge(NNewHits + NOldHits); + t.fHits.enlarge(NNewHits + NOldHits); t.NHits = (NNewHits + NOldHits); if (dir) { // backward for (int i = NOldHits - 1; i >= 0; i--) { - t.fStsHits[NNewHits + i] = t.fStsHits[i]; + t.fHits[NNewHits + i] = t.fHits[i]; } for (unsigned int i = 0, ii = NNewHits - 1; i < NNewHits; i++, ii--) { - t.fStsHits[i] = newHits[ii]; + t.fHits[i] = newHits[ii]; } } else { // forward for (unsigned int i = 0; i < newHits.size(); i++) { - t.fStsHits[NOldHits + i] = (newHits[i]); + t.fHits[NOldHits + i] = (newHits[i]); } } diff --git a/reco/L1/L1Algo/L1TrackFitter.cxx b/reco/L1/L1Algo/L1TrackFitter.cxx index bb655d34324653844c9d11fcab17c734a55554c0..5d99d26c11d4622e879bfbf92bc8511e3c171066 100644 --- a/reco/L1/L1Algo/L1TrackFitter.cxx +++ b/reco/L1/L1Algo/L1TrackFitter.cxx @@ -52,9 +52,9 @@ void L1Algo::KFTrackFitter_simple() // TODO: Add pipe. for (int iter = 0; iter < 3; iter++) { //cout<<" Back 1"<<endl; { // fit backward - const L1Hit& hit0 = (*vStsHits)[hits[nHits - 1]]; - const L1Hit& hit1 = (*vStsHits)[hits[nHits - 2]]; - const L1Hit& hit2 = (*vStsHits)[hits[nHits - 3]]; + const L1Hit& hit0 = (*vHits)[hits[nHits - 1]]; + const L1Hit& hit1 = (*vHits)[hits[nHits - 2]]; + const L1Hit& hit2 = (*vHits)[hits[nHits - 3]]; int ista0 = (*fStripFlag)[hit0.f] / 4; int ista1 = (*fStripFlag)[hit1.f] / 4; @@ -126,15 +126,15 @@ void L1Algo::KFTrackFitter_simple() // TODO: Add pipe. //cout<<"\nfit, iter=:"<<iter<<endl; for (int i = nHits - 2; i >= 0; i--) { // if( fabs(T.qp[0])>2. ) break; // iklm. Don't know it need for - const L1Hit& hit = (*vStsHits)[hits[i]]; + const L1Hit& hit = (*vHits)[hits[i]]; ista = (*fStripFlag)[hit.f] / 4; const L1Station& sta = fParameters.GetStation(ista); // L1Extrapolate( T, hit.z, qp0, fld ); L1ExtrapolateLine(T, hit.z); -// T.L1Extrapolate( sta.z, qp0, fld ); -// L1Extrapolate( T, hit.z, qp0, fld ); + // T.L1Extrapolate( sta.z, qp0, fld ); + // L1Extrapolate( T, hit.z, qp0, fld ); if constexpr (L1Constants::control::kIfUseRadLengthTable) { fit.L1AddMaterial(T, fParameters.GetMaterialThickness(i, T.x, T.y), qp0, ONE); } @@ -194,9 +194,9 @@ void L1Algo::KFTrackFitter_simple() // TODO: Add pipe. { //T.qp = first_trip->GetQpOrig(MaxInvMom); - const L1Hit& hit0 = (*vStsHits)[hits[0]]; - const L1Hit& hit1 = (*vStsHits)[hits[1]]; - const L1Hit& hit2 = (*vStsHits)[hits[2]]; + const L1Hit& hit0 = (*vHits)[hits[0]]; + const L1Hit& hit1 = (*vHits)[hits[1]]; + const L1Hit& hit2 = (*vHits)[hits[2]]; int ista0 = GetFStation((*fStripFlag)[hit0.f]); int ista1 = GetFStation((*fStripFlag)[hit1.f]); @@ -262,18 +262,18 @@ void L1Algo::KFTrackFitter_simple() // TODO: Add pipe. int ista = ista2; for (int i = 1; i < nHits; i++) { - const L1Hit& hit = (*vStsHits)[hits[i]]; - ista = (*fStripFlag)[hit.f] / 4; + const L1Hit& hit = (*vHits)[hits[i]]; + ista = (*fStripFlag)[hit.f] / 4; const L1Station& sta = fParameters.GetStation(ista); - fvec u = hit.u; - fvec v = hit.v; + fvec u = hit.u; + fvec v = hit.v; fvec x, y; StripsToCoor(u, v, x, y, sta); // L1Extrapolate( T, hit.z, qp0, fld ); L1ExtrapolateLine(T, hit.z); -// T.L1Extrapolate( sta.z, qp0, fld ); -// L1Extrapolate( T, hit.z, qp0, fld ); + // T.L1Extrapolate( sta.z, qp0, fld ); + // L1Extrapolate( T, hit.z, qp0, fld ); if constexpr (L1Constants::control::kIfUseRadLengthTable) { fit.L1AddMaterial(T, fParameters.GetMaterialThickness(i, T.x, T.y), qp0, ONE); } @@ -392,7 +392,7 @@ void L1Algo::L1KFTrackFitter() int nHitsTrack = t[iVec]->NHits; int iSta[L1Constants::size::kMaxNstations]; for (i = 0; i < nHitsTrack; i++) { - const L1Hit& hit = (*vStsHits)[fRecoHits[start_hit++]]; + const L1Hit& hit = (*vHits)[fRecoHits[start_hit++]]; const int ista = (*fStripFlag)[hit.f] / 4; iSta[i] = ista; w[ista][iVec] = 1.; @@ -446,11 +446,11 @@ void L1Algo::L1KFTrackFitter() fscal prevZ = z_end[iVec]; fscal cursy = 0., curSy = 0.; for (i = nHitsTrack - 1; i >= 0; i--) { - const int ista = iSta[i]; + const int ista = iSta[i]; const L1Station& st = fParameters.GetStation(ista); - const fscal curZ = z[ista][iVec]; - fscal dZ = curZ - prevZ; - fscal By = st.fieldSlice.cy[0][0]; + const fscal curZ = z[ista][iVec]; + fscal dZ = curZ - prevZ; + fscal By = st.fieldSlice.cy[0][0]; curSy += dZ * cursy + dZ * dZ * By / 2.; cursy += dZ * By; Sy[ista][iVec] = curSy; @@ -823,12 +823,12 @@ void L1Algo::L1KFTrackFitterMuch() } for (iVec = 0; iVec < nTracks_SIMD; iVec++) { - int nHitsTrack = t[iVec]->NHits; - int nHitsTrackSts = 0; + int nHitsTrack = t[iVec]->NHits; + int nHitsTrackField = 0; for (i = 0; i < nHitsTrack; i++) { - const L1Hit& hit = (*vStsHits)[fRecoHits[start_hit++]]; + const L1Hit& hit = (*vHits)[fRecoHits[start_hit++]]; const int ista = (*fStripFlag)[hit.f] / 4; - if (ista < 8) nHitsTrackSts++; + if (ista < fNfieldStations) nHitsTrackField++; iSta[i] = ista; w[ista][iVec] = 1.; @@ -885,12 +885,12 @@ void L1Algo::L1KFTrackFitterMuch() fscal prevZ = z_start[iVec]; fscal cursy = 0., curSy = 0.; // for(i = nHitsTrack - 1; i >= 0; i-- ){ - for (i = 0; i < nHitsTrackSts; i++) { - const int ista = iSta[i]; + for (i = 0; i < nHitsTrackField; i++) { + const int ista = iSta[i]; const L1Station& st = fParameters.GetStation(ista); - const fscal curZ = z[ista][iVec]; - fscal dZ = curZ - prevZ; - fscal By = st.fieldSlice.cy[0][0]; + const fscal curZ = z[ista][iVec]; + fscal dZ = curZ - prevZ; + fscal By = st.fieldSlice.cy[0][0]; curSy += dZ * cursy + dZ * dZ * By / 2.; cursy += dZ * By; Sy[ista][iVec] = curSy; @@ -900,15 +900,15 @@ void L1Algo::L1KFTrackFitterMuch() //fit backward - int nHitsSts = 0; + int nHitsField = 0; for (i = 0; i < nHits; i++) - if (iSta[i] < 8) nHitsSts++; + if (iSta[i] < fNfieldStations) nHitsField++; - GuessVec(T, x, y, z, Sy, w, nHitsSts, &z_start); + GuessVec(T, x, y, z, Sy, w, nHitsField, &z_start); - GuessVec(T1, x, y, z, Sy, w, nHitsSts, &z_start); + GuessVec(T1, x, y, z, Sy, w, nHitsField, &z_start); for (int iter = 0; iter < 2; iter++) { // 1.5 iterations @@ -1147,7 +1147,7 @@ void L1Algo::L1KFTrackFitterMuch() fvec wIn = (ONE & (initialised)); - if (i >= 7) { + if (i >= fNfieldStations - 1) { fvec z_last = z[i]; @@ -1228,22 +1228,21 @@ void L1Algo::L1KFTrackFitterMuch() T1.Filter(time[i], timeEr[i], w1, sta[i].timeInfo); } - if (i < 7) { + if (i < fNfieldStations - 1) { - if (i == 6) { + if (i == fNfieldStations - 2) { // next-to-last field station - T1.ExtrapolateLine(z[7]); + T1.ExtrapolateLine(z[i + 1]); - int i_sts = i + 1; - fldZ1 = z[i_sts]; //7 - sta[i_sts].fieldSlice.GetFieldValue(T1.fx, T1.fy, fldB1); - fldB1.Combine(fB[i_sts], w[i_sts]); + fldZ1 = z[i + 1]; + sta[i + 1].fieldSlice.GetFieldValue(T1.fx, T1.fy, fldB1); + fldB1.Combine(fB[i + 1], w[i + 1]); - fldZ2 = z[i_sts - 2]; //5 + fldZ2 = z[i - 1]; dz = fldZ2 - fldZ1; - sta[i_sts].fieldSlice.GetFieldValue(T1.fx + T1.ftx * dz, T1.fy + T1.fty * dz, fldB2); - fldB2.Combine(fB[i_sts - 2], w[i_sts - 2]); + sta[i + 1].fieldSlice.GetFieldValue(T1.fx + T1.ftx * dz, T1.fy + T1.fty * dz, fldB2); + fldB2.Combine(fB[i - 1], w[i - 1]); } diff --git a/reco/L1/L1Algo/L1Triplet.h b/reco/L1/L1Algo/L1Triplet.h index 73fcc241082e4af193ddbaf56b48ce9265797d68..77a90f14150c0f22e0c95cbcad2cca665065e2be 100644 --- a/reco/L1/L1Algo/L1Triplet.h +++ b/reco/L1/L1Algo/L1Triplet.h @@ -83,7 +83,7 @@ private: fscal fCty = 0.f; // RMS of ty unsigned int fFirstNeighbour = 0; // ID of the first neighbouring triplet - L1HitIndex_t fHitL = 0; // left hit index (16b) in vStsHits array + L1HitIndex_t fHitL = 0; // left hit index (16b) in vHits array L1HitIndex_t fHitM = 0; // middle hit index (16b) L1HitIndex_t fHitR = 0; // right hit index (16b) char fNneighbours = 0; // n of neighbouring triplets diff --git a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx index a4f2fa8642a71bee5899cf03b1208591990f3f87..5d515e6c073e3cdfd13e1d59c3a10fd29b9b87e0 100644 --- a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx +++ b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx @@ -74,14 +74,14 @@ void L1AlgoDraw::InitL1Draw(L1Algo* algo_) // algo = CbmL1::Instance()->algo; algo = algo_; - vStsHits.reserve(algo->vStsHits->size()); - for (unsigned int i = 0; i < algo->vStsHits->size(); i++) { - vStsHits.push_back((*algo->vStsHits)[i]); + vHits.reserve(algo->vHits->size()); + for (unsigned int i = 0; i < algo->vHits->size(); i++) { + vHits.push_back((*algo->vHits)[i]); } NStations = algo->GetNstations(); for (int i = 0; i < NStations; i++) { - StsHitsStartIndex[i] = algo->StsHitsStartIndex[i]; - StsHitsStopIndex[i] = algo->StsHitsStopIndex[i]; + HitsStartIndex[i] = algo->HitsStartIndex[i]; + HitsStopIndex[i] = algo->HitsStopIndex[i]; vStations[i] = algo->GetParameters()->GetStation(i); } } @@ -136,8 +136,8 @@ void L1AlgoDraw::DrawMCTracks() if (fVerbose >= 4) { cout << "hits = "; - for (unsigned int ih = 0; ih < T.StsHits.size(); ih++) - cout << T.StsHits[ih] << " "; + for (unsigned int ih = 0; ih < T.Hits.size(); ih++) + cout << T.Hits[ih] << " "; cout << endl; } for (int ip = 0; ip < npoints; ip++) { @@ -466,7 +466,7 @@ void L1AlgoDraw::DrawDoublet(int il, int ir) void L1AlgoDraw::DrawInfo() { - cout << " vStsHits.size = " << algo->vStsHits->size() << endl; + cout << " vHits.size = " << algo->vHits->size() << endl; cout << " vRecoHits.size = " << algo->fRecoHits.size() << endl; cout << " vTracks.size = " << algo->fTracks.size() << endl; } @@ -544,7 +544,7 @@ void L1AlgoDraw::DrawInputHits() YX->Draw(); - int nhits = vStsHits.size(); + int nhits = vHits.size(); Double_t x_poly[nhits], y_poly[nhits], z_poly[nhits]; Double_t x_poly_fake[nhits], y_poly_fake[nhits], z_poly_fake[nhits]; Double_t x_poly_turned[nhits], z_poly_turned[nhits]; @@ -555,8 +555,8 @@ void L1AlgoDraw::DrawInputHits() L1Station& st = vStations[ista]; Int_t n_poly = 0; Int_t n_poly_fake = 0; - for (int ih = StsHitsStartIndex[ista]; ih < StsHitsStopIndex[ista]; ih++) { - L1Hit& h = vStsHits[ih]; + for (int ih = HitsStartIndex[ista]; ih < HitsStopIndex[ista]; ih++) { + L1Hit& h = vHits[ih]; int iMC = CbmL1::Instance()->vHitMCRef[ih]; //if( (vSFlag[h.f] | vSFlagB[h.b] )&0x02 ) continue; // if used @@ -679,7 +679,7 @@ void L1AlgoDraw::DrawRestHits(L1HitIndex_t* StsRestHitsStartIndex, L1HitIndex_t* YX->Draw(); - int nhits = vStsHits.size(); + int nhits = vHits.size(); Double_t x_poly[nhits], y_poly[nhits], z_poly[nhits]; Double_t x_poly_fake[nhits], y_poly_fake[nhits], z_poly_fake[nhits]; @@ -690,7 +690,7 @@ void L1AlgoDraw::DrawRestHits(L1HitIndex_t* StsRestHitsStartIndex, L1HitIndex_t* Int_t n_poly_fake = 0; for (L1HitIndex_t iRestHit = StsRestHitsStartIndex[ista]; iRestHit < StsRestHitsStopIndex[ista]; iRestHit++) { int ih = realIHit[iRestHit]; - L1Hit& h = vStsHits[ih]; + L1Hit& h = vHits[ih]; int iMC = CbmL1::Instance()->vHitMCRef[ih]; //if( (vSFlag[h.f] | vSFlagB[h.b] )&0x02 ) continue; // if used @@ -790,11 +790,11 @@ void L1AlgoDraw::ClearVeiw() L1AlgoDraw::Point L1AlgoDraw::GetHitCoor(int ih) { - L1Hit& hit = vStsHits[ih]; + L1Hit& hit = vHits[ih]; // find station int ista = 0; for (int i = 0; i < NStations; i++) { - if ((StsHitsStartIndex[i] <= ih) && (StsHitsStopIndex[i] > ih)) { + if ((HitsStartIndex[i] <= ih) && (HitsStopIndex[i] > ih)) { ista = i; break; } diff --git a/reco/L1/L1Algo/utils/L1AlgoDraw.h b/reco/L1/L1Algo/utils/L1AlgoDraw.h index c6ae16429580316261ccfdacf42d5b74132de8af..d071907dc1477c7eb1661c89aabc91bf8f5b5ba7 100644 --- a/reco/L1/L1Algo/utils/L1AlgoDraw.h +++ b/reco/L1/L1Algo/utils/L1AlgoDraw.h @@ -33,7 +33,7 @@ public: void DrawTriplets(std::vector<L1Triplet>& triplets, const L1HitIndex_t* realIHit); void DrawDoublets(std::vector<L1HitIndex_t>* Duplets_hits, std::map<L1HitIndex_t, L1HitIndex_t>* Duplets_start, - const int MaxArrSize, L1HitIndex_t* StsHitsStartIndex, unsigned int* realIHit); + const int MaxArrSize, L1HitIndex_t* HitsStartIndex, unsigned int* realIHit); void DrawDoubletsOnSta(int iSta, L1HitIndex_t* Duplets_hits, L1HitIndex_t* Duplets_start, const int MaxArrSize, L1HitIndex_t* StsRestHitsStartIndex, unsigned int* realIHit); @@ -58,9 +58,9 @@ private: L1Algo* algo {nullptr}; - std::vector<L1Hit> vStsHits {}; - int StsHitsStartIndex[20] {0}; - int StsHitsStopIndex[20] {0}; + std::vector<L1Hit> vHits {}; + int HitsStartIndex[20] {0}; + int HitsStopIndex[20] {0}; int NStations {0}; L1Station vStations[20] {}; diff --git a/reco/L1/L1Algo/utils/L1AlgoEfficiencyPerformance.h b/reco/L1/L1Algo/utils/L1AlgoEfficiencyPerformance.h index 7e7625e509d3fb51e7471c3d4d25be1f38e9ed6d..7809e79d4f0a9279d500eeac14d963d64e861d43 100644 --- a/reco/L1/L1Algo/utils/L1AlgoEfficiencyPerformance.h +++ b/reco/L1/L1Algo/utils/L1AlgoEfficiencyPerformance.h @@ -92,7 +92,7 @@ public: float p {0.f}; // momentum vector<int> recoIds {}; // indices of reco tracklets in sorted recoArray - vector<int> hitIds[NHits] {}; // indices of hits in L1::vStsHits. Separated by stations + vector<int> hitIds[NHits] {}; // indices of hits in L1::vHits. Separated by stations private: bool isReconstructable {false}; // is it reconstructed }; @@ -224,9 +224,9 @@ bool L1AlgoEfficiencyPerformance<NHits>::AddOne(L1HitIndex_t* iHits) // obtain mc data for (int iih = 0; iih < NHits; iih++) { - int nMC = fL1->vStsHits[iHits[iih]].mcPointIds.size(); + int nMC = fL1->vHits[iHits[iih]].mcPointIds.size(); for (int iMC = 0; iMC < nMC; iMC++) { - const int iMCP = fL1->vStsHits[iHits[iih]].mcPointIds[iMC]; + const int iMCP = fL1->vHits[iHits[iih]].mcPointIds[iMC]; int mcId = fL1->vMCPoints[iMCP].ID; mcIds[iih].push_back(mcId); } // for mcPoints @@ -254,7 +254,7 @@ bool L1AlgoEfficiencyPerformance<NHits>::AddOne(L1HitIndex_t* iHits) for (unsigned int i = 0; i < mcsN.size(); i++) { if (mcsN[i] >= 0) { trlet.mcTrackId = mcsN[i]; - trlet.iStation = fL1->vMCPoints[fL1->vStsHits[iHits[0]].mcPointIds[0]].iStation; + trlet.iStation = fL1->vMCPoints[fL1->vHits[iHits[0]].mcPointIds[0]].iStation; break; } } diff --git a/reco/L1/L1Algo/utils/L1AlgoPulls.cxx b/reco/L1/L1Algo/utils/L1AlgoPulls.cxx index a3e5707935ae0dd13035bf19c7e3866fa2d28997..fe647db43c41fb04bb7a92cce27d939b1b4f8f9a 100644 --- a/reco/L1/L1Algo/utils/L1AlgoPulls.cxx +++ b/reco/L1/L1Algo/utils/L1AlgoPulls.cxx @@ -140,7 +140,7 @@ void L1AlgoPulls::AddOne(L1TrackPar& T_, int i, L1HitIndex_t ih) #ifdef BUILD_HISTO_FOR_EACH_STANTION int ista = mcP.iStation - 2; // last hit - // int ista = fL1->algo->vSFlag[ fL1->algo->vStsHits[ih].f ]/4 - 2; // last hit + // int ista = fL1->algo->vSFlag[ fL1->algo->vHits[ih].f ]/4 - 2; // last hit fStaPulls[ista].push_back(P); #endif // BUILD_HISTO_FOR_EACH_STANTION }; diff --git a/reco/L1/L1AlgoInputData.cxx b/reco/L1/L1AlgoInputData.cxx index 3d77aca5bde42fce4189584f9204cb59a5cb5c63..30dc4f4b0e624da0a2f0c2bad04f7bff73d7b5bc 100644 --- a/reco/L1/L1AlgoInputData.cxx +++ b/reco/L1/L1AlgoInputData.cxx @@ -11,34 +11,34 @@ using std::ios; /* L1AlgoInputData::L1AlgoInputData( const L1AlgoInputData& a) { - SetData( a.GetStsHits(), a.GetStsStrips(), a.GetStsStripsB(), - a.GetSFlag(), a.GetSFlagB(), a.GetStsHitsStartIndex(), a.GetStsHitsStopIndex()); + SetData( a.GetHits(), a.GetStsStrips(), a.GetStsStripsB(), + a.GetSFlag(), a.GetSFlagB(), a.GetHitsStartIndex(), a.GetHitsStopIndex()); } const L1AlgoInputData& L1AlgoInputData::operator=( const L1AlgoInputData& a) { - SetData( a.GetStsHits(), a.GetStsStrips(), a.GetStsStripsB(), - a.GetSFlag(), a.GetSFlagB(), a.GetStsHitsStartIndex(), a.GetStsHitsStopIndex()); + SetData( a.GetHits(), a.GetStsStrips(), a.GetStsStripsB(), + a.GetSFlag(), a.GetSFlagB(), a.GetHitsStartIndex(), a.GetHitsStopIndex()); return a; } -void L1AlgoInputData::SetData( const vector< L1Hit > & StsHits_, +void L1AlgoInputData::SetData( const vector< L1Hit > & Hits_, const vector< L1Strip > & StsStrips_, const vector< L1Strip > & StsStripsB_, const vector< unsigned char > & SFlag_, const vector< unsigned char > & SFlagB_, - const L1HitIndex_t* StsHitsStartIndex_, - const L1HitIndex_t* StsHitsStopIndex_ ) + const L1HitIndex_t* HitsStartIndex_, + const L1HitIndex_t* HitsStopIndex_ ) { - vStsHits.resize(StsHits_.size()); + vHits.resize(Hits_.size()); vStsStrips.resize(StsStrips_.size()); vStsStripsB.resize(StsStripsB_.size()); fStripFlag.resize(SFlag_.size()); fStripFlagB.resize(SFlagB_.size()); - for(unsigned int i=0; i<StsHits_.size(); ++i ) {vStsHits[i] = StsHits_[i]; + for(unsigned int i=0; i<Hits_.size(); ++i ) {vHits[i] = Hits_[i]; } for(unsigned int i=0; i<StsStrips_.size(); ++i ) vStsStrips[i] = StsStrips_[i]; @@ -46,9 +46,9 @@ void L1AlgoInputData::SetData( const vector< L1Hit > & StsHits_, for(unsigned int i=0; i<SFlag_.size(); ++i ) fStripFlag[i] = SFlag_[i]; for(unsigned int i=0; i<SFlagB_.size(); ++i ) fStripFlagB[i] = SFlagB_[i]; - for(unsigned int i=0; i<MaxNStations+1; ++i) StsHitsStartIndex[i] = StsHitsStartIndex_[i]; + for(unsigned int i=0; i<MaxNStations+1; ++i) HitsStartIndex[i] = HitsStartIndex_[i]; - for(unsigned int i=0; i<MaxNStations+1; ++i) StsHitsStopIndex[i] = StsHitsStopIndex_[i]; + for(unsigned int i=0; i<MaxNStations+1; ++i) HitsStopIndex[i] = HitsStopIndex_[i]; } */ @@ -57,15 +57,15 @@ void L1AlgoInputData::SetData( const vector< L1Hit > & StsHits_, void L1AlgoInputData::Clear() { - vStsHits.clear(); - NStsStrips = 0; + vHits.clear(); + fNstrips = 0; fStripFlag.clear(); { for (int i = 0; i < kMaxNStations + 1; ++i) { - StsHitsStartIndex[i] = 0; + HitsStartIndex[i] = 0; } for (int i = 0; i < kMaxNStations + 1; ++i) { - StsHitsStopIndex[i] = 0; + HitsStopIndex[i] = 0; } } } @@ -101,8 +101,8 @@ bool L1AlgoInputData::ReadHitsFromFile(const char work_dir[100], const int maxNE if (nEvent <= maxNEvent) { - vStsHits.clear(); - NStsStrips = 0; + vHits.clear(); + fNstrips = 0; fStripFlag.clear(); @@ -120,7 +120,7 @@ bool L1AlgoInputData::ReadHitsFromFile(const char work_dir[100], const int maxNE // read algo->vStsStrips fadata >> n; // cout << n<< " vStsStrips"<<endl; - NStsStrips = n; + fNstrips = n; if (iVerbose >= 4) { cout << "vStsStrips[" << n << "]" << " have been read." << endl; @@ -138,9 +138,9 @@ bool L1AlgoInputData::ReadHitsFromFile(const char work_dir[100], const int maxNE cout << "fStripFlag[" << n << "]" << " have been read." << endl; } - // read algo->vStsHits + // read algo->vHits fadata >> n; - // cout << n<< " vStsHits"<<endl; + // cout << n<< " vHits"<<endl; int element_f; // for convert int element_b; int element_n; @@ -152,27 +152,27 @@ bool L1AlgoInputData::ReadHitsFromFile(const char work_dir[100], const int maxNE #ifdef USE_EVENT_NUMBER element.n = static_cast<unsigned short int>(element_n); #endif - vStsHits.push_back(element); + vHits.push_back(element); } if (iVerbose >= 4) { - cout << "vStsHits[" << n << "]" + cout << "vHits[" << n << "]" << " have been read." << endl; } - // read StsHitsStartIndex and StsHitsStopIndex + // read HitsStartIndex and HitsStopIndex n = 20; for (int i = 0; i < n; i++) { int tmp; fadata >> tmp; - if (kMaxNStations + 1 > i) StsHitsStartIndex[i] = tmp; - // cout << " StsHitsStartIndex[i]"<< StsHitsStartIndex[i] << endl; + if (kMaxNStations + 1 > i) HitsStartIndex[i] = tmp; + // cout << " HitsStartIndex[i]"<< HitsStartIndex[i] << endl; // cout << tmp<< " tmp"<<endl; } for (int i = 0; i < n; i++) { int tmp; fadata >> tmp; - if (kMaxNStations + 1 > i) StsHitsStopIndex[i] = tmp; - // cout << " StsHitsStopIndex[i]"<< StsHitsStopIndex[i] << endl; + if (kMaxNStations + 1 > i) HitsStopIndex[i] = tmp; + // cout << " HitsStopIndex[i]"<< HitsStopIndex[i] << endl; // cout << tmp<< " tmp"<<endl; } @@ -218,21 +218,21 @@ void L1AlgoInputData::PrintHits() std::cout << static_cast<int>(fStripFlagB[i]) << std::endl; } - n = vStsHits.size(); + n = vHits.size(); std::cout << n << std::endl; for (int i = 0; i < n; i++){ - std::cout << static_cast<int>(vStsHits[i].f) << " "; - std::cout << static_cast<int>(vStsHits[i].b) << " "; - std::cout << (vStsHits[i].z) << std::endl; + std::cout << static_cast<int>(vHits[i].f) << " "; + std::cout << static_cast<int>(vHits[i].b) << " "; + std::cout << (vHits[i].z) << std::endl; } n = 20; for (int i = 0; i < n; i++){ - if (MaxNStations+1 > i) std::cout << StsHitsStartIndex[i] <<std::endl; + if (MaxNStations+1 > i) std::cout << HitsStartIndex[i] <<std::endl; else std::cout << "0" <<std::endl; } for (int i = 0; i < n; i++){ - if (MaxNStations+1 > i) std::cout << StsHitsStopIndex[i] <<std::endl; + if (MaxNStations+1 > i) std::cout << HitsStopIndex[i] <<std::endl; else std::cout << "0" <<std::endl; } diff --git a/reco/L1/L1AlgoInputData.h b/reco/L1/L1AlgoInputData.h index 258f7e937bf0909281ae2ae109fd8388468d8fe2..b5254392c7afd821209a092f76bbe17bdb7d5c53 100644 --- a/reco/L1/L1AlgoInputData.h +++ b/reco/L1/L1AlgoInputData.h @@ -33,17 +33,17 @@ struct L1AlgoInputData { /// For all the vectors the clear method is called, all other fields are set to zero void Clear(); /// Gets number of the station strips - int GetNStsStrips() const { return NStsStrips; } + int GetNstrips() const { return fNstrips; } /// Gives an access to the underlying vector of L1Hit objects - L1Vector<L1Hit>& GetStsHits() { return vStsHits; } + L1Vector<L1Hit>& GetHits() { return vHits; } /// Gives an access to the vector of the strip flags L1Vector<unsigned char>& GetSFlag() { return fStripFlag; } /// Gets an access of the start indexes for different stations /// \return pointer to the first element of the array over the stations - const L1HitIndex_t* GetStsHitsStartIndex() const { return StsHitsStartIndex; } + const L1HitIndex_t* GetHitsStartIndex() const { return HitsStartIndex; } /// Gets an access of the stop indexes for different stations /// \return pointer to the first element of the array over the stations - const L1HitIndex_t* GetStsHitsStopIndex() const { return StsHitsStopIndex; } + const L1HitIndex_t* GetHitsStopIndex() const { return HitsStopIndex; } /// Reads a vector of L1Hit object from file /// The input text file must have the exactly "data_algo.txt" basename @@ -93,16 +93,16 @@ struct L1AlgoInputData { * Data fields (public) */ /// hits as a combination of front-, backstrips and z-position - L1Vector<L1Hit> vStsHits {"L1AlgoInputData::vStsHits"}; + L1Vector<L1Hit> vHits {"L1AlgoInputData::vHits"}; - int NStsStrips {0}; ///> Number of strips in the station + int fNstrips {0}; ///> Number of strips in the station /// information of hits station & used hits in tracks; L1Vector<unsigned char> fStripFlag {"L1AlgoInputData::fStripFlag"}; /// Start indeces for a given station - L1HitIndex_t StsHitsStartIndex[kMaxNStations + 1] {0}; + L1HitIndex_t HitsStartIndex[kMaxNStations + 1] {0}; /// Stop indeces for a given station - L1HitIndex_t StsHitsStopIndex[kMaxNStations + 1] {0}; + L1HitIndex_t HitsStopIndex[kMaxNStations + 1] {0}; } _fvecalignment; diff --git a/reco/L1/OffLineInterface/CbmL1GlobalTrackFinder.cxx b/reco/L1/OffLineInterface/CbmL1GlobalTrackFinder.cxx index be278f67e3cad9e1c82e90ad0fee2f6465024fd7..8dc630b687c4557e01da8d2ffb5be375c5bfcfdf 100644 --- a/reco/L1/OffLineInterface/CbmL1GlobalTrackFinder.cxx +++ b/reco/L1/OffLineInterface/CbmL1GlobalTrackFinder.cxx @@ -106,7 +106,7 @@ Int_t CbmL1GlobalTrackFinder::CopyL1Tracks(CbmEvent* event) bool hasMuchHits = false; bool hasTrdHits = false; bool hasTofHits = false; - for (vector<int>::iterator ih = it->StsHits.begin(); ih != it->StsHits.end(); ++ih) { + for (vector<int>::iterator ih = it->Hits.begin(); ih != it->Hits.end(); ++ih) { CbmL1HitStore& h = L1->vHitStore[*ih]; if (h.Det == 1 && hasStsHits == false) { @@ -163,7 +163,7 @@ void CbmL1GlobalTrackFinder::CbmL1TrackToCbmTrack(CbmL1Track l1track, CbmTrack* CbmL1* L1 = CbmL1::Instance(); - for (vector<int>::iterator ih = T->StsHits.begin(); ih != T->StsHits.end(); ++ih) { + for (vector<int>::iterator ih = T->Hits.begin(); ih != T->Hits.end(); ++ih) { CbmL1HitStore& h = L1->vHitStore[*ih]; if (h.Det != systemIdT) continue; } @@ -189,7 +189,7 @@ void CbmL1GlobalTrackFinder::CbmL1TrackToCbmStsTrack(CbmL1Track l1track, CbmStsT CbmL1* L1 = CbmL1::Instance(); - for (vector<int>::iterator ih = T->StsHits.begin(); ih != T->StsHits.end(); ++ih) { + for (vector<int>::iterator ih = T->Hits.begin(); ih != T->Hits.end(); ++ih) { CbmL1HitStore& h = L1->vHitStore[*ih]; if (h.Det != systemIdT) continue; track->AddHit(h.ExtIndex, kSTSHIT); @@ -221,7 +221,7 @@ void CbmL1GlobalTrackFinder::CbmL1TrackToCbmMuchTrack(CbmL1Track l1track, CbmMuc CbmL1* L1 = CbmL1::Instance(); - for (vector<int>::iterator ih = T->StsHits.begin(); ih != T->StsHits.end(); ++ih) { + for (vector<int>::iterator ih = T->Hits.begin(); ih != T->Hits.end(); ++ih) { CbmL1HitStore& h = L1->vHitStore[*ih]; if (h.Det != systemIdT) continue; track->AddHit(h.ExtIndex, kMUCHPIXELHIT); @@ -249,7 +249,7 @@ void CbmL1GlobalTrackFinder::CbmL1TrackToCbmTrdTrack(CbmL1Track l1track, CbmTrdT CbmL1* L1 = CbmL1::Instance(); - for (vector<int>::iterator ih = T->StsHits.begin(); ih != T->StsHits.end(); ++ih) { + for (vector<int>::iterator ih = T->Hits.begin(); ih != T->Hits.end(); ++ih) { CbmL1HitStore& h = L1->vHitStore[*ih]; if (h.Det != systemIdT) continue; track->AddHit(h.ExtIndex, kTRDHIT); @@ -278,7 +278,7 @@ void CbmL1GlobalTrackFinder::CbmL1TrackToCbmTofTrack(CbmL1Track l1track, CbmTofT CbmL1* L1 = CbmL1::Instance(); - for (vector<int>::iterator ih = T->StsHits.begin(); ih != T->StsHits.end(); ++ih) { + for (vector<int>::iterator ih = T->Hits.begin(); ih != T->Hits.end(); ++ih) { CbmL1HitStore& h = L1->vHitStore[*ih]; if (h.Det != systemIdT) continue; // track->AddHit(h.ExtIndex, kTOFHIT); diff --git a/reco/L1/OffLineInterface/CbmL1StsTrackFinder.cxx b/reco/L1/OffLineInterface/CbmL1StsTrackFinder.cxx index c2a399025f3ca832a3bbd373e04c6e11c5bb5e79..5f75c291833d4dd23130c5b7f60f340dbe9edf30 100644 --- a/reco/L1/OffLineInterface/CbmL1StsTrackFinder.cxx +++ b/reco/L1/OffLineInterface/CbmL1StsTrackFinder.cxx @@ -87,7 +87,7 @@ Int_t CbmL1StsTrackFinder::CopyL1Tracks(CbmEvent* event) t->SetTime(T.Tpv[6]); t->SetTimeError(T.Cpv[20]); - for (vector<int>::iterator ih = it->StsHits.begin(); ih != it->StsHits.end(); ++ih) { + for (vector<int>::iterator ih = it->Hits.begin(); ih != it->Hits.end(); ++ih) { CbmL1HitStore& h = L1->vHitStore[*ih]; // double zref = L1->algo->vStations[h.iStation].z[0]; if (h.Det > 1) { // not MVD or STS hit