diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 4766f6e2f4f2d2f60ed8ce851280ff91ebbcee26..ddccf46dd3766a5c62be297eb635eeda4562e5eb 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -86,7 +86,7 @@ using std::ios; ClassImp(CbmL1) - static L1Algo algo_static _fvecalignment; // TODO: gAlgo + static L1Algo algo_static _fvecalignment; // TODO: gAlgo //L1AlgoInputData* fData_static _fvecalignment; @@ -388,7 +388,7 @@ InitStatus CbmL1::Init() // TODO: Replace algo initialization in the constructor (S.Zharko) algo = &algo_static; - /**********************//** + /************************** ** Field initialization ** **************************/ @@ -397,44 +397,44 @@ InitStatus CbmL1::Init() }; fpInitManager->SetFieldFunction(fieldGetterFcn); - /***********************//** + /*************************** ** Target initialization ** ***************************/ auto& target = CbmKF::Instance()->vTargets[0]; fpInitManager->SetTargetPosition(target.x, target.y, target.z); - /*****************************//** + /********************************* ** Target field initialization ** *********************************/ fpInitManager->InitTargetField(2.5); - /**********************************//** + /************************************** ** ** ** STATIONS GEOMETRY INITIALIZATION ** ** ** **************************************/ - /***********************************************//** + /*************************************************** ** Active tracking detector subsystems selection ** ***************************************************/ fActiveTrackingDetectorIDs.insert(L1DetectorID::kSts); - if (fUseMVD) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kMvd); } + if (fUseMVD) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kMvd); } if (fUseMUCH) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kMuch); } - if (fUseTRD) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kTrd); } - if (fUseTOF) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kTof); } + if (fUseTRD) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kTrd); } + if (fUseTOF) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kTof); } fpInitManager->SetActiveDetectorIDs(fActiveTrackingDetectorIDs); - /*****************************************************************//** + /********************************************************************* ** Counting numbers of stations for different detector subsystems ** *********************************************************************/ CbmMuchGeoScheme* fGeoScheme = CbmMuchGeoScheme::Instance(); - + /*** MuCh ***/ if (fUseMUCH) { /// Save old global file and folder pointer to avoid messing with FairRoot @@ -938,7 +938,7 @@ InitStatus CbmL1::Init() fpInitManager->SetStationsNumberCrosscheck(L1DetectorID::kMuch, NMuchStations); fpInitManager->SetStationsNumberCrosscheck(L1DetectorID::kTrd, NTrdStations); fpInitManager->SetStationsNumberCrosscheck(L1DetectorID::kTof, NTOFStation); - + { if (fSTAPDataMode % 2 == 1) { // 1,3 LOG(warn) << "CbmL1::Init: geo vector was removed, currently data cannot be written to a text-file"; @@ -961,8 +961,8 @@ InitStatus CbmL1::Init() //if (ind2 != ind) // LOG(error) << "-E- CbmL1: Read geometry from file " << fSTAPDataDir + "geo_algo.txt was NOT successful."; } - - /***********************************//** + + /*************************************** ** Stations geometry initialization ** ***************************************/ @@ -997,7 +997,7 @@ InitStatus CbmL1::Init() /*** STS stations info ***/ for (int iSt = 0; iSt < NStsStations; ++iSt) { // NOTE: example using smart pointers - auto cbmSts = CbmStsSetup::Instance()->GetStation(iSt); + auto cbmSts = CbmStsSetup::Instance()->GetStation(iSt); auto stationInfo = L1BaseStationInfo(L1DetectorID::kSts, iSt); stationInfo.SetStationType(0); // STS stationInfo.SetTimeInfo(1); @@ -1038,7 +1038,7 @@ InitStatus CbmL1::Init() stationInfo.SetFieldStatus(0); stationInfo.SetZ(layer->GetZ()); auto thickness = layer->GetDz(); - auto radLength = 0.; // Why 0??? (S.Zharko) + auto radLength = 0.; // Why 0??? (S.Zharko) stationInfo.SetMaterial(thickness, radLength); stationInfo.SetXmax(100.); stationInfo.SetYmax(100.); @@ -1108,7 +1108,7 @@ InitStatus CbmL1::Init() LOG(info) << "- TOF station " << iSt << " at z = " << stationInfo.GetZdouble(); } - /************************************//** + /**************************************** ** ** ** TRACKING ITERATIONS INITIALIZATION ** ** ** @@ -1273,10 +1273,10 @@ InitStatus CbmL1::Init() //fpInitManager->PushBackCAIteration(trackingIterAllSecJump); } - /******************//** + /********************** ** Set special cuts ** **********************/ - + fpInitManager->SetGhostSuppression(fGhostSuppression); fpInitManager->SetTrackingLevel(fTrackingLevel); fpInitManager->SetMomentumCutOff(fMomentumCutOff); @@ -1285,7 +1285,7 @@ InitStatus CbmL1::Init() algo->Init(fUseHitErrors, fTrackingMode, fMissingHits); - /*****************************//** + /********************************* ** Material map initialization ** *********************************/ @@ -1356,7 +1356,8 @@ InitStatus CbmL1::Init() TDirectory* oldDir = gDirectory; TFile* rlFile = new TFile(fStsMatBudgetFileName); cout << "STS Material budget file is " << fStsMatBudgetFileName << ".\n"; - for (int j = 1, iSta = algo->GetNstationsBeforePipe(); iSta < (algo->GetNstationsBeforePipe() + NStsStations); iSta++, j++) { + for (int j = 1, iSta = algo->GetNstationsBeforePipe(); iSta < (algo->GetNstationsBeforePipe() + NStsStations); + iSta++, j++) { TString stationNameSts = stationName; stationNameSts += j; TProfile2D* hStaRadLen = (TProfile2D*) rlFile->Get(stationNameSts); @@ -2109,7 +2110,7 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent // write algo data in file static int vNEvent = 1; std::fstream fadata; - + TString fadata_name = fSTAPDataDir + "data_algo.txt"; // if ( vNEvent <= maxNEvent ) { if (1) { diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 2ef9cd3c414974137314396243c81cc4038b5c7a..2edf8e71421a4983d44d7d62a77902376e852ed4 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -222,7 +222,7 @@ private: /// \param MVD Index of the detector subsystem /// \return flag: false - success, true - some errors occured bool ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int MVD); // help procedure - + /// Converts data from generic FairMCPoint based class to the CbmL1MCPoint /// \param MC Pointer to a target CbmL1MCPoint object /// \param iPoint Index of the point into the input MC points CbmMCDataArray object for the particular detector @@ -232,10 +232,10 @@ private: /// \return flag: false - success, true - some errors occured // TODO: Probably, we should replace input parameter MVD with the template (S.Zharko) bool ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int MVD); - + // static bool compareZ(const int &a, const int &b ); // bool compareZ(const int &a, const int &b ); - + /// Fills the vMCTracks vector and the dFEI2vMCTracks set void Fill_vMCTracks(); diff --git a/reco/L1/CbmL1Hit.h b/reco/L1/CbmL1Hit.h index 0faf887064006f44ebae74a1a1a1ad921853f681..13c9e9ed263c2011316e4410427237d26971251c 100644 --- a/reco/L1/CbmL1Hit.h +++ b/reco/L1/CbmL1Hit.h @@ -16,15 +16,15 @@ struct CbmL1Hit { CbmL1Hit(int hitId_, int extIndex_, int Det_) : hitId(hitId_), extIndex(extIndex_), Det(Det_) {}; - int hitId = 0; ///> index of L1Hit in algo->vStsHits array. Should be equal to index of this in L1->vStsHits - int extIndex = 0; ///> index of hit in the TClonesArray array - int Det = 0; ///> station index - float x = 0.f; ///> measured X coordinate - float y = 0.f; ///> measured Y coordinate - float t = 0.f; ///> measured time - int f = 0; ///> front strip index - int b = 0; ///> back strip index - int ID = 0; ///> TODO: check if this ID is redundant + int hitId = 0; ///> index of L1Hit in algo->vStsHits array. Should be equal to index of this in L1->vStsHits + int extIndex = 0; ///> index of hit in the TClonesArray array + int Det = 0; ///> station index + float x = 0.f; ///> measured X coordinate + float y = 0.f; ///> measured Y coordinate + float t = 0.f; ///> measured time + int f = 0; ///> front strip index + int b = 0; ///> back strip index + int ID = 0; ///> TODO: check if this ID is redundant L1Vector<int> mcPointIds {"CbmL1Hit::mcPointIds"}; // indices of CbmL1MCPoint in L1->vMCPoints array }; diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index bdf485e0cefa806a3d7896a6ccad2f6d6daa38cc..8fe21a7b1ce12f60403616a161ed4b55d245f2f9 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -1193,7 +1193,7 @@ void CbmL1::TrackFitPerformance() for (unsigned int iMCPoint = 0; iMCPoint < mc.Points.size(); iMCPoint++) { const int iMCP = mc.Points[iMCPoint]; CbmL1MCPoint& mcP = vMCPoints[iMCP]; - const L1Station& st = algo->GetStations()[mcP.iStation]; + const L1Station& st = algo->GetStations()[mcP.iStation]; z[ih] = st.z[0]; if (ih > 0 && (z[ih] - z[ih - 1]) < 0.1) continue; st.fieldSlice.GetFieldValue(mcP.x, mcP.y, B[ih]); @@ -1304,7 +1304,7 @@ void CbmL1::TrackFitPerformance() for (unsigned int iMCPoint = 0; iMCPoint < mc.Points.size(); iMCPoint++) { const int iMCP = mc.Points[iMCPoint]; CbmL1MCPoint& mcP = vMCPoints[iMCP]; - const L1Station& st = algo->GetStations()[mcP.iStation]; + const L1Station& st = algo->GetStations()[mcP.iStation]; z[ih] = st.z[0]; if (ih > 0 && (z[ih] - z[ih - 1]) < 0.1) continue; st.fieldSlice.GetFieldValue(mcP.x, mcP.y, B[ih]); @@ -1375,7 +1375,7 @@ void CbmL1::TrackFitPerformance() if (ih >= mc.Points.size()) continue; //If nofMCPoints in track < 3 const int iMCP = mc.Points[ih]; CbmL1MCPoint& mcP = vMCPoints[iMCP]; - const L1Station& st = algo->GetStations()[mcP.iStation]; + const L1Station& st = algo->GetStations()[mcP.iStation]; z[ih] = st.z[0]; st.fieldSlice.GetFieldValue(mcP.x, mcP.y, B[ih]); }; @@ -1438,7 +1438,7 @@ void CbmL1::TrackFitPerformance() int ih = 1; for (unsigned int iHit = 0; iHit < it->StsHits.size(); iHit++) { const int iStation = vHitStore[it->StsHits[iHit]].iStation; - const L1Station& st = algo->GetStations()[iStation]; + const L1Station& st = algo->GetStations()[iStation]; z[ih] = st.z[0]; st.fieldSlice.GetFieldValue(vHitStore[it->StsHits[iHit]].x, vHitStore[it->StsHits[iHit]].y, B[ih]); ih++; diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx index 34a9a262d91322d9caaf712914c796811394f6d7..d641594c24cbe3b24d050c8278ae8d3e5b25b2c8 100644 --- a/reco/L1/CbmL1ReadEvent.cxx +++ b/reco/L1/CbmL1ReadEvent.cxx @@ -88,7 +88,7 @@ struct TmpHit { int id; int track; - /// Provides comparison of two hits. + /// Provides comparison of two hits. /// If two hits belong to different stations, /// the smallest hit belongs to the station with the smallest index. Otherwise, the smallest hit /// has the smallest y coordinate @@ -106,7 +106,7 @@ struct TmpHit { /// \param nTmpHits /// \param nStripF /// \param ip - /// \param NStrips + /// \param NStrips /// \param st reference to the station info object // TODO: Probably, L1Station& st parameter should be constant. Do we really want to modify a station here? (S.Zharko) void CreateHitFromPoint(const CbmL1MCPoint& point, int det, int nTmpHits, int nStripF, int ip, int& NStrips, @@ -150,7 +150,7 @@ struct TmpHit { iMC = ip; } - /// Sets randomized position and time of the hit + /// Sets randomized position and time of the hit /// The positions are smeared within predefined errors dx, dy, dt; z coordinate /// of the hit is known precisely /// \param point constant reference to the input MC-point @@ -177,15 +177,15 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, fData_->Clear(); // clear arrays for next event - vMCPoints.clear(); /* <CbmL1MCPoint> */ - vMCPoints_in_Time_Slice.clear(); /* <int> */ - vMCTracks.clear(); /* <CbmL1MCTrack> */ - vStsHits.clear(); /* <CbmL1Hit> */ - vRTracks.clear(); /* <CbmL1Track> */ - vHitMCRef.clear(); /* <int>: indexes of MC-points in vMCPoints (by index of algo->vStsHits) */ - 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 */ + vMCPoints.clear(); /* <CbmL1MCPoint> */ + vMCPoints_in_Time_Slice.clear(); /* <int> */ + vMCTracks.clear(); /* <CbmL1MCTrack> */ + vStsHits.clear(); /* <CbmL1Hit> */ + vRTracks.clear(); /* <CbmL1Track> */ + vHitMCRef.clear(); /* <int>: indexes of MC-points in vMCPoints (by index of algo->vStsHits) */ + 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 */ if (fVerbose >= 10) cout << "ReadEvent: clear is done." << endl; @@ -266,7 +266,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, CbmL1MCPoint MC; if (!ReadMCPoint(&MC, iMC, iFile, iEvent, 1)) { MC.iStation = -1; - const L1Station* sta = algo->GetStations().begin(); + const L1Station* sta = algo->GetStations().begin(); double bestDist = 1.e20; for (Int_t iSt = 0; iSt < NMvdStations; iSt++) { // use z_in since z_out is sometimes very wrong @@ -303,7 +303,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, CbmL1MCPoint MC; if (!ReadMCPoint(&MC, iMC, iFile, iEvent, 0)) { MC.iStation = -1; - const L1Station* sta = algo->GetStations().begin() + NMvdStations; + const L1Station* sta = algo->GetStations().begin() + NMvdStations; double bestDist = 1.e20; for (Int_t iSt = 0; iSt < NStsStations; iSt++) { // use z_in since z_out is sometimes very wrong @@ -416,7 +416,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, Int_t IND_Track = trk_it->second; MC.iStation = -1; - const L1Station* sta = algo->GetStations().begin() + NMvdStations + NStsStations + NMuchStations + NTrdStations; + const L1Station* sta = + algo->GetStations().begin() + NMvdStations + NStsStations + NMuchStations + NTrdStations; for (Int_t iSt = 0; iSt < NTOFStation; iSt++) MC.iStation = (MC.z > sta[iSt].z[0] - 15) ? (NMvdStations + NStsStations + NMuchStations + NTrdStations + iSt) @@ -443,7 +444,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, if (!ReadMCPoint(&MC, TofPointToTrack[iTofSta][iMC], iFile, iEvent, 4)) { MC.iStation = -1; - const L1Station* sta = algo->GetStations().begin() + NMvdStations + NStsStations + NMuchStations + NTrdStations; + const L1Station* sta = + algo->GetStations().begin() + NMvdStations + NStsStations + NMuchStations + NTrdStations; for (Int_t iSt = 0; iSt < NTOFStation; iSt++) MC.iStation = (MC.z > sta[iSt].z[0] - 15) ? (NMvdStations + NStsStations + NMuchStations + NTrdStations + iSt) @@ -846,7 +848,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, nTrdHits++; } } - + // // Get TRD hits // @@ -1082,7 +1084,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, Double_t dtrck = dFEI(iFile, iEvent, pt->GetTrackID()); DFEI2I::iterator trk_it = dFEI2vMCPoints.find(dtrck); if (trk_it != dFEI2vMCPoints.end()) th.iMC = TofPointToTrack[sttof][trk_it->second]; - if ((1 == fTofUseMcHit) && (th.iMC > -1)) th.SetHitFromPoint(vMCPoints[th.iMC], algo->GetStations()[th.iStation]); + if ((1 == fTofUseMcHit) && (th.iMC > -1)) + th.SetHitFromPoint(vMCPoints[th.iMC], algo->GetStations()[th.iStation]); } } @@ -1144,7 +1147,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, vHitStore.reserve(nHits); vHitMCRef.reserve(nHits); - + for (int i = 0; i < nHits; i++) { TmpHit& th = tmpHits[i]; @@ -1187,7 +1190,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, h.z = th.z; - // save hit + // save hit vStsHits.push_back(CbmL1Hit(fData->vStsHits.size(), th.ExtIndex, th.Det)); vStsHits[vStsHits.size() - 1].x = th.x; @@ -1240,7 +1243,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, void CbmL1::Fill_vMCTracks() { vMCTracks.clear(); - + // Count the total number of tracks in this event and reserve memory { Int_t nMCTracks = 0; diff --git a/reco/L1/L1Algo/L1Algo.cxx b/reco/L1/L1Algo/L1Algo.cxx index cb73b1d13719bc7897db94978fca6b202a0ef517..d523443caf2ffa67bdd204479d2346cc2d785aaf 100644 --- a/reco/L1/L1Algo/L1Algo.cxx +++ b/reco/L1/L1Algo/L1Algo.cxx @@ -76,13 +76,13 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M fTrackingMode = mode; fMissingHits = MissingHits; - + //int NMvdStations = static_cast<int>(geo[ind++]); // TODO: get rid of NMbdStations (S. Zh.) int nStationsSts = fInitManager.GetStationsNumber(static_cast<L1DetectorID>(1)); fNstationsBeforePipe = fInitManager.GetStationsNumber(static_cast<L1DetectorID>(0)); //int NStsStations = static_cast<int>(geo[ind++]); // TODO: get rid of NStsStations (S. Zh.) - fNfieldStations = nStationsSts + fNstationsBeforePipe; // TODO: Provide special getter for it (S.Zharko, 12.05.2022) + fNfieldStations = nStationsSts + fNstationsBeforePipe; // TODO: Provide special getter for it (S.Zharko, 12.05.2022) if (fTrackingMode == kMcbm) { fNfieldStations = -1; } @@ -93,7 +93,7 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M // Print out the bits of the init manager LOG(info) << "InitManager " << fInitManager.GetInitController().ToString(); - + // Get real target position fRealTargetX = fInitManager.GetTargetPosition()[0]; fRealTargetY = fInitManager.GetTargetPosition()[1]; @@ -103,15 +103,15 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M fNstations = fInitManager.GetStationsNumber(); // Get field near target - fVtxFieldValue = fInitManager.GetTargetFieldValue(); + fVtxFieldValue = fInitManager.GetTargetFieldValue(); fVtxFieldRegion = fInitManager.GetTargetFieldRegion(); // Fill L1Station array fInitManager.TransferL1StationArray(fStations); - - fTrackingLevel = fInitManager.GetTrackingLevel(); + + fTrackingLevel = fInitManager.GetTrackingLevel(); fGhostSuppression = fInitManager.GetGhostSuppression(); - fMomentumCutOff = fInitManager.GetMomentumCutOff(); + fMomentumCutOff = fInitManager.GetMomentumCutOff(); LOG(info) << " ***********************"; LOG(info) << " * L1Algo parameters *"; diff --git a/reco/L1/L1Algo/L1Algo.h b/reco/L1/L1Algo/L1Algo.h index 9458d4c627bae344f10061b8b8ef7a1cfda9015b..ef4e05ebf2bb35177da315f18fdf8932143cfb8d 100644 --- a/reco/L1/L1Algo/L1Algo.h +++ b/reco/L1/L1Algo/L1Algo.h @@ -85,7 +85,6 @@ using L1StationsArray_t = std::array<L1Station, L1Parameters::kMaxNstations>; /// class L1Algo { public: - L1Algo(unsigned int nThreads = 1); L1Algo(const L1Algo&) = delete; @@ -105,7 +104,7 @@ public: /// \return particle mass squared float GetDefaultParticleMass2() const { return fDefaultMass * fDefaultMass; } - float fDefaultMass = 0.10565800; // muon mass + float fDefaultMass = 0.10565800; // muon mass // TODO: make fDefaultMass a private member (S.Zharko) /// pack station, thread and triplet indices to an unique triplet ID @@ -154,12 +153,12 @@ public: Tindex fDupletPortionStopIndex[L1Parameters::kMaxNstations] {0}; // end of the duplet portions for the station L1Vector<Tindex> fDupletPortionSize {"L1Algo::fDupletPortionSize"}; // N duplets in a portion - /********************************************************************************************//** + /********************************************************************************************/ /** * Temporary vectors used by the clone merger * TODO: Probably, the subclass L1TrackMerger for clones merger would help to improve * readability (S.Zharko) ***********************************************************************************************/ - + // // Vectors that are parallel to fTracks // @@ -172,7 +171,7 @@ public: /// Index of the last hit of a track L1Vector<L1HitIndex_t> fMergerTrackLastHit {"L1Algo::fMergerTrackLastHit"}; /// Index (TODO:??) of a track that can be merge with the given track - L1Vector<unsigned short> fMergerTrackNeighbour { "L1Algo::fMergerTrackNeighbour"}; + L1Vector<unsigned short> fMergerTrackNeighbour {"L1Algo::fMergerTrackNeighbour"}; /// Chi2 value of the track merging procedure L1Vector<float> fMergerTrackChi2 {"L1Algo::fMergerTrackChi2"}; /// Flag: is the given track already stored to the output @@ -223,24 +222,22 @@ public: void SetNThreads(unsigned int n); private: - int fNstations {0}; ///< number of all detector stations - int fNstationsBeforePipe {0}; ///< number of stations before pipe (MVD stations in CBM) - int fNfieldStations {0}; ///< number of stations in the field region - alignas(16) L1StationsArray_t fStations; ///< array of L1Station objects + int fNstations {0}; ///< number of all detector stations + int fNstationsBeforePipe {0}; ///< number of stations before pipe (MVD stations in CBM) + int fNfieldStations {0}; ///< number of stations in the field region + alignas(16) L1StationsArray_t fStations; ///< array of L1Station objects public: /// Gets total number of stations used in tracking - int GetNstations() const { return fNstations; } + int GetNstations() const { return fNstations; } /// Gets number of stations before the pipe (MVD stations in CBM) int GetNstationsBeforePipe() const { return fNstationsBeforePipe; } /// Gets number of stations situated in field region (MVD + STS in CBM) - int GetNfieldStations() const { return fNfieldStations;} + int GetNfieldStations() const { return fNfieldStations; } /// Gets reference to the stations array const L1StationsArray_t& GetStations() const { return fStations; } public: - - L1Vector<L1Material> fRadThick {"fRadThick"}; // material for each station int NStsStrips {0}; ///> number of strips @@ -285,7 +282,7 @@ public: int fNThreads {0}; bool fUseHitErrors {true}; - bool fMissingHits {0}; ///< TODO ??? + bool fMissingHits {0}; ///< TODO ??? TrackingMode fTrackingMode {kSts}; fvec EventTime[L1Parameters::kMaxNthreads][L1Parameters::kMaxNthreads] {{0}}; @@ -405,7 +402,7 @@ private: L1InitManager fInitManager {&fParameters}; ///< Object of L1Algo initialization manager class - /*********************************************************************************************//** + /*********************************************************************************************/ /** * ------ FUNCTIONAL PART ------ ************************************************************************************************/ @@ -452,7 +449,7 @@ private: void MultiplySR(fvec const C[15], fvec const r_in[5], fvec r_out[5]); void FilterTracks(fvec const r[5], fvec const C[15], fvec const m[5], fvec const V[15], fvec R[5], fvec W[15], fvec* chi2); - /// + /// void CAMergeClones(); @@ -545,8 +542,8 @@ private: /// Refit Triplets. void f32( // input - Tindex n3, int istal, nsL1::vector<L1TrackPar>::TSimd& T_3, L1Vector<L1HitIndex_t>& hitsl_3, L1Vector<L1HitIndex_t>& hitsm_3, - L1Vector<L1HitIndex_t>& hitsr_3, int nIterations = 0); + Tindex n3, int istal, nsL1::vector<L1TrackPar>::TSimd& T_3, L1Vector<L1HitIndex_t>& hitsl_3, + L1Vector<L1HitIndex_t>& hitsm_3, L1Vector<L1HitIndex_t>& hitsr_3, int nIterations = 0); /// Select triplets. Save them into vTriplets. void f4( // input @@ -581,7 +578,8 @@ private: /// Find triplets on station void TripletsStaPort( // input - int istal, int istam, int istar, Tindex& nstaltriplets, L1TrackPar* T_1, L1FieldRegion* fld_1, L1HitIndex_t* hitsl_1, + int istal, int istam, int istar, Tindex& nstaltriplets, L1TrackPar* T_1, L1FieldRegion* fld_1, + L1HitIndex_t* hitsl_1, Tindex& n_2, L1Vector<L1HitIndex_t>& i1_2, L1Vector<L1HitIndex_t>& hitsm_2, @@ -692,9 +690,9 @@ private: fvec fMaxInvMom {L1Utils::kNaN}; ///< max considered q/p for tracks fvec fMaxSlopePV {L1Utils::kNaN}; ///< max slope (tx\ty) in prim vertex float fMaxSlope {L1Utils::kNaN}; ///< max slope (tx\ty) in 3d hit position of a triplet - fvec fRealTargetX {L1Utils::kNaN}; ///< real target position x coordinate - fvec fRealTargetY {L1Utils::kNaN}; ///< real target position y coordinate - fvec fRealTargetZ {L1Utils::kNaN}; ///< real target position z coordinate + fvec fRealTargetX {L1Utils::kNaN}; ///< real target position x coordinate + fvec fRealTargetY {L1Utils::kNaN}; ///< real target position y coordinate + fvec fRealTargetZ {L1Utils::kNaN}; ///< real target position z coordinate fvec fTargX {L1Utils::kNaN}; ///< target position x coordinate for the current iteration (modifiable) fvec fTargY {L1Utils::kNaN}; ///< target position y coordinate for the current iteration (modifiable) fvec fTargZ {L1Utils::kNaN}; ///< target position z coordinate for the current iteration (modifiable) @@ -708,8 +706,8 @@ private: // int TripNumThread; - int fTrackingLevel {2}; // currently not used - int fGhostSuppression {1}; // currently not used + int fTrackingLevel {2}; // currently not used + int fGhostSuppression {1}; // currently not used float fMomentumCutOff {0.2}; // currently not used /// ----- Debug features ----- diff --git a/reco/L1/L1Algo/L1AlgoTBB.h b/reco/L1/L1Algo/L1AlgoTBB.h index f31b3fd7ae6482cecd46aee6f1cf7e9cf9b4d89c..32f27fa24d692a5607dbe039fcb3bd3931aa89b2 100644 --- a/reco/L1/L1Algo/L1AlgoTBB.h +++ b/reco/L1/L1Algo/L1AlgoTBB.h @@ -198,7 +198,8 @@ namespace tbb L1HitIndex_t* hitsm_g2_, // fvec *x_minusV_g2_, fvec *x_plusV_g2_, fvec *y_minusV_g2_, fvec *y_plusV_g2_, // output - L1HitIndex_t* Duplets_start_, L1HitIndex_t* Duplets_hits_, std::vector<L1Triplet>* vTriplets_part_, unsigned* TripStartIndexH_, + L1HitIndex_t* Duplets_start_, L1HitIndex_t* Duplets_hits_, std::vector<L1Triplet>* vTriplets_part_, + unsigned* TripStartIndexH_, unsigned* TripStopIndexH_) : // input isec(isec_) diff --git a/reco/L1/L1Algo/L1CAIteration.cxx b/reco/L1/L1Algo/L1CAIteration.cxx index fc8e4484e972425b487de9d440d64b55ebbd59a7..da511460695ee5dd67249ab703ddafadf70243d5 100644 --- a/reco/L1/L1Algo/L1CAIteration.cxx +++ b/reco/L1/L1Algo/L1CAIteration.cxx @@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-3.0-only Authors: Sergey Gorbunov, Sergei Zharko [committer] */ -/***********************************************************************************************//** +/*************************************************************************************************** * @file L1CAIteration.cxx * @brief Definition of the L1CAIteration class methods * @since 05.02.2022 diff --git a/reco/L1/L1Algo/L1CAIteration.h b/reco/L1/L1Algo/L1CAIteration.h index 73ca1cb2a87c04eee4274b44598a6ac3e649939f..538a9166909fc52e70bb5125c16427e564afc9fe 100644 --- a/reco/L1/L1Algo/L1CAIteration.h +++ b/reco/L1/L1Algo/L1CAIteration.h @@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-3.0-only Authors: Sergey Gorbunov, Sergei Zharko [committer] */ -/***********************************************************************************************//** +/*************************************************************************************************** * @file L1CAIteration.h * @brief Declaration of the L1CAIteration class * @since 05.02.2022 @@ -17,8 +17,8 @@ // TODO: discuss the border conditions for the parameters. Implement them (S.Zharko) // Implementation: use tuples for boundary conditions of the parameters -/// Class L1CAIteration describes L1 Track finder iteration. -/// Each iteration utilizes special physics cuts and run condition to find tracks of a particular +/// Class L1CAIteration describes L1 Track finder iteration. +/// Each iteration utilizes special physics cuts and run condition to find tracks of a particular /// class (e.g., fast primary tracks or secondary electron tracks). Hits associated with tracks /// reconstructed during current iteration are removed from the further iterations. /// @@ -130,15 +130,15 @@ private: float fTrackChi2Cut {10.f}; ///> Track chi2 upper cut float fTripletChi2Cut {21.1075f}; ///> Triplet chi2 upper cut float fDoubletChi2Cut {11.3449 * 2.f / 3.f}; ///> Doublet chi2 upper cut - float fPickGather {3.0}; ///> Size of region to attach new hits to the created track [TODO: units??] - float fPickNeighbour {5.0}; ///> Min value of dp/dp_error, for which two tiplets are neighbours - float fMaxInvMom {1.0 / 0.5}; ///> Max considered q/p for tracks - float fMaxSlopePV {1.1}; ///> Max slope (tx\ty) in primary vertex - float fMaxSlope {2.748}; ///> Max slope (tx\ty) in 3D hit position of a triplet - float fMaxDZ {0.f}; ///> Correction for accounting overlaping and iff z [TODO: units??] + float fPickGather {3.0}; ///> Size of region to attach new hits to the created track [TODO: units??] + float fPickNeighbour {5.0}; ///> Min value of dp/dp_error, for which two tiplets are neighbours + float fMaxInvMom {1.0 / 0.5}; ///> Max considered q/p for tracks + float fMaxSlopePV {1.1}; ///> Max slope (tx\ty) in primary vertex + float fMaxSlope {2.748}; ///> Max slope (tx\ty) in 3D hit position of a triplet + float fMaxDZ {0.f}; ///> Correction for accounting overlaping and iff z [TODO: units??] float fTargetPosSigmaX {0}; ///> Constraint on target position in X direction [cm] float fTargetPosSigmaY {0}; ///> Constraint on target position in Y direction [cm] - int fMinLevelTripletStart {0}; ///> Min level for starting a triplet. Track length = fMinLevelTripletStart + 3 + int fMinLevelTripletStart {0}; ///> Min level for starting a triplet. Track length = fMinLevelTripletStart + 3 // ^ TODO: invent more proper name }; diff --git a/reco/L1/L1Algo/L1CAMergeClones.cxx b/reco/L1/L1Algo/L1CAMergeClones.cxx index 86da1df512de2e5c75107779c50c7421c0c682b2..1172e605d7fda9539fa858720a79c8f3a61db2a2 100644 --- a/reco/L1/L1Algo/L1CAMergeClones.cxx +++ b/reco/L1/L1Algo/L1CAMergeClones.cxx @@ -204,8 +204,8 @@ void L1Algo::CAMergeClones() L1Vector<unsigned short>& firstStation = fMergerTrackFirstStation; L1Vector<unsigned short>& lastStation = fMergerTrackLastStation; - L1Vector<L1HitIndex_t>& firstHit = fMergerTrackFirstHit; - L1Vector<L1HitIndex_t>& lastHit = fMergerTrackLastHit; + L1Vector<L1HitIndex_t>& firstHit = fMergerTrackFirstHit; + L1Vector<L1HitIndex_t>& lastHit = fMergerTrackLastHit; L1Vector<unsigned short>& neighbour = fMergerTrackNeighbour; L1Vector<float>& trackChi2 = fMergerTrackChi2; L1Vector<char>& isStored = fMergerTrackIsStored; diff --git a/reco/L1/L1Algo/L1CATrackFinder.cxx b/reco/L1/L1Algo/L1CATrackFinder.cxx index fe2614da90a7573880e48738b749f8b154c71721..cf53d35b1bc4111cdd2835d2068bdd372dd607f6 100644 --- a/reco/L1/L1Algo/L1CATrackFinder.cxx +++ b/reco/L1/L1Algo/L1CATrackFinder.cxx @@ -371,7 +371,9 @@ inline void L1Algo::f11( /// input 1st stage of singlet search else { fit.L1AddMaterial(T, stal.materialInfo, fMaxInvMom, 1); } - if ((istam >= fNstationsBeforePipe) && (istal <= fNstationsBeforePipe - 1)) { fit.L1AddPipeMaterial(T, fMaxInvMom, 1); } + if ((istam >= fNstationsBeforePipe) && (istal <= fNstationsBeforePipe - 1)) { + fit.L1AddPipeMaterial(T, fMaxInvMom, 1); + } fvec dz = zstam - zl; L1ExtrapolateTime(T, dz, stam.timeInfo); @@ -432,7 +434,8 @@ inline void L1Algo::f20( while (true) { if (fTrackingMode == kGlobal || fTrackingMode == kMcbm) { irm1++; - if ((L1HitIndex_t) irm1 >= (StsHitsUnusedStopIndex[&stam - fStations.begin()] - StsHitsUnusedStartIndex[&stam - fStations.begin()])) + if ((L1HitIndex_t) irm1 + >= (StsHitsUnusedStopIndex[&stam - fStations.begin()] - StsHitsUnusedStartIndex[&stam - fStations.begin()])) break; imh = irm1; } @@ -564,8 +567,8 @@ inline void L1Algo::f20( /// Find the triplets(right hit). Reformat data in the portion of triplets. inline void L1Algo::f30( // input L1HitPoint* vStsHits_r, L1Station& stam, L1Station& star, int istam, int istar, L1HitPoint* vStsHits_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*/, + 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 Tindex& n3, nsL1::vector<L1TrackPar>::TSimd& T_3, L1Vector<L1HitIndex_t>& hitsl_3, L1Vector<L1HitIndex_t>& hitsm_3, L1Vector<L1HitIndex_t>& hitsr_3, nsL1::vector<fvec>::TSimd& u_front_3, nsL1::vector<fvec>::TSimd& u_back_3, @@ -693,7 +696,9 @@ inline void L1Algo::f30( // input else { fit.L1AddMaterial(T2, stam.materialInfo, T2.qp, 1); } - if ((istar >= fNstationsBeforePipe) && (istam <= fNstationsBeforePipe - 1)) { fit.L1AddPipeMaterial(T2, T2.qp, 1); } + if ((istar >= fNstationsBeforePipe) && (istam <= fNstationsBeforePipe - 1)) { + fit.L1AddPipeMaterial(T2, T2.qp, 1); + } fvec dz2 = star.z - T2.z; L1ExtrapolateTime(T2, dz2, stam.timeInfo); @@ -703,9 +708,9 @@ inline void L1Algo::f30( // input if (fTrackingMode == kGlobal || fTrackingMode == kMcbm) // extrapolate to the right hit station { - if (istar <= fNfieldStations) L1Extrapolate(T2, star.z, T2.qp, f2); // Full extrapolation in the magnetic field + if (istar <= fNfieldStations) L1Extrapolate(T2, star.z, T2.qp, f2); // Full extrapolation in the magnetic field else - L1ExtrapolateLine(T2, star.z); // Extrapolation with line () + L1ExtrapolateLine(T2, star.z); // Extrapolation with line () } else L1Extrapolate(T2, star.z, T2.qp, f2); @@ -718,7 +723,7 @@ inline void L1Algo::f30( // input if (fabs(T2.tx[i2_4]) > fMaxSlope) continue; if (fabs(T2.ty[i2_4]) > fMaxSlope) continue; - const fvec Pick_r22 = (fTripletChi2Cut - T2.chi2); + const fvec Pick_r22 = (fTripletChi2Cut - T2.chi2); const float& timeError = T2.C55[i2_4]; const float& time = T2.t[i2_4]; // find first possible hit @@ -749,7 +754,7 @@ inline void L1Algo::f30( // input //for (int irh = 0; irh < ( StsHitsUnusedStopIndex[istar] - StsHitsUnusedStartIndex[istar] ); irh++){ const L1HitPoint& hitr = vStsHits_r[irh]; -#ifdef USE_EVENT_NUMBER // NOTE: +#ifdef USE_EVENT_NUMBER // NOTE: if ((T2.n[i2_4] != hitr.n)) continue; #endif // USE_EVENT_NUMBER const fscal zr = hitr.Z(); @@ -955,8 +960,8 @@ inline void L1Algo::f31( // input /// Refit Triplets. inline void L1Algo::f32( // input // TODO not updated after gaps introduction - Tindex n3, int istal, nsL1::vector<L1TrackPar>::TSimd& T_3, L1Vector<L1HitIndex_t>& hitsl_3, L1Vector<L1HitIndex_t>& hitsm_3, - L1Vector<L1HitIndex_t>& hitsr_3, int nIterations) + Tindex n3, int istal, nsL1::vector<L1TrackPar>::TSimd& T_3, L1Vector<L1HitIndex_t>& hitsl_3, + L1Vector<L1HitIndex_t>& hitsm_3, L1Vector<L1HitIndex_t>& hitsr_3, int nIterations) { L1Fit fit; fit.SetParticleMass(fDefaultMass); @@ -980,8 +985,8 @@ inline void L1Algo::f32( // input // TODO not updated after gaps introduction // 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]]]}; + (*RealIHitP)[hitsm_3[i3] + StsHitsUnusedStartIndex[ista[1]]], + (*RealIHitP)[hitsr_3[i3] + StsHitsUnusedStartIndex[ista[2]]]}; fscal u[NHits], v[NHits], x[NHits], y[NHits], z[NHits]; for (int ih = 0; ih < NHits; ++ih) { @@ -1321,8 +1326,8 @@ inline void L1Algo::DupletsStaPort( /// input: int istal, int istam, Tindex ip, L1Vector<Tindex>& n_g, Tindex* portionStopIndex_, /// output: - L1TrackPar* T_1, L1FieldRegion* fld_1, L1HitIndex_t* hitsl_1, L1Vector<char>& lmDuplets, Tindex& n_2, L1Vector<L1HitIndex_t>& i1_2, - L1Vector<L1HitIndex_t>& hitsm_2 + L1TrackPar* T_1, L1FieldRegion* fld_1, L1HitIndex_t* hitsl_1, L1Vector<char>& lmDuplets, Tindex& n_2, + L1Vector<L1HitIndex_t>& i1_2, L1Vector<L1HitIndex_t>& hitsm_2 /// ) { @@ -1456,9 +1461,9 @@ L1Algo::TripletsStaPort( /// creates triplets: input: @istal - start station nu #endif nsL1::vector<L1TrackPar>::TSimd& T_3 = fT_3[Thread]; - L1Vector<L1HitIndex_t>& hitsl_3 = fhitsl_3[Thread]; - L1Vector<L1HitIndex_t>& hitsm_3 = fhitsm_3[Thread]; - L1Vector<L1HitIndex_t>& hitsr_3 = fhitsr_3[Thread]; + L1Vector<L1HitIndex_t>& hitsl_3 = fhitsl_3[Thread]; + L1Vector<L1HitIndex_t>& hitsm_3 = fhitsm_3[Thread]; + L1Vector<L1HitIndex_t>& hitsr_3 = fhitsr_3[Thread]; nsL1::vector<fvec>::TSimd& u_front3 = fu_front3[Thread]; nsL1::vector<fvec>::TSimd& u_back3 = fu_back3[Thread]; nsL1::vector<fvec>::TSimd& z_pos3 = fz_pos3[Thread]; @@ -1570,7 +1575,7 @@ L1Algo::TripletsStaPort( /// creates triplets: input: @istal - start station nu // } -/***********************************************************************************************//** +/***********************************************************************************************/ /** * * * ------ CATrackFinder procedure ------ * * * @@ -1583,7 +1588,7 @@ void L1Algo::CATrackFinder() omp_set_num_threads(fNThreads); #endif - /*******************************//** + /*******************************/ /** * Performance monitors setting **********************************/ @@ -1643,7 +1648,7 @@ void L1Algo::CATrackFinder() static L1CATFIterTimerInfo stat_gti = gti; static L1CATFTimerInfo stat_ti = ti; -#endif // XXX +#endif // XXX #ifdef COUNTERS static Tindex stat_nStartHits = 0; @@ -1658,7 +1663,7 @@ void L1Algo::CATrackFinder() static Tindex stat_nTrCandidates[fNFindIterations] = {0}; #endif - /********************************//** + /********************************/ /** * CATrackFinder routine setting ***********************************/ @@ -1701,7 +1706,7 @@ void L1Algo::CATrackFinder() #ifdef XXX c_time.Start(); c_timerG.Start(); -#endif // XXX +#endif // XXX float yStep = 1.5 / sqrt(nDontUsedHits); // empirics. 0.01*sqrt(2374) ~= 0.5 @@ -1766,7 +1771,7 @@ void L1Algo::CATrackFinder() TStopwatch c_time1; c_time1.Start(); - /********************************//** + /********************************/ /** * Loop over tracking iterations ***********************************/ @@ -2005,12 +2010,14 @@ void L1Algo::CATrackFinder() L1FieldRegion fldG_1[vPortion]; L1HitIndex_t hitslG_1[Portion]; - L1Vector<L1HitIndex_t> hitsm_2("L1CATrackFinder::hitsm_2"); /// middle hits indexed by number of doublets in portion(i2) + L1Vector<L1HitIndex_t> hitsm_2( + "L1CATrackFinder::hitsm_2"); /// middle hits indexed by number of doublets in portion(i2) L1Vector<L1HitIndex_t> i1_2( "L1CATrackFinder::i1_2"); /// index in portion of singlets(i1) indexed by index in portion of doublets(i2) - L1Vector<L1HitIndex_t> hitsmG_2("L1CATrackFinder::hitsmG_2"); /// middle hits indexed by number of doublets in portion(i2) + L1Vector<L1HitIndex_t> hitsmG_2( + "L1CATrackFinder::hitsmG_2"); /// middle hits indexed by number of doublets in portion(i2) L1Vector<L1HitIndex_t> i1G_2( "L1CATrackFinder::i1G_2"); /// index in portion of singlets(i1) indexed by index in portion of doublets(i2) L1Vector<char> lmDuplets[L1Parameters::kMaxNstations] { @@ -2123,8 +2130,9 @@ void L1Algo::CATrackFinder() // cout<<"---- Collect track candidates. ----"<<endl; // #endif - int min_level = caIteration.GetMinLevelTripletStart(); // min level for start triplet. So min track length = min_level+3. - // if (isec == kFastPrimJumpIter) min_level = 1; + int min_level = + caIteration.GetMinLevelTripletStart(); // min level for start triplet. So min track length = min_level+3. + // if (isec == kFastPrimJumpIter) min_level = 1; //if ((isec == kAllSecIter) || (isec == kAllSecEIter) || (isec == kAllSecJumpIter)) // min_level = 1; // only the long low momentum tracks @@ -2462,7 +2470,7 @@ void L1Algo::CATrackFinder() int start = StsHitsUnusedStartIndex[ista]; int Nelements = StsHitsUnusedStopIndex[ista] - start; L1Hit* staHits = nullptr; // to avoid out-of-range error in ..[start] - L1HitIndex_t* staHitIndices = nullptr; + L1HitIndex_t* staHitIndices = nullptr; L1HitPoint* staHitPoints = nullptr; if (Nelements > 0) { staHits = &((*vStsHitsUnused)[start]); @@ -2522,9 +2530,7 @@ void L1Algo::CATrackFinder() c_timerG.Start(); #endif - if constexpr (L1Parameters::kIfMergeClones) { - CAMergeClones(); - } + if constexpr (L1Parameters::kIfMergeClones) { CAMergeClones(); } #ifdef XXX c_timerG.Stop(); diff --git a/reco/L1/L1Algo/L1Def.h b/reco/L1/L1Algo/L1Def.h index 0b4e6f0f97d3df58c627fbff769dfdd9048d66a5..ac1fe5832a1faa731e59dd926b5be177353b4784 100644 --- a/reco/L1/L1Algo/L1Def.h +++ b/reco/L1/L1Algo/L1Def.h @@ -68,6 +68,4 @@ T finite(T x) typedef int index_type; - - #endif diff --git a/reco/L1/L1Algo/L1Filtration.h b/reco/L1/L1Algo/L1Filtration.h index df438092cb41e48c633c77d91c35e1b45e3054ca..bc5bc5da2ae1744b762b24e2249d8c18ca468bcc 100644 --- a/reco/L1/L1Algo/L1Filtration.h +++ b/reco/L1/L1Algo/L1Filtration.h @@ -265,7 +265,8 @@ inline void L1FilterChi2XYC00C10C11(const L1UMeasurementInfo& info, fvec& x, fve C11 -= K1 * F1; } -inline void L1FilterVtx(L1TrackPar& T, fvec x, fvec y, const L1XYMeasurementInfo& info, fvec extrDx, fvec extrDy, fvec J[]) +inline void L1FilterVtx(L1TrackPar& T, fvec x, fvec y, const L1XYMeasurementInfo& info, fvec extrDx, fvec extrDy, + fvec J[]) { cnst TWO = 2.; diff --git a/reco/L1/L1Algo/L1Grid.cxx b/reco/L1/L1Algo/L1Grid.cxx index 071d3804c80eb47156f83d63614296a4ddf28d36..862b724a867e17f3a127a56b431f310186d7380b 100644 --- a/reco/L1/L1Algo/L1Grid.cxx +++ b/reco/L1/L1Algo/L1Grid.cxx @@ -37,9 +37,10 @@ inline void memset(T* dest, T i, size_t num) } -void L1Grid::UpdateIterGrid(unsigned int Nelements, L1Hit* hits, L1Vector<L1HitIndex_t>* indicesBuf, L1HitIndex_t* indices, - L1Vector<L1Hit>* hits2, L1Vector<L1HitPoint>* pointsBuf, L1HitPoint* points, - int& NHitsOnStation, char iS, L1Algo& Algo, const L1Vector<unsigned char>* vSFlag) +void L1Grid::UpdateIterGrid(unsigned int Nelements, L1Hit* hits, L1Vector<L1HitIndex_t>* indicesBuf, + L1HitIndex_t* indices, L1Vector<L1Hit>* hits2, L1Vector<L1HitPoint>* pointsBuf, + L1HitPoint* points, int& NHitsOnStation, char iS, L1Algo& Algo, + const L1Vector<unsigned char>* vSFlag) { fFirstHitInBin.reset(fN + 2, 0); diff --git a/reco/L1/L1Algo/L1Grid.h b/reco/L1/L1Algo/L1Grid.h index ae31722216605b79e06f8296294e6a616b6a3a47..aa3113c975ad049e934914b00cfe4d0f1534a24a 100644 --- a/reco/L1/L1Algo/L1Grid.h +++ b/reco/L1/L1Algo/L1Grid.h @@ -43,14 +43,15 @@ public: ~L1Grid() = default; - void StoreHits(L1HitIndex_t nhits, const L1Hit* hits, char iS, L1Algo& Algo, L1HitIndex_t n, L1Hit* hitsBuf1, const L1Hit* hits1, - L1HitIndex_t* indices1); + void StoreHits(L1HitIndex_t nhits, const L1Hit* hits, char iS, L1Algo& Algo, L1HitIndex_t n, L1Hit* hitsBuf1, + const L1Hit* hits1, L1HitIndex_t* indices1); void CreatePar0(float yMin, float yMax, float zMin, float zMax, float sy, float sz); void BuildBins(float yMin, float yMax, float zMin, float zMax, float tMin, float tMax, float sy, float sz, float st); - void HitsSort(L1HitPoint* pointsBuf, L1Hit* hitsBuf, const L1Hit* hits, L1HitIndex_t* indices, L1HitIndex_t* indicesBuf, - L1HitPoint* points, L1HitIndex_t n, L1HitIndex_t nhits, char iS, L1Algo& Algo); + void HitsSort(L1HitPoint* pointsBuf, L1Hit* hitsBuf, const L1Hit* hits, L1HitIndex_t* indices, + L1HitIndex_t* indicesBuf, L1HitPoint* points, L1HitIndex_t n, L1HitIndex_t nhits, char iS, + L1Algo& Algo); void Initial1(int NThreads); void AllocateMemory(int NThreads); diff --git a/reco/L1/L1Algo/L1Hit.h b/reco/L1/L1Algo/L1Hit.h index dc18c3043ad34fb326765583f5eee4fe343d2688..77988fa1a2a4c645169c8e669143e1af80997985 100644 --- a/reco/L1/L1Algo/L1Hit.h +++ b/reco/L1/L1Algo/L1Hit.h @@ -12,8 +12,8 @@ #ifndef L1Hit_h #define L1Hit_h -using L1HitIndex_t = unsigned /*short*/ int; ///> Index of L1Hit -using L1StripIndex_t = unsigned /*short*/ int; ///> Index of the station strip +using L1HitIndex_t = unsigned /*short*/ int; ///> Index of L1Hit +using L1StripIndex_t = unsigned /*short*/ int; ///> Index of the station strip /// TODO: replace typedef with using (C++11) (S.Zharko) /// TODO: change naming: THitI -> L1HitIndex_t, TStripI -> L1StripIndex_t (S.Zharko) @@ -23,16 +23,16 @@ using L1StripIndex_t = unsigned /*short*/ int; ///> Index of the station strip /// L1Hit class describes a generic hit for CA tracker /// struct L1Hit { - L1StripIndex_t f {0}; ///> front strip index - L1StripIndex_t b {0}; ///> back strip index - float u {0.f}; ///> measured U coordinate - float v {0.f}; ///> measured V coordinate - float t {0.f}; ///> measured time - float z {0.f}; ///> fixed Z coordinate - float du {0.f}; ///> mean squared error of u - float dv {0.f}; ///> mean squared error of v - float dt {0.f}; ///> mean squared error of t - int ID {0}; ///> TODO: check if this ID is redundant + L1StripIndex_t f {0}; ///> front strip index + L1StripIndex_t b {0}; ///> back strip index + float u {0.f}; ///> measured U coordinate + float v {0.f}; ///> measured V coordinate + float t {0.f}; ///> measured time + float z {0.f}; ///> fixed Z coordinate + float du {0.f}; ///> mean squared error of u + float dv {0.f}; ///> mean squared error of v + float dt {0.f}; ///> mean squared error of t + int ID {0}; ///> TODO: check if this ID is redundant }; #endif diff --git a/reco/L1/L1Algo/L1HitArea.h b/reco/L1/L1Algo/L1HitArea.h index ea8f248147fe54358fbf9949647853394bd14cf8..0fcd83d69987a6c18400b2492290b0bc6a27ef61 100644 --- a/reco/L1/L1Algo/L1HitArea.h +++ b/reco/L1/L1Algo/L1HitArea.h @@ -28,8 +28,8 @@ protected: unsigned short fBDY; // Y distance of bin indexes unsigned int fIndYmin; // minimum index for unsigned short fIz; // current Z bin index (incremented while iterating) - L1HitIndex_t fHitYlst; // last possible hit index in current z-line - L1HitIndex_t fIh; // hit index iterating inside the bins + L1HitIndex_t fHitYlst; // last possible hit index in current z-line + L1HitIndex_t fIh; // hit index iterating inside the bins int fNy; // Number of bins in Y direction }; @@ -114,8 +114,8 @@ protected: unsigned short fBDY; // Y distance of bin indexes unsigned int fIndYmin; // minimum index for unsigned short fIz; // current Z bin index (incremented while iterating) - L1HitIndex_t fHitYlst; // last possible hit index in current z-line - L1HitIndex_t fIh; // hit index iterating inside the bins + L1HitIndex_t fHitYlst; // last possible hit index in current z-line + L1HitIndex_t fIh; // hit index iterating inside the bins int fNy; // Number of bins in Y direction int fNz; diff --git a/reco/L1/L1Algo/L1HitsSortHelper.cxx b/reco/L1/L1Algo/L1HitsSortHelper.cxx index 8e2f7e9433b9f1a46b85ab9cf92bdc3731b30e7b..e0c2ccf5eecc4912ce17a241e8899eb185f0f75e 100644 --- a/reco/L1/L1Algo/L1HitsSortHelper.cxx +++ b/reco/L1/L1Algo/L1HitsSortHelper.cxx @@ -14,7 +14,8 @@ using std::vector; L1HitsSortHelper::L1HitsSortHelper(vector<L1Hit>& hits, vector<L1HitPoint>& points, vector<L1HitIndex_t>& indices, - const L1Grid* grid, L1HitIndex_t* iStart, L1HitIndex_t* iStop, int nStations, int nDontUsedHits) + const L1Grid* grid, L1HitIndex_t* iStart, L1HitIndex_t* iStop, int nStations, + int nDontUsedHits) : fD() , fHits(hits) , fPoints(points) diff --git a/reco/L1/L1Algo/L1InitManager.h b/reco/L1/L1Algo/L1InitManager.h index 410f625754d866a980875a49fda029aeb0ddab4e..5d1161734f7300337ae5e261c229ea1030b8568c 100644 --- a/reco/L1/L1Algo/L1InitManager.h +++ b/reco/L1/L1Algo/L1InitManager.h @@ -74,7 +74,7 @@ private: keCAIterations, ///< 7) If the CA track finder iterations were initialized keTrackingLevel, ///< 8) keGhostSuppression, ///< 9) - keMomentumCutOff, ///< 10) + keMomentumCutOff, ///< 10) keEnd ///< 11) [technical] number of entries in the enum }; @@ -227,12 +227,9 @@ private: // NOTE: Owner of the object is L1Algo instance L1Parameters* fpParameters {nullptr}; - int fTrackingLevel {0}; ///< tracking level + int fTrackingLevel {0}; ///< tracking level int fGhostSuppression {0}; ///< flag: if true, ghost tracks are suppressed float fMomentumCutOff {0}; ///< minimum momentum of tracks TODO: ? - - - }; #endif diff --git a/reco/L1/L1Algo/L1Parameters.h b/reco/L1/L1Algo/L1Parameters.h index 4ef0102e1b8cf4f96283f7f559b8e680b6e8c1c8..6e4b938ff2a8507e9b4a4b81fd76f2a17125615b 100644 --- a/reco/L1/L1Algo/L1Parameters.h +++ b/reco/L1/L1Algo/L1Parameters.h @@ -20,7 +20,7 @@ class L1Parameters { public: - /**********************//** + /**********************/ /** * COMPILE TIME CONSTANTS * **************************/ @@ -62,13 +62,11 @@ public: static constexpr bool kIfDebugDoubletsPerformance {false}; /// Flag: debug mode for analyzing the tiplets pergormance efficiencies static constexpr bool kIfDebugTripletsPerformance {false}; - /// Flag: debug mode for creating pools for triplets. + /// Flag: debug mode for creating pools for triplets. /// NOTE: this feature will work only if the L1Parameters::kIfDebugTipletsPerformace is true! static constexpr bool kIfCreateTipletPulls {false}; - - public: /// Default constructor L1Parameters() = default; diff --git a/reco/L1/L1Algo/L1Station.cxx b/reco/L1/L1Algo/L1Station.cxx index 294be0724f47580a26d6ed8080cc17b770dd44d4..30941e3a5d641db884fc4b2a00b9a429e47a7428 100644 --- a/reco/L1/L1Algo/L1Station.cxx +++ b/reco/L1/L1Algo/L1Station.cxx @@ -10,10 +10,7 @@ #include <sstream> // TODO: Improve log style (S.Zh.) -void L1Station::Print(int verbosity) const -{ - LOG(info) << ToString(verbosity); -} +void L1Station::Print(int verbosity) const { LOG(info) << ToString(verbosity); } std::string L1Station::ToString(int verbosityLevel, int indentLevel) const { @@ -25,7 +22,8 @@ std::string L1Station::ToString(int verbosityLevel, int indentLevel) const aStream << '\n' << indent << "Address: " << this << '\n'; } if (verbosityLevel == 0) { - aStream << indent << "- <z [cm], typeID> = " << std::setw(12) << std::setfill(' ') << z[0] << ", " << std::setw(4) << std::setfill(' ') << type; + aStream << indent << "- <z [cm], typeID> = " << std::setw(12) << std::setfill(' ') << z[0] << ", " << std::setw(4) + << std::setfill(' ') << type; } else { aStream << indent << "Station type ID: " << std::setw(12) << std::setfill(' ') << type << '\n'; diff --git a/reco/L1/L1Algo/L1Station.h b/reco/L1/L1Algo/L1Station.h index 38f5c5bfea891a6eab6160af4419b395c2242ce3..7b7d42628805bc94f2d135e95a3ff4e09cc7e64b 100644 --- a/reco/L1/L1Algo/L1Station.h +++ b/reco/L1/L1Algo/L1Station.h @@ -17,11 +17,11 @@ /// struct L1Station { int type {0}; - int timeInfo {0}; ///< flag: if time information can be used + int timeInfo {0}; ///< flag: if time information can be used int fieldStatus {0}; ///< flag: 1 - station is INSIDE the field, 0 - station is OUTSIDE the field - fvec z {0}; ///< z position of station - fvec Rmin {0}; ///< min radius of the station - fvec Rmax {0}; ///< max radius of the station + fvec z {0}; ///< z position of station + fvec Rmin {0}; ///< min radius of the station + fvec Rmax {0}; ///< max radius of the station fvec dt {0}; L1MaterialInfo materialInfo {}; L1FieldSlice fieldSlice {}; diff --git a/reco/L1/L1Algo/L1Track.h b/reco/L1/L1Algo/L1Track.h index ff53a42582277abc8e34a11a452904e9497388ab..584d4b233810fb370ad8031012d0648264a90aa5 100644 --- a/reco/L1/L1Algo/L1Track.h +++ b/reco/L1/L1Algo/L1Track.h @@ -52,15 +52,11 @@ public: /// Provides comparison of two L1Track objects /// If two tracks have different number of hits, the smallest track has the largest number of hits. - /// If two tracks have the same numbers of hits and ... + /// If two tracks have the same numbers of hits and ... static bool compareCand(const L1Track& a, const L1Track& b) { - if (a.NHits != b.NHits) { - return (a.NHits > b.NHits); - } - if (a.ista != b.ista) { - return (a.ista < b.ista); - } + if (a.NHits != b.NHits) { return (a.NHits > b.NHits); } + if (a.ista != b.ista) { return (a.ista < b.ista); } else { return (a.chi2 < b.chi2); } @@ -77,4 +73,4 @@ public: // else return false; // } -#endif // L1Track_H +#endif // L1Track_H diff --git a/reco/L1/L1Algo/L1Triplet.h b/reco/L1/L1Algo/L1Triplet.h index 681ce98e15cca0d88acb264cb9adf863e1db3245..73fcc241082e4af193ddbaf56b48ce9265797d68 100644 --- a/reco/L1/L1Algo/L1Triplet.h +++ b/reco/L1/L1Algo/L1Triplet.h @@ -83,9 +83,9 @@ 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 fHitM = 0; // middle hit index (16b) - L1HitIndex_t fHitR = 0; // right hit index (16b) + L1HitIndex_t fHitL = 0; // left hit index (16b) in vStsHits array + L1HitIndex_t fHitM = 0; // middle hit index (16b) + L1HitIndex_t fHitR = 0; // right hit index (16b) char fNneighbours = 0; // n of neighbouring triplets unsigned char fLevel = 0; // triplet level // == its possible position on the longest track candidate it belongs to. diff --git a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx index be7519a930fb0294127fd1fd0d3ae35ee1145929..6720dbb40b5179d67b4a080e51387c5b77bd0d15 100644 --- a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx +++ b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx @@ -364,13 +364,13 @@ void L1AlgoDraw::DrawTriplet(int il, int im, int ir) marker.DrawMarker(lx[nHits - 1], ly[nHits - 1]); } -void L1AlgoDraw::DrawDoublets(vector<L1HitIndex_t>* Duplets_hits, map<L1HitIndex_t, L1HitIndex_t>* Duplets_start, const int /*MaxArrSize*/, - L1HitIndex_t* StsRestHitsStartIndex, unsigned int* realIHit) +void L1AlgoDraw::DrawDoublets(vector<L1HitIndex_t>* Duplets_hits, map<L1HitIndex_t, L1HitIndex_t>* Duplets_start, + const int /*MaxArrSize*/, L1HitIndex_t* StsRestHitsStartIndex, unsigned int* realIHit) { for (int iSta = 0; iSta < NStations - 1; iSta++) { const int firstHitOnSta = StsRestHitsStartIndex[iSta]; const int firstHitOnNextSta = StsRestHitsStartIndex[iSta + 1]; - L1HitIndex_t* staDupletsHits = &(Duplets_hits[iSta][0]); + L1HitIndex_t* staDupletsHits = &(Duplets_hits[iSta][0]); map<L1HitIndex_t, L1HitIndex_t>& staDupletsStart = Duplets_start[iSta]; for (int iRestLHit = firstHitOnSta; iRestLHit < firstHitOnNextSta; iRestLHit++) { @@ -397,13 +397,13 @@ void L1AlgoDraw::DrawDoublets(vector<L1HitIndex_t>* Duplets_hits, map<L1HitIndex YX->Update(); }; -void L1AlgoDraw::DrawDoubletsOnSta(int iSta, L1HitIndex_t* Duplets_hits, L1HitIndex_t* Duplets_start, const int MaxArrSize, - L1HitIndex_t* StsRestHitsStartIndex, unsigned int* realIHit) +void L1AlgoDraw::DrawDoubletsOnSta(int iSta, L1HitIndex_t* Duplets_hits, L1HitIndex_t* Duplets_start, + const int MaxArrSize, L1HitIndex_t* StsRestHitsStartIndex, unsigned int* realIHit) { const int firstHitOnSta = StsRestHitsStartIndex[iSta]; const int firstHitOnNextSta = StsRestHitsStartIndex[iSta + 1]; - L1HitIndex_t* staDupletsHits = Duplets_hits + MaxArrSize * iSta; - L1HitIndex_t* staDupletsStart = Duplets_start + MaxArrSize * iSta; + L1HitIndex_t* staDupletsHits = Duplets_hits + MaxArrSize * iSta; + L1HitIndex_t* staDupletsStart = Duplets_start + MaxArrSize * iSta; for (int iRestLHit = firstHitOnSta; iRestLHit < firstHitOnNextSta; iRestLHit++) { const int ilh = iRestLHit - firstHitOnSta; @@ -659,7 +659,8 @@ void L1AlgoDraw::DrawInputHits() } // DrawInputHits -void L1AlgoDraw::DrawRestHits(L1HitIndex_t* StsRestHitsStartIndex, L1HitIndex_t* StsRestHitsStopIndex, unsigned int* realIHit) +void L1AlgoDraw::DrawRestHits(L1HitIndex_t* StsRestHitsStartIndex, L1HitIndex_t* StsRestHitsStopIndex, + unsigned int* realIHit) { TLatex latex; diff --git a/reco/L1/L1Algo/utils/L1AlgoDraw.h b/reco/L1/L1Algo/utils/L1AlgoDraw.h index 5a42880723a5efab4cd9d52de50800b8942918ad..c6ae16429580316261ccfdacf42d5b74132de8af 100644 --- a/reco/L1/L1Algo/utils/L1AlgoDraw.h +++ b/reco/L1/L1Algo/utils/L1AlgoDraw.h @@ -32,8 +32,8 @@ public: void DrawRecoTracks(); 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); + 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); void DrawDoubletsOnSta(int iSta, L1HitIndex_t* Duplets_hits, L1HitIndex_t* Duplets_start, const int MaxArrSize, L1HitIndex_t* StsRestHitsStartIndex, unsigned int* realIHit); diff --git a/reco/L1/L1AlgoInputData.cxx b/reco/L1/L1AlgoInputData.cxx index d6471fc1cc91f0eb271eef5578b43dbf5340c846..3d77aca5bde42fce4189584f9204cb59a5cb5c63 100644 --- a/reco/L1/L1AlgoInputData.cxx +++ b/reco/L1/L1AlgoInputData.cxx @@ -55,7 +55,7 @@ void L1AlgoInputData::SetData( const vector< L1Hit > & StsHits_, /****************************************************************************************************************/ -void L1AlgoInputData::Clear() +void L1AlgoInputData::Clear() { vStsHits.clear(); NStsStrips = 0; diff --git a/reco/L1/L1AlgoInputData.h b/reco/L1/L1AlgoInputData.h index 5af39afaf6f808dca013979da21c97dbc794132f..cbb7ed09606a0764d9b4e5546d207e3034bab1c4 100644 --- a/reco/L1/L1AlgoInputData.h +++ b/reco/L1/L1AlgoInputData.h @@ -13,7 +13,7 @@ #include "L1Vector.h" /// -/// Class L1AlgoInputData implements a container for keeping a vector of L1Algo internal hit structures (the +/// Class L1AlgoInputData implements a container for keeping a vector of L1Algo internal hit structures (the /// L1Hit objects), used for track reconstruction procedure. /// struct L1AlgoInputData { @@ -38,10 +38,10 @@ struct L1AlgoInputData { L1Vector<L1Hit>& GetStsHits() { return vStsHits; } /// 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 + /// 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; } - /// Gets an access of the stop indexes for different stations + /// 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; } @@ -50,11 +50,11 @@ struct L1AlgoInputData { /// \param work_dir path to the file data_algo.txt file, containing the L1Hit objects for different events /// \param maxNEvent max number of events to be read from the data_algo.txt file /// \param iVerbose verbosity level - /// \return success flag: + /// \return success flag: /// true - data was read and stored into this object /// false - data was not read for some reason bool ReadHitsFromFile(const char work_dir[100], const int maxNEvent, const int iVerbose); - // TODO: Is there any reason to pass string as an array of chars? It is dangerous, because if one can pass a + // TODO: Is there any reason to pass string as an array of chars? It is dangerous, because if one can pass a // string containing more then 100 symbols and thus cast a segmentation violation. So, I'd change it // to const char*, if there are no any specific reasons to keep the current signature. (S.Zharko) @@ -73,7 +73,7 @@ struct L1AlgoInputData { void* operator new[](size_t size) { return _mm_malloc(size, 16); } /// Delete operator for single element void operator delete(void* ptr, size_t) { _mm_free(ptr); } - /// Delete operator for multiple elements + /// Delete operator for multiple elements void operator delete[](void* ptr, size_t) { _mm_free(ptr); } // TODO: Where are the definitions? (S.Zharko) @@ -93,7 +93,7 @@ struct L1AlgoInputData { * Data fields (public) */ /// hits as a combination of front-, backstrips and z-position - L1Vector<L1Hit> vStsHits {"L1AlgoInputData::vStsHits"}; + L1Vector<L1Hit> vStsHits {"L1AlgoInputData::vStsHits"}; int NStsStrips {0}; ///> Number of strips in the station /// information of hits station & used hits in tracks; @@ -102,7 +102,7 @@ struct L1AlgoInputData { /// Start indeces for a given station L1HitIndex_t StsHitsStartIndex[kMaxNStations + 1] {0}; /// Stop indeces for a given station - L1HitIndex_t StsHitsStopIndex[kMaxNStations + 1] {0}; + L1HitIndex_t StsHitsStopIndex[kMaxNStations + 1] {0}; } _fvecalignment; diff --git a/reco/L1/ParticleFinder/CbmL1PFFitter.cxx b/reco/L1/ParticleFinder/CbmL1PFFitter.cxx index 39f591252414c3445f67819261ed120456a43e35..39edf5d09ab93516659c90d77264e70a6db89d29 100644 --- a/reco/L1/ParticleFinder/CbmL1PFFitter.cxx +++ b/reco/L1/ParticleFinder/CbmL1PFFitter.cxx @@ -405,9 +405,9 @@ void CbmL1PFFitter::GetChiToVertex(vector<CbmStsTrack>& Tracks, vector<L1FieldRe CbmStsTrack* t[fvecLen]; - int nStations = CbmL1::Instance()->algo->GetNstations(); - int NMvdStations = CbmL1::Instance()->algo->GetNstationsBeforePipe(); - const L1Station* sta = CbmL1::Instance()->algo->GetStations().begin(); + int nStations = CbmL1::Instance()->algo->GetNstations(); + int NMvdStations = CbmL1::Instance()->algo->GetNstationsBeforePipe(); + const L1Station* sta = CbmL1::Instance()->algo->GetStations().begin(); fvec* zSta = new fvec[nStations]; for (int iSta = 0; iSta < nStations; iSta++) zSta[iSta] = sta[iSta].z;