utils.cxx
Go to the documentation of this file.
1 #include "utils.h"
2 
5 
6 std::vector<bool> getSliceIsMC(const std::vector<rb::Cluster> &slices)
7 {
8  std::vector<bool> result(slices.size(), false);
9 
11  if (! bt->HaveTruthInfo()) {
12  return result;
13  }
14 
15  std::vector<cheat::NeutrinoWithIndex> allMC;
16  std::vector<std::vector<cheat::NeutrinoEffPur>> sliceToMCTruthTable;
17 
18  allMC = bt->allMCTruth();
19  sliceToMCTruthTable = bt->SlicesToMCTruthsTable(slices);
20 
21  for (size_t sliceIdx = 0; sliceIdx < result.size(); sliceIdx++)
22  {
23  for (size_t mcIdx = 0; mcIdx < allMC.size(); mcIdx++)
24  {
25  auto &effPur = sliceToMCTruthTable[sliceIdx][mcIdx];
26 
27  if (effPur.efficiency > 0)
28  {
29  result[sliceIdx] = true;
30  break;
31  }
32  }
33  }
34 
35  return result;
36 }
37 
back track the reconstruction to the simulation
std::vector< bool > getSliceIsMC(const std::vector< rb::Cluster > &slices)
Definition: utils.cxx:6