//--*-C++-*-- #ifndef __rich_select_h__ #define __rich_select_h__ /* !----------------------------------------------------------------------- ! rich_select: particle selection functions ! == using RICH likelihoods from RTRA ! ! before using these functions you should call for each event: ! int copyRTRItoRTRA(int algorithm) ! algorithm = 0 Rise ! algorithm = 1 Riter/Rire ! ! selection functions : ! LOGICAL FUNCTION RICH_ELECTRON(LEVEL,IROW) ! LOGICAL FUNCTION RICH_MUON(LEVEL,IROW) ! LOGICAL FUNCTION RICH_PION(LEVEL,IROW) ! LOGICAL FUNCTION RICH_KAON(LEVEL,IROW) ! LOGICAL FUNCTION RICH_PROTON(LEVEL,IROW) ! LOGICAL FUNCTION RICH_MULTIE(LEVEL,IROW) ! parameters: integer LEVEL (selection level) ! integer IROW (RTRA row number) ! selection levels: ! 0 maximum probable hypothesis ! 1 soft likelihood cut ! 2 medium likelihood cut ! 3 hard likelihood cut ! return value: TRUE, if IROW=valid row number && RTRA.flr>0 && obey ! selection level criteria ! ! M. Staric, apr-2001 ! !----------------------------------------------------------------------- */ template inline unsigned int get_irow( ArtePointer ptr ) { return (ptr - *ArteTable::begin() + 1); } extern "C" { int rich_electron_(int &level, int &irow); int rich_muon_(int &level, int &irow); int rich_pion_(int &level, int &irow); int rich_kaon_(int &level, int &irow); int rich_proton_(int &level, int &irow); int rich_multie_(int &level, int &irow); } inline int Rich_electron(int level,ArtePointer r){ int irow=get_irow(r); return rich_electron_( level, irow ); } inline int Rich_muon(int level,ArtePointer r){ int irow=get_irow(r); return rich_muon_( level, irow ); } inline int Rich_pion(int level,ArtePointer r){ int irow=get_irow(r); return rich_pion_( level, irow ); } inline int Rich_kaon(int level,ArtePointer r){ int irow=get_irow(r); return rich_kaon_( level, irow ); } inline int Rich_proton(int level,ArtePointer r){ int irow=get_irow(r); return rich_proton_( level, irow ); } inline int Rich_multie(int level,ArtePointer r){ int irow=get_irow(r); return rich_multie_( level, irow ); } #endif