All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NumuVars.h
Go to the documentation of this file.
1 #pragma once
2 // Specific variables for the Numu event selection.
3 
5 
6 namespace ana
7 {
8  // Variables for Data/MC comparison
9  extern const Var kPrimTrkLen;
10 
11  extern const Var kPrimMuonIdx;
12 
13 } // namespace
14 
const Var kPrimMuonIdx([](const caf::SRSliceProxy *slc) -> double{if((int) slc->reco.ntrk==0) return-5.0;double best_idx=0;double best_len=-5.0;for(unsigned int trkIdx=0;trkIdx< slc->reco.ntrk;trkIdx++){auto &trk=slc->reco.trk[trkIdx];if(trk.chi2pid[2].pid_ndof< 0) return-5.0;bool isMuonLike=trk.chi2pid[2].chi2_pion > trk.chi2pid[2].chi2_muon;if(isMuonLike &&trk.len > best_len){best_len=trk.len;best_idx=trkIdx;}}return best_idx;})
Definition: NumuVars.h:11
process_name opflashCryoW ana
const Var kPrimTrkLen([](const caf::SRSliceProxy *slc) -> double{double len=-5.0;if(slc->reco.ntrk > 0){int muIdx=(int) kPrimMuonIdx(slc);if(muIdx >=0){len=slc->reco.trk[muIdx].len;}}return len;})
Definition: NumuVars.h:9