LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Result.h
Go to the documentation of this file.
1 
8 #ifndef LCVN_RESULT_H
9 #define LCVN_RESULT_H
10 
12 #include <math.h>
13 #include <vector>
14 
15 namespace lcvn {
17  class Result {
18  public:
19  Result(const float* output, unsigned int& nOutputs);
20  // Vector version of the constructor
21  Result(const std::vector<std::vector<float>> output);
22  //Result(const float* output, unsigned int& nOutputs, const float* features, unsigned int& nFeatures);
23  Result();
24 
26  unsigned int ArgMax(int output_n) const;
27 
29  float Max();
30 
33 
36 
39 
42 
45 
48 
51 
53  float GetIsAntineutrinoProbability() const;
54 
56  float GetNumuProbability() const;
57 
59  float GetNueProbability() const;
60 
62  float GetNutauProbability() const;
63 
65  float GetNCProbability() const;
66 
68  float GetQEProbability() const;
69 
71  float GetResProbability() const;
72 
74  float GetDISProbability() const;
75 
77  float GetOtherProbability() const;
78 
80  float Get0protonsProbability() const;
81 
83  float Get1protonsProbability() const;
84 
86  float Get2protonsProbability() const;
87 
89  float GetNprotonsProbability() const;
90 
92  float Get0pionsProbability() const;
93 
95  float Get1pionsProbability() const;
96 
98  float Get2pionsProbability() const;
99 
101  float GetNpionsProbability() const;
102 
104  float Get0pizerosProbability() const;
105 
107  float Get1pizerosProbability() const;
108 
110  float Get2pizerosProbability() const;
111 
113  float GetNpizerosProbability() const;
114 
116  float Get0neutronsProbability() const;
117 
119  float Get1neutronsProbability() const;
120 
122  float Get2neutronsProbability() const;
123 
125  float GetNneutronsProbability() const;
126 
128  unsigned int NOutput();
129 
130  std::vector<std::vector<float>> fOutput;
131  };
132 }
133 
134 #endif // CVN_RESULT_H
float Get1neutronsProbability() const
Return the 1 neutrons topology probability.
Definition: Result.cxx:319
float GetQEProbability() const
Return the CC QE interaction probability.
Definition: Result.cxx:166
TFTopologyPions PredictedPions() const
Return the predicted pions.
Definition: Result.cxx:83
TFTopologyProtons
float GetNueProbability() const
Return the nue flavour probability.
Definition: Result.cxx:121
float GetNutauProbability() const
Return the nutau flavour probability.
Definition: Result.cxx:132
Utility class for truth labels.
float Get1pizerosProbability() const
Return the 1 pizeros topology probability.
Definition: Result.cxx:283
float Get1pionsProbability() const
Return the 1 pions topology probability.
Definition: Result.cxx:247
TFFlavour PredictedFlavour() const
Return the predicted flavour.
Definition: Result.cxx:65
float Get2pizerosProbability() const
Return the 2 pizeros topology probability.
Definition: Result.cxx:292
float Get0pizerosProbability() const
Return the 0 pizeros topology probability.
Definition: Result.cxx:274
TFTopologyNeutrons PredictedNeutrons() const
Return the predicted neutrons.
Definition: Result.cxx:95
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
TFInteraction PredictedInteraction() const
Return the predicted interaction.
Definition: Result.cxx:71
TFTopologyPizeros PredictedPizeros() const
Return the predicted pizeros.
Definition: Result.cxx:89
float Get0pionsProbability() const
Return the 0 pions topology probability.
Definition: Result.cxx:238
float GetNneutronsProbability() const
Return the >2 neutrons topology probability.
Definition: Result.cxx:337
float GetDISProbability() const
Return the CC DIS interaction probability.
Definition: Result.cxx:184
float GetNCProbability() const
Return the NC probability.
Definition: Result.cxx:143
TFTopologyPizeros
TFTopologyNeutrons
float Get1protonsProbability() const
Return the 1 protons topology probability.
Definition: Result.cxx:211
float Get2neutronsProbability() const
Return the 2 neutrons topology probability.
Definition: Result.cxx:328
float Max()
Maximum value in vector.
float GetIsAntineutrinoProbability() const
Return the is_antineutrino probability.
Definition: Result.cxx:101
TFIsAntineutrino
float Get0neutronsProbability() const
Return the 0 neutrons topology probability.
Definition: Result.cxx:310
float GetNumuProbability() const
Return the numu flavour probability.
Definition: Result.cxx:110
float GetResProbability() const
Return the CC Res interaction probability.
Definition: Result.cxx:175
float GetNpizerosProbability() const
Return the >2 pizeros topology probability.
Definition: Result.cxx:301
Result, basic output of CVN neural net.
Definition: Result.h:17
unsigned int ArgMax(int output_n) const
Index of maximum value in vector.
Definition: Result.cxx:34
TFTopologyProtons PredictedProtons() const
Return the predicted protons.
Definition: Result.cxx:77
std::vector< std::vector< float > > fOutput
Vector of outputs from neural net.
Definition: Result.h:130
float GetNpionsProbability() const
Return the >2 pions topology probability.
Definition: Result.cxx:265
float GetNprotonsProbability() const
Return the >2 protons topology probability.
Definition: Result.cxx:229
unsigned int NOutput()
Number of outputs, i.e. size of vector.
float Get2pionsProbability() const
Return the 2 pions topology probability.
Definition: Result.cxx:256
TFIsAntineutrino PredictedIsAntineutrino() const
Return the predicted is_antineutrino.
Definition: Result.cxx:59
float GetOtherProbability() const
Return the CC Other interaction probability.
Definition: Result.cxx:193
float Get2protonsProbability() const
Return the 2 protons topology probability.
Definition: Result.cxx:220
float Get0protonsProbability() const
Return the 0 protons topology probability.
Definition: Result.cxx:202