diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 3ac2a458b4f3ef81bc7a1a434ab41fdc7e94075d..7191b989a04375ba6c293d3aab3badfcebe17529 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -32,6 +32,7 @@ // TODO: include of CbmSetup.h creates problems on Mac // #include "CbmSetup.h" #include "CbmStsFindTracks.h" +#include "CbmStsHit.h" #include "CbmStsParSetModule.h" #include "CbmStsParSetSensor.h" #include "CbmStsParSetSensorCond.h" @@ -52,6 +53,7 @@ #include "TGeoManager.h" #include "TGeoNode.h" #include "TMatrixD.h" +#include "TProfile2D.h" #include "TROOT.h" #include "TRandom3.h" #include "TVector3.h" @@ -201,7 +203,7 @@ InitStatus CbmL1::Init() if (fTrackingMode == L1Algo::TrackingMode::kGlobal) { fUseMUCH = 0; fUseTRD = 1; - fUseTOF = 1; + fUseTOF = 0; } @@ -219,7 +221,7 @@ InitStatus CbmL1::Init() fTofHitDigiMatches = 0; listStsClusters = 0; - listStsDigi.clear(); + vFileEvent.clear(); @@ -349,7 +351,7 @@ InitStatus CbmL1::Init() algo = &algo_static; L1Vector<fscal> geo("geo"); - geo.reserve(1000); + geo.reserve(10000); for (int i = 0; i < 3; i++) { Double_t point[3] = {0, 0, 2.5 * i}; @@ -398,7 +400,7 @@ InitStatus CbmL1::Init() } } NTrdStations = layerCounter; - NTrdStations = NTrdStations - 1; + if (fTrackingMode == L1Algo::TrackingMode::kMcbm) { NTrdStations = NTrdStations - 1; } } @@ -504,16 +506,13 @@ InitStatus CbmL1::Init() // } // target field for (Int_t ist = 0; ist < NStation; ist++) { - double C[3][N]; double z = 0; double Xmax = 0, Ymax = 0; if (ist < NMvdStations) { - CbmMvdDetector* mvdDetector = CbmMvdDetector::Instance(); CbmMvdStationPar* mvdStationPar = mvdDetector->GetParameterFile(); - CbmKFTube& t = CbmKF::Instance()->vMvdMaterial[ist]; geo.push_back(1); geo.push_back(t.z); @@ -530,6 +529,8 @@ InitStatus CbmL1::Init() geo.push_back(b_sigma); z = t.z; Xmax = Ymax = t.R; + + LOG(info) << "L1: Mvd station " << ist << " at z " << t.z << endl; } @@ -562,6 +563,8 @@ InitStatus CbmL1::Init() Xmax = station->GetXmax(); Ymax = station->GetYmax(); + + LOG(info) << "L1: Sts station " << ist - NMvdStations << " at z " << station->GetZ() << endl; } if ((ist < (NMvdStations + NStsStations + NMuchStations)) && (ist >= (NMvdStations + NStsStations))) { @@ -595,6 +598,8 @@ InitStatus CbmL1::Init() Xmax = 100; //station->GetRmax(); Ymax = 100; //station->GetRmax(); + + LOG(info) << "L1: Much station " << iStation << " at z " << z << endl; } // int num = 0; @@ -609,10 +614,12 @@ InitStatus CbmL1::Init() // Int_t nrModules = fTrdDigiPar->GetNrOfModules(); - int skip = 0; - if (num == 0) skip = 0; - if (num == 1) skip = 2; - if (num == 2) skip = 3; + int skip = num; + if (fTrackingMode == L1Algo::TrackingMode::kMcbm) { + if (num == 0) skip = 0; + if (num == 1) skip = 2; + if (num == 2) skip = 3; + } int ModuleId = fTrdDigiPar->GetModuleId(skip); @@ -622,19 +629,24 @@ InitStatus CbmL1::Init() if (num == 0 || num == 2 || num == 4) geo.push_back(3); if (num == 1 || num == 3) geo.push_back(6); - geo.push_back(module->GetZ()); + + float stationZ = module->GetZ(); + + geo.push_back(stationZ); geo.push_back(2 * module->GetSizeZ()); geo.push_back(0); geo.push_back(2 * module->GetSizeX()); geo.push_back(10); - fscal f_phi = 0, f_sigma = 1 / 10000, b_phi = 3.14159265358 / 2., b_sigma = 1 / 10000; + fscal f_phi = 0, f_sigma = 1., b_phi = 3.14159265358 / 2., b_sigma = 1.; geo.push_back(f_phi); geo.push_back(f_sigma); geo.push_back(b_phi); geo.push_back(b_sigma); - Xmax = Ymax = 20; + Xmax = module->GetSizeX(); + Ymax = module->GetSizeY(); + LOG(info) << "L1: Trd station " << num << " at z " << stationZ << endl; } if ((ist < (NMvdStations + NStsStations + NTrdStations + NMuchStations + NTOFStation)) @@ -642,10 +654,16 @@ InitStatus CbmL1::Init() geo.push_back(4); - if (ist == (NMvdStations + NStsStations + NTrdStations + NMuchStations + 0)) geo.push_back(251); - if (ist == (NMvdStations + NStsStations + NTrdStations + NMuchStations + 1)) geo.push_back(270); - if (ist == (NMvdStations + NStsStations + NTrdStations + NMuchStations + 2)) geo.push_back(293); - if (ist == (NMvdStations + NStsStations + NTrdStations + NMuchStations + 3)) geo.push_back(310); + z = 0; + + int num = ist - (NMvdStations + NStsStations + NTrdStations + NMuchStations); + + if (num == 0) z = 251; + if (num == 1) z = 270; + if (num == 2) z = 293; + if (num == 3) z = 310; + + geo.push_back(z); geo.push_back(10); /// TODO: add Tof width dz geo.push_back(0); @@ -658,6 +676,7 @@ InitStatus CbmL1::Init() geo.push_back(b_phi); geo.push_back(b_sigma); Xmax = Ymax = 20; + LOG(info) << "L1: Tof station " << num << " at z " << z << endl; } double dx = 1.; // step for the field approximation @@ -666,6 +685,7 @@ InitStatus CbmL1::Init() if (dx > Xmax / N / 2) dx = Xmax / N / 4.; if (dy > Ymax / N / 2) dy = Ymax / N / 4.; + double C[3][N]; for (int i = 0; i < 3; i++) for (int k = 0; k < N; k++) C[i][k] = 0; @@ -969,6 +989,7 @@ InitStatus CbmL1::Init() algo->fRadThick[iSta].table.resize(1); algo->fRadThick[iSta].table[0].resize(1); algo->fRadThick[iSta].table[0][0] = algo->vStations[iSta].materialInfo.RadThick[0]; + cout << "TRD material: " << algo->vStations[iSta].materialInfo.RadThick[0] << endl; } } diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 4fa41786056ae729e9197d1b8943939ec4a4a91a..a4cd0d613b9dc9d2c3ce308980c407d980593585 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -21,12 +21,7 @@ #ifndef _CbmL1_h_ #define _CbmL1_h_ -//#define GLOBAL -/// temporary TEST !!!! -///#define HAVE_SSE - -#include "CbmEvent.h" #include "CbmL1Hit.h" #include "CbmL1MCPoint.h" #include "CbmL1MCTrack.h" @@ -35,10 +30,6 @@ #include "CbmMCTrack.h" #include "CbmMvdHit.h" #include "CbmMvdPoint.h" -#include "CbmStsCluster.h" -#include "CbmStsDigi.h" -#include "CbmStsHit.h" -#include "CbmStsPoint.h" #include "FairDetector.h" #include "FairRootManager.h" @@ -47,26 +38,12 @@ #include "L1Algo/L1Algo.h" #include "L1Algo/L1Vector.h" -//#include "CbmMCEventHeader.h" -//#include "L1AlgoInputData.h" #include "CbmMCDataArray.h" #include "CbmMCEventList.h" #include "CbmTimeSlice.h" #include "TClonesArray.h" -#include "TGeoBBox.h" -#include "TGeoCone.h" -#include "TGeoManager.h" -#include "TGeoMatrix.h" -#include "TGeoPcon.h" -#include "TGeoTube.h" #include "TH1.h" -#include "TH2.h" -#include "TParticle.h" -#include "TProfile.h" -#include "TProfile2D.h" -#include "TRandom.h" -#include "TRefArray.h" #include <algorithm> #include <fstream> @@ -85,12 +62,17 @@ class L1FieldSlice; class CbmL1Track; class CbmL1MCTrack; class KFTopoPerformance; -//class CbmEvBasedArray; + +class CbmEvent; class CbmStsParSetSensor; class CbmStsParSetSensorCond; class CbmStsParSetModule; class CbmTofDigiBdfPar; +class CbmTrdParSetDigi; +class CbmTrdParModDigi; +class CbmTofDigiPar; + class CbmL1HitStore { public: int ExtIndex; @@ -99,16 +81,6 @@ public: int Det; }; -//class CbmL1FileEvent{ -//public: -// int File; -// int Event; -//} - -class CbmTrdParSetDigi; -class CbmTrdParModDigi; -class CbmTofDigiPar; - class CbmL1 : public FairTask { private: @@ -280,7 +252,6 @@ private: CbmTimeSlice* fTimeSlice {nullptr}; CbmMCEventList* fEventList {nullptr}; //! MC event list (all) - L1Vector<CbmStsDigi> listStsDigi {"CbmL1::listStsDigi"}; CbmMCDataArray* fStsPoints {nullptr}; CbmMCDataArray* fMvdPoints {nullptr}; CbmMCDataArray* fMCTracks {nullptr}; diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index 7f645050d713e467deb02c4f15f950aaf189927b..1bced1df02fb935aa13be5ee3a9eb08065320115 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -26,6 +26,9 @@ #include "CbmMatch.h" #include "CbmMuchPixelHit.h" #include "CbmMuchPoint.h" +#include "CbmStsDigi.h" +#include "CbmStsHit.h" +#include "CbmStsPoint.h" #include "CbmStsSetup.h" #include "CbmStsStation.h" #include "CbmTofHit.h" @@ -35,6 +38,9 @@ #include "FairTrackParam.h" // for vertex pulls +#include "TH1.h" +#include "TH2.h" +#include "TProfile.h" #include <TFile.h> #include <iostream> @@ -1663,6 +1669,7 @@ void CbmL1::InputPerformance() static TH1F *pullXtrd, *pullYtrd, *pullTtrd, *resXtrd, *resYtrd, *resTtrd /*, *pullZ*/; static TH1F *pullXtof, *pullYtof, *pullTtof, *resXtof, *resYtof, *resTtof /*, *pullZ*/; + static TH1F* trdMCPointsZ = nullptr; static bool first_call = 1; if (first_call) { @@ -1751,12 +1758,14 @@ void CbmL1::InputPerformance() gDirectory->mkdir("TRD"); gDirectory->cd("TRD"); + trdMCPointsZ = new TH1F("trdMCPointsZ", "trdMCPointsZ", 1000, 400., 700.); + pullXtrd = new TH1F("Px_trd", "TRD Pull x", 100, -5, 5); pullYtrd = new TH1F("Py_trd", "TRD Pull y", 100, -5, 5); pullTtrd = new TH1F("Pt_trd", "TRD Pull t", 100, -5, 5); - resXtrd = new TH1F("x_trd", "TRD Residual x", 100, -200000, 200000); - resYtrd = new TH1F("y_trd", "TRD Residual y", 100, -200000, 200000); + resXtrd = new TH1F("x_trd", "TRD Residual x", 100, -10000, 10000); + resYtrd = new TH1F("y_trd", "TRD Residual y", 100, -10000, 10000); resTtrd = new TH1F("t_trd", "TRD Residual t", 100, -40, 40); @@ -2018,11 +2027,12 @@ void CbmL1::InputPerformance() if (hm->GetNofLinks() == 0) continue; + if (hm->GetNofLinks() != 1) continue; //SG!! + Float_t bestWeight = 0.f; Float_t totalWeight = 0.f; int iMCPoint = -1; CbmLink link; - for (int iLink = 0; iLink < hm->GetNofLinks(); iLink++) { totalWeight += hm->GetLink(iLink).GetWeight(); if (hm->GetLink(iLink).GetWeight() > bestWeight) { @@ -2068,6 +2078,7 @@ void CbmL1::InputPerformance() resXtrd->Fill((h.x - mcPos.X()) * 10 * 1000); resYtrd->Fill((h.y - mcPos.Y()) * 10 * 1000); resTtrd->Fill((h.t - mcTime)); + trdMCPointsZ->Fill(mcPos.Z()); } } // much diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx index 62dddcfa32dcf670e58c3e01e3925238cd21845a..c9a0545e0a0d015ec5e09a5fbf02fd3f3bdae827 100644 --- a/reco/L1/CbmL1ReadEvent.cxx +++ b/reco/L1/CbmL1ReadEvent.cxx @@ -19,6 +19,7 @@ *==================================================================== */ +#include "CbmEvent.h" #include "CbmKF.h" #include "CbmL1.h" #include "CbmMatch.h" @@ -26,6 +27,10 @@ #include "CbmMuchPixelHit.h" #include "CbmMuchPoint.h" #include "CbmStsAddress.h" +#include "CbmStsCluster.h" +#include "CbmStsDigi.h" +#include "CbmStsHit.h" +#include "CbmStsPoint.h" #include "CbmStsSetup.h" #include "CbmTofDigiBdfPar.h" #include "CbmTofHit.h" @@ -147,6 +152,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, L1Vector<CbmLink*> ToFPointsMatch("CbmL1ReadEvent::ToFPointsMatch"); + int firstTrdPoint = 0; + if (fPerformance) { Fill_vMCTracks(); vMCPoints.clear(); @@ -232,7 +239,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, } } - + firstTrdPoint = vMCPoints.size(); if (fTrdPoints) for (Int_t iMC = 0; iMC < fTrdPoints->Size(iFile, iEvent); iMC++) { CbmL1MCPoint MC; @@ -558,7 +565,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, } // for j } // if listStsHits - if (fMuchPixelHits) { + if (fUseMUCH && fMuchPixelHits) { Int_t nEnt = fMuchPixelHits->GetEntriesFast(); @@ -666,9 +673,52 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, } // for j } // if listMvdHits - if (listTrdHits) { + if (0 && (fTrackingMode = L1Algo::TrackingMode::kGlobal) && fUseTRD) { // SG!! create TRD hits from TRD points + int firstDetStrip = NStrips; + + for (int ip = firstTrdPoint; ip < firstTrdPoint + nTrdPoints; ip++) { + const CbmL1MCPoint& p = vMCPoints[ip]; + + int mcTrack = p.ID; + if (mcTrack < 0) continue; + const CbmL1MCTrack& t = vMCTracks[mcTrack]; + //if (t.p < 1) continue; + if (t.Points.size() > 4) continue; + + cout << "trd mc: station " << p.iStation - NMvdStations - NStsStations - NMuchStations << " x " << p.x << " y " + << p.y << " z " << p.z << " t " << p.time << " mc " << p.ID << " p " << p.p << endl; + TmpHit th; + th.ExtIndex = 0; + th.Det = 3; + th.id = tmpHits.size(); + th.iStation = p.iStation; + th.time = p.time; + th.dt = 1.e4; + th.iStripF = firstDetStrip + ip; + th.iStripB = th.iStripF; + if (NStrips <= th.iStripF) { NStrips = th.iStripF + 1; } + th.x = p.x; + th.y = p.y; + th.z = p.z; + float sigma = 1.; + th.dx = sigma; + th.dy = sigma; + th.dxy = 0; + th.du = sigma; + th.dv = sigma; + L1Station& st = algo->vStations[th.iStation]; + 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.iMC = ip; + tmpHits.push_back(th); + nTrdHits++; + } + } + + if (1 && fUseTRD && listTrdHits) { int firstDetStrip = NStrips; + vector<bool> mcUsed(nTrdPoints, 0); for (int j = 0; j < listTrdHits->GetEntriesFast(); j++) { TmpHit th; @@ -681,7 +731,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, int sta = mh->GetPlaneId(); - if (sta > 1) sta = sta - 1; + if ((fTrackingMode == L1Algo::TrackingMode::kMcbm) && (sta > 1)) { sta = sta - 1; } th.iStation = NMvdStations + sta + NStsStations + NMuchStations; @@ -722,45 +772,53 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, th.iMC = -1; int iMC = -1; - if (fPerformance) { - - if (fTrdHitMatches) { - - CbmMatch* trdHitMatch = L1_DYNAMIC_CAST<CbmMatch*>(fTrdHitMatches->At(j)); - - - 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()); - // - // float min = 0.1; - // - // - // th.dx = min; - // th.du = min; - // th.x = 0.5*(pt->GetXOut()+pt->GetXIn())+ gRandom->Gaus(0,th.dx); - // - // th.dy = min; - // th.dv = min; - // th.y = 0.5*(pt->GetYOut()+pt->GetYIn())+ gRandom->Gaus(0,th.dy); - // - // th.time = pt->GetTime(); - // - // L1Station& st = algo->vStations[th.iStation]; - // 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]; - } + if (1 && (fTrackingMode = L1Algo::TrackingMode::kGlobal) && fPerformance + && fTrdHitMatches) { //SG!!! replace hits by MC points + + CbmMatch* trdHitMatch = L1_DYNAMIC_CAST<CbmMatch*>(fTrdHitMatches->At(j)); + + if (trdHitMatch->GetNofLinks() == 1) + 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++; @@ -769,7 +827,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, } // if listTrdHits - if (fTofHits) { + if (fUseTOF && fTofHits) { int firstDetStrip = NStrips; diff --git a/reco/L1/L1Algo/L1CATrackFinder.cxx b/reco/L1/L1Algo/L1CATrackFinder.cxx index f785fccb0abc53fe035f27a59b017b8d15eb0f5d..07170c1d5a67ccab43ed3cc44fc4ff4a2ff44a69 100644 --- a/reco/L1/L1Algo/L1CATrackFinder.cxx +++ b/reco/L1/L1Algo/L1CATrackFinder.cxx @@ -18,6 +18,7 @@ * */ + #include "L1Algo.h" #include "L1Extrapolation.h" #include "L1Filtration.h" @@ -677,7 +678,8 @@ inline void L1Algo::f30( // input FilterTime(T2, timeM, timeMEr, stam.timeInfo); #ifdef USE_RL_TABLE - if (fTrackingMode != kMcbm) fit.L1AddMaterial(T2, fRadThick[istam].GetRadThick(T2.x, T2.y), T2.qp, 1); + if (fTrackingMode != kMcbm && fTrackingMode != kGlobal) + fit.L1AddMaterial(T2, fRadThick[istam].GetRadThick(T2.x, T2.y), T2.qp, 1); if (fTrackingMode == kGlobal || fTrackingMode == kMcbm) fit.L1AddThickMaterial(T2, fRadThick[istam].GetRadThick(T2.x, T2.y), MaxInvMom, 1, stam.materialInfo.thick, 1); @@ -712,7 +714,6 @@ inline void L1Algo::f30( // input const fvec Pick_r22 = (TRIPLET_CHI2_CUT - T2.chi2); const float& timeError = T2.C55[i2_4]; const float& time = T2.t[i2_4]; - // find first possible hit #ifdef DO_NOT_SELECT_TRIPLETS @@ -737,7 +738,6 @@ inline void L1Algo::f30( // input if (!area.GetNext(irh)) break; } - // while (area.GetNext(irh)) { //for (int irh = 0; irh < ( StsHitsUnusedStopIndex[istar] - StsHitsUnusedStartIndex[istar] ); irh++){ const L1HitPoint& hitr = vStsHits_r[irh]; @@ -762,15 +762,14 @@ inline void L1Algo::f30( // input if ((star.timeInfo) && (stam.timeInfo)) if (fabs(T_cur.t[i2_4] - hitr.time) > sqrt(T_cur.C55[i2_4] + hitr.timeEr) * 5) continue; + if ((star.timeInfo) && (stam.timeInfo)) if (fabs(T_cur.t[i2_4] - hitr.time) > 30) continue; - // - check whether hit belong to the window ( track position +\- errors ) - // check lower boundary fvec y, C11; L1ExtrapolateYC11Line(T2, zr, y, C11); - fscal dy_est2 = (Pick_r22[i2_4] * (fabs( @@ -786,7 +785,6 @@ inline void L1Algo::f30( // input const fscal dY = yr[i2_4] - y[i2_4]; const fscal dY2 = dY * dY; if (dY2 > dy_est2 && dY2 < 0) continue; // if (yr < y_minus_new[i2_4]) continue; - // check upper boundary if (dY2 > dy_est2) continue; // if (yr > y_plus_new [i2_4] ) continue; // check x-boundaries @@ -804,7 +802,6 @@ inline void L1Algo::f30( // input } const fscal dX = xr[i2_4] - x[i2_4]; - if (dX * dX > dx_est2) continue; // check chi2 // not effective fvec C10; @@ -828,7 +825,6 @@ inline void L1Algo::f30( // input #ifdef DO_NOT_SELECT_TRIPLETS if (isec != TRACKS_FROM_TRIPLETS_ITERATION) #endif - if (chi2[i2_4] > TRIPLET_CHI2_CUT || C00[i2_4] < 0 || C11[i2_4] < 0 || T_cur.C55[i2_4] < 0) continue; // chi2_triplet < CHI2_CUT @@ -1813,6 +1809,8 @@ void L1Algo::CATrackFinder() // --- SET PARAMETERS FOR THE ITERATION --- FIRSTCASTATION = 0; + if (fTrackingMode == kGlobal) { FIRSTCASTATION = 12; } + // if ( (isec == kAllSecIter) || (isec == kAllSecEIter) || (isec == kAllSecJumpIter) ) // FIRSTCASTATION = 2; @@ -2021,7 +2019,6 @@ void L1Algo::CATrackFinder() n_2, i1_2, hitsm_2); - Tindex nstaltriplets = 0; TripletsStaPort( // input @@ -2681,7 +2678,6 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best fscal dqp = fabs(qp1 - qp2); fscal Cqp = curr_trip->GetCqp(); Cqp += new_trip.GetCqp(); - if (fTrackingMode != kMcbm) { if (dqp > PickNeighbour * Cqp) { continue; // bad neighbour // CHECKME why do we need recheck it?? (it really change result) @@ -2705,7 +2701,6 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best if (dtx > 3 * Ctx) continue; } - if (GetFUsed((*fStripFlag)[(*vStsHitsUnused)[new_trip.GetLHit()].f] | (*fStripFlag)[(*vStsHitsUnused)[new_trip.GetLHit()].b])) { //hits are used // no used hits allowed -> compare and store track @@ -2730,8 +2725,8 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best dqp = dqp / Cqp; - dtx = dtx / Ctx; - dty = dty / Cty; + dtx = dtx / Ctx; // TODO: SG: it must be /sqrt(Ctx); + dty = dty / Cty; // TODO: SG: it must be /sqrt(Cty); if (fTrackingMode == kGlobal || fTrackingMode == kMcbm) { new_chi2 += dtx * dtx; @@ -2740,9 +2735,7 @@ inline void L1Algo::CAFindTrack(int ista, L1Branch& best_tr, unsigned char& best else { new_chi2 += dqp * dqp; } - - if (new_chi2 > TRACK_CHI2_CUT * new_L) continue; - + if (new_chi2 > TRACK_CHI2_CUT * new_L) continue; // TODO: SG: it must be ( 2 * new_L ) const int new_ista = ista + new_trip.GetMSta() - new_trip.GetLSta(); CAFindTrack(new_ista, best_tr, best_L, best_chi2, &new_trip, new_tr[ista], new_L, new_chi2, min_best_l, new_tr); diff --git a/reco/L1/ParticleFinder/CbmL1PFFitter.cxx b/reco/L1/ParticleFinder/CbmL1PFFitter.cxx index c8a543c29b84ca6d97f715febbe1074fc109c2b1..260217dd41f6c9eac4ae694b9d7c7b9e1a989d73 100644 --- a/reco/L1/ParticleFinder/CbmL1PFFitter.cxx +++ b/reco/L1/ParticleFinder/CbmL1PFFitter.cxx @@ -21,6 +21,7 @@ #include "CbmL1.h" #include "CbmStsAddress.h" +#include "CbmStsHit.h" #include "CbmStsSetup.h" #include "CbmStsTrack.h"