5 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
20 std::string suffix =
"";
21 std::string label =
"";
28 std::string suffix =
"";
29 std::string label =
"";
73 std::string suffix =
"";
74 std::string label =
"";
81 std::string suffix =
"";
82 std::string label =
"";
95 return ( slc->reco.shw[0].len < 30.);
103 {{
"nocut",
"All Slices",
kNoCut, kBlack},
104 {
"sig",
"True NumuCC",
kSig, kRed+1},
105 {
"bkg",
"Not NumuCC", !
kSig, kAzure+2},
109 {
"uncont",
"Uncontained", !
kContained, kBlack},
110 {
"sig_uncont",
"Uncontained Signal", !
kContained &&
kSig, kRed+1},
115 {{
"nocut_spill",
"All Slices",
kNoSpillCut, kBlack},
117 {
"flash_spill",
"Pass flash Trigger",
kFlashTrigger, kAzure+2}
const Binning kLengthBinning
const Cut kNoCut([](const caf::SRSliceProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
const Var kRecoShower_EndX([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.x+shw->dir.x *shw->len):-9999.;})
const Var kRecoShower_OpenAngle([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?180.*shw->open_angle/M_PI:-5.;})
const SpillCut kFirstEvents
const SpillMultiVar kCRTHitTime([](const caf::SRSpillProxy *sr){std::vector< double > times;for(const auto &hit:sr->crt_hits){times.push_back(hit.time);}return times;})
const Cut kIsNC([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.isnc;})
Is this a Neutral Current event?
Represent the binning of a Spectrum's x-axis.
const SpillMultiVar kCRTHitX([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.x);}return positions;})
const Binning kTimeBinning
const Cut kNueContainedFD([](const caf::SRSliceProxy *slc){const int largestShwIdx(kLargestRecoShowerIdx(slc));return false;double this_endx=slc->reco.shw[largestShwIdx].start.x+(slc->reco.shw[largestShwIdx].dir.x *slc->reco.shw[largestShwIdx].len);double this_endy=slc->reco.shw[largestShwIdx].start.y+(slc->reco.shw[largestShwIdx].dir.y *slc->reco.shw[largestShwIdx].len);double this_endz=slc->reco.shw[largestShwIdx].start.z+(slc->reco.shw[largestShwIdx].dir.z *slc->reco.shw[largestShwIdx].len);bool startx=(fvfd_cryo1.xmin< slc->reco.shw[largestShwIdx].start.x)&&(slc->reco.shw[largestShwIdx].start.x< fvfd_cryo1.xmax);bool endx=(fvfd_cryo1.xmin< this_endx)&&(this_endx< fvfd_cryo1.xmax);bool starty=(fvfd_cryo1.ymin< slc->reco.shw[largestShwIdx].start.y)&&(slc->reco.shw[largestShwIdx].start.y< fvfd_cryo1.ymax);bool endy=(fvfd_cryo1.ymin< this_endy)&&(this_endy< fvfd_cryo1.ymax);bool startz=(fvfd_cryo1.zmin< slc->reco.shw[largestShwIdx].start.z)&&(slc->reco.shw[largestShwIdx].start.z< fvfd_cryo1.zmax);bool endz=(fvfd_cryo1.zmin< this_endz)&&(this_endz< fvfd_cryo1.zmax);return(startx &&endx &&starty &&endy &&startz &&endz);})
std::vector< SelDefSpill > sels_spill
const Binning kDensityBinning
const Var kRecoShower_StartX([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.x):-9999.;})
const Var kRecoShower_StartY([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.y):-9999.;})
const Binning kOpenAngleBinning
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
const Cut kIsNue([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==12;})
const Var kSlcVtxX([](const caf::SRSliceProxy *slc) -> double{return slc->vertex.x;})
const Var kSlcVtxY([](const caf::SRSliceProxy *slc) -> double{return slc->vertex.y;})
const Var kRecoShower_BestEnergy([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->bestplane_energy):-5;})
const SpillMultiVar kCRTHitPE([](const caf::SRSpillProxy *sr){std::vector< double > pes;for(const auto &hit:sr->crt_hits){pes.push_back(hit.pe);}return pes;})
const Binning kPositionXFDBinning
const Var kSlcVtxZ([](const caf::SRSliceProxy *slc) -> double{return slc->vertex.z;})
const Var kRecoShower_EndY([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.y+shw->dir.y *shw->len):-9999.;})
const SpillMultiVar kCRTHitY([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.y);}return positions;})
const Var kRecoShower_Length([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->len):-5.;})
const Var kRecoShower_Energy([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->plane[1].energy):-5.;})
const SpillMultiVar kCRTHitZ([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.z);}return positions;})
std::vector< PlotDef > plots
const SpillCut kNoSpillCut([](const caf::SRSpillProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
const SpillCut kFlashTrigger([](const caf::SRSpillProxy *sr){return(sr->pass_flashtrig);})
const Var kRecoShower_StartZ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.z):-9999.;})
const Binning kPositionYFDBinning
const Binning kNueEnergyBinning
std::vector< SelDef > sels
const Binning kPositionZFDBinning
std::vector< PlotDefSpill > plots_spill
const Var kRecoShower_Density([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->density):-5.;})
const Binning kGapBinning
const Var kRecoShower_EndZ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.z+shw->dir.z *shw->len):-9999.;})
const Var kRecoShower_ConversionGap([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->conversion_gap):-5.;})
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
const Cut kShortShower([](const caf::SRSliceProxy *slc){if(slc->reco.nshw >0){return(slc->reco.shw[0].len< 30.);}return false;})