3 #include "TClonesArray.h"
5 #include "Math/PdfFuncMathCore.h"
40 std::vector<Track*> all_kaons;
43 if (DataStore->find(
"TracksForPID") != DataStore->end()) {
44 for (
auto track : std::any_cast<std::vector<Track*>>((*DataStore)[
"TracksForPID"])) {
46 all_kaons.push_back(track);
55 all_kaons.push_back(track);
58 std::vector<Track*> tracks_for_PID;
62 tracks_for_PID.push_back(track);
64 (*DataStore)[
"TracksForPID"] = tracks_for_PID;
68 std::vector<Track*> reconstructed_kaons = SelectorFcn<Track>(all_kaons, [](Track*
t){
return (
t->PT >= 0.1); });
70 std::vector<Track*> tracks_for_PID = std::any_cast<std::vector<Track*>>((*DataStore)[
"TracksForPID"]);
71 for (
auto kaon : reconstructed_kaons) {
72 tracks_for_PID.erase(std::find(tracks_for_PID.begin(), tracks_for_PID.end(), kaon));
74 (*DataStore)[
"TracksForPID"] = tracks_for_PID;
77 (*DataStore)[
"Kaons"] = reconstructed_kaons;
86 bool TrackIsKaon =
false;
96 int track_truth = track->PID;
98 if (TMath::Abs(track_truth) == 321) {
100 if (gRandom->Uniform(0, 1) <= kIDprob) {
108 }
else if (TMath::Abs(track_truth) == 211) {
110 if (gRandom->Uniform(0,1) <= ROOT::Math::gaussian_pdf(separation)) {