14 printf(
"MkFitter alignment check:\n");
24 for (
int i = 0;
i <
NN; ++
i) {
31 for (
int hi = 0; hi < end_hit; ++hi) {
40 for (
int hi = 0; hi < end_hit; ++hi) {
51 const std::vector<HitVec>& layerHits,
61 for (
int i = beg;
i <
end; ++
i, ++itrack) {
62 const Track& trk = tracks[
i];
72 for (
int hi = 0; hi <
m_Nhits; ++hi) {
79 const Hit&
hit = layerHits[hi][hidx];
87 const std::vector<LayerOfHits>& layerHits,
97 for (
int i = beg;
i <
end; ++
i) {
99 const Track& trk = tracks[
i];
110 for (
int hi = 0; hi <
m_Nhits; ++hi) {
113 const Hit&
hit = layerHits[hlyr].refHit(hidx);
124 const std::vector<HitVec>& layerHits,
134 for (
int i = beg;
i <
end; ++
i) {
135 int itrack =
i - beg;
136 const Track& trk = tracks[
i];
149 for (
int hi = 0; hi <
m_Nhits; ++hi) {
152 for (
int i = beg;
i <
end; ++
i) {
153 const int hidx = tracks[
i].getHitIdx(hi);
154 const Hit&
hit = layerHits[hi][hidx];
156 m_HoTArr[hi](
i - beg, 0, 0) = tracks[
i].getHitOnTrack(hi);
171 const int iI = inputProp ?
iP :
iC;
174 for (
int i = beg;
i <
end; ++
i, ++itrack) {
175 const Track& trk = tracks[
i];
184 for (
int hi = 0; hi <
m_Nhits; ++hi) {
200 const int iI = inputProp ?
iP :
iC;
203 for (
int i = beg;
i <
end; ++
i, ++itrack) {
216 for (
int hi = 0; hi <
m_Nhits; ++hi) {
223 const std::vector<Track>&
tracks,
224 const std::vector<HitVec>& layerHits,
233 for (
int i = beg;
i <
end; ++
i) {
236 const Track& see = seeds[
i];
251 for (
int hi = 0; hi <
m_Nhits; ++hi) {
258 const Hit&
hit = layerHits[hi][hidx];
284 for (
int i = beg;
i <
end; ++
i, ++itrack) {
285 const Track& trk = tracks[
i];
315 for (
int i = 0;
i < N_proc; ++
i) {
324 if (hidx < 0 || hlyr < 0) {
327 mhp.
addInput(layersohits[hlyr][hidx]);
348 for (
int i = beg;
i <
end; ++
i, ++itrack) {
350 m_Par[iCP].
copyOut(itrack, tracks[
i].parameters_nc().Array());
352 tracks[
i].setCharge(
m_Chg(itrack, 0, 0));
355 tracks[
i].setChi2(
m_Chi2(itrack, 0, 0));
356 tracks[
i].setLabel(
m_Label(itrack, 0, 0));
364 const int iO = outputProp ?
iP :
iC;
367 for (
int i = beg;
i <
end; ++
i, ++itrack) {
369 m_Par[iO].
copyOut(itrack, tracks[
i].parameters_nc().Array());
371 tracks[
i].setCharge(
m_Chg(itrack, 0, 0));
372 tracks[
i].setChi2(
m_Chi2(itrack, 0, 0));
373 tracks[
i].setLabel(
m_Label(itrack, 0, 0));
377 tracks[
i].resetHits();
379 for (
int hi = 0; hi <
m_Nhits; ++hi) {
380 tracks[
i].addHitIdx(
m_HoTArr[hi](itrack, 0, 0), 0.);
const SVector6 & parameters() const
void addInput(const D &item)
int countValidHits(int itrack, int end_hit) const
void copyIn(idx_t n, const T *arr)
MPlexHV m_msPar[Config::nMaxTrkHits]
void kalmanUpdate(const MPlexLS &psErr, const MPlexLV &psPar, const MPlexHS &msErr, const MPlexHV &msPar, MPlexLS &outErr, MPlexLV &outPar, const int N_proc)
void outputFittedTracksAndHitIdx(std::vector< Track > &tracks, int beg, int end, bool outputProp) const
void copyOut(idx_t n, T *arr) const
void addInput(const T &item)
auto const & tracks
cannot be loose
void inputSeedsTracksAndHits(const std::vector< Track > &seeds, const std::vector< Track > &tracks, const std::vector< HitVec > &layerHits, int beg, int end)
void inputTracksAndHitIdx(const std::vector< Track > &tracks, int beg, int end, bool inputProp)
int countInvalidHits(int itrack, int end_hit) const
void inputTracksForFit(const std::vector< Track > &tracks, int beg, int end)
const float * errArray() const
constexpr std::array< uint8_t, layerIndexSize > layer
HitOnTrack getHitOnTrack(int posHitIdx) const
void fitTracksWithInterSlurp(const std::vector< HitVec > &layersohits, int N_proc)
void outputTracks(std::vector< Track > &tracks, int beg, int end, int iCP) const
void slurpInTracksAndHits(const std::vector< Track > &tracks, const std::vector< HitVec > &layerHits, int beg, int end)
static const PropagationConfig & get_default()
void align_check(const char *pref, void *adr)
const float * posArray() const
void pack(TM &mplex, int base_offset)
const SMatrixSym66 & errors() const
int getHitIdx(int posHitIdx) const
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
constexpr Matriplex::idx_t NN
void propagateTracksToHitR(const MPlexHV &par, const int N_proc, const PropagationFlags pf, const MPlexQI *noMatEffPtr=nullptr)
int getHitLyr(int posHitIdx) const
const HitOnTrack * getHitsOnTrackArray() const
void pack(TMerr &err, TMpar &par)
MPlexQHoT m_HoTArr[Config::nMaxTrkHits]
char data[epos_bytes_allocation]
void copyIn(idx_t n, const T *arr)
MPlexHS m_msErr[Config::nMaxTrkHits]
void copyOut(idx_t n, T *arr) const
void inputTracksAndHits(const std::vector< Track > &tracks, const std::vector< HitVec > &layerHits, int beg, int end)