Static Public Member Functions | List of all members
genie::InteractionType Class Reference

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

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+3.10-2.17-e17-debug/GENIE-Generator/src/Framework/Interaction/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 <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

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

May 06, 2004

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 48 of file InteractionType.h.

Member Function Documentation

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

Definition at line 53 of file InteractionType.h.

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

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

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

Definition at line 69 of file InteractionType.h.

References MECModelEnuComparisons::i, genie::kIntEM, genie::kIntNDecay, genie::kIntNOsc, genie::kIntNull, genie::kIntWeakCC, genie::kIntWeakNC, and confusionMatrixTree::t.

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

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