Commit 6bd93cbf authored by Sergei Zharko's avatar Sergei Zharko
Browse files

code format fix

parent 7298fc76
......@@ -388,7 +388,7 @@ InitStatus CbmL1::Init()
// TODO: Replace algo initialization in the constructor (S.Zharko)
algo = &algo_static;
/**********************//**
/**************************
** Field initialization **
**************************/
......@@ -397,28 +397,28 @@ 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 **
***************************************************/
......@@ -429,7 +429,7 @@ InitStatus CbmL1::Init()
if (fUseTOF) { fActiveTrackingDetectorIDs.insert(L1DetectorID::kTof); }
fpInitManager->SetActiveDetectorIDs(fActiveTrackingDetectorIDs);
/*****************************************************************//**
/*********************************************************************
** Counting numbers of stations for different detector subsystems **
*********************************************************************/
......@@ -549,7 +549,7 @@ InitStatus CbmL1::Init()
// LOG(error) << "-E- CbmL1: Read geometry from file " << fSTAPDataDir + "geo_algo.txt was NOT successful.";
}
/***********************************//**
/***************************************
** Stations geometry initialization **
***************************************/
......@@ -695,7 +695,7 @@ InitStatus CbmL1::Init()
LOG(info) << "- TOF station " << iSt << " at z = " << stationInfo.GetZdouble();
}
/************************************//**
/****************************************
** **
** TRACKING ITERATIONS INITIALIZATION **
** **
......@@ -860,7 +860,7 @@ InitStatus CbmL1::Init()
//fpInitManager->PushBackCAIteration(trackingIterAllSecJump);
}
/******************//**
/**********************
** Set special cuts **
**********************/
......@@ -872,7 +872,7 @@ InitStatus CbmL1::Init()
algo->Init(fUseHitErrors, fTrackingMode, fMissingHits);
/*****************************//**
/*********************************
** Material map initialization **
*********************************/
......@@ -943,7 +943,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);
......
......@@ -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)
......@@ -1064,7 +1066,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]);
}
}
......
......@@ -85,7 +85,6 @@ using L1StationsArray_t = std::array<L1Station, L1Parameters::kMaxNstations>;
///
class L1Algo {
public:
L1Algo(unsigned int nThreads = 1);
L1Algo(const L1Algo&) = delete;
......@@ -154,7 +153,7 @@ 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)
......@@ -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
......@@ -234,13 +233,11 @@ public:
/// 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
......@@ -405,7 +402,7 @@ private:
L1InitManager fInitManager {&fParameters}; ///< Object of L1Algo initialization manager class
/*********************************************************************************************//**
/*********************************************************************************************/ /**
* ------ FUNCTIONAL PART ------
************************************************************************************************/
......@@ -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,
......
......@@ -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_)
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......@@ -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);
......@@ -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
///
)
{
......@@ -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
**********************************/
......@@ -1658,7 +1663,7 @@ void L1Algo::CATrackFinder()
static Tindex stat_nTrCandidates[fNFindIterations] = {0};
#endif
/********************************//**
/********************************/ /**
* CATrackFinder routine setting
***********************************/
......@@ -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,7 +2130,8 @@ 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.
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
......@@ -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();
......
......@@ -68,6 +68,4 @@ T finite(T x)
typedef int index_type;
#endif
......@@ -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.;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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)
......
......@@ -230,9 +230,6 @@ private:
int fTrackingLevel {0}; ///< tracking level
int fGhostSuppression {0}; ///< flag: if true, ghost tracks are suppressed
float fMomentumCutOff {0}; ///< minimum momentum of tracks TODO: ?
};
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment