Classes | Typedefs | Enumerations | Functions
cvn Namespace Reference

Utility class for truth labels. More...

Classes

class  AssignLabels
 
class  Boundary
 
class  CVNEvaluator
 
class  CVNEventDump
 
class  CVNEventDumpProtoDUNE
 
class  CVNImageUtils
 Class containing some utility functions for all things CVN. More...
 
class  CVNMapper
 
class  CVNMapperProtoDUNE
 
class  CVNMapperSim
 
class  CVNMapperWire
 
class  CVNProtoDUNEUtils
 
class  CVNSparseMapper
 
class  CVNSparseMapper3D
 
class  CVNSparseROOT
 
class  CVNValidation
 
class  CVNZlibMaker
 
class  CVNZlibMakerProtoDUNE
 
class  GCNFeatureUtils
 Class containing some utility functions for all things CVN. More...
 
class  GCNGraph
 GCNGraph, basic input for the GCN. More...
 
class  GCNGraphMaker
 
class  GCNGraphMaker2D
 
class  GCNGraphMakerProtoDUNE
 
class  GCNGraphNode
 
class  GCNH5
 
class  GCNHitGraphMaker
 
class  GCNParticleFlow
 GCNParticleFlow, a map of true particles to their parents. More...
 
class  GCNZlibMaker
 
class  GCNZlibMakerProtoDUNE
 
class  PixelMap
 PixelMap, basic input to CVN neural net. More...
 
class  PixelMapProducer
 Producer algorithm for PixelMap, input to CVN neural net. More...
 
class  PixelMapSimProducer
 Producer algorithm for PixelMap, input to CVN neural net. More...
 
class  PixelMapWireProducer
 Producer algorithm for PixelMap, input to CVN neural net. More...
 
class  Result
 Result, basic output of CVN neural net. More...
 
class  SparsePixelMap
 
class  TFNetHandler
 Wrapper for caffe::Net which handles construction and prediction. More...
 
class  TrainingData
 The TrainingData objects contains a PixelMap and the output class type, and any other bit that goes into the ANN. More...
 

Typedefs

typedef std::vector< std::vector< unsigned char > > ViewVector
 Useful typedefs. More...
 
typedef std::vector< ViewVectorImageVector
 
typedef std::vector< std::vector< float > > ViewVectorF
 
typedef std::vector< ViewVectorFImageVectorF
 
typedef std::tuple< int, int, int, float, float, float, float, float, float, float, std::string, std::stringptruth
 
typedef enum cvn::HType HitType
 
typedef enum cvn::Interaction InteractionType
 
typedef enum cvn::TFResult TFResultType
 Enumeration to describe the order of the TF network output. More...
 
typedef enum cvn::TFMultioutputs TFMultioutputsType
 
typedef enum cvn::TFIsAntineutrino TFIsAntineutrinoType
 
typedef enum cvn::TFFlavour TFFlavourType
 
typedef enum cvn::TFInteraction TFInteractionType
 
typedef enum cvn::TFTopologyProtons TFTopologyProtonsType
 
typedef enum cvn::TFTopologyPions TFTopologyPionsType
 
typedef enum cvn::TFTopologyPizeros TFTopologyPizerosType
 
typedef enum cvn::TFTopologyNeutrons TFTopologyNeutronsType
 
typedef enum cvn::tau_type TauType
 
typedef enum cvn::topology_type TopologyType
 
typedef enum cvn::topology_type_alt TopologyTypeAlt
 

Enumerations

enum  HType {
  kElectronHit, kMuonHit, kProtonHit, kNeutronHit,
  kPionHit, kPiZeroHit, kGammaHit, kOtherPDGhit,
  kUnknownHit, kEmptyHit
}
 
enum  Interaction {
  kNumuQE, kNumuRes, kNumuDIS, kNumuOther,
  kNueQE, kNueRes, kNueDIS, kNueOther,
  kNutauQE, kNutauRes, kNutauDIS, kNutauOther,
  kNuElectronElastic, kNC, kCosmic, kOther,
  kNIntType
}
 
enum  TFResult {
  kTFNumuQE, kTFNumuRes, kTFNumuDIS, kTFNumuOther,
  kTFNueQE, kTFNueRes, kTFNueDIS, kTFNueOther,
  kTFNutauQE, kTFNutauRes, kTFNutauDIS, kTFNutauOther,
  kTFNC
}
 Enumeration to describe the order of the TF network output. More...
 
enum  TFMultioutputs {
  is_antineutrino, flavour, interaction, protons,
  pions, pizeros, neutrons
}
 
enum  TFIsAntineutrino { kNeutrino, kAntineutrino }
 
enum  TFFlavour { kFlavNumuCC, kFlavNueCC, kFlavNutauCC, kFlavNC }
 
enum  TFInteraction { kInteQECC, kInteResCC, kInteDISCC, kInteOtherCC }
 
enum  TFTopologyProtons { kTop0proton, kTop1proton, kTop2proton, kTopNproton }
 
enum  TFTopologyPions { kTop0pion, kTop1pion, kTop2pion, kTopNpion }
 
enum  TFTopologyPizeros { kTop0pizero, kTop1pizero, kTop2pizero, kTopNpizero }
 
enum  TFTopologyNeutrons { kTop0neutron, kTop1neutron, kTop2neutron, kTopNneutron }
 
enum  tau_type { kNotNutau, kNutauE, kNutauMu, kNutauHad }
 
enum  topology_type {
  kTopNue, kTopNumu, kTopNutauE, kTopNutauMu,
  kTopNutauHad, kTopNC
}
 
enum  topology_type_alt { kTopNueLike, kTopNumuLike, kTopNutauLike, kTopNCLike }
 

Functions

std::ostream & operator<< (std::ostream &os, const PixelMapProducer &p)
 
std::ostream & operator<< (std::ostream &os, const PixelMapSimProducer &p)
 
std::ostream & operator<< (std::ostream &os, const PixelMapWireProducer &p)
 
bool check (const std::vector< std::vector< float > > &outputs)
 
void fillEmpty (std::vector< std::vector< float > > &outputs)
 
std::ostream & operator<< (std::ostream &os, const Boundary &b)
 
std::ostream & operator<< (std::ostream &os, const GCNGraph &m)
 
std::ostream & operator<< (std::ostream &os, const PixelMap &m)
 

Detailed Description

Utility class for truth labels.

The TrainingData objects contains a PixelMap and the output class type, and any other bit that goes into the ANN.

Defines an enumeration for interaction type.

Defines an enumeration for cellhit classification.

Typedef Documentation

typedef enum cvn::HType cvn::HitType

Definition at line 19 of file CVNImageUtils.h.

Definition at line 21 of file CVNImageUtils.h.

typedef std::tuple<int, int, int, float, float, float, float, float, float, float, std::string, std::string> cvn::ptruth

Definition at line 33 of file GCNFeatureUtils.h.

Enumeration to describe the order of the TF network output.

typedef std::vector<std::vector<unsigned char> > cvn::ViewVector

Useful typedefs.

Definition at line 18 of file CVNImageUtils.h.

Definition at line 20 of file CVNImageUtils.h.

Enumeration Type Documentation

enum cvn::HType
Enumerator
kElectronHit 
kMuonHit 
kProtonHit 
kNeutronHit 
kPionHit 
kPiZeroHit 
kGammaHit 
kOtherPDGhit 
kUnknownHit 
kEmptyHit 

Definition at line 14 of file HitType.h.

Enumerator
kNumuQE 

Numu CC QE interaction.

kNumuRes 

Numu CC Resonant interaction.

kNumuDIS 

Numu CC DIS interaction.

kNumuOther 

Numu CC, other than above.

kNueQE 

Nue CC QE interaction.

kNueRes 

Nue CC Resonant interaction.

kNueDIS 

Nue CC DIS interaction.

kNueOther 

Nue CC, other than above.

kNutauQE 

Nutau CC QE interaction.

kNutauRes 

Nutau CC Resonant interaction.

kNutauDIS 

Nutau CC DIS interaction.

kNutauOther 

Nutau CC, other than above.

kNuElectronElastic 

NC Nu On E Scattering.

kNC 

NC interaction.

kCosmic 

Cosmic ray background.

kOther 

Something else. Tau? Hopefully we don't use this.

kNIntType 

Number of interaction types, used like a vector size.

Definition at line 16 of file InteractionType.h.

17  {
18  kNumuQE, ///< Numu CC QE interaction
19  kNumuRes, ///< Numu CC Resonant interaction
20  kNumuDIS, ///< Numu CC DIS interaction
21  kNumuOther, ///< Numu CC, other than above
22  kNueQE, ///< Nue CC QE interaction
23  kNueRes, ///< Nue CC Resonant interaction
24  kNueDIS, ///< Nue CC DIS interaction
25  kNueOther, ///< Nue CC, other than above
26  kNutauQE, ///< Nutau CC QE interaction
27  kNutauRes, ///< Nutau CC Resonant interaction
28  kNutauDIS, ///< Nutau CC DIS interaction
29  kNutauOther, ///< Nutau CC, other than above
30  kNuElectronElastic,///< NC Nu On E Scattering
31  kNC, ///< NC interaction
32  kCosmic, ///< Cosmic ray background
33  kOther, ///< Something else. Tau? Hopefully we don't use this
34  kNIntType ///< Number of interaction types, used like a vector size
Nue CC QE interaction.
Nue CC DIS interaction.
NC Nu On E Scattering.
Nutau CC, other than above.
Nutau CC DIS interaction.
Nutau CC Resonant interaction.
enum cvn::Interaction InteractionType
Cosmic ray background.
Label NC:1, else 0.
Definition: cvnCreateDB.cc:55
Nue CC Resonant interaction.
Nue CC, other than above.
Numu CC Resonant interaction.
Number of interaction types, used like a vector size.
Something else. Tau? Hopefully we don&#39;t use this.
Numu CC QE interaction.
Nutau CC QE interaction.
Numu CC, other than above.
Numu CC DIS interaction.
Enumerator
kNotNutau 
kNutauE 
kNutauMu 
kNutauHad 

Definition at line 174 of file InteractionType.h.

174  {
175  kNotNutau,
176  kNutauE,
177  kNutauMu,
178  kNutauHad
179  } TauType;
enum cvn::tau_type TauType
Enumerator
kFlavNumuCC 
kFlavNueCC 
kFlavNutauCC 
kFlavNC 

Definition at line 75 of file InteractionType.h.

Enumerator
kInteQECC 
kInteResCC 
kInteDISCC 
kInteOtherCC 

Definition at line 84 of file InteractionType.h.

Enumerator
kNeutrino 
kAntineutrino 

Definition at line 68 of file InteractionType.h.

69  {
70  kNeutrino,
enum cvn::TFIsAntineutrino TFIsAntineutrinoType
Enumerator
is_antineutrino 
flavour 
interaction 
protons 
pions 
pizeros 
neutrons 

Definition at line 56 of file InteractionType.h.

Enumeration to describe the order of the TF network output.

Enumerator
kTFNumuQE 

Numu CC QE interaction.

kTFNumuRes 

Numu CC Resonant interaction.

kTFNumuDIS 

Numu CC DIS interaction.

kTFNumuOther 

Numu CC, other than above.

kTFNueQE 

Nue CC QE interaction.

kTFNueRes 

Nue CC Resonant interaction.

kTFNueDIS 

Nue CC DIS interaction.

kTFNueOther 

Nue CC, other than above.

kTFNutauQE 

Nutau CC QE interaction.

kTFNutauRes 

Nutau CC Resonant interaction.

kTFNutauDIS 

Nutau CC DIS interaction.

kTFNutauOther 

Nutau CC, other than above.

kTFNC 

NC interaction.

Definition at line 38 of file InteractionType.h.

39  {
40  kTFNumuQE, ///< Numu CC QE interaction
41  kTFNumuRes, ///< Numu CC Resonant interaction
42  kTFNumuDIS, ///< Numu CC DIS interaction
43  kTFNumuOther, ///< Numu CC, other than above
44  kTFNueQE, ///< Nue CC QE interaction
45  kTFNueRes, ///< Nue CC Resonant interaction
46  kTFNueDIS, ///< Nue CC DIS interaction
47  kTFNueOther, ///< Nue CC, other than above
48  kTFNutauQE, ///< Nutau CC QE interaction
49  kTFNutauRes, ///< Nutau CC Resonant interaction
50  kTFNutauDIS, ///< Nutau CC DIS interaction
51  kTFNutauOther, ///< Nutau CC, other than above
52  kTFNC ///< NC interaction
53  } TFResultType;
NC interaction.
enum cvn::TFResult TFResultType
Enumeration to describe the order of the TF network output.
Numu CC QE interaction.
Nutau CC Resonant interaction.
Nue CC, other than above.
Numu CC Resonant interaction.
Nue CC DIS interaction.
Numu CC, other than above.
Nue CC QE interaction.
Nutau CC DIS interaction.
Nutau CC QE interaction.
Nutau CC, other than above.
Nue CC Resonant interaction.
Numu CC DIS interaction.
Enumerator
kTop0neutron 
kTop1neutron 
kTop2neutron 
kTopNneutron 

Definition at line 120 of file InteractionType.h.

Enumerator
kTop0pion 
kTop1pion 
kTop2pion 
kTopNpion 

Definition at line 102 of file InteractionType.h.

103  {
104  kTop0pion,
105  kTop1pion,
106  kTop2pion,
107  kTopNpion
enum cvn::TFTopologyPions TFTopologyPionsType
Enumerator
kTop0pizero 
kTop1pizero 
kTop2pizero 
kTopNpizero 

Definition at line 111 of file InteractionType.h.

Enumerator
kTop0proton 
kTop1proton 
kTop2proton 
kTopNproton 

Definition at line 93 of file InteractionType.h.

Enumerator
kTopNue 
kTopNumu 
kTopNutauE 
kTopNutauMu 
kTopNutauHad 
kTopNC 

Definition at line 181 of file InteractionType.h.

Enumerator
kTopNueLike 
kTopNumuLike 
kTopNutauLike 
kTopNCLike 

Definition at line 190 of file InteractionType.h.

Function Documentation

bool cvn::check ( const std::vector< std::vector< float > > &  outputs)

Definition at line 42 of file TFNetHandler.cxx.

43  {
44  if (outputs.size() == 1) return true;
45  size_t aux = 0;
46  for (size_t o = 0; o < outputs.size(); ++o)
47  {
48  size_t aux2 = 0;
49 
50  for (size_t i = 0; i < outputs[o].size(); ++i)
51  if (outputs[o][i] == 0.0 || outputs[o][i] == 1.0)
52  aux2++;
53  if (aux2 == outputs[o].size()) aux++;
54  }
55  return aux == outputs.size() ? false : true;
56  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void cvn::fillEmpty ( std::vector< std::vector< float > > &  outputs)

Definition at line 59 of file TFNetHandler.cxx.

60  {
61  for (size_t o = 0; o < outputs.size(); ++o)
62  {
63  for (size_t i = 0; i < outputs[o].size(); ++i)
64  outputs[o][i] = -3.0;
65  }
66  return;
67  }
std::ostream & cvn::operator<< ( std::ostream &  os,
const Boundary b 
)

Definition at line 54 of file Boundary.cxx.

55  {
56  os<<"Boundary with "
57  <<"(first,last) wire X: (" << b.FirstWire(0)<<", "<< b.LastWire(0)
58  <<"(first,last) wire Y: (" << b.FirstWire(1)<<", "<< b.LastWire(1)
59  <<"(first,last) wire Z: (" << b.FirstWire(2)<<", "<< b.LastWire(2)
60  <<"), (first,last) tdc X: ("<<b.FirstTDC(0)<<", "<<b.LastTDC(0)<<")"
61  <<"), (first,last) tdc Y: ("<<b.FirstTDC(1)<<", "<<b.LastTDC(1)<<")"
62  <<"), (first,last) tdc Z: ("<<b.FirstTDC(2)<<", "<<b.LastTDC(2)<<")";
63 
64  return os;
65  }
static bool * b
Definition: config.cpp:1043
std::ostream& cvn::operator<< ( std::ostream &  os,
const PixelMapProducer p 
)

Definition at line 125 of file PixelMapProducer.cxx.

126  {
127  os << "PixelMapProducer: "
128  << p.NTdc() <<" tdcs X " << p.NWire() << " wires";
129  return os;
130  }
p
Definition: test.py:223
std::ostream& cvn::operator<< ( std::ostream &  os,
const PixelMapSimProducer p 
)

Definition at line 145 of file PixelMapSimProducer.cxx.

146  {
147  os << "PixelMapSimProducer: "
148  << p.NTdc() <<" tdcs X " << p.NWire() << " wires";
149  return os;
150  }
p
Definition: test.py:223
std::ostream& cvn::operator<< ( std::ostream &  os,
const PixelMapWireProducer p 
)

Definition at line 145 of file PixelMapWireProducer.cxx.

146  {
147  os << "PixelMapWireProducer: "
148  << p.NTdc() <<" tdcs X " << p.NWire() << " wires";
149  return os;
150  }
p
Definition: test.py:223
std::ostream & cvn::operator<< ( std::ostream &  os,
const GCNGraph m 
)

Definition at line 178 of file GCNGraph.cxx.

179  {
180  os << "GCNGraph with " << m.GetNumberOfNodes() << " nodes, ";
181  return os;
182  }
std::ostream & cvn::operator<< ( std::ostream &  os,
const PixelMap m 
)

Definition at line 236 of file PixelMap.cxx.

237  {
238  os << "PixelMap with " << m.NPixel() << " pixels, "
239  << m.NWire() << " wires"
240  << " by " << m.NTdc() << " tdcs" ;
241  return os;
242  }