All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SRTrueInteraction.h
Go to the documentation of this file.
1 // SRTrueInteraction.h
2 // \author psihas@fnal.gov
3 ////////////////////////////////////////////////////////////////////////
4 #ifndef SRTRUEINTERACTION_H
5 #define SRTRUEINTERACTION_H
6 
9 
10 namespace caf
11 {
12  // NB - 'wgt' below cannot be just vector<vector<float>> due to bugs in
13  // SRProxy/FlatMaker.
15  {
16  public:
17  std::vector<float> univ;
18  };
19 
21  {
22  public:
24 
25  float visE; //!< Sum of energy deposited on plane [GeV]
26  unsigned int nhitprim; //!< Number of hits from primary particles on plane
27  unsigned int nhit; //!< Number of hits on plane
28  };
29 
30  /// The SRTrueInteraction is a representation of neutrino interaction information
32  {
33  public:
36 
37  int initpdg; //!< Initial PDG code of probe neutrino
38  int pdg; //!< PDG code of probe neutrino
39  int index; //!< Index of the matched true neutrino interaction (-1 if not matched to neutrino)
40  int targetPDG; //!< PDG code of struck target
41  /// PDG code of struck nucleon (or, in the case of MEC, struck nucleon-nucleon pair).
42  /// For MEC, the codes are: 2000000200 --> nn, 2000000201 --> np, 2000000202 --> "pp
43  int hitnuc;
44  genie_interaction_mode_ genie_mode; //!< Interaction mode (as for LArSoft MCNeutrino::Mode() )
45  genie_interaction_type_ genie_inttype; //!< Following LARSoft MCNeutrino::InteractionType()
46 
47  bool isnc; //!< same as LArSoft "ccnc" - 0=CC, 1=NC
48  bool iscc; //!< CC (true) or NC/interference (false)
49  bool isvtxcont; //!< If true vertex is within TPC
50  bool is_numucc_primary; //!< Whether this is the "primary" reco neutrino slice as defined by the numu CC analysis
51 
52  float E; ///< True energy [GeV]
53 
54  SRTrueInteractionPlaneInfo plane[2][3]; //!< Per-plane, per-cryostat deposition information
55 
56  float time; ///< Time
57  float bjorkenX; //!< Bjorken x = (k-k')^2/(2*p.q) [Dimensionless]
58  float inelasticityY; //!< Inelasticity y
59  float Q2; //!< Q squared
60  float q0; //!< q0, struck nucleon rest frame
61  float modq; //!< |q|, struck nucleon rest frame
62  float q0_lab; //!< q0, lab frame
63  float modq_lab; //!< |q|, lab frame
64  float w; //!< Hadronic invariant mass W
65  float t; //!< Kinematic t
66  float eccqe; //!< CCQE energy
67  float baseline; //!< Distance from decay to interaction [m]
68 
69  unsigned int npiplus; ///< Number of \f$\pi^+\f$'s after neutrino reaction, before FSI
70  unsigned int npiminus; ///< Number of \f$\pi^1\f$'s after neutrino reaction, before FSI
71  unsigned int npizero; ///< Number of \f$\pi^0\f$'s after neutrino reaction, before FSI
72  unsigned int nproton; ///< Number of protons after neutrino reaction, before FSI
73  unsigned int nneutron; ///< Number of neutrons after neutrino reaction, before FSI
74 
75  // GTruth stuff
76  bool ischarm; ///< Is a charmed quark in interaction
77  bool isseaquark; ///< Did neutrino scatter off a sea quark
78  int resnum; ///< Resonance number, straight from GENIE
79  float xsec; ///< xsec for thrown interaction, in 1/GeV^2, as stored by the GENIE spline
80 
81  float genweight; ///< Weight, if any, assigned by the generator
82 
83  int parent_dcy_mode; //!< Parent hadron/muon decay mode
84  int parent_pdg; //!< PDG Code of parent particle ID
85  SRVector3D prod_vtx; //!< Neutrino production vertex [cm; beam coordinates]
86  SRVector3D parent_dcy_mom; //!< Neutrino parent momentum at decay [GeV; beam coordinates]
87  float parent_dcy_E; //!< Neutrino parent energy at decay [GeV]
88  float imp_weight; //!< Importance weight from flux file
89 
90  SRVector3D vtx; //!< Vertex position in detector coord. [cm]
91  SRVector3D momentum; //!< Neutrino three-momentum
92  SRVector3D position; //!< Neutrino interaction position
93 
94  int cryostat; //!< Cryostat the the Interaction originates in. -1 if it originates outside a cryostat.
96 
97  generator_ generator; ///< The generator that created this neutrino interaction
98  std::vector<unsigned int> genVersion; ///< Version of the generator that created this neutrino interaction
99 
100  int nprim; ///< Number of primary daughters
101  std::vector<SRTrueParticle> prim; ///< Primary daughters, lepton comes first in vector.
102 
103  /// \brief Systematic weights
104  ///
105  /// The first index is the parameter set, the second the universe. The
106  /// parameter sets are those defined in the globalTree, with matching
107  /// indices.
108  std::vector<SRMultiverse> wgt;
109  };
110 
111 } // end namespace
112 
113 #endif // SRTRUEINTERACTION_H
114 //////////////////////////////////////////////////////////////////////////////
float imp_weight
Importance weight from flux file.
unsigned int npiplus
Number of &#39;s after neutrino reaction, before FSI.
Det_t
Which SBN detector?
Definition: SREnums.h:7
float genweight
Weight, if any, assigned by the generator.
int initpdg
Initial PDG code of probe neutrino.
unsigned int nneutron
Number of neutrons after neutrino reaction, before FSI.
bool isseaquark
Did neutrino scatter off a sea quark.
A 3-vector with more efficient storage than TVector3.
Definition: SRVector3D.h:16
std::vector< unsigned int > genVersion
Version of the generator that created this neutrino interaction.
SRVector3D parent_dcy_mom
Neutrino parent momentum at decay [GeV; beam coordinates].
SRVector3D vtx
Vertex position in detector coord. [cm].
float inelasticityY
Inelasticity y.
The SRTrueInteraction is a representation of neutrino interaction information.
SRVector3D position
Neutrino interaction position.
float xsec
xsec for thrown interaction, in 1/GeV^2, as stored by the GENIE spline
int resnum
Resonance number, straight from GENIE.
int nprim
Number of primary daughters.
SRVector3D prod_vtx
Neutrino production vertex [cm; beam coordinates].
float E
True energy [GeV].
genie_interaction_type_ genie_inttype
Following LARSoft MCNeutrino::InteractionType()
unsigned int nproton
Number of protons after neutrino reaction, before FSI.
genie_interaction_mode_
Definition: SREnums.h:62
generator_
Which generator?
Definition: SREnums.h:44
int parent_pdg
PDG Code of parent particle ID.
int pdg
PDG code of probe neutrino.
float modq
|q|, struck nucleon rest frame
std::vector< SRTrueParticle > prim
Primary daughters, lepton comes first in vector.
unsigned int nhitprim
Number of hits from primary particles on plane.
bool ischarm
Is a charmed quark in interaction.
unsigned int nhit
Number of hits on plane.
SRVector3D momentum
Neutrino three-momentum.
bool is_numucc_primary
Whether this is the &quot;primary&quot; reco neutrino slice as defined by the numu CC analysis.
float bjorkenX
Bjorken x = (k-k&#39;)^2/(2*p.q) [Dimensionless].
unsigned int npizero
Number of &#39;s after neutrino reaction, before FSI.
float t
Kinematic t.
bool isnc
same as LArSoft &quot;ccnc&quot; - 0=CC, 1=NC
genie_interaction_type_
Definition: SREnums.h:82
float w
Hadronic invariant mass W.
SRTrueInteractionPlaneInfo plane[2][3]
Per-plane, per-cryostat deposition information.
float q0_lab
q0, lab frame
bool isvtxcont
If true vertex is within TPC.
bool iscc
CC (true) or NC/interference (false)
float parent_dcy_E
Neutrino parent energy at decay [GeV].
float baseline
Distance from decay to interaction [m].
float eccqe
CCQE energy.
float q0
q0, struck nucleon rest frame
generator_ generator
The generator that created this neutrino interaction.
unsigned int npiminus
Number of &#39;s after neutrino reaction, before FSI.
int index
Index of the matched true neutrino interaction (-1 if not matched to neutrino)
int parent_dcy_mode
Parent hadron/muon decay mode.
genie_interaction_mode_ genie_mode
Interaction mode (as for LArSoft MCNeutrino::Mode() )
std::vector< SRMultiverse > wgt
Systematic weights.
std::vector< float > univ
int cryostat
Cryostat the the Interaction originates in. -1 if it originates outside a cryostat.
float visE
Sum of energy deposited on plane [GeV].
float modq_lab
|q|, lab frame