All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NumuCutsIcarus202106.h
Go to the documentation of this file.
1 #pragma once
2 
3 // Definition of the generic Cut object.
5 
6 namespace ana
7 {
8  // Cuts for identifying slice category.
9  extern const Cut kIsNuSlice;
10 
11  extern const Cut kIsCosmic;
12 
13  extern const Cut kIsNuMuCC;
14 
15  extern const Cut kIsNuOther;
16 
17  // "Raw" cuts for the selection.
18  extern const Cut kCryo0;
19 
20  extern const Cut kTFiducial;
21 
22  extern const Cut kRFiducial;
23 
24  extern const Cut kNotClearCosmic;
25 
26  extern const Cut kNuScore;
27 
28  extern const Cut kFMScore;
29 
30  extern const Cut kPTrack;
31 
32  extern const Cut kPTrackContained;
33 
34  extern const Cut kPTrackExiting;
35 
36  // "Successive" cuts for the selection.
37  extern const Cut kNuMuCC_Cryo0;
38 
39  extern const Cut kCosmic_Cryo0;
40 
41  extern const Cut kNuOther_Cryo0;
42 
43  extern const Cut kNuMuCC_TFiducial;
44 
45  extern const Cut kNuMuCC_RFiducial;
46 
47  extern const Cut kCosmic_TFiducial;
48 
49  extern const Cut kCosmic_RFiducial;
50 
51  extern const Cut kNuOther_TFiducial;
52 
53  extern const Cut kNuOther_RFiducial;
54 
55  extern const Cut kNuMuCC_ClearCos;
56 
57  extern const Cut kCosmic_ClearCos;
58 
59  extern const Cut kNuOther_ClearCos;
60 
61  extern const Cut kNuMuCC_NuScore;
62 
63  extern const Cut kCosmic_NuScore;
64 
65  extern const Cut kNuOther_NuScore;
66 
67  extern const Cut kNuMuCC_FMScore;
68 
69  extern const Cut kCosmic_FMScore;
70 
71  extern const Cut kNuOther_FMScore;
72 
73  extern const Cut kNuMuCC_PTrack;
74 
75  extern const Cut kCosmic_PTrack;
76 
77  extern const Cut kNuOther_PTrack;
78 
79  // The full selection cut using only reco information.
80  extern const Cut kNuMuCC_FullSelection;
81 
82  // Spill level cuts.
83  extern const SpillCut kLongTrack;
84 }
const Cut kFMScore([](const caf::SRSliceProxy *slc){return(!isnan(slc->fmatch.score)&&slc->fmatch.score< 7.0);})
const Cut kIsNuMuCC([](const caf::SRSliceProxy *slc){return(kIsNuSlice(slc)&&slc->truth.iscc &&(slc->truth.pdg==14||slc->truth.pdg==-14));})
const Cut kNuOther_RFiducial
const Cut kIsNuSlice
const Cut kNuMuCC_FMScore
const Cut kPTrackContained([](const caf::SRSliceProxy *slc){int Ind=kPTrackInd(slc);bool Contained(false);if(Ind >=0){auto const &trk=slc->reco.trk.at(Ind);Contained=(!isnan(trk.end.x)&&(trk.end.x< -71.1-25 &&trk.end.x >-369.33+25)&&!isnan(trk.end.y)&&(trk.end.y >-181.7+25 &&trk.end.y< 134.8-25)&&!isnan(trk.end.z)&&(trk.end.z >-895.95+30 &&trk.end.z< 895.95-50));}return Contained;})
const Cut kCosmic_PTrack
const Cut kNuOther_Cryo0
const Cut kNuOther_ClearCos
const Cut kNuMuCC_FullSelection
const Cut kNuScore([](const caf::SRSliceProxy *slc){return(!isnan(slc->nu_score)&&slc->nu_score > 0.4);})
process_name opflashCryoW ana
const Cut kIsNuOther
const Cut kCosmic_FMScore
const Cut kTFiducial([](const caf::SRSliceProxy *slc){return(!isnan(slc->truth.position.x)&&((slc->truth.position.x< -71.1-25 &&slc->truth.position.x >-369.33+25)||(slc->truth.position.x > 71.1+25 &&slc->truth.position.x< 369.33-25))&&!isnan(slc->truth.position.y)&&(slc->truth.position.y >-181.7+25 &&slc->truth.position.y< 134.8-25)&&!isnan(slc->truth.position.z)&&(slc->truth.position.z >-895.95+30 &&slc->truth.position.z< 895.95-50));})
const Cut kCosmic_RFiducial
const Cut kNuMuCC_PTrack
const SpillCut kLongTrack([](const caf::SRSpillProxy *sr){bool ProgCut=false;bool NuIsNuMuCC, IsMuon, Contained;for(auto const &nu:sr->mc.nu){NuIsNuMuCC=nu.iscc &&(nu.pdg==14||nu.pdg==-14);for(auto const &prim:nu.prim){IsMuon=(prim.pdg==13||prim.pdg==-13);Contained=(prim.contained==1);ProgCut=ProgCut||(NuIsNuMuCC &&IsMuon &&((Contained &&prim.length > 50.0)||(!Contained &&prim.length > 100.0)));}}return ProgCut;})
_Cut< caf::SRSliceProxy > Cut
Definition: Cut.h:95
const Cut kNuOther_PTrack
const Cut kIsCosmic
const Cut kNuOther_NuScore
const Cut kCosmic_NuScore
const Cut kNuOther_TFiducial
const Cut kCosmic_TFiducial
const Cut kCryo0([](const caf::SRSliceProxy *slc){return(!isnan(slc->vertex.x)&&slc->vertex.x< 0);})
const Cut kNotClearCosmic([](const caf::SRSliceProxy *slc){return!slc->is_clear_cosmic;})
const Cut kNuMuCC_RFiducial
const Cut kCosmic_Cryo0
const Cut kNuMuCC_Cryo0
const Cut kNuMuCC_ClearCos
const Cut kRFiducial([](const caf::SRSliceProxy *slc){return(!isnan(slc->vertex.x)&&((slc->vertex.x< -71.1-25 &&slc->vertex.x >-369.33+25)||(slc->vertex.x > 71.1+25 &&slc->vertex.x< 369.33-25))&&!isnan(slc->vertex.y)&&(slc->vertex.y >-181.7+25 &&slc->vertex.y< 134.8-25)&&!isnan(slc->vertex.z)&&(slc->vertex.z >-895.95+30 &&slc->vertex.z< 895.95-50));})
Template for Cut and SpillCut.
Definition: Cut.h:16
const Cut kPTrack([](const caf::SRSliceProxy *slc){return(kPTrackInd(slc) >=0);})
const Cut kPTrackExiting([](const caf::SRSliceProxy *slc){int Ind=kPTrackInd(slc);bool Exiting(false);if(Ind >=0){auto const &trk=slc->reco.trk.at(Ind);Exiting=!(!isnan(trk.end.x)&&(trk.end.x< -71.1-25 &&trk.end.x >-369.33+25)&&!isnan(trk.end.y)&&(trk.end.y >-181.7+25 &&trk.end.y< 134.8-25)&&!isnan(trk.end.z)&&(trk.end.z >-895.95+30 &&trk.end.z< 895.95-50));}return Exiting;})
const Cut kCosmic_ClearCos
const Cut kNuMuCC_NuScore
const Cut kNuOther_FMScore
const Cut kNuMuCC_TFiducial