Geant4WeightVars.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 namespace ana
5 {
6 
8  {
9  const Var kGeantPiplusWeights([i](const caf::SRProxy *sr)
10  {
11  if(sr->mc.nnu < 1
12  || sr->mc.nu[0].rwgt.geant4.npiplus_univ < 1
13  || sr->mc.nu[0].rwgt.geant4.piplus_univ.size() < 1
14  || sr->mc.nu[0].rwgt.geant4.piplus_univ[i] <= 0
15  ){
16  return 1.f;
17  }
18  return float(sr->mc.nu[0].rwgt.geant4.piplus_univ[i]);
19  });
20  return kGeantPiplusWeights;
21  }
22 
24  {
25  const Var kGeantPiminusWeights([i](const caf::SRProxy *sr)
26  {
27  if(sr->mc.nnu < 1
28  || sr->mc.nu[0].rwgt.geant4.npiminus_univ < 1
29  || sr->mc.nu[0].rwgt.geant4.piminus_univ.size() < 1
30  || sr->mc.nu[0].rwgt.geant4.piminus_univ[i] <= 0
31  ){
32  return 1.f;
33  }
34  return float(sr->mc.nu[0].rwgt.geant4.piminus_univ[i]);
35  });
36  return kGeantPiminusWeights;
37  }
38 
39 
40 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kGeantPiPlusSingleUnivWeight(int i)
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
caf::Proxy< short int > nnu
Definition: SRProxy.h:617
const Var kGeantPiminusSingleUnivWeight(int i)
caf::StandardRecord * sr
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138