All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PAC2020/SBND/helper.h
Go to the documentation of this file.
1 #pragma once
2 
6 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
7 
8 #include "SBNAna/Cuts/Cuts.h"
9 #include "SBNAna/Cuts/NueCuts.h"
10 #include "SBNAna/Cuts/TruthCuts.h"
12 #include "SBNAna/Vars/Binnings.h"
13 #include "SBNAna/Vars/NueVars.h"
14 #include "SBNAna/Vars/TruthVars.h"
15 #include "SBNAna/Vars/Vars.h"
16 
17 #include <fstream>
18 
19 using namespace ana;
20 
21 const SpillVar kNuEnergy([](const caf::SRSpillProxy* sr) {
22  float energy = (sr->mc.nnu != 1 ? -5.f : (float)sr->mc.nu[0].E);
23  return energy;
24 });
25 
26 const SpillCut kSpillSingleNu([](const caf::SRSpillProxy* sr) {
27  return (sr->mc.nnu < 2);
28 });
29 
30 const Cut kTrueNuFV(
31  [](const caf::SRSliceProxy* slc) {
32  if (slc->truth.index == -1)
33  return false;
34 
35  return PtInVolAbsX(slc->truth.position, fvndAbs);
36  });
37 
38 const Cut kNuEEnergyCut(
39  [](const caf::SRSliceProxy* slc) {
40  if (slc->truth.index == -1)
41  return true;
42 
43  for (auto const& prim : slc->truth.prim) {
44  if (std::abs(prim.pdg) != 11 && std::abs(prim.pdg) != 22)
45  continue;
46 
47  if (prim.startE > 0.2)
48  return true;
49  }
50 
51  return false;
52  });
53 
55 
56 // In this example, our signal is Nue cc
60 const Cut kOtherNu = kHasNu && !(kNuECC || kNuMuCC || kNC);
61 
62 double POT = 6.6E20;
const Cut kSlcCompletenessCut([](const caf::SRSliceProxy *slc){if(slc->truth.index< 0) return false;return(kCompletness(slc) > 0.5);})
then if[["$THISISATEST"==1]]
Definition: neoSmazza.sh:95
const Cut kIsNC([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.isnc;})
Is this a Neutral Current event?
const SpillCut kSpillSingleNu([](const caf::SRSpillProxy *sr){return(sr->mc.nnu< 2);})
bool PtInVolAbsX(const caf::SRVector3DProxy &pt, const FidVol &vol)
double POT
const Cut kNuEEnergyCut([](const caf::SRSliceProxy *slc){return true;for(auto const &prim:slc->truth.prim){if(std::abs(prim.pdg)!=11 &&std::abs(prim.pdg)!=22) continue;return true;}return false;})
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
Definition: EpilogFwd.h:2
const Cut kIsNue([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==12;})
const Cut kTrueNuFV([](const caf::SRSliceProxy *slc){return false;return PtInVolAbsX(slc->truth.position, fvndAbs);})
T abs(T value)
const Cut kHasNu([](const caf::SRSliceProxy *slc){return slc->truth.index >=0;})
for($it=0;$it< $RaceTrack_number;$it++)
const Cut kIsNumu([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==14;})
caf::Proxy< caf::StandardRecord > SRSpillProxy
Definition: EpilogFwd.h:3
const Cut kCosmicRay
const SpillVar kNuEnergy([](const caf::SRSpillProxy *sr){float energy=(sr->mc.nnu!=1?-5.f:(float) sr->mc.nu[0].E);return energy;})
const Cut kNuMuCC
const Cut kNuECC
Neutral-current interactions.
Definition: IPrediction.h:39
const Cut kOtherNu
Most useful for combining weights.
Definition: Var.h:23
const FidVol fvndAbs