Namespaces | Functions | Variables
NCPi0SingleProngCuts.h File Reference
#include "CAFAna/Core/Cut.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Vars/Vars.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include "StandardRecord/SRNueCosRej.h"
#include "CAFAna/Cuts/Cuts.h"
#include "TMath.h"
#include "TVector3.h"
#include "TParticlePDG.h"

Go to the source code of this file.

Namespaces

 ana
 Cuts and Vars for the 2020 FD DiF Study.
 

Functions

const Cut ana::kFiducial ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0 &&sr->mc.nnu==0) return false;if((sr->vtx.elastic[0].vtx.x)< -170.0) return false;if((sr->vtx.elastic[0].vtx.x) > 170.0) return false;if((sr->vtx.elastic[0].vtx.y)< -160.0) return false;if((sr->vtx.elastic[0].vtx.y) > 170.0) return false;if((sr->vtx.elastic[0].vtx.z)< 50.0) return false;if((sr->vtx.elastic[0].vtx.z) > 1100.0) return false;return true;})
 
const Cut ana::kTrueFiducial ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;if(fabs(sr->mc.nu[0].vtx.x) > 200.0) return false;if(fabs(sr->mc.nu[0].vtx.y) > 200.0) return false;if((sr->mc.nu[0].vtx.z)< 0.0) return false;if((sr->mc.nu[0].vtx.z) > 1600.0) return false;return true;})
 
const Cut ana::kContainment ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;for(unsigned int i=0;i< sr->vtx.elastic[0].fuzzyk.nshwlid;i++){if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.x)< -100.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.x) > 125.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.y)< -120.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.y) > 100.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.z)< 300.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.z) > 1200.0) return false;}return true;})
 
const Cut ana::kVtx ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0 &&sr->mc.nnu==0) return false;return(sr->vtx.nelastic==1);})
 
const Cut ana::kVertexDistance ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;float Distance;Distance=sqrt( (sr->mc.nu[0].vtx.x-sr->vtx.elastic[0].vtx.x)* (sr->mc.nu[0].vtx.x-sr->vtx.elastic[0].vtx.x)+ (sr->mc.nu[0].vtx.y-sr->vtx.elastic[0].vtx.y)* (sr->mc.nu[0].vtx.y-sr->vtx.elastic[0].vtx.y)+ (sr->mc.nu[0].vtx.z-sr->vtx.elastic[0].vtx.z)* (sr->mc.nu[0].vtx.z-sr->vtx.elastic[0].vtx.z) );return Distance > 10.0;})
 
const Cut ana::k1Prong ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0 &&sr->mc.nnu==0) return false;return(sr->vtx.elastic[0].fuzzyk.npng==1);})
 
const Cut ana::kNumu ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;return(sr->mc.nu[0].iscc && sr->mc.nu[0].pdg==14);})
 
const Cut ana::kNue ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;return(sr->mc.nu[0].iscc && sr->mc.nu[0].pdg==12);})
 
const Cut ana::kNCurrent ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;return(sr->mc.nu[0].iscc==0);})
 
const Cut ana::kCCurrent ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;return(sr->mc.nu[0].iscc==1);})
 
const Cut ana::kPi0 ([](const caf::SRProxy *sr){float MassOfPi0=0.135;float kinetic=-10;float en=-99;if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;if(sr->mc.nu[0].prim.size()==0) return false;int nbofprim=sr->mc.nu[0].prim.size();int countpi=0;for(int i=0;i< nbofprim;i++){if(sr->mc.nu[0].prim[i].pdg==111){en=sr->mc.nu[0].prim[i].p.E;kinetic=en-MassOfPi0;if(kinetic > 0.0) countpi++;}}if(countpi > 0) return true;return false;})
 
const Cut ana::NCBkg ([](const caf::SRProxy *sr){float MassOfPi0=0.135;float kinetic=-10;float en=-99;if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;if(sr->mc.nu[0].prim.size()==0) return false;int nbofprim=sr->mc.nu[0].prim.size();int countpi=0;for(int i=0;i< nbofprim;i++){if(sr->mc.nu[0].prim[i].pdg==111){en=sr->mc.nu[0].prim[i].p.E;kinetic=en-MassOfPi0;countpi++;}}if(countpi==0 &&!sr->mc.nu[0].iscc) return true;return false;})
 
const Cut ana::CCPi0Bkg ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;if(sr->mc.nu[0].prim.size()==0) return false;int nbofprim=sr->mc.nu[0].prim.size();int countpi=0;for(int i=0;i< nbofprim;i++){if(sr->mc.nu[0].prim[i].pdg==111) countpi++;}if(countpi > 0 &&sr->mc.nu[0].iscc) return true;return false;})
 
const Cut ana::CCNonPi0Bkg ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;if(sr->mc.nu[0].prim.size()==0) return false;int nbofprim=sr->mc.nu[0].prim.size();int countpi=0;for(int i=0;i< nbofprim;i++){if(sr->mc.nu[0].prim[i].pdg==111) countpi++;}if(countpi==0 &&sr->mc.nu[0].iscc) return true;return false;})
 
const Cut ana::kremid ([](const caf::SRProxy *sr){ return(sr->sel.remid.pid< 0.4125);})
 
const Cut ana::krecoprongenergy ([](const caf::SRProxy *sr){float MassOfPi0=0.135;float kinetic=-10;float en=-99;float totEn;float reco;if(sr->vtx.nelastic==0 &&sr->mc.nnu==0) return false;totEn=(sr->vtx.elastic[0].fuzzyk.png[0].shwlid.calE);reco=(totEn-MassOfPi0);if(reco >.2) return true;return false;})
 
const Cut ana::ksliceenergy ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0 &&sr->mc.nnu==0) return false;if(sr->slc.calE >.2) return true;return false;})
 
const Cut ana::kprongnhits ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0 &&sr->mc.nnu==0) return false;if(sr->vtx.elastic[0].fuzzyk.png[0].nhitx< 5) return false;if(sr->vtx.elastic[0].fuzzyk.png[0].nhity< 5) return false;return true;})
 
const Cut ana::kElectron ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;if(sr->mc.nnu==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->vtx.elastic[0].fuzzyk.png[0].truth.pdg==11) return true;return false;})
 
const Cut ana::kMuon ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;if(sr->mc.nnu==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->vtx.elastic[0].fuzzyk.png[0].truth.pdg==13) return true;return false;})
 
const Cut ana::kPhoton ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;if(sr->mc.nnu==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->vtx.elastic[0].fuzzyk.png[0].truth.pdg==22) return true;return false;})
 
const Cut ana::kPiPlus ([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;if(sr->mc.nnu==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->vtx.elastic[0].fuzzyk.png[0].truth.pdg==211) return true;return false;})
 
const Cut ana::kCVNPhoton ([](const caf::SRProxy *sr){return(sr->vtx.elastic[0].fuzzyk.png[0].cvnpart.photonid >0.7);})
 

Variables

const Cut ana::Bkg = !Signal
 
const Cut ana::Preselection = kVtx && k1Prong && kFiducial && kContainment && kremid
 
const Cut ana::Energy = ksliceenergy