Namespaces | Functions | Variables
CVNProngVars.cxx File Reference
#include "CAFAna/Vars/CVNProngVars.h"
#include "CAFAna/Vars/Vars.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include <cassert>

Go to the source code of this file.

Namespaces

 ana
 Cuts and Vars for the 2020 FD DiF Study.
 

Functions

double ana::GetCVNProngMuonScore (unsigned int ProngIdx, caf::SRProxy *sr)
 Function to return "adjusted" CVN-prong muon score: More...
 
double ana::EMScore (unsigned int ProngIdx, const caf::SRProxy *sr)
 
double ana::HadScore (unsigned int ProngIdx, const caf::SRProxy *sr)
 
double ana::HadScoreWithMuon (unsigned int ProngIdx, const caf::SRProxy *sr)
 
bool ana::IsNumuCCPionByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event pion selection criteria More...
 
bool ana::IsNumuCCProtonByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event proton selection criteria More...
 
bool ana::IsNumuCCHadronByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event hadron selection criteria More...
 
bool ana::IsNumuCCEMShowerByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event EM selection criteria More...
 

Variables

const Var ana::kCVNMuonIdx ([](const caf::SRProxy *sr){float longest_idx=-5.0;float longest_len=-5.0;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){auto &png=sr->vtx.elastic.fuzzyk.png[png_idx];if(png.len > longest_len){longest_len=png.len;longest_idx=png_idx;}}} if(longest_len > 500.0) return longest_idx;float best_idx=-5.0;float best_score=-5.0;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){auto &png=sr->vtx.elastic.fuzzyk.png[png_idx];if(png.cvnpart.muonid > best_score){best_score=png.cvnpart.muonid;best_idx=png_idx;}}}return best_idx;})
 : Prong index of best muon prong by CVN score & length More...
 
const Var ana::kCVNBestMuonScore ([](const caf::SRProxy *sr){float muonScore=-5.0;if(kCVNMuonIdx(sr)< 0.0) return muonScore;if(!sr->vtx.elastic.IsValid) return muonScore;muonScore=sr->vtx.elastic.fuzzyk.png[(unsigned int) kCVNMuonIdx(sr)].cvnpart.muonid;if(sr->vtx.elastic.fuzzyk.png[(unsigned int) kCVNMuonIdx(sr)].len > 500.0) muonScore=1.0;return muonScore;})
 : Muon score for best muon prong by CVN score & length More...
 
const Var ana::kCVNBestMuonRawScore ([](const caf::SRProxy *sr){float muonScore=-5.0;if(kCVNMuonIdx(sr)< 0.0) return muonScore;if(!sr->vtx.elastic.IsValid) return muonScore;muonScore=sr->vtx.elastic.fuzzyk.png[(unsigned int) kCVNMuonIdx(sr)].cvnpart.muonid;return muonScore;})
 : Raw muon score for best muon prong by CVN score & length More...
 
const MultiVar ana::kNumuCCPionIndices ([](const caf::SRProxy *sr){std::vector< double > indices;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){if(IsNumuCCPionByCVN(png_idx, sr)) indices.push_back((double) png_idx);}}return indices;})
 : Returns a vector of indices for prongs selected as pions More...
 
const MultiVar ana::kNumuCCProtonIndices ([](const caf::SRProxy *sr){std::vector< double > indices;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){if(IsNumuCCProtonByCVN(png_idx, sr)) indices.push_back((double) png_idx);}}return indices;})
 : Returns a vector of indices for prongs selected as protons More...
 
const MultiVar ana::kNumuCCEMShowerIndices ([](const caf::SRProxy *sr){std::vector< double > indices;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){if(IsNumuCCEMShowerByCVN(png_idx, sr)) indices.push_back((double) png_idx);}}return indices;})
 : Returns a vector of indices for prongs selected as EM showers More...