- if((xdet[0]<=0.) && (xdet[1]>=0.)) vol[1]=1;
- if((xdet[0]>0.) && (xdet[1]>0.)) vol[1]=2;
- if((xdet[0]<0.) && (xdet[1]<0.)) vol[1]=3;
- if((xdet[0]>0.) && (xdet[1]<0.)) vol[1]=4;
+ // Calculating quadrant in ZN
+ if(xdet[0]<=0.){
+ if(xdet[1]>=0.) vol[1]=1;
+ else if(xdet[1]<0.) vol[1]=3;
+ }
+ else if(xdet[0]>0.){
+ if(xdet[1]>=0.) vol[1]=2;
+ else if(xdet[1]<0.) vol[1]=4;
+ }
+ if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
+ printf("\n StepManager->ERROR in ZN!!! vol[1] = %d, xdet[0] = %f,"
+ "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);