39 edm4hep::ParticleIDCollection pid_col;
40 edm4hep::RecDqdxCollection dqdx_col;
44 if (lmtpc <= 0)
return;
46 if (!particle)
return;
48 const float dedx80 = ph::Q(lmtpc + 2);
49 const float sigma80 = ph::Q(lmtpc + 3);
50 const float dedx65 = ph::Q(lmtpc + 4);
51 const float sigma65 = ph::Q(lmtpc + 5);
52 const float dedx_int = ph::Q(lmtpc + 6);
53 const int p7 =
static_cast<int>(std::lround(ph::Q(lmtpc + 7)));
54 const int p8 =
static_cast<int>(std::lround(ph::Q(lmtpc + 8)));
55 const int p10 =
static_cast<int>(std::lround(ph::Q(lmtpc + 10)));
56 const int padpat =
static_cast<int>(std::lround(ph::Q(lmtpc + 15)));
57 const int nPads = p7 % 100;
58 const int nWires = p8 % 1000;
59 const int nSat = p10 % 1000;
60 const int nEmpty = p10 / 1000;
62 auto pid = pid_col.create();
63 pid.setAlgorithmType(kAlgoMtpcExt);
64 pid.addToParameters(dedx80);
65 pid.addToParameters(sigma80);
66 pid.addToParameters(dedx65);
67 pid.addToParameters(sigma65);
68 pid.addToParameters(dedx_int);
69 pid.addToParameters(
static_cast<float>(nPads));
70 pid.addToParameters(
static_cast<float>(nWires));
71 pid.addToParameters(
static_cast<float>(nSat));
72 pid.addToParameters(
static_cast<float>(nEmpty));
73 pid.addToParameters(
static_cast<float>(padpat));
74 pid.setParticle(*particle);
77 auto dq = dqdx_col.create();
86 for (
const auto& trk : particle->getTracks()) { dq.setTrack(trk);
break; }