Go to the documentation of this file.
1 #pragma once
3 #include "CAFAna/Core/Cut.h"
5 namespace ana
6 {
7  /// Is this a Neutral %Current event?
8  extern const Cut kIsNC;
9  extern const Cut kIsNue;
10  extern const Cut kIsNumu;
12  extern const NuTruthCut kIsTau_NT;
13  extern const Cut kIsTau;
15  extern const NuTruthCut kIsNC_NT;
17  //----------------------------------------------------------------------
18  /// Helper for defining true CC event cuts
19  class CCFlavSel
20  {
21  public:
22  CCFlavSel(int pdg, int pdgorig) : fPdg(pdg), fPdgOrig(pdgorig)
23  {
24  }
26  bool operator()(const caf::SRProxy* sr) const;
27  protected:
28  int fPdg, fPdgOrig;
29  };
31  // Finally, the function argument to the Cut constructor can be a "functor"
32  // object (one with operator()). This allows similar logic but with different
33  // constants to be easily duplicated.
35  /// Select CC \f$ \nu_\mu\to\nu_e \f$
36  const Cut kIsSig (CCFlavSel(12, 14));
37  /// Select CC \f$ \nu_\mu\to\nu_\mu \f$
38  const Cut kIsNumuCC (CCFlavSel(14, 14));
39  /// Select CC \f$ \nu_e\to\nu_e \f$
40  const Cut kIsBeamNue(CCFlavSel(12, 12));
41  /// Select CC \f$ \nu_e\to\nu_\mu \f$
42  const Cut kIsNumuApp(CCFlavSel(14, 12));
43  /// Select CC \f$ \nu_\mu\to\nu_\tau \f$
44  const Cut kIsTauFromMu(CCFlavSel(16, 14));
45  /// Select CC \f$ \nu_e\to\nu_\tau \f$
46  const Cut kIsTauFromE(CCFlavSel(16, 12));
48  extern const NuTruthCut kIsNumuCC_NT;
49  extern const NuTruthCut kIsBeamNue_NT;
50  extern const NuTruthCut kIsSig_NT;
52  /// Is this truly an antineutrino?
53  extern const Cut kIsAntiNu;
54  extern const Cut kIsNu;
56  extern const Cut kHasNu;
58  extern const NuTruthCut kIsAntiNu_NT;
60  /// Check if MC slice has neutrino information (useful for in-and-out tests)
61  extern const Cut kHasNeutrino;
63  /// Select truly quasielastic events
64  extern const NuTruthCut kIsQE_NT;
65  extern const Cut kIsQE;
67  extern const NuTruthCut kIsRes_NT;
68  extern const Cut kIsRes;
70  extern const NuTruthCut kIsDIS_NT;
71  extern const Cut kIsDIS;
73  extern const NuTruthCut kIsCoh_NT;
74  extern const Cut kIsCoh;
76  //// Select neutrinos by their parents type
77  extern const Cut kIsNumuFromKaon;
78  extern const Cut kIsNumuFromPion;
80  extern const Cut kIsPion;
81  extern const Cut kIsNumuFromMuon;
83  extern const Cut kIsKaon;
84  extern const Cut kIsMuon;
86  extern const Cut kIsNueFromKaon;
87  extern const Cut kIsNueFromPion;
88  extern const Cut kIsNueFromMuon;
91  extern const Cut kIsDytmanMEC;
93  extern const Cut kIsVtxCont;
94  extern const NuTruthCut kIsVtxCont_NT;
95 }
const Cut kIsQE
Definition: TruthCuts.cxx:104
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
bool operator()(const caf::SRProxy *sr) const
Definition: TruthCuts.cxx:32
const NuTruthCut kIsCoh_NT([](const caf::SRNeutrinoProxy *truth){return(truth->mode==caf::kCoh);})
Definition: TruthCuts.h:73
const Cut kIsNumu([](const caf::SRProxy *sr){return(sr->mc.nnu==1 &&abs(sr->[0].pdg)==14);})
Definition: TruthCuts.h:10
const Cut kIsRes
Definition: TruthCuts.cxx:111
const NuTruthCut kIsRes_NT([](const caf::SRNeutrinoProxy *truth){return(truth->mode==caf::kRes);})
Definition: TruthCuts.h:67
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
const Cut kIsAntiNu([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return sr->[0].pdg< 0;})
Is this truly an antineutrino?
Definition: TruthCuts.h:53
const Cut kIsBeamNue(CCFlavSel(12, 12))
Select CC .
const Cut kIsNumuApp(CCFlavSel(14, 12))
Select CC .
const Cut kIsNumuFromKaon([](const caf::SRProxy *sr){return(sr->mc.nnu==1 && sr->[0].iscc==1 && (abs(sr->[0].beam.ptype)==321||sr->[0].beam.ptype==310||sr->[0].beam.ptype==311||sr->[0].beam.ptype==130)&& abs(sr->[0].pdg)==14);})
Definition: TruthCuts.h:77
const Cut kIsDIS
Definition: TruthCuts.cxx:118
const Cut kIsTau
Definition: TruthCuts.cxx:25
const Cut kIsVtxCont([](const caf::SRProxy *sr){return(sr->mc.nnu==1 &&sr->[0].isvtxcont);})
Definition: TruthCuts.h:93
const Cut kIsKaon([](const caf::SRProxy *sr){return(abs(sr->[0].beam.ptype)==321||sr->[0].beam.ptype==310||sr->[0].beam.ptype==311||sr->[0].beam.ptype==130);})
Definition: TruthCuts.h:83
const NuTruthCut kIsTau_NT([](const caf::SRNeutrinoProxy *truth){return(abs(truth->pdg)==16);})
Definition: TruthCuts.h:12
const Cut kIsNu([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return sr->[0].pdg > 0;})
Definition: TruthCuts.h:54
const NuTruthCut kIsDIS_NT([](const caf::SRNeutrinoProxy *truth){return(truth->mode==caf::kDIS);})
Definition: TruthCuts.h:70
const Cut kIsDytmanMEC
Definition: TruthCuts.cxx:187
const NuTruthCut kIsAntiNu_NT([](const caf::SRNeutrinoProxy *truth){return truth->pdg< 0;})
Definition: TruthCuts.h:58
const Cut kIsTauFromE(CCFlavSel(16, 12))
Select CC .
const Cut kIsTauFromMu(CCFlavSel(16, 14))
Select CC .
const Cut kIsNC([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return!sr->[0].iscc;})
Is this a Neutral Current event?
Definition: TruthCuts.h:8
const Cut kIsMuon([](const caf::SRProxy *sr){return(abs(sr->[0].beam.ptype)==13);})
Definition: TruthCuts.h:84
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
const Cut kIsNue([](const caf::SRProxy *sr){return(sr->mc.nnu==1 &&abs(sr->[0].pdg)==12);})
Definition: TruthCuts.h:9
const Cut kIsNueFromPion([](const caf::SRProxy *sr){return(sr->mc.nnu==1 && sr->[0].iscc==1 && (abs(sr->[0].beam.ptype)==211||sr->[0].beam.ptype==111)&& abs(sr->[0].pdg)==12);})
Definition: TruthCuts.h:87
Helper for defining true CC event cuts.
Definition: TruthCuts.h:19
caf::StandardRecord * sr
CCFlavSel(int pdg, int pdgorig)
Definition: TruthCuts.h:22
const NuTruthCut kIsQE_NT([](const caf::SRNeutrinoProxy *truth){return(truth->mode==caf::kQE);})
Select truly quasielastic events.
Definition: TruthCuts.h:64
const NuTruthCut kIsVtxCont_NT([](const caf::SRNeutrinoProxy *truth){return(truth->isvtxcont);})
Definition: TruthCuts.h:94
const NuTruthCut kIsBeamNue_NT([](const caf::SRNeutrinoProxy *truth){return( truth->iscc && abs(truth->pdg)==12 && abs(truth->pdgorig)==12 );})
Definition: TruthCuts.h:49
const NuTruthCut kIsNumuCC_NT([](const caf::SRNeutrinoProxy *truth){return( truth->iscc && abs(truth->pdg)==14 && abs(truth->pdgorig)==14 );})
Definition: TruthCuts.h:48
const Cut kHasNeutrino([](const caf::SRProxy *sr){return(sr->mc.nnu!=0);})
Check if MC slice has neutrino information (useful for in-and-out tests)
Definition: TruthCuts.h:61
const NuTruthCut kIsNC_NT([](const caf::SRNeutrinoProxy *truth){return!truth->iscc;})
Definition: TruthCuts.h:15
const NuTruthCut kIsDytmanMEC_NT([](const caf::SRNeutrinoProxy *truth){return(truth->mode==caf::kMEC);})
Definition: TruthCuts.h:90
const Cut kIsNueFromMuon([](const caf::SRProxy *sr){return(sr->mc.nnu==1 && sr->[0].iscc==1 && abs(sr->[0].beam.ptype)==13 && abs(sr->[0].pdg)==12);})
Definition: TruthCuts.h:88
const Cut kHasNu([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return true;})
Definition: TruthCuts.h:56
const Cut kIsPion([](const caf::SRProxy *sr){return(abs(sr->[0].beam.ptype)==211||sr->[0].beam.ptype==111);})
Definition: TruthCuts.h:80
const Cut kIsNumuFromMuon([](const caf::SRProxy *sr){return(sr->mc.nnu==1 && sr->[0].iscc==1 && abs(sr->[0].beam.ptype)==13 && abs(sr->[0].pdg)==14);})
Definition: TruthCuts.h:81
const Cut kIsNueFromKaon([](const caf::SRProxy *sr){return(sr->mc.nnu==1 && sr->[0].iscc==1 && (abs(sr->[0].beam.ptype)==321||sr->[0].beam.ptype==310||sr->[0].beam.ptype==311||sr->[0].beam.ptype==130)&& abs(sr->[0].pdg)==12);})
Definition: TruthCuts.h:86
const NuTruthCut kIsSig_NT([](const caf::SRNeutrinoProxy *truth){return( truth->iscc && abs(truth->pdg)==12 && abs(truth->pdgorig)==14 );})
Definition: TruthCuts.h:50
Template for Cut and SpillCut.
Definition: Cut.h:15
const Cut kIsNumuFromPion([](const caf::SRProxy *sr){return(sr->mc.nnu==1 && sr->[0].iscc==1 && (abs(sr->[0].beam.ptype)==211||sr->[0].beam.ptype==111)&& abs(sr->[0].pdg)==14);})
Definition: TruthCuts.h:78
const Cut kIsCoh
Definition: TruthCuts.cxx:133