LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArTrainingData.h
Go to the documentation of this file.
1 // \file TrainingData.h
5 // \author radovic -- a.radovic@gmail.com
7 #ifndef LCVN_TRAININGDATA_H
8 #define LCVN_TRAININGDATA_H
9 
10 #include <iostream>
11 #include <ostream>
12 
16 
17 namespace lcvn {
18 
19  class TDNuInfo {
20  public:
21  TDNuInfo();
22 
23  void SetTruthInfo(float nuEnergy, float lepEnergy, float lepAngle, float weight);
24  void SetRecoInfo(float nueEnergy, float numuEnergy, float nutauEnergy);
25 
26  // Set topology information separately to save having a large number of
27  // arguments in the constructor.
28  void SetTopologyInformation(int pdg,
29  int nproton,
30  int npion,
31  int npizero,
32  int nneutron,
33  int toptype,
34  int toptypealt);
35 
36  friend std::ostream& operator<<(std::ostream& os, const TDNuInfo& td);
37 
38  private:
39  float fNuEnergy;
40  float fLepEnergy;
41  float fLepAngle;
42  float fEventWeight;
43 
47 
48  // If we are using topology information, store it here
50  int fNuPDG;
51  int fNProton;
52  int fNPion;
53  int fNPizero;
54  int fNNeutron;
57  };
58 
61 
62  template <class T>
64 
65  public:
67  LArTrainingData(const InteractionType& interaction, const PixelMap& pMap, const T info);
68 
69  unsigned int NOutput() const { return (unsigned int)kNIntType; };
70 
71  void FillOutputVector(float* output) const;
72 
75  T fInfo;
76  };
77 
79 } // end namespace
80 
81 #endif // CVN_TRAININGDATA_H
82 
LArTrainingData< lcvn::TDNuInfo > LArTrainingNuData
float fNuEnergy
True energy of neutrino event.
float fEventWeight
The event weight (norm * oscProb)
float fRecoNumuEnergy
Reconstructed energy under numu hypothesis.
float fRecoNueEnergy
Reconstructed energy under nue hypothesis.
friend std::ostream & operator<<(std::ostream &os, const TDNuInfo &td)
float fLepAngle
True angle of outgoing lepton wrt neutrino.
float fRecoNutauEnergy
Reconstructed energy under nutau hypothesis.
unsigned int NOutput() const
PixelMap, basic input to CVN neural net.
Definition: PixelMap.h:20
Utility class for truth labels.
PixelMap for CVN.
void SetTopologyInformation(int pdg, int nproton, int npion, int npizero, int nneutron, int toptype, int toptypealt)
void SetRecoInfo(float nueEnergy, float numuEnergy, float nutauEnergy)
double weight
Definition: plottest35.C:25
The TrainingData objects contains a PixelMap and the output class type, and any other bit that goes i...
void SetTruthInfo(float nuEnergy, float lepEnergy, float lepAngle, float weight)
Number of interaction types, used like a vector size.
PixelMap fPMap
PixelMap for the event.
InteractionType fInt
Class of the event.
float fLepEnergy
True energy of outgoing lepton.