10 int phidiffs[6] = {phi2 - phi1, phi3 - phi1, phi4 - phi1, phi3 - phi2, phi4 - phi4, phi4 - phi3};
15 else if(phidiffs[0] == 0 && phidiffs[1] < 0)
17 else if(phidiffs[1] == 0 && phidiffs[2] < 0)
27 else if(phidiffs[0] == 0 && phidiffs[1] < 0)
36 else if(phidiffs[0] == 0 && phidiffs[2] < 0)
52 else if(phidiffs[1] == 0 && phidiffs[2] < 0)
75 else if(phidiffs[3] == 0 && phidiffs[4] < 0)
int getCharge(int phi1, int phi2, int phi3, int phi4, int mode)