AssignLabels.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file Assignlabels.h
3 ///\brief Utility class for truth labels
4 ///
5 // \author Leigh Whitehead leigh.howard.whitehead@cern.ch
6 ////////////////////////////////////////////////////////////////////////
7 #ifndef CVN_ASSIGNLABELS_H
8 #define CVN_ASSIGNLABELS_H
9 
11 
15 
16 
17 namespace cvn
18 {
19 
20  class AssignLabels{
21 
22  public:
23 
24  AssignLabels();
26 
28  InteractionType GetInteractionTypeFromSlice(int nuPDG, bool nuCCNC,
29  int nuMode );
30 
31  // Use the topology information
32  void GetTopology(const art::Ptr<simb::MCTruth> truth, unsigned int nTopologyHits);
33  void PrintTopology();
34  unsigned short GetNProtons() { return nProton; };
35  unsigned short GetNPions() { return nPion; };
36  unsigned short GetNPizeros() { return nPizero; };
37  unsigned short GetNNeutrons() { return nNeutron; };
38  short GetPDG() { return pdgCode; };
39  unsigned short TauMode() { return tauMode; };
40  bool IsAntineutrino();
41  unsigned short GetTopologyType();
42  unsigned short GetTopologyTypeAlt();
43 
44  // Get the pion interaction mode for ProtoDUNE specific code
45  unsigned short GetProtoDUNEBeamInteractionType(const simb::MCParticle &particle) const;
46 
47  private:
48 
49  // Recursive function to get all hits from daughters of a neutral particle
50  unsigned int GetNeutralDaughterHitsRecursive(const simb::MCParticle &particle) const;
51 
53  // unused unsigned int fTopologyHitsCut;
54 
55  unsigned short nProton;
56  unsigned short nPion;
57  unsigned short nPizero;
58  unsigned short nNeutron;
59  short pdgCode;
60  unsigned short tauMode;
61 
62  };
63 }
64 
65 #endif // CVN_ASSIGNLABELS_H
unsigned short TauMode()
Definition: AssignLabels.h:39
AssignLabels()
Default constructor.
unsigned short GetNPizeros()
Definition: AssignLabels.h:36
std::string string
Definition: nybbler.cc:12
unsigned short GetNNeutrons()
Definition: AssignLabels.h:37
enum cvn::Interaction InteractionType
unsigned short GetTopologyType()
unsigned int GetNeutralDaughterHitsRecursive(const simb::MCParticle &particle) const
Utility class for truth labels.
Particle class.
InteractionType GetInteractionType(simb::MCNeutrino &truth)
unsigned short GetNProtons()
Definition: AssignLabels.h:34
unsigned short GetTopologyTypeAlt()
InteractionType GetInteractionTypeFromSlice(int nuPDG, bool nuCCNC, int nuMode)
unsigned short nPizero
Definition: AssignLabels.h:57
def process(f, kind)
Definition: search.py:254
void GetTopology(const art::Ptr< simb::MCTruth > truth, unsigned int nTopologyHits)
unsigned short GetProtoDUNEBeamInteractionType(const simb::MCParticle &particle) const
unsigned short tauMode
Definition: AssignLabels.h:60
unsigned short nPion
Definition: AssignLabels.h:56
int GetProcessKey(std::string process) const
unsigned short GetNPions()
Definition: AssignLabels.h:35
Event generator information.
Definition: MCNeutrino.h:18
unsigned short nNeutron
Definition: AssignLabels.h:58
unsigned short nProton
Definition: AssignLabels.h:55