GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
genie::InteractionType Class Reference

Enumeration of interaction types: e/m, weak cc, weak nc. More...

#include <InteractionType.h>

Static Public Member Functions

static string AsString (InteractionType_t type)
 
static InteractionType_t FromString (string type)
 

Detailed Description

Enumeration of interaction types: e/m, weak cc, weak nc.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool

Changes required to implement the GENIE Boosted Dark Matter module were installed by Josh Berger (Univ. of Wisconsin)

Created:
May 06, 2004
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 49 of file InteractionType.h.

Member Function Documentation

static string genie::InteractionType::AsString ( InteractionType_t  type)
inlinestatic

Definition at line 54 of file InteractionType.h.

References genie::kIntDarkMatter, genie::kIntDarkNC, genie::kIntEM, genie::kIntHNL, genie::kIntNDecay, genie::kIntNOsc, genie::kIntWeakCC, genie::kIntWeakMix, and genie::kIntWeakNC.

Referenced by genie::ReinSehgalRESXSecWithCache::CacheBranchName(), genie::SPPXSecWithCache::CacheBranchName(), genie::ReinSehgalRESXSecWithCacheFast::CacheBranchName(), and genie::ProcessInfo::InteractionTypeAsString().

55  {
56  switch (type) {
57 
58  case(kIntEM) : return "EM"; break;
59  case(kIntWeakCC) : return "Weak[CC]"; break;
60  case(kIntWeakNC) : return "Weak[NC]"; break;
61  case(kIntWeakMix) : return "Weak[CC+NC+interference]"; break;
62  case(kIntDarkMatter) : return "DarkMatter"; break;
63  case(kIntNDecay) : return "NucleonDecay"; break;
64  case(kIntNOsc) : return "NeutronOsc"; break;
65  case(kIntDarkNC) : return "Dark[NC]"; break;
66  case(kIntHNL) : return "HNLDecay"; break;
67  default : return "Unknown"; break;
68  }
69  return "Unknown";
70  }
static InteractionType_t genie::InteractionType::FromString ( string  type)
inlinestatic

Definition at line 72 of file InteractionType.h.

References genie::kIntDarkNC, genie::kIntEM, genie::kIntHNL, genie::kIntNDecay, genie::kIntNOsc, genie::kIntNull, genie::kIntWeakCC, and genie::kIntWeakNC.

73  {
74  //-- Make uppercase/lowercase irrelevant
75 
76  for(unsigned int i=0; i<type.size(); i++) type[i] = toupper(type[i]);
77 
78  //-- Figure out the ScatteringType_t from the input string
79 
80  const char * t = type.c_str();
81 
82  if ( strcmp(t,"EM") == 0 ||
83  strcmp(t,"E-M") == 0 ||
84  strcmp(t,"E/M") == 0 ||
85  strcmp(t,"ELECTROMAGNETIC") == 0 ||
86  strcmp(t,"ELECTRO-MAGNETIC") == 0 ) return kIntEM;
87 
88  else if ( strcmp(t,"WEAK-CC") == 0 ||
89  strcmp(t,"CHARGED-CURRENT") == 0 ||
90  strcmp(t,"CHARGED CURRENT") == 0 ||
91  strcmp(t,"WEAK-CHARGED-CURRENT") == 0 ||
92  strcmp(t,"WEAK CHARGED CURRENT") == 0 ||
93  strcmp(t,"CC") == 0 ) return kIntWeakCC;
94 
95  else if ( strcmp(t,"WEAK-NC") == 0 ||
96  strcmp(t,"NEUTRAL-CURRENT") == 0 ||
97  strcmp(t,"NEUTRAL CURRENT") == 0 ||
98  strcmp(t,"WEAK-NEUTRAL-CURRENT") == 0 ||
99  strcmp(t,"WEAK NEUTRAL CURRENT") == 0 ||
100  strcmp(t,"NC") == 0 ) return kIntWeakNC;
101 
102  else if ( strcmp(t,"NDECAY") == 0 ) return kIntNDecay;
103 
104  else if ( strcmp(t,"NOSC") == 0 ) return kIntNOsc;
105 
106  else if ( strcmp(t,"DARK-NC") == 0 ) return kIntDarkNC;
107 
108  else if ( strcmp(t,"HNL") == 0 ) return kIntHNL;
109 
110  else return kIntNull;
111  }

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