diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 36af489e599669557892167a17933c75aca10c44..58a45a359b2639e36134f8c747fa740093cfade0 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -651,7 +651,7 @@ InitStatus CbmL1::Init() int num = ist - (NMvdStations + NStsStations + NTrdStations + NMuchStations); - geo.push_back(TofStationZ[ist - num]); + geo.push_back(TofStationZ[num]); geo.push_back(10); /// TODO: add Tof width dz geo.push_back(0); diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx index 10b085a2fcc183ab93829df961a2c6ce5b046a48..88f70b7267a093ae9a8ff9ae1e09d7ce6ffe319b 100644 --- a/reco/L1/CbmL1ReadEvent.cxx +++ b/reco/L1/CbmL1ReadEvent.cxx @@ -772,57 +772,58 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, th.iMC = -1; int iMC = -1; - if (1 && (fTrackingMode = L1Algo::TrackingMode::kGlobal) && fPerformance - && fTrdHitMatches) { //SG!!! replace hits by MC points + if (1 && fPerformance && fTrdHitMatches) { CbmMatch* trdHitMatch = L1_DYNAMIC_CAST<CbmMatch*>(fTrdHitMatches->At(j)); - if (trdHitMatch->GetNofLinks() == 1) + if (trdHitMatch->GetNofLinks() > 0) if (trdHitMatch->GetLink(0).GetIndex() < nTrdPoints) { iMC = trdHitMatch->GetLink(0).GetIndex(); th.iMC = iMC + nMvdPoints + nStsPoints + nMuchPoints; // th.track = vMCPoints[th.iMC].ID; - // - CbmTrdPoint* pt = - (CbmTrdPoint*) fTrdPoints->Get(trdHitMatch->GetLink(0).GetFile(), trdHitMatch->GetLink(0).GetEntry(), - trdHitMatch->GetLink(0).GetIndex()); - - th.dx = 0.1; - th.du = 0.1; - th.dy = 0.1; - th.dv = 0.1; - - th.x = 0.5 * (pt->GetXOut() + pt->GetXIn()); // + gRandom->Gaus(0, th.dx); - th.y = 0.5 * (pt->GetYOut() + pt->GetYIn()); // + gRandom->Gaus(0, th.dy); - th.z = 0.5 * (pt->GetZOut() + pt->GetZIn()); - th.time = pt->GetTime(); - th.dt = 10000.; - - th.u_front = th.x * st.frontInfo.cos_phi[0] + th.y * st.frontInfo.sin_phi[0]; - th.u_back = th.x * st.backInfo.cos_phi[0] + th.y * st.backInfo.sin_phi[0]; - th.dx = 1.; - th.du = 1.; - th.dy = 1.; - th.dv = 1.; - } - } - if (th.iMC < 0) continue; - if (mcUsed[iMC]) continue; - if (0) { - int mcTrack = -1; - float mcP = 0; - if (th.iMC >= 0) { - mcTrack = vMCPoints[th.iMC].ID; - if (mcTrack >= 0) { mcP = vMCTracks[mcTrack].p; } - } - if (mcP < 1.) continue; - } - mcUsed[iMC] = 1; - tmpHits.push_back(th); - nTrdHits++; + if (fTrackingMode == L1Algo::TrackingMode::kGlobal) { //SG!!! replace hits by MC points + + CbmTrdPoint* pt = + (CbmTrdPoint*) fTrdPoints->Get(trdHitMatch->GetLink(0).GetFile(), trdHitMatch->GetLink(0).GetEntry(), + trdHitMatch->GetLink(0).GetIndex()); + + th.dx = 0.1; + th.du = 0.1; + th.dy = 0.1; + th.dv = 0.1; + + th.x = 0.5 * (pt->GetXOut() + pt->GetXIn()); // + gRandom->Gaus(0, th.dx); + th.y = 0.5 * (pt->GetYOut() + pt->GetYIn()); // + gRandom->Gaus(0, th.dy); + th.z = 0.5 * (pt->GetZOut() + pt->GetZIn()); + th.time = pt->GetTime(); + th.dt = 10000.; + + th.u_front = th.x * st.frontInfo.cos_phi[0] + th.y * st.frontInfo.sin_phi[0]; + th.u_back = th.x * st.backInfo.cos_phi[0] + th.y * st.backInfo.sin_phi[0]; + th.dx = 1.; + th.du = 1.; + th.dy = 1.; + th.dv = 1.; + + if (th.iMC < 0) continue; + if (mcUsed[iMC]) continue; + if (0) { + int mcTrack = -1; + float mcP = 0; + if (th.iMC >= 0) { + mcTrack = vMCPoints[th.iMC].ID; + if (mcTrack >= 0) { mcP = vMCTracks[mcTrack].p; } + } + if (mcP < 1.) continue; + } + mcUsed[iMC] = 1; + } + } - //} + tmpHits.push_back(th); + nTrdHits++; + } } // for j } // if listTrdHits