Classes | Namespaces | Functions | Variables
NCPi0SemiIncCuts.h File Reference
#include "CAFAna/Core/Cut.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Vars/Vars.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include "NDAna/ncpi0_SemiInclusive/NCPi0SemiIncVars.h"
#include "TMath.h"
#include "TVector3.h"
#include "TParticlePDG.h"

Go to the source code of this file.

Classes

struct  ana::SelDef
 

Namespaces

 ana
 Cuts and Vars for the 2020 FD DiF Study.
 

Functions

const Cut ana::kIs1Vtx ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;assert(sr->mc.nnu==1);if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return false;return(sr->vtx.nelastic==1);})
 
const Cut ana::kIs2Prongs ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;assert(sr->mc.nnu==1);if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return false;return(sr->vtx.elastic[0].fuzzyk.npng==2);})
 
const Cut ana::kVtxInFiducial ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;assert(sr->mc.nnu==1);if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->vtx.elastic[0].vtx.x< -130) return false;if(sr->vtx.elastic[0].vtx.x > 160) return false;if(sr->vtx.elastic[0].vtx.y< -150) return false;if(sr->vtx.elastic[0].vtx.y > 120) return false;if(sr->vtx.elastic[0].vtx.z< 225) return false;if(sr->vtx.elastic[0].vtx.z > 950) return false;return true;})
 
const Cut ana::kShwStopContainment ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;assert(sr->mc.nnu==1);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)< -130.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.x) > 140.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.y)< -150.0) return false;if((sr->vtx.elastic[0].fuzzyk.png[i].shwlid.stop.y) > 150.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) > 1025.0) return false;}return true;})
 
const SpillTruthCut ana::kIsMyNumuST ([](const caf::SRNeutrinoProxy *nu){return(nu->pdg==14 &&nu->pdgorig==14);})
 
const SpillTruthCut ana::kIsMyNueST ([](const caf::SRNeutrinoProxy *nu){return(nu->pdg==12 &&nu->pdgorig==12);})
 
const SpillTruthCut ana::kIsNCurrentST ([](const caf::SRNeutrinoProxy *nu){return(nu->iscc==0);})
 
const SpillTruthCut ana::kIsCCurrentST ([](const caf::SRNeutrinoProxy *nu){return(nu->iscc==1);})
 
const SpillTruthCut ana::kIsPi0ST ([](const caf::SRNeutrinoProxy *nu){float MassOfPi0=0.135;float kinetic=-10;float en=-99;if(nu->prim.size()==0) return false; int nbofprim=nu->prim.size();for(int i=0;i< nbofprim;i++){if(nu->prim[i].pdg==111){en=nu->prim[i].p.E;kinetic=en-MassOfPi0;}}if(kinetic > 0.1) return true;return false;})
 
const SpillTruthCut ana::kIsAllPi0ST ([](const caf::SRNeutrinoProxy *nu){float MassOfPi0=0.135;float kinetic=-10;float en=-99;if(nu->prim.size()==0) return false; int nbofprim=nu->prim.size();for(int i=0;i< nbofprim;i++){if(nu->prim[i].pdg==111){en=nu->prim[i].p.E;kinetic=en-MassOfPi0;}}if(kinetic > 0.0) return true;return false;})
 
const Cut ana::kIsReMId ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->vtx.nelastic==0) return false;assert(sr->mc.nnu==1);if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;if(sr->sel.remid.pid< 0) return false;return(sr->sel.remid.pid< 0.36);})
 
const TVector3 ana::vtxmin (-130,-176, 225)
 
const TVector3 ana::vtxmax (160, 120, 950)
 
const SpillTruthCut ana::kTrueFiducialST ([](const caf::SRNeutrinoProxy *sr){return(sr->vtx.X()< vtxmax.X()&&sr->vtx.X() > vtxmin.X()&&sr->vtx.Y()< vtxmax.Y()&&sr->vtx.Y() > vtxmin.Y()&&sr->vtx.Z()< vtxmax.Z()&&sr->vtx.Z() > vtxmin.Z());})
 
const SpillTruthCut ana::kModeDIS ([](const caf::SRNeutrinoProxy *sr){return(sr->mode==caf::kDIS);})
 
const SpillTruthCut ana::kModeRES ([](const caf::SRNeutrinoProxy *sr){return(sr->mode==caf::kRes);})
 
const SpillTruthCut ana::kModeCOH ([](const caf::SRNeutrinoProxy *sr){return(sr->mode==caf::kCoh);})
 
const SpillTruthCut ana::kModeQE ([](const caf::SRNeutrinoProxy *sr){return(sr->mode==caf::kQE);})
 
const Cut ana::kcut15hits ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);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;float hit;hit=sr->slc.nhit;if(hit >15) return true;return false;})
 
const Cut ana::ktMC ([](const caf::SRProxy *sr){if(sr->hdr.ismc) return true;return false;})
 

Variables

const Cut ana::kIsMyNumu = CutFromSpillTruthCut(kIsMyNumuST)
 
const Cut ana::kIsMyNue = CutFromSpillTruthCut(kIsMyNueST)
 
const Cut ana::kIsNCurrent = CutFromSpillTruthCut(kIsNCurrentST)
 
const Cut ana::kIsCCurrent = CutFromSpillTruthCut(kIsCCurrentST)
 
const Cut ana::kIsPi0 = CutFromSpillTruthCut(kIsPi0ST)
 
const Cut ana::kIsAllPi0 = CutFromSpillTruthCut(kIsAllPi0ST)
 
const Cut ana::kTrueVtxInFiducial = CutFromSpillTruthCut(kTrueFiducialST)
 
const Cut ana::kModeTypeDIS = CutFromSpillTruthCut(kModeDIS)
 
const Cut ana::kModeTypeRES = CutFromSpillTruthCut(kModeRES)
 
const Cut ana::kModeTypeCOH = CutFromSpillTruthCut(kModeCOH)
 
const Cut ana::kModeTypeQE = CutFromSpillTruthCut(kModeQE)
 
const SpillTruthCut ana::kIsMyNeutrinoST = (kIsMyNumuST||kIsMyNueST)
 
const Cut ana::kIsMyNeutrino = (kIsMyNumu||kIsMyNue)
 
const Cut ana::kIsSigDef = kIsMyNeutrino && kIsNCurrent && kIsPi0
 
const SpillTruthCut ana::kIsSignalST = kIsMyNeutrinoST && kIsNCurrentST && kIsPi0ST && kTrueFiducialST
 
const SpillTruthCut ana::kIsSignalNoEnThrsST = kIsMyNeutrinoST && kIsNCurrentST && kIsAllPi0ST && kTrueFiducialST
 
const Cut ana::kIsSignalNoEnThrs = kIsMyNeutrino && kIsNCurrent && kIsAllPi0 && kTrueVtxInFiducial
 
const Cut ana::kIsBkgNoEnThrs = !kIsSignalNoEnThrs
 
const Cut ana::kIsBkg = !kIsSignal
 
const Cut ana::kIsRESSignal = kIsSignal && kModeTypeRES
 
const Cut ana::kIsDISSignal = kIsSignal && kModeTypeDIS
 
const Cut ana::kIsOtherSignal = kIsSignal && !(kModeTypeDIS && kModeTypeRES)
 
const Cut ana::kIsNCBkg = kIsBkg && kIsNCurrent
 
const Cut ana::kIsCCBkg = kIsBkg && kIsCCurrent
 
const Cut ana::kIsRESBkg = kIsBkg && kModeTypeRES
 
const Cut ana::kIsDISBkg = kIsBkg && kModeTypeDIS
 
const Cut ana::kIsOtherBkg = kIsBkg && !(kModeTypeDIS && kModeTypeRES)
 
const Cut ana::kIsCCRESBkg = kIsBkg && kIsCCurrent && kModeTypeRES
 
const Cut ana::kIsNCRESBkg = kIsBkg && kIsNCurrent && kModeTypeRES
 
const Cut ana::kIsCCDISBkg = kIsBkg && kIsCCurrent && kModeTypeDIS
 
const Cut ana::kIsNCDISBkg = kIsBkg && kIsNCurrent && kModeTypeDIS
 
const Cut ana::kIsCCOtherBkg = kIsBkg && kIsCCurrent && !(kModeTypeDIS && kModeTypeRES)
 
const Cut ana::kIsNCOtherBkg = kIsBkg && kIsNCurrent && !(kModeTypeDIS && kModeTypeRES)
 
const int ana::knumcutflow = 5
 
const int ana::knumchns = 18
 
const SelDef ana::cut_flow [knumcutflow]
 
const SelDef ana::chns [knumchns]