Skip to content
Snippets Groups Projects

Ca: move L1TrackPar class to /algo

Merged Sergey Gorbunov requested to merge se.gorbunov/cbmroot:CaTrackParam into master
All threads resolved!
Compare and
76 files
+ 2603
2174
Compare changes
  • Side-by-side
  • Inline

Files

+ 15
39
@@ -2,24 +2,24 @@
SPDX-License-Identifier: GPL-3.0-only
Authors: Ivan Kisel, Sergey Gorbunov, Maksym Zyzak, Igor Kulakov [committer], Sergei Zharko */
/// \file CaTrack.h
/// \brief header file for the ca::Track class
/// \since 02.06.2022
/// \author S.Zharko <s.zharko@gsi.de>
#ifndef CBM_ALGO_CA_TRACK
#define CBM_ALGO_CA_TRACK 1
#ifndef CaTrack_h
#define CaTrack_h 1
#include <boost/serialization/access.hpp>
#include "CaConstants.h"
#include "CaSimd.h"
#include "CaTrackParam.h"
namespace cbm::algo::ca
{
/// @class cbm::algo::ca::Track
/// @brief Class representing an output track in the CA tracking algorithm
/// \class cbm::algo::ca::Track
/// \brief Class representing an output track in the CA tracking algorithm
///
/// Track parameters vector: {x, y, tx, ty, q/p, z, t, vi}
/// Covariation matrix: C[20] (C55) corresponds to the time variance
@@ -28,49 +28,25 @@ namespace cbm::algo::ca
public:
friend class boost::serialization::access;
Track()
{
fParFirst.fill(constants::undef::Fscal);
fParLast.fill(constants::undef::Fscal);
fParPV.fill(constants::undef::Fscal);
fCovFirst.fill(constants::undef::Fscal);
fCovLast.fill(constants::undef::Fscal);
fCovPV.fill(constants::undef::Fscal);
}
Track() = default;
template<class Archive>
void serialize(Archive& ar, const unsigned int /*version*/)
{
ar& fNofHits;
for (int i = 0; i < NparTr; ++i) {
ar& fParFirst[i];
ar& fParLast[i];
ar& fParPV[i];
}
for (int i = 0; i < NparCov; ++i) {
ar& fCovFirst[i];
ar& fCovLast[i];
ar& fCovPV[i];
}
ar& fChi2;
ar& fNDF;
ar& fParFirst;
ar& fParLast;
ar& fParPV;
}
public:
static constexpr int NparTr {8};
static constexpr int NparCov {28};
int fNofHits {constants::Undef<int>}; ///< Number of hits in track
int fNofHits {constants::undef::Int}; ///< Number of hits in track
std::array<fscal, NparTr> fParFirst; ///< Track parameters on the first station
std::array<fscal, NparCov> fCovFirst; ///< Track parameter covariation matrix elements on the first station
std::array<fscal, NparTr> fParLast; ///< Track parameters on the last station
std::array<fscal, NparCov> fCovLast; ///< Track parameter covariation matrix elements on the second station
std::array<fscal, NparTr> fParPV; ///< Track parameters in the primary vertex
std::array<fscal, NparCov> fCovPV; ///< Track parameter covariation matrix elements in the primary vertex
fscal fChi2 {constants::undef::Fscal}; ///< Track fit chi-square value
int fNDF {constants::undef::Int}; ///< Track fit NDF value
TrackParamS fParFirst; ///< Track parameters on the first station
TrackParamS fParLast; ///< Track parameters on the last station
TrackParamS fParPV; ///< Track parameters in the primary vertex
};
} // namespace cbm::algo::ca
#endif // CBM_ALGO_CA_TRACK
#endif // CaTrack_h
Loading