LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
AssignLabels.h
Go to the documentation of this file.
1 // \file Assignlabels.h
5 // \author Leigh Whitehead leigh.howard.whitehead@cern.ch
7 #ifndef LCVN_ASSIGNLABELS_H
8 #define LCVN_ASSIGNLABELS_H
9 
11 
15 
16 namespace lcvn {
17 
18  class AssignLabels {
19 
20  public:
21  AssignLabels();
22 
24  InteractionType GetInteractionTypeFromSlice(int nuPDG, bool nuCCNC, int nuMode) const;
25 
26  // Use the topology information
27  void GetTopology(const art::Ptr<simb::MCTruth> truth, unsigned int nTopologyHits);
28  void PrintTopology();
29  unsigned short GetNProtons() const { return nProton; };
30  unsigned short GetNPions() const { return nPion; };
31  unsigned short GetNPizeros() const { return nPizero; };
32  unsigned short GetNNeutrons() const { return nNeutron; };
33  short GetPDG() const { return pdgCode; };
34  unsigned short TauMode() const { return tauMode; };
35  bool IsAntineutrino() const { return pdgCode < 0; };
36  unsigned short GetTopologyType() const;
37  unsigned short GetTopologyTypeAlt() const;
38 
39  // Get the pion interaction mode for ProtoDUNE specific code
40  unsigned short GetProtoDUNEBeamInteractionType(const simb::MCParticle& particle) const;
41 
42  private:
43  // Recursive function to get all hits from daughters of a neutral particle
44  unsigned int GetNeutralDaughterHitsRecursive(const simb::MCParticle& particle) const;
45 
46  int GetProcessKey(std::string process) const;
47 
48  unsigned short nProton;
49  unsigned short nPion;
50  unsigned short nPizero;
51  unsigned short nNeutron;
52  short pdgCode;
53  unsigned short tauMode;
54  };
55 }
56 
57 #endif // CVN_ASSIGNLABELS_H
int GetProcessKey(std::string process) const
unsigned short TauMode() const
Definition: AssignLabels.h:34
InteractionType GetInteractionType(simb::MCNeutrino &truth) const
unsigned short nPion
Definition: AssignLabels.h:49
unsigned short nProton
Definition: AssignLabels.h:48
unsigned short nNeutron
Definition: AssignLabels.h:51
Utility class for truth labels.
Particle class.
unsigned short GetTopologyTypeAlt() const
unsigned short GetTopologyType() const
AssignLabels()
Default constructor.
unsigned short tauMode
Definition: AssignLabels.h:53
unsigned short GetNPions() const
Definition: AssignLabels.h:30
void GetTopology(const art::Ptr< simb::MCTruth > truth, unsigned int nTopologyHits)
unsigned int GetNeutralDaughterHitsRecursive(const simb::MCParticle &particle) const
unsigned short nPizero
Definition: AssignLabels.h:50
unsigned short GetNProtons() const
Definition: AssignLabels.h:29
InteractionType GetInteractionTypeFromSlice(int nuPDG, bool nuCCNC, int nuMode) const
short GetPDG() const
Definition: AssignLabels.h:33
unsigned short GetNNeutrons() const
Definition: AssignLabels.h:32
unsigned short GetProtoDUNEBeamInteractionType(const simb::MCParticle &particle) const
Event generator information.
Definition: MCNeutrino.h:18
unsigned short GetNPizeros() const
Definition: AssignLabels.h:31
bool IsAntineutrino() const
Definition: AssignLabels.h:35