OverlayCuts.cxx
Go to the documentation of this file.
3 
4 namespace ana
5 {
7  {
8  return Cut([stc](const caf::SRProxy* sr)
9  {
10  if(sr->mc.nallnus == 0) return false;
11  for(int j=0; j<sr->mc.nallnus; j++)
12  if( ( sr->mc.allnus[j].mode > 9999 // overlaid mc or
13  || !sr->spill.ismc )) // overlaid data
14  return stc(&sr->mc.allnus[j]);
15  return false;
16  });
17  }
18 
19  const NuTruthCut kNoCut_NT([](const caf::SRNeutrinoProxy* nu)
20  {
21  return true;
22  });
23 
25  {
26  return (nu->mode > 9999);
27  });
29  {
30  return true;
31  });
32 
33  const TVector3 ovtxmin(-180, -180, 25);
34  const TVector3 ovtxmax( 180, 180, 1150);
36  {
37  return (nu->vtx.X() < ovtxmax.X() &&
38  nu->vtx.X() > ovtxmin.X() &&
39  nu->vtx.Y() > ovtxmin.Y() &&
40  nu->vtx.Y() < ovtxmax.Y() &&
41  nu->vtx.Z() > ovtxmin.Z() &&
42  nu->vtx.Z() < ovtxmax.Z() );
43  });
45 
46  const TVector3 ovtxminLoose(-220, -220, 0);
47  const TVector3 ovtxmaxLoose( 220, 220, 1150);
49  {
50  return (nu->vtx.X() < ovtxmaxLoose.X() &&
51  nu->vtx.X() > ovtxminLoose.X() &&
52  nu->vtx.Y() > ovtxminLoose.Y() &&
53  nu->vtx.Y() < ovtxmaxLoose.Y() &&
54  nu->vtx.Z() > ovtxminLoose.Z() &&
55  nu->vtx.Z() < ovtxmaxLoose.Z() );
56  });
58 
60  {
61  return nu->E > 0.25;
62  });
64 
66  const NuTruthCut kTrueNumuCC_Nu([](const caf::SRNeutrinoProxy* truth)
67  {
68  return (
69  truth->iscc &&
70  abs(truth->pdg) == 14
71  );
72  });
73 
75  const NuTruthCut kTrueNueCC_Nu([](const caf::SRNeutrinoProxy* truth)
76  {
77  return (
78  truth->iscc &&
79  abs(truth->pdg) == 12
80  );
81  });
82 
84  {
85  //return (nu->E >= 0. && nu->E < 5.);
86  return (nu->E >= 0. && nu->E < 7.);
87  });
89 
91  {
92  //return (nu->E >= 0. && nu->E < 4.5);
93  return (nu->E >= 0. && nu->E < 6.0);
94  });
96 
97  const Cut kOverlaidEff51([](const caf::SRProxy* sr)
98  {
99  if(sr->mc.nallnus == 0) return false;
100  for(int j=0; j<sr->mc.nallnus; j++)
101  if( ( sr->mc.allnus[j].mode > 9999 // overlaid mc or
102  || !sr->spill.ismc ) // overlaid data
103  && sr->mc.allnus[j].eff > 0.51 ) // and slice eff cut
104  return true;
105  return false;
106  });
107 
108  const Cut kOverlaidNoEffCut([](const caf::SRProxy* sr)
109  {
110  if(sr->mc.nallnus == 0) return false;
111  for(int j=0; j<sr->mc.nallnus; j++)
112  if( ( sr->mc.allnus[j].mode > 9999
113  || !sr->spill.ismc ))
114  return true;
115  return false;
116  });
117 
118  const Cut kNotOverlaidData([](const caf::SRProxy* sr)
119  {
120  if(sr->mc.nallnus == 0) return true;
121  return false;
122  });
123 
124 
125  const SpillCut kNoCut_Sp([](const caf::SRSpillProxy* sp)
126  {
127  return true;
128  });
129 }
caf::Proxy< caf::SRSpill > spill
Definition: SRProxy.h:2143
const NuTruthCut kTrueNueCC_Nu([](const caf::SRNeutrinoProxy *truth){return( truth->iscc && abs(truth->pdg)==12 );})
Definition: OverlayCuts.h:25
const TVector3 ovtxmaxLoose(220, 220, 1150)
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Proxy for caf::SRNeutrino.
Definition: SRProxy.h:510
caf::Proxy< short int > nallnus
Definition: SRProxy.h:615
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
const NuTruthCut kOverlaidData_Nu([](const caf::SRNeutrinoProxy *nu){return true;})
Definition: OverlayCuts.h:10
const Cut kAnaTrueECut_Numu
Definition: OverlayCuts.cxx:88
const NuTruthCut kOverlaidMC_Nu([](const caf::SRNeutrinoProxy *nu){return(nu->mode > 9999);})
Definition: OverlayCuts.h:9
const NuTruthCut kAnaTrueECut_Nu_Nue([](const caf::SRNeutrinoProxy *nu){return(nu->E >=0.&&nu->E< 6.0);})
Definition: OverlayCuts.h:31
void abs(TH1 *hist)
caf::Proxy< int > mode
Definition: SRProxy.h:543
const NuTruthCut kNoCut_NT([](const caf::SRNeutrinoProxy *nu){return true;})
Definition: OverlayCuts.h:7
caf::Proxy< float > E
Definition: SRProxy.h:520
_Cut< caf::SRNeutrinoProxy > NuTruthCut
Cut designed to be used over the nuTree, ie all neutrinos, not just those that got slices...
Definition: Cut.h:104
Cut OverlayCutFromNuTruthCut(const NuTruthCut stc)
Definition: OverlayCuts.cxx:6
const NuTruthCut kTrueNumuCC_Nu([](const caf::SRNeutrinoProxy *truth){return( truth->iscc && abs(truth->pdg)==14 );})
Definition: OverlayCuts.h:22
caf::Proxy< caf::SRVector3D > vtx
Definition: SRProxy.h:573
const Cut kTrueOFiducialLoose
Definition: OverlayCuts.cxx:57
const Cut kTrueE250MeV
Definition: OverlayCuts.cxx:63
const NuTruthCut kTrueOFiducial_Nu([](const caf::SRNeutrinoProxy *nu){return(nu->vtx.X()< ovtxmax.X()&& nu->vtx.X() > ovtxmin.X()&& nu->vtx.Y() > ovtxmin.Y()&& nu->vtx.Y()< ovtxmax.Y()&& nu->vtx.Z() > ovtxmin.Z()&& nu->vtx.Z()< ovtxmax.Z());})
Definition: OverlayCuts.h:13
const Cut kTrueNueCC
Definition: OverlayCuts.cxx:74
const Cut kOverlaidNoEffCut([](const caf::SRProxy *sr){if(sr->mc.nallnus==0) return false;for(int j=0;j< sr->mc.nallnus;j++) if((sr->mc.allnus[j].mode > 9999 ||!sr->spill.ismc)) return true;return false;})
Definition: OverlayCuts.h:35
caf::Proxy< bool > iscc
Definition: SRProxy.h:538
const TVector3 ovtxminLoose(-220,-220, 0)
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
Definition: Cut.h:96
const Cut kAnaTrueECut_Nue
Definition: OverlayCuts.cxx:95
caf::StandardRecord * sr
const double j
Definition: BetheBloch.cxx:29
_Cut< caf::SRSpillProxy > SpillCut
Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts.
Definition: Cut.h:100
Proxy for caf::SRSpill.
Definition: SRProxy.h:1346
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
caf::Proxy< std::vector< caf::SRNeutrino > > allnus
Definition: SRProxy.h:606
const SpillCut kNoCut_Sp([](const caf::SRSpillProxy *sp){return true;})
Definition: OverlayCuts.h:39
const Cut kOverlaidEff51([](const caf::SRProxy *sr){if(sr->mc.nallnus==0) return false;for(int j=0;j< sr->mc.nallnus;j++) if((sr->mc.allnus[j].mode > 9999 ||!sr->spill.ismc) &&sr->mc.allnus[j].eff > 0.51) return true;return false;})
Definition: OverlayCuts.h:33
const NuTruthCut kTrueE250MeV_Nu([](const caf::SRNeutrinoProxy *nu){return nu->E > 0.25;})
Definition: OverlayCuts.h:19
const NuTruthCut kTrueOFiducialLoose_Nu([](const caf::SRNeutrinoProxy *nu){return(nu->vtx.X()< ovtxmaxLoose.X()&& nu->vtx.X() > ovtxminLoose.X()&& nu->vtx.Y() > ovtxminLoose.Y()&& nu->vtx.Y()< ovtxmaxLoose.Y()&& nu->vtx.Z() > ovtxminLoose.Z()&& nu->vtx.Z()< ovtxmaxLoose.Z());})
Definition: OverlayCuts.h:16
caf::Proxy< bool > ismc
Definition: SRProxy.h:1378
const Cut kTrueNumuCC
Definition: OverlayCuts.cxx:65
const TVector3 ovtxmin(-180,-180, 25)
caf::Proxy< short int > pdg
Definition: SRProxy.h:552
const TVector3 ovtxmax(180, 180, 1150)
const Cut kTrueOFiducial
Definition: OverlayCuts.cxx:44
const Cut kNotOverlaidData([](const caf::SRProxy *sr){if(sr->mc.nallnus==0) return true;return false;})
Definition: OverlayCuts.h:37
const NuTruthCut kAnaTrueECut_Nu_Numu([](const caf::SRNeutrinoProxy *nu){return(nu->E >=0.&&nu->E< 7.);})
Definition: OverlayCuts.h:28