Skip to content

Commit

Permalink
CP
Browse files Browse the repository at this point in the history
  • Loading branch information
mconcas committed Sep 9, 2024
1 parent 43f99a5 commit 4c56558
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Common/DCAFitter/GPU/cuda/DCAFitterN.cu
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GPUg() void printKernel(o2::vertexing::DCAFitterN<2>* ft)
{
if (threadIdx.x == 0) {
printf(" =============== GPU DCA Fitter ================\n");
// ft->print();
ft->print();
printf(" ===============================================\n");
}
}
Expand Down
4 changes: 1 addition & 3 deletions Common/DCAFitter/GPU/cuda/test/main_prog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ int run()

double bz = 5.0;
std::vector<int> forceQ{1, 1};
std::cout << "running... " << std::endl;
o2::vertexing::DCAFitterN<2> ft; // 2 prong fitter
ft.setBz(bz);
ft.setPropagateToPCA(true); // After finding the vertex, propagate tracks to the DCA. This is default anyway
Expand All @@ -123,12 +122,11 @@ int run()
ft.setMinParamChange(1e-3); // stop iterations if max correction is below this value. This is default anyway
ft.setMinRelChi2Change(0.9); // stop iterations if chi2 improves by less that this factor

std::cout << "running... " << std::endl;
auto genParent = generate(vtxGen, vctracks, bz, genPHS, k0, k0dec, forceQ);
std::cout << "running... " << std::endl;
ft.setUseAbsDCA(true);
auto res = ft.process(vctracks[0], vctracks[1]);
ft.print();
std::cout << " => " << sizeof(DCAFitterN<2>) << std::endl;
std::cout << "returned value: " << res << std::endl;

// o2::vertexing::gpu::doPrintOnDevice(&ft);
Expand Down
13 changes: 13 additions & 0 deletions Common/DCAFitter/include/DCAFitter/DCAFitterN.h
Original file line number Diff line number Diff line change
Expand Up @@ -1011,10 +1011,23 @@ GPUd() bool DCAFitterN<N, Args...>::closerToAlternative() const
template <int N, typename... Args>
GPUd() void DCAFitterN<N, Args...>::print() const
{
#if !defined(GPUCA_GPUCODE)
LOG(info) << N << "-prong vertex fitter in " << (mUseAbsDCA ? "abs." : "weighted") << " distance minimization mode";
LOG(info) << "Bz: " << mBz << " MaxIter: " << mMaxIter << " MaxChi2: " << mMaxChi2;
LOG(info) << "Stopping condition: Max.param change < " << mMinParamChange << " Rel.Chi2 change > " << mMinRelChi2Change;
LOG(info) << "Discard candidates for : Rvtx > " << getMaxR() << " DZ between tracks > " << mMaxDZIni;
#endif
#if defined(GPUCA_GPUCODE_DEVICE)
// if (mUseAbsDCA) {
printf("test %d\n", sizeof(DCAFitterN<2>));
// printf("%d-prong vertex fitter in abs. distance minimization mode\n", N);
// // } else {
// printf("%d-prong vertex fitter in weighted distance minimization mode\n", N);
// // }
// printf("Bz: %f MaxIter: %d MaxChi2: %f\n", mBz, mMaxIter, mMaxChi2);
// printf("Stopping condition: Max.param change < %f Rel.Chi2 change > %f\n", mMinParamChange, mMinRelChi2Change);
// printf("Discard candidates for : Rvtx > %f DZ between tracks > %f", getMaxR(), mMaxDZIni);
#endif
}

//___________________________________________________________________
Expand Down

0 comments on commit 4c56558

Please sign in to comment.