Classes | Functions | Variables
make_pi0_xcheck.h File Reference
#include "TCanvas.h"
#include "TH1.h"
#include "TF1.h"
#include "TFile.h"
#include "TLegend.h"
#include "TLegendEntry.h"
#include "TArrayD.h"
#include "TAxis.h"
#include "TLatex.h"
#include "CAFAna/Core/Cut.h"
#include "CAFAna/Cuts/NueCutsFirstAna.h"
#include "CAFAna/Analysis/Plots.h"
#include "CAFAna/Analysis/Style.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "CAFAna/Vars/Vars.h"
#include "3FlavorAna/Vars/NumuVars.h"
#include "CAFAna/Vars/GenieWeights.h"
#include "StandardRecord/Proxy/SRProxy.h"

Go to the source code of this file.

Classes

struct  PlotDef
 
struct  PlotDefMulti
 
struct  PlotDef2D
 
struct  SelDef
 

Functions

const Cut kNueVtxContain ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(fabs(sr->vtx.elastic.vtx.X()) > 180) return false;if(fabs(sr->vtx.elastic.vtx.Y()) > 180) return false;if(fabs(sr->vtx.elastic.vtx.Z())< 50) return false;if(fabs(sr->vtx.elastic.vtx.Z()) > 1000) return false;return true;})
 
const Cut kNueVtxXWest ([](const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.X() >=0) return true;return false;})
 
const Cut kNueVtxXEast ([](const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.X()< 0) return true;return false;})
 
const Cut kNueVtxYTop ([](const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.Y() >=0) return true;return false;})
 
const Cut kNueVtxYBot ([](const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.Y()< 0) return true;return false;})
 
const Cut kNueShwContain ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(fabs(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X()) > 180) return false;if(fabs(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y()) > 180) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z()< 200) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z() > 1200) return false;return true;})
 
const Cut kTwoProngs ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;return sr->vtx.elastic.fuzzyk.npng==2;})
 
const Cut kPhotonID ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid > 0.75 &&sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid > 0.75;})
 
const Cut kPhotonLow ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid > 0.6 &&sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid > 0.6;})
 
const Cut kPhotonHigh ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid > 0.9 &&sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid > 0.9;})
 
const Cut kPhotonMax ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;double pid1=sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid;double pid2=sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid;if(pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.muonid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.electronid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.neutronid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.pionid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.otherid) return false;if(pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.muonid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.electronid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.neutronid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.pionid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.otherid) return false;return true;})
 
const Cut kMissingPlanesCut ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(auto &it:sr->vtx.elastic.fuzzyk.png) if(it.maxplanegap<=1) return false;return true;})
 
const Cut kContigPlanesCut ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(auto &it:sr->vtx.elastic.fuzzyk.png) if(it.maxplanecont<=4) return false;return true;})
 
const Var kNumPlanes ([](const caf::SRProxy *sr){return sr->slc.lastplane-sr->slc.firstplane+1;})
 
const Var kVtxX ([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.x;})
 
const Var kVtxY ([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.y;})
 
const Var kVtxZ ([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.z;})
 
const Var kProng1E ([](const caf::SRProxy *sr){return deadscale *1000 *sr->vtx.elastic.fuzzyk.png[0].calE;})
 
const Var kProng2E ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) deadscale *1000 *sr->vtx.elastic.fuzzyk.png[1].calE;})
 
const MultiVar kProngE ([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1E(sr));ret.push_back(kProng2E(sr));return ret;})
 
const Var kSumE ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return(double) 1000 *deadscale *(p1.calE+p2.calE);})
 
const Var kPngAsymE ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.f;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.f;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return abs(p1.calE-p2.calE)/(p1.calE+p2.calE);})
 
const Var kProng1L ([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].len;})
 
const Var kProng2L ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].len;})
 
const Var kProng1NHit ([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].nhit;})
 
const Var kProng2NHit ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].nhit;})
 
const MultiVar kProngNHit ([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1NHit(sr));ret.push_back(kProng2NHit(sr));return ret;})
 
const Var kProng1EHit ([](const caf::SRProxy *sr){return kProng1E(sr)/kProng1NHit(sr);})
 
const Var kProng2EHit ([](const caf::SRProxy *sr){return kProng2E(sr)/kProng2NHit(sr);})
 
const MultiVar kEHit ([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1EHit(sr));ret.push_back(kProng2EHit(sr));return ret;})
 
const Var kProng1NPlane ([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].nplane;})
 
const Var kProng2NPlane ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1;return(int) sr->vtx.elastic.fuzzyk.png[1].nplane;})
 
const Var kDotProd ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;return sr->vtx.elastic.fuzzyk.png[0].dir.Unit().Dot(sr->vtx.elastic.fuzzyk.png[1].dir.Unit());})
 
const Var kTotalP ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;double png1E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[0].calE;double png2E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[1].calE;double px1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.x;double py1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.y;double pz1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.z;double px2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.x;double py2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.y;double pz2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.z;return sqrt((px1+px2)*(px1+px2)+(py1+py2)*(py1+py2)+(pz1+pz2)*(pz1+pz2));})
 
const Var kCosTotal ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;double x1=sr->vtx.elastic.fuzzyk.png[0].dir.x;double y1=sr->vtx.elastic.fuzzyk.png[0].dir.y;double z1=sr->vtx.elastic.fuzzyk.png[0].dir.z;double x2=sr->vtx.elastic.fuzzyk.png[1].dir.x;double y2=sr->vtx.elastic.fuzzyk.png[1].dir.y;double z2=sr->vtx.elastic.fuzzyk.png[1].dir.z;TVector3 tot(x1+x2, y1+y2, z1+z2);return tot.Unit().Dot(beamDirND);})
 
const Var kDotProdTruth ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;TVector3 p1(sr->vtx.elastic.fuzzyk.png[0].truth.p.px, sr->vtx.elastic.fuzzyk.png[0].truth.p.py, sr->vtx.elastic.fuzzyk.png[0].truth.p.pz);TVector3 p2(sr->vtx.elastic.fuzzyk.png[1].truth.p.px, sr->vtx.elastic.fuzzyk.png[1].truth.p.py, sr->vtx.elastic.fuzzyk.png[1].truth.p.pz);return p1.Unit().Dot(p2.Unit());})
 
const Var thetaRes ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;double a1=sr->vtx.elastic.fuzzyk.png[0].dir.Unit().Dot(sr->vtx.elastic.fuzzyk.png[1].dir.Unit());TVector3 p1(sr->vtx.elastic.fuzzyk.png[0].truth.p.px, sr->vtx.elastic.fuzzyk.png[0].truth.p.py, sr->vtx.elastic.fuzzyk.png[0].truth.p.pz);TVector3 p2(sr->vtx.elastic.fuzzyk.png[1].truth.p.px, sr->vtx.elastic.fuzzyk.png[1].truth.p.py, sr->vtx.elastic.fuzzyk.png[1].truth.p.pz);double a2=p1.Unit().Dot(p2.Unit());return(a1-a2)/a2;})
 
const Var kNPng ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1;return(int) sr->vtx.elastic.fuzzyk.npng;})
 
const Var kEHitSlc ([](const caf::SRProxy *sr){return 1000 *deadscale *sr->slc.calE/sr->slc.nhit;})
 
const Var kESlc ([](const caf::SRProxy *sr){return 1000 *deadscale *sr->slc.calE;})
 
const Var kHitSlc ([](const caf::SRProxy *sr){return sr->slc.nhit;})
 
const Var kMass ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];const double dot=p1.dir.Unit().Dot(p2.dir.Unit());return deadscale *1000 *sqrt(2 *p1.calE *p2.calE *(1-dot));})
 
const Var kMassNoScale ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];const double dot=p1.dir.Unit().Dot(p2.dir.Unit());return 1000 *sqrt(2 *p1.calE *p2.calE *(1-dot))/1.78;})
 
const Var kPng1Pur ([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].truth.pur;})
 
const Var kPng2Pur ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].truth.pur;})
 
const MultiVar kProngPur ([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1Pur(sr));ret.push_back(kPng2Pur(sr));return ret;})
 
const Var kPng1Eff ([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].truth.eff;})
 
const Var kPng2Eff ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.0;return(double) sr->vtx.elastic.fuzzyk.png[1].truth.eff;})
 
const MultiVar kProngEff ([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1Eff(sr));ret.push_back(kPng2Eff(sr));return ret;})
 
const Var kPng1CVN ([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid;})
 
const Var kPng2CVN ([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.0;return(double) sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid;})
 
const MultiVar kProngCVN ([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1CVN(sr));ret.push_back(kPng2CVN(sr));return ret;})
 
const Cut kTwoPhoton ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;int count=0;for(auto &it:sr->vtx.elastic.fuzzyk.png) if(it.cvnpart.photonid > 0.75)++count;if(count< 2) return false;return true;})
 
const Var kOne ([](const caf::SRProxy *sr){return 1;})
 

Variables

const double deadscale = 0.8747
 
const Cut kRemidCut = SIMPLEVAR(sel.remid.pid) > 0 && SIMPLEVAR(sel.remid.pid) < 0.5
 
const Cut kdEdxCut = SIMPLEVAR(sand.nue.dedxpng1) < 0.003 && SIMPLEVAR(sand.nue.dedxpng2) < 0.003
 
const Var kLongestProngVar = SIMPLEVAR(sel.rvp.longtr)
 
const Var kNumHits = SIMPLEVAR(slc.nhit)
 
const Cut kTruePi0 = SIMPLEVAR(sand.nue.npi0) > 0
 
const Cut qual = kNueVtxContain && kNueShwContain
 
const Cut qual_base = qual && kTwoProngs && kContigPlanesCut && kMissingPlanesCut
 
const Cut SAsel = qual_base && kdEdxCut && kRemidCut
 
const Cut CVN_two = qual_base && kPhotonID
 
const Cut CVN_dedx = CVN_two && kdEdxCut
 
const Cut CVN_flat = CVN_two && kCosTotal > 0.75 && kTotalP > 200 && kTotalP < 1000
 
const Cut CVN_low = qual_base && kPhotonLow
 
const Cut CVN_high = qual_base && kPhotonHigh
 
const Cut CVN_max = qual_base && kPhotonMax
 
const Cut CVNASA = CVN_two && SAsel
 
const Cut CVNNSA = CVN_two && !SAsel
 
const Cut NCVNSA = !CVN_two && SAsel
 
const unsigned int kNSels = 11
 
const std::vector< SelDefsels
 
const unsigned int kNPlots = 21
 
const std::vector< PlotDefplots
 
const unsigned int kN2D = 11
 
std::vector< PlotDef2Dplots2d
 
const unsigned int kNMulti = 6
 
const std::vector< PlotDefMultiplotsMulti
 

Function Documentation

const Cut kContigPlanesCut ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(auto &it:sr->vtx.elastic.fuzzyk.png) if(it.maxplanecont<=4) return false;return true;}  )
const Var kCosTotal ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;double x1=sr->vtx.elastic.fuzzyk.png[0].dir.x;double y1=sr->vtx.elastic.fuzzyk.png[0].dir.y;double z1=sr->vtx.elastic.fuzzyk.png[0].dir.z;double x2=sr->vtx.elastic.fuzzyk.png[1].dir.x;double y2=sr->vtx.elastic.fuzzyk.png[1].dir.y;double z2=sr->vtx.elastic.fuzzyk.png[1].dir.z;TVector3 tot(x1+x2, y1+y2, z1+z2);return tot.Unit().Dot(beamDirND);}  )
const Var kDotProd ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;return sr->vtx.elastic.fuzzyk.png[0].dir.Unit().Dot(sr->vtx.elastic.fuzzyk.png[1].dir.Unit());}  )
const Var kDotProdTruth ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;TVector3 p1(sr->vtx.elastic.fuzzyk.png[0].truth.p.px, sr->vtx.elastic.fuzzyk.png[0].truth.p.py, sr->vtx.elastic.fuzzyk.png[0].truth.p.pz);TVector3 p2(sr->vtx.elastic.fuzzyk.png[1].truth.p.px, sr->vtx.elastic.fuzzyk.png[1].truth.p.py, sr->vtx.elastic.fuzzyk.png[1].truth.p.pz);return p1.Unit().Dot(p2.Unit());}  )
const MultiVar kEHit ( [] (const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1EHit(sr));ret.push_back(kProng2EHit(sr));return ret;}  )
const Var kEHitSlc ( [] (const caf::SRProxy *sr){return 1000 *deadscale *sr->slc.calE/sr->slc.nhit;}  )
const Var kESlc ( [] (const caf::SRProxy *sr){return 1000 *deadscale *sr->slc.calE;}  )
const Var kHitSlc ( [] (const caf::SRProxy *sr){return sr->slc.nhit;}  )
const Var kMass ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];const double dot=p1.dir.Unit().Dot(p2.dir.Unit());return deadscale *1000 *sqrt(2 *p1.calE *p2.calE *(1-dot));}  )
const Var kMassNoScale ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];const double dot=p1.dir.Unit().Dot(p2.dir.Unit());return 1000 *sqrt(2 *p1.calE *p2.calE *(1-dot))/1.78;}  )
const Cut kMissingPlanesCut ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(auto &it:sr->vtx.elastic.fuzzyk.png) if(it.maxplanegap<=1) return false;return true;}  )
const Var kNPng ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1;return(int) sr->vtx.elastic.fuzzyk.npng;}  )
const Cut kNueShwContain ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(fabs(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X()) > 180) return false;if(fabs(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y()) > 180) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z()< 200) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z() > 1200) return false;return true;}  )
const Cut kNueVtxContain ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(fabs(sr->vtx.elastic.vtx.X()) > 180) return false;if(fabs(sr->vtx.elastic.vtx.Y()) > 180) return false;if(fabs(sr->vtx.elastic.vtx.Z())< 50) return false;if(fabs(sr->vtx.elastic.vtx.Z()) > 1000) return false;return true;}  )
const Cut kNueVtxXEast ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.X()< 0) return true;return false;}  )
const Cut kNueVtxXWest ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.X() >=0) return true;return false;}  )
const Cut kNueVtxYBot ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.Y()< 0) return true;return false;}  )
const Cut kNueVtxYTop ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.vtx.Y() >=0) return true;return false;}  )
const Var kNumPlanes ( [] (const caf::SRProxy *sr){return sr->slc.lastplane-sr->slc.firstplane+1;}  )
const Var kOne ( [] (const caf::SRProxy *sr){return 1;}  )
const Cut kPhotonHigh ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid > 0.9 &&sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid > 0.9;}  )
const Cut kPhotonID ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid > 0.75 &&sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid > 0.75;}  )
const Cut kPhotonLow ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid > 0.6 &&sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid > 0.6;}  )
const Cut kPhotonMax ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng!=2) return false;double pid1=sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid;double pid2=sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid;if(pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.muonid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.electronid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.neutronid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.pionid||pid1< sr->vtx.elastic.fuzzyk.png[0].cvnpart.otherid) return false;if(pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.muonid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.electronid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.neutronid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.pionid||pid2< sr->vtx.elastic.fuzzyk.png[0].cvnpart.otherid) return false;return true;}  )
const Var kPng1CVN ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid;}  )
const Var kPng1Eff ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].truth.eff;}  )
const Var kPng1Pur ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].truth.pur;}  )
const Var kPng2CVN ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.0;return(double) sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid;}  )
const Var kPng2Eff ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.0;return(double) sr->vtx.elastic.fuzzyk.png[1].truth.eff;}  )
const Var kPng2Pur ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].truth.pur;}  )
const Var kPngAsymE ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.f;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.f;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return abs(p1.calE-p2.calE)/(p1.calE+p2.calE);}  )
const Var kProng1E ( [] (const caf::SRProxy *sr){return deadscale *1000 *sr->vtx.elastic.fuzzyk.png[0].calE;}  )
const Var kProng1EHit ( [] (const caf::SRProxy *sr){return kProng1E(sr)/kProng1NHit(sr);}  )
const Var kProng1L ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].len;}  )
const Var kProng1NHit ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].nhit;}  )
const Var kProng1NPlane ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].nplane;}  )
const Var kProng2E ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) deadscale *1000 *sr->vtx.elastic.fuzzyk.png[1].calE;}  )
const Var kProng2EHit ( [] (const caf::SRProxy *sr){return kProng2E(sr)/kProng2NHit(sr);}  )
const Var kProng2L ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].len;}  )
const Var kProng2NHit ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].nhit;}  )
const Var kProng2NPlane ( [] (const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1;return(int) sr->vtx.elastic.fuzzyk.png[1].nplane;}  )
const MultiVar kProngCVN ( [] (const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1CVN(sr));ret.push_back(kPng2CVN(sr));return ret;}  )
const MultiVar kProngE ( [] (const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1E(sr));ret.push_back(kProng2E(sr));return ret;}  )
const MultiVar kProngEff ( [] (const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1Eff(sr));ret.push_back(kPng2Eff(sr));return ret;}  )
const MultiVar kProngNHit ( [] (const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1NHit(sr));ret.push_back(kProng2NHit(sr));return ret;}  )
const MultiVar kProngPur ( [] (const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1Pur(sr));ret.push_back(kPng2Pur(sr));return ret;}  )
const Var kSumE ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return(double) 1000 *deadscale *(p1.calE+p2.calE);}  )
const Var kTotalP ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;double png1E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[0].calE;double png2E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[1].calE;double px1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.x;double py1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.y;double pz1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.z;double px2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.x;double py2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.y;double pz2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.z;return sqrt((px1+px2)*(px1+px2)+(py1+py2)*(py1+py2)+(pz1+pz2)*(pz1+pz2));}  )
const Cut kTwoPhoton ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;int count=0;for(auto &it:sr->vtx.elastic.fuzzyk.png) if(it.cvnpart.photonid > 0.75)++count;if(count< 2) return false;return true;}  )
const Cut kTwoProngs ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;return sr->vtx.elastic.fuzzyk.npng==2;}  )
const Var kVtxX ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.vtx.x;}  )
const Var kVtxY ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.vtx.y;}  )
const Var kVtxZ ( [] (const caf::SRProxy *sr){return sr->vtx.elastic.vtx.z;}  )
const Var thetaRes ( [] (const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;double a1=sr->vtx.elastic.fuzzyk.png[0].dir.Unit().Dot(sr->vtx.elastic.fuzzyk.png[1].dir.Unit());TVector3 p1(sr->vtx.elastic.fuzzyk.png[0].truth.p.px, sr->vtx.elastic.fuzzyk.png[0].truth.p.py, sr->vtx.elastic.fuzzyk.png[0].truth.p.pz);TVector3 p2(sr->vtx.elastic.fuzzyk.png[1].truth.p.px, sr->vtx.elastic.fuzzyk.png[1].truth.p.py, sr->vtx.elastic.fuzzyk.png[1].truth.p.pz);double a2=p1.Unit().Dot(p2.Unit());return(a1-a2)/a2;}  )

Variable Documentation

const Cut CVN_dedx = CVN_two && kdEdxCut

Definition at line 482 of file make_pi0_xcheck.h.

const Cut CVN_flat = CVN_two && kCosTotal > 0.75 && kTotalP > 200 && kTotalP < 1000

Definition at line 483 of file make_pi0_xcheck.h.

const Cut CVN_high = qual_base && kPhotonHigh

Definition at line 485 of file make_pi0_xcheck.h.

const Cut CVN_low = qual_base && kPhotonLow

Definition at line 484 of file make_pi0_xcheck.h.

const Cut CVN_max = qual_base && kPhotonMax

Definition at line 486 of file make_pi0_xcheck.h.

const Cut CVN_two = qual_base && kPhotonID

Definition at line 481 of file make_pi0_xcheck.h.

const Cut CVNASA = CVN_two && SAsel

Definition at line 487 of file make_pi0_xcheck.h.

const Cut CVNNSA = CVN_two && !SAsel

Definition at line 488 of file make_pi0_xcheck.h.

const double deadscale = 0.8747

Definition at line 26 of file make_pi0_xcheck.h.

const Cut kdEdxCut = SIMPLEVAR(sand.nue.dedxpng1) < 0.003 && SIMPLEVAR(sand.nue.dedxpng2) < 0.003

Definition at line 76 of file make_pi0_xcheck.h.

const Var kLongestProngVar = SIMPLEVAR(sel.rvp.longtr)

Definition at line 145 of file make_pi0_xcheck.h.

const unsigned int kN2D = 11

Definition at line 531 of file make_pi0_xcheck.h.

Referenced by make_pi0_xcheck(), and plot_pi0_xcheck().

const unsigned int kNMulti = 6

Definition at line 546 of file make_pi0_xcheck.h.

Referenced by make_pi0_xcheck(), and plot_pi0_xcheck().

const unsigned int kNPlots = 21

Definition at line 506 of file make_pi0_xcheck.h.

Referenced by make_pi0_xcheck(), make_pid(), plot_pi0_xcheck(), and plot_pid().

const unsigned int kNSels = 11

Definition at line 491 of file make_pi0_xcheck.h.

Referenced by make_pi0_xcheck(), make_pid(), plot_pi0_xcheck(), and plot_pid().

const Var kNumHits = SIMPLEVAR(slc.nhit)

Definition at line 147 of file make_pi0_xcheck.h.

const Cut kRemidCut = SIMPLEVAR(sel.remid.pid) > 0 && SIMPLEVAR(sel.remid.pid) < 0.5

Definition at line 74 of file make_pi0_xcheck.h.

const Cut kTruePi0 = SIMPLEVAR(sand.nue.npi0) > 0

Definition at line 371 of file make_pi0_xcheck.h.

const Cut NCVNSA = !CVN_two && SAsel

Definition at line 489 of file make_pi0_xcheck.h.

const std::vector<PlotDef> plots
Initial value:
=
{{"counting", "", Binning::Simple(3, 0, 3), kOne,0},
{"mass", "M_{#gamma#gamma} (MeV)", Binning::Simple(50, 0, 500), kMass,0},
{"asymE", "|E1-E2|/E1+E2", Binning::Simple(50, 0, 1), kPngAsymE,0},
{"Ptot", "P_{#gamma#gamma} (MeV)", Binning::Simple(50, 0, 4000), kTotalP,0},
{"Etot", "E_{#gamma#gamma} (MeV)", Binning::Simple(50, 0, 4000), kSumE,0},
{"Costot", "cos(#theta)", Binning::Simple(50, 0, 1), kCosTotal,0},
{"Open", "Cos(#theta_{#gamma#gamma})", Binning::Simple(50, 0, 1), kDotProd,0},
{"PngE1", "E_{p1} (MeV)", Binning::Simple(50, 0, 2000), kProng1E,0},
{"PngE2", "E_{p2} (MeV)", Binning::Simple(50, 0, 2000), kProng2E,0},
{"PngHit1", "hit_{p1}", Binning::Simple(50, 0, 100), kProng1NHit,0},
{"PngHit2", "hit_{p2}", Binning::Simple(50, 0, 100), kProng2NHit,0},
{"SlcEHit", "E_{slc}/hit_{slc} (MeV)", Binning::Simple(50, 0, 50), kEHitSlc,0},
{"SlcE", "E_{slc} (MeV)", Binning::Simple(50, 0, 4000), kESlc,0},
{"SlcHit", "hit_{slc}", Binning::Simple(50, 0, 200), kHitSlc,0},
{"PngEHit1", "E_{p1}/hit_{p1} (MeV)", Binning::Simple(50, 0, 50), kProng1EHit,0},
{"PngEHit2", "E_{p2}/hit_{p2} (MeV)", Binning::Simple(50, 0, 50), kProng2EHit,0},
{"PngPur1", "Prong 1 Purity", Binning::Simple(50, 0, 1), kPng1Pur,1},
{"PngPur2", "Prong 2 Purity", Binning::Simple(50, 0, 1), kPng2Pur,1},
{"vtxx", "x (cm)", Binning::Simple(50, -200, 200), kVtxX,0},
{"vtxy", "y (cm)", Binning::Simple(50, -200, 200), kVtxY,0},
{"vtxz", "z (cm)", Binning::Simple(50, 0, 1600), kVtxZ,0}
}
const Var kProng2EHit([](const caf::SRProxy *sr){return kProng2E(sr)/kProng2NHit(sr);})
const Var kPngAsymE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.f;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.f;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return abs(p1.calE-p2.calE)/(p1.calE+p2.calE);})
const Var kPng1Pur([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].truth.pur;})
const Var kVtxZ([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.z;})
const Var kProng2E([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) deadscale *1000 *sr->vtx.elastic.fuzzyk.png[1].calE;})
const Var kVtxX([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.x;})
const Var kPng2Pur([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].truth.pur;})
const Var kProng2NHit([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.npng< 2) return-1.;return(double) sr->vtx.elastic.fuzzyk.png[1].nhit;})
const Var kProng1EHit([](const caf::SRProxy *sr){return kProng1E(sr)/kProng1NHit(sr);})
const Var kEHitSlc([](const caf::SRProxy *sr){return 1000 *deadscale *sr->slc.calE/sr->slc.nhit;})
const Var kOne([](const caf::SRProxy *sr){return 1;})
const Var kHitSlc([](const caf::SRProxy *sr){return sr->slc.nhit;})
const Var kTotalP([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;double png1E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[0].calE;double png2E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[1].calE;double px1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.x;double py1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.y;double pz1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.z;double px2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.x;double py2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.y;double pz2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.z;return sqrt((px1+px2)*(px1+px2)+(py1+py2)*(py1+py2)+(pz1+pz2)*(pz1+pz2));})
const Var kProng1NHit([](const caf::SRProxy *sr){return sr->vtx.elastic.fuzzyk.png[0].nhit;})
const Var kESlc([](const caf::SRProxy *sr){return 1000 *deadscale *sr->slc.calE;})
const Var kSumE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return(double) 1000 *deadscale *(p1.calE+p2.calE);})
const Var kDotProd([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;return sr->vtx.elastic.fuzzyk.png[0].dir.Unit().Dot(sr->vtx.elastic.fuzzyk.png[1].dir.Unit());})
const Var kProng1E([](const caf::SRProxy *sr){return deadscale *1000 *sr->vtx.elastic.fuzzyk.png[0].calE;})
const Var kVtxY([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.y;})
const Var kCosTotal([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;double x1=sr->vtx.elastic.fuzzyk.png[0].dir.x;double y1=sr->vtx.elastic.fuzzyk.png[0].dir.y;double z1=sr->vtx.elastic.fuzzyk.png[0].dir.z;double x2=sr->vtx.elastic.fuzzyk.png[1].dir.x;double y2=sr->vtx.elastic.fuzzyk.png[1].dir.y;double z2=sr->vtx.elastic.fuzzyk.png[1].dir.z;TVector3 tot(x1+x2, y1+y2, z1+z2);return tot.Unit().Dot(beamDirND);})
const Var kMass([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];const double dot=p1.dir.Unit().Dot(p2.dir.Unit());return deadscale *1000 *sqrt(2 *p1.calE *p2.calE *(1-dot));})

Definition at line 507 of file make_pi0_xcheck.h.

std::vector<PlotDef2D> plots2d
Initial value:
=
{{"vertices_XY", "x (cm)", Binning::Simple(50,-200,200), kVtxX, "y (cm)", Binning::Simple(50,-200,200), kVtxY},
{"vertices_ZX", "z (cm)", Binning::Simple(50,0,1600), kVtxZ, "x (cm)", Binning::Simple(50,-200,200), kVtxX},
{"vertices_ZY", "z (cm)", Binning::Simple(50,0,1600), kVtxZ, "y (cm)", Binning::Simple(50,-200,200), kVtxY},
{"peak_Ptot", "P_{#gamma#gamma} (MeV)", Binning::Simple(50,0,4000), kTotalP, "M_{#gamma#gamma} (MeV)",Binning::Simple(50,0,500), kMass},
{"peak_Etot", "E_{#gamma#gamma} (MeV)", Binning::Simple(50,0,4000), kSumE, "M_{#gamma#gamma} (MeV)", Binning::Simple(50,0,500), kMass},
{"peak_asymE", "|E1-E2|/E1+E2", Binning::Simple(50,0,1), kPngAsymE, "M_{#gamma#gamma} (MeV)", Binning::Simple(50,0,500), kMass},
{"peak_Costot", "cos(#theta)", Binning::Simple(50,0,1), kCosTotal, "M_{#gamma#gamma} (MeV)", Binning::Simple(50,0,500), kMass},
{"peak_open", "cos(#theta_{#gamma#gamma})", Binning::Simple(50,0,1), kDotProd, "M_{#gamma#gamma} (MeV)", Binning::Simple(50,0,500), kMass},
{"peak_x", "x (cm)", Binning::Simple(50,-200,200), kVtxX, "M_{#gamma#gamma} (MeV)", Binning::Simple(50,0,500), kMass},
{"peak_y", "y (cm)", Binning::Simple(50,-200,200), kVtxY, "M_{#gamma#gamma} (MeV)", Binning::Simple(50,0,500), kMass},
{"peak_z", "z (cm)", Binning::Simple(50,0,1600), kVtxZ, "M_{#gamma#gamma} (MeV)", Binning::Simple(50,0,500), kMass}
}
const Var kPngAsymE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.f;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.f;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return abs(p1.calE-p2.calE)/(p1.calE+p2.calE);})
const Var kVtxZ([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.z;})
const Var kVtxX([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.x;})
const Var kTotalP([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;double png1E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[0].calE;double png2E=1000 *deadscale *sr->vtx.elastic.fuzzyk.png[1].calE;double px1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.x;double py1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.y;double pz1=png1E *sr->vtx.elastic.fuzzyk.png[0].dir.z;double px2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.x;double py2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.y;double pz2=png2E *sr->vtx.elastic.fuzzyk.png[1].dir.z;return sqrt((px1+px2)*(px1+px2)+(py1+py2)*(py1+py2)+(pz1+pz2)*(pz1+pz2));})
const Var kSumE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];return(double) 1000 *deadscale *(p1.calE+p2.calE);})
const Var kDotProd([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;return sr->vtx.elastic.fuzzyk.png[0].dir.Unit().Dot(sr->vtx.elastic.fuzzyk.png[1].dir.Unit());})
const Var kVtxY([](const caf::SRProxy *sr){return sr->vtx.elastic.vtx.y;})
const Var kCosTotal([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-5.;double x1=sr->vtx.elastic.fuzzyk.png[0].dir.x;double y1=sr->vtx.elastic.fuzzyk.png[0].dir.y;double z1=sr->vtx.elastic.fuzzyk.png[0].dir.z;double x2=sr->vtx.elastic.fuzzyk.png[1].dir.x;double y2=sr->vtx.elastic.fuzzyk.png[1].dir.y;double z2=sr->vtx.elastic.fuzzyk.png[1].dir.z;TVector3 tot(x1+x2, y1+y2, z1+z2);return tot.Unit().Dot(beamDirND);})
const Var kMass([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.;if(sr->vtx.elastic.fuzzyk.npng!=2) return-1.;const auto &p1=sr->vtx.elastic.fuzzyk.png[0];const auto &p2=sr->vtx.elastic.fuzzyk.png[1];const double dot=p1.dir.Unit().Dot(p2.dir.Unit());return deadscale *1000 *sqrt(2 *p1.calE *p2.calE *(1-dot));})

Definition at line 532 of file make_pi0_xcheck.h.

Referenced by make_pi0_xcheck(), and plot_pi0_xcheck().

const std::vector<PlotDefMulti> plotsMulti
Initial value:
=
{{"PngPur", "Prong Purity", Binning::Simple(50, 0, 1), kProngPur,1},
{"PngEff", "Prong Efficiency", Binning::Simple(50, 0, 1), kProngEff,1},
{"PngE", "E_{png} (MeV)", Binning::Simple(50, 0, 2000), kProngE,0},
{"PngHits", "hit_{png}", Binning::Simple(50, 0, 100), kProngNHit,0},
{"PngEHit", "E_{png}/hit_{png} (MeV)", Binning::Simple(50, 0, 50), kEHit,0},
{"PngCVN", "CVN_{png}", Binning::Simple(50, 0.5, 1), kProngCVN,0}
}
const MultiVar kProngE([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1E(sr));ret.push_back(kProng2E(sr));return ret;})
const MultiVar kProngPur([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1Pur(sr));ret.push_back(kPng2Pur(sr));return ret;})
const MultiVar kProngNHit([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1NHit(sr));ret.push_back(kProng2NHit(sr));return ret;})
const MultiVar kProngEff([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1Eff(sr));ret.push_back(kPng2Eff(sr));return ret;})
const MultiVar kEHit([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kProng1EHit(sr));ret.push_back(kProng2EHit(sr));return ret;})
const MultiVar kProngCVN([](const caf::SRProxy *sr){std::vector< double > ret;ret.push_back(kPng1CVN(sr));ret.push_back(kPng2CVN(sr));return ret;})

Definition at line 547 of file make_pi0_xcheck.h.

Referenced by make_pi0_xcheck(), and plot_pi0_xcheck().

Definition at line 478 of file make_pi0_xcheck.h.

Referenced by calib::BestPathEstimates().

Definition at line 479 of file make_pi0_xcheck.h.

const Cut SAsel = qual_base && kdEdxCut && kRemidCut

Definition at line 480 of file make_pi0_xcheck.h.

const std::vector<SelDef> sels
Initial value:
=
{{"qual_base","Base Selection Criteria",qual_base},
{"SA_sel", "SA Selection", SAsel},
{"CVN_two", "Two Prong CVN Selection", CVN_two},
{"CVN_dedx", "dedx Selection", CVN_dedx},
{"CVN_flat", "Flat Kinematics Selection", CVN_flat},
{"CVN_low", "Two Prong CVN Selection", CVN_low},
{"CVN_high", "Two Prong CVN Selection", CVN_high},
{"CVN_max", "Two Prong CVN Selection", CVN_max},
{"CVN_SA", "CVN and SA selection", CVNASA},
{"CVN_NSA", "CVN and not SA selection", CVNNSA},
{"NCVN_SA", "Not CVN and SA selection", NCVNSA}
}
const Cut CVN_low
const Cut CVN_two
const Cut NCVNSA
const Cut qual_base
const Cut SAsel
const Cut CVN_flat
const Cut CVN_dedx
const Cut CVNNSA
const Cut CVNASA
const Cut CVN_high
const Cut CVN_max

Definition at line 492 of file make_pi0_xcheck.h.