All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CAFAna/Cuts/TruthCuts.cxx
Go to the documentation of this file.
2 
3 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
4 
5 namespace ana
6 {
7  const Cut kHasMatchedNu([](const caf::SRSliceProxy* slc)
8  {
9  return slc->truth.index >= 0;
10  });
11 
12  /// \brief Is this a Neutral %Current event?
13  ///
14  /// In this case the selection function is simple enough that we can include
15  /// it inline as a lambda function.
16  const Cut kIsNC([](const caf::SRSliceProxy* slc)
17  {
18  return kHasMatchedNu(slc) && slc->truth.isnc;
19  });
20 
21  const Cut kIsCC([](const caf::SRSliceProxy* slc)
22  {
23  return kHasMatchedNu(slc) && slc->truth.iscc;
24  });
25 
26  const Cut kIsAntiNu([](const caf::SRSliceProxy* slc)
27  {
28  return kHasMatchedNu(slc) && slc->truth.pdg < 0;
29  });
30 
31  //----------------------------------------------------------------------
33  {
34  return kHasMatchedNu(slc) &&
35  slc->truth.iscc &&
36  abs(slc->truth.initpdg) == fPdgOrig &&
37  abs(slc->truth.pdg) == fPdg;
38  }
39 
40  //----------------------------------------------------------------------
42  {
43  return kHasMatchedNu(slc) && slc->truth.isnc && abs(slc->truth.initpdg) == fPdgOrig;
44  }
45 }
const Cut kIsNC([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.isnc;})
Is this a Neutral Current event?
const Cut kIsCC([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.iscc;})
process_name opflashCryoW ana
bool operator()(const caf::SRSliceProxy *slc) const
caf::Proxy< caf::SRSlice > SRSliceProxy
Definition: EpilogFwd.h:2
T abs(T value)
_Cut< caf::SRSliceProxy > Cut
Definition: Cut.h:95
const Cut kHasMatchedNu([](const caf::SRSliceProxy *slc){return slc->truth.index >=0;})
bool operator()(const caf::SRSliceProxy *slc) const
const Cut kIsAntiNu([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.pdg< 0;})
Is this truly an antineutrino?