Go to the documentation of this file.
1 #pragma once
3 #include "CAFAna/Core/Var.h"
6 namespace ana
7 {
8  extern Var OverlayVarFromNuTruthVar(const NuTruthVar stv, double _default = -5);
11  extern const Var kNoWeight;
12  extern const Var kSpillPOTRatioWeight;
13  extern const Var kSliceCount;
16  extern const NuTruthVar kTrueE_Nu;
17  extern const NuTruthVar kTrueLepE_Nu;
18  extern const NuTruthVar kTrueQ2_Nu;
19  extern const NuTruthVar kTrueW2_Nu;
20  extern const NuTruthVar kTrueXbj_Nu;
21  extern const NuTruthVar kTrueYbj_Nu ;
22  extern const NuTruthVar kOTrueVtxX_Nu;
23  extern const NuTruthVar kOTrueVtxY_Nu;
24  extern const NuTruthVar kOTrueVtxZ_Nu;
26  extern const NuTruthVar kIsCC_Nu;
27  extern const NuTruthVar kPDG_Nu;
28  extern const NuTruthVar kUselessVar_Nu;
32  const Var kTrueLepE_OV = OverlayVarFromNuTruthVar(kTrueLepE_Nu);
37  const Var kOTrueVtxX_OV = OverlayVarFromNuTruthVar(kOTrueVtxX_Nu);
38  const Var kOTrueVtxY_OV = OverlayVarFromNuTruthVar(kOTrueVtxY_Nu);
39  const Var kOTrueVtxZ_OV = OverlayVarFromNuTruthVar(kOTrueVtxZ_Nu);
40  const Var kOverlayMode_OV = OverlayVarFromNuTruthVar(kOverlayMode_Nu);
44  //const Var kTrueE_OV = OverlayVarFromNuTruthVar(kTrueE_Nu);
45  extern const Var kSlcNoiseFrac;
46  extern const Var kSlcNoiseFracN;
47  extern const Var kSlcNoiseFracPE;
48  extern const Var kSlcEff;
50  extern const SpillVar kSpillCount_Sp;
51  extern const SpillVar kSpillPOT_Sp;
57 } // namespace
const NuTruthVar kOTrueVtxZ_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->vtx.z);})
Definition: OverlayVars.h:24
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kIsCC_OV
Definition: OverlayVars.h:41
const NuTruthVar kTrueQ2_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->q2);})
Definition: OverlayVars.h:18
const NuTruthVar kTrueYbj_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->y);})
Definition: OverlayVars.h:21
const Var kSlcNoiseFracPE([](const caf::SRProxy *sr){return sr->slc.fracnoisePE;})
Definition: OverlayVars.h:47
const Var kTrueQ2_OV
Definition: OverlayVars.h:33
const NuTruthVar kOTrueVtxX_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->vtx.x);})
Definition: OverlayVars.h:22
const NuTruthVar kUselessVar_Nu([](const caf::SRNeutrinoProxy *nu){return 0.;})
Definition: OverlayVars.h:28
const SpillVar kSpillPOTRatioWeight_Sp([](const caf::SRSpillProxy *sp){const double centralValue=40.e12;return sp->spillpot/centralValue;})
Definition: OverlayVars.h:52
const Var kTrueYbj_OV
Definition: OverlayVars.h:36
const Var kTrueLepE_OV
Definition: OverlayVars.h:32
const Var kSliceCount([](const caf::SRProxy *sr){return 0.;})
Definition: OverlayVars.h:13
const Var kTrueXbj_OV
Definition: OverlayVars.h:35
_Var< caf::SRProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
Definition: Var.h:74
const Var kPDG_OV
Definition: OverlayVars.h:42
const Var kOTrueVtxZ_OV
Definition: OverlayVars.h:39
const NuTruthVar kOTrueVtxY_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->vtx.y);})
Definition: OverlayVars.h:23
const Var kNoWeight([](const caf::SRProxy *sr){return 1.;})
Definition: OverlayVars.h:11
const NuTruthVar kTrueLepE_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->prim[0].p.E);})
Definition: OverlayVars.h:17
const Var kSlcEff([](const caf::SRProxy *sr){for(int i=0;i< (int) sr->mc.nallnus;i++) if(sr->mc.allnus[i].mode > 9999||!sr->spill.ismc) return(float) sr->mc.allnus[i].eff;return-5.f;})
Definition: OverlayVars.h:48
_Var< caf::SRNeutrinoProxy > NuTruthVar
Var designed to be used over the nuTree, ie all neutrinos, not just those that got slices...
Definition: Var.h:82
const Var kTrueW2_OV
Definition: OverlayVars.h:34
const NuTruthVar kTrueXbj_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->x);})
Definition: OverlayVars.h:20
const SpillVar kSpillCount_Sp([](const caf::SRSpillProxy *sp){return 0.;})
Definition: OverlayVars.h:50
const NuTruthVar kTrueE_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->E);;})
Definition: OverlayVars.h:16
const Var kSlcNoiseFrac([](const caf::SRProxy *sr){return sr->slc.fracnoiseE;})
Definition: OverlayVars.h:45
const NuTruthVar kPDG_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->pdg);})
Definition: OverlayVars.h:27
const NuTruthVar kIsCC_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->iscc);})
Definition: OverlayVars.h:26
const Var kSlcNoiseFracN([](const caf::SRProxy *sr){return 1.*sr->slc.nnoisehit/sr->slc.ncalhit;})
Definition: OverlayVars.h:46
Var OverlayVarFromNuTruthVar(const NuTruthVar stv, double _default)
Definition: OverlayVars.cxx:8
const Var kOverlayMode_OV
Definition: OverlayVars.h:40
const NuTruthVar kOverlayMode_Nu([](const caf::SRNeutrinoProxy *nu){return(nu->mode >9999)?(float) nu->mode-10000.:(float) nu->mode;})
Definition: OverlayVars.h:25
const Var kSpillPOTRatioWeight([](const caf::SRProxy *sr){const double centralValue=40.e12;return sr->spill.spillpot/centralValue;})
Definition: OverlayVars.h:12
const Var kOTrueVtxY_OV
Definition: OverlayVars.h:38
const NuTruthVar kTrueW2_Nu([](const caf::SRNeutrinoProxy *nu){return float(nu->W2);})
Definition: OverlayVars.h:19
const SpillVar kSpillPOT_Sp([](const caf::SRSpillProxy *sp){return sp->spillpot;})
Definition: OverlayVars.h:51
const Var kOTrueVtxX_OV
Definition: OverlayVars.h:37
const Var kTrueE_OV
Definition: OverlayVars.h:31