Public Member Functions | Protected Attributes | List of all members
ana::fIsPi0Variable Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/NDAna/ncpi0_semi_inc_png_cvn/ncpi0Cuts.h"

Public Member Functions

 fIsPi0Variable (float b)
 
bool operator() (const caf::SRProxy *sr) const
 

Protected Attributes

float fPi0
 

Detailed Description

Definition at line 659 of file ncpi0Cuts.h.

Constructor & Destructor Documentation

ana::fIsPi0Variable::fIsPi0Variable ( float  b)
inline

Definition at line 663 of file ncpi0Cuts.h.

663  : fPi0(b)
664  {
665  }
const hit & b
Definition: hits.cxx:21

Member Function Documentation

bool ana::fIsPi0Variable::operator() ( const caf::SRProxy sr) const
inline

Definition at line 666 of file ncpi0Cuts.h.

References ana::assert(), caf::Proxy< caf::SRVertexBranch >::elastic, fPi0, caf::Proxy< caf::SRElastic >::fuzzyk, MECModelEnuComparisons::i, caf::Proxy< caf::StandardRecord >::mc, caf::Proxy< caf::SRTruthBranch >::nnu, caf::Proxy< caf::SRFuzzyK >::npng, caf::Proxy< caf::SRFuzzyK >::nshwlid, caf::Proxy< caf::SRTruthBranch >::nu, and caf::Proxy< caf::StandardRecord >::vtx.

667  {
668  float MassOfPi0=0.135;
669  float kinetic=-10;
670  float en = -99;
671 
672  //Check vtx
673  if(sr->vtx.nelastic == 0)
674  return false;
675  if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return false;
676  if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;
677 
678  //check nu
679  if(sr->mc.nnu == 0)
680  return false;
681  assert(sr->mc.nnu == 1);
682  if(sr->mc.nu[0].prim.size() == 0)
683  return false;
684 
685  //Loop over primaries and calculate pi0 KE
686  int nbofprim=sr->mc.nu[0].prim.size();
687  int countpi0=0;
688 
689  for(int i = 0; i < nbofprim; i++)
690  {
691  if(sr->mc.nu[0].prim[i].pdg == 111)
692  {
693  en= sr->mc.nu[0].prim[i].p.E;
694  //count if above threshold
695  // en = MassOfPion + KE
696  if(en > fPi0) countpi0++;
697  }
698  }
699  //If there are pions greater then zero return true.
700  if(countpi0 > 0) return true;
701  return false;
702  }
caf::Proxy< size_t > npng
Definition: SRProxy.h:2038
caf::Proxy< unsigned int > nshwlid
Definition: SRProxy.h:2040
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2059
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
caf::Proxy< short int > nnu
Definition: SRProxy.h:617
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2118
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
assert(nhit_max >=nhit_nbins)
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2146

Member Data Documentation

float ana::fIsPi0Variable::fPi0
protected

Definition at line 704 of file ncpi0Cuts.h.

Referenced by operator()().


The documentation for this class was generated from the following file: