19#ifdef TRDPID_WITH_ONNX
33 if (trk.getIsCrossingNeighbor(
layer) && trk.getHasNeighbor()) {
34 for (
const auto& trklt : input.getTRDTracklets()) {
35 if (std::abs(tracklet.getPadCol() - trklt.getPadCol()) <= 1 && std::abs(tracklet.getPadRow() - trklt.getPadRow()) == 1) {
36 if (tracklet.getTrackletWord() == trklt.getTrackletWord()) {
41 const auto [aQ0, aQ1, aQ2] = correctCharges(tracklet, snp, tgl);
42 const auto [bQ0, bQ1, bQ2] = correctCharges(tracklet, snp, tgl);
43 return {aQ0 + bQ0, aQ1 + bQ1, aQ2 + bQ2};
48 return correctCharges(tracklet, snp, tgl);
51std::array<float, constants::NCHARGES> PIDBase::correctCharges(
const Tracklet64& trklt,
float snp,
float tgl)
const noexcept
53 auto tphi = snp / std::sqrt((1.f - snp) + (1.f + snp));
54 auto trackletLength = std::sqrt(1.f + tphi * tphi + tgl * tgl);
55 const float correction = mLocalGain->getValue(trklt.getHCID() / 2, trklt.getPadCol(), trklt.getPadRow()) * trackletLength;
57 trklt.getQ0() / correction,
58 trklt.getQ1() / correction,
59 trklt.getQ2() / correction,
65 LOG(info) <<
"Creating PID policy. Loading model " << policy;
73#ifdef TRDPID_WITH_ONNX
75 return std::make_unique<XGB>(PIDPolicy::XGB);
77 return std::make_unique<PY>(PIDPolicy::PY);
This file provides a dummy model, which only outputs -1.f.
This file provides the interface for loglikehood policies.
This file provides the base for ML policies.
This file provides the base interface for pid policies.
std::array< float, constants::NCHARGES > getCharges(const Tracklet64 &tracklet, const int layer, const TrackTRD &trk, const o2::globaltracking::RecoContainer &input, float snp, float tgl) const noexcept
GLenum GLuint GLint GLint layer
std::unique_ptr< PIDBase > getTRDPIDPolicy(PIDPolicy policy)
Factory function to create a PID policy.
PIDPolicy
Option for available PID policies.
@ LQ3D
3-Dimensional Likelihood model
@ LQ2D
2-Dimensional Likelihood model
@ Dummy
Dummy object outputting -1.f.
@ LQ1D
1-Dimensional Likelihood model
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"