TrainingData.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file TrainingData.h
3 /// \brief The TrainingData objects contains a PixelMap and the
4 /// output class type, and any other bit that goes into the ANN
5 // \author radovic -- a.radovic@gmail.com
6 
7 //#include "art/Framework/Services/Registry/ServiceHandle.h"
8 
10 //#include "MCCheater/BackTracker.h"
11 
12 namespace cvn
13 {
14 
16  float nuEnergy, float lepEnergy,
17  float nueEnergy, float numuEnergy,
18  float nutauEnergy, float weight,
19  const PixelMap& pMap):
20  fInt(interaction),
21  fNuEnergy(nuEnergy),
22  fLepEnergy(lepEnergy),
23  fRecoNueEnergy(nueEnergy),
24  fRecoNumuEnergy(numuEnergy),
25  fRecoNutauEnergy(nutauEnergy),
26  fEventWeight(weight),
27  fUseTopology(false),
28  fNuPDG(0),
29  fNProton(-1),
30  fNPion(-1),
31  fNPizero(-1),
32  fNNeutron(-1),
33  fTopologyType(-1),
34  fTopologyTypeAlt(-1),
35  fPMap(pMap)
36  { }
37 
38 
40  {
41  for(unsigned int i = 0; i < kNIntType; ++i)
42  output[i] = 0;
43 
44  output[fInt] = 1;
45  }
46 
48  int npion, int npizero, int nneutron, int toptype,
49  int toptypealt){
50 
51  fUseTopology = true;
52 
53  fNuPDG = pdg;
54  fNProton = nproton;
55  fNPion = npion;
56  fNPizero = npizero;
57  fNNeutron = nneutron;
58 
59  fTopologyType = toptype;
60  fTopologyTypeAlt = toptypealt;
61 
62  }
63 
64 } // end namespace cvn
65 ////////////////////////////////////////////////////////////////////////
InteractionType fInt
Class of the event.
Definition: TrainingData.h:41
enum cvn::Interaction InteractionType
Utility class for truth labels.
void FillOutputVector(float *output) const
weight
Definition: test.py:257
Number of interaction types, used like a vector size.
PixelMap, basic input to CVN neural net.
Definition: PixelMap.h:22
void SetTopologyInformation(int pdg, int nproton, int npion, int npizero, int nneutron, int toptype, int toptypealt)