Advertisement
Guest User

ggrc

a guest
Mar 28th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.06 KB | None | 0 0
  1. //*****************************************************************************
  2. int GetGenieReactionCode(const std::string& reactionCode){
  3. //*****************************************************************************
  4.  
  5.   int code = 0;
  6.  
  7.   //if(!p_silent) cout << "3: " << reactionCode << endl;
  8.   if(reactionCode.find("charm") == string::npos &&
  9.     reactionCode.find("Weak[CC],QES") != string::npos){
  10.     code = 1;
  11.   }
  12.   else if(reactionCode.find("Weak[CC],RES") != string::npos){
  13.     code = 11;
  14.   }
  15.   else if(reactionCode.find("charm") == string::npos &&
  16.     reactionCode.find("Weak[CC],DIS") != string::npos){
  17.     code = 21;
  18.   }
  19.   else if(reactionCode.find("Weak[CC],COH") != string::npos){
  20.     code = 16;
  21.   }
  22.   else if(reactionCode.find("Weak[NC],RES") != string::npos){
  23.     code = 31;
  24.   }
  25.   else if(reactionCode.find("Weak[NC],QES") != string::npos){
  26.     code = 51;
  27.   }
  28.   else if(reactionCode.find("Weak[NC],COH") != string::npos){
  29.     code = 36;
  30.   }
  31.   else if(reactionCode.find("Weak[NC],DIS") != string::npos){
  32.     code = 41;
  33.   }
  34.   return code;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement