flavor Namespace Reference

Functions

const char * as_string (flavor_t flavor)
flavor_t get_from_code (int pdgc)

Function Documentation

const char* flavor::as_string ( flavor_t  flavor  )  [inline]

Definition at line 33 of file flavor.h.

References e_e, e_mu, e_tau, and e_undefined_flavor.

00034      {
00035        switch(flavor) {
00036          case e_e:                return "Electron flavor "; break;
00037          case e_mu:               return "Muon flavor";      break;
00038          case e_tau:              return "Tau flavor";       break;
00039          case e_undefined_flavor:
00040          default:            
00041                                   return "Unknown flavor";   break;
00042        }
00043        return "Bad flavor";
00044      }

flavor_t flavor::get_from_code ( int  pdgc  )  [inline]

Definition at line 46 of file flavor.h.

References e_e, e_mu, e_tau, and e_undefined_flavor.

00047      {
00048        if      (pdgc == 5 || pdgc ==  6) return e_e;
00049        else if (pdgc == 7 || pdgc ==  8) return e_mu;
00050        else if (pdgc == 9 || pdgc == 10) return e_tau;
00051        else                              return e_undefined_flavor;
00052      }


Generated on 15 Jul 2018 for loon by  doxygen 1.6.1