/*
$Log$
+Revision 1.2 2000/07/12 08:56:25 fca
+Coding convention correction and warning removal
+
Revision 1.1 2000/07/11 18:24:59 fca
Coding convention corrections + few minor bug fixes
printf("Invalid field map for constant mesh %d\n",fMap);
}
} else {
- //This is the ZDC part
- Float_t rad2=x[0]*x[0]+x[1]*x[1];
- if(rad2<kD2RA2) {
- if(x[2]>kD2BEG) {
-
- // Separator Dipole D2
- if(x[2]<kD2END) b[1]=kFDIP;
- } else if(x[2]>kD1BEG) {
-
- // Separator Dipole D1
- if(x[2]<kD1END) b[1]=-kFDIP;
- }
- if(rad2<kCORRA2) {
-
- // First quadrupole of inner triplet de-focussing in x-direction
- // Inner triplet
- if(x[2]>kZ4BEG) {
- if(x[2]<kZ4END) {
-
- // 2430 <-> 3060
- b[0]=-kG1*x[1];
- b[1]=-kG1*x[0];
- }
- } else if(x[2]>kZ3BEG) {
- if(x[2]<kZ3END) {
-
- // 1530 <-> 2080
- b[0]=kG1*x[1];
- b[1]=kG1*x[0];
- }
- } else if(x[2]>kZ2BEG) {
- if(x[2]<kZ2END) {
-
- // 890 <-> 1430
- b[0]=kG1*x[1];
- b[1]=kG1*x[0];
- }
- } else if(x[2]>kZ1BEG) {
- if(x[2]<kZ1END) {
-
- // 0 <-> 630
- b[0]=-kG1*x[1];
- b[1]=-kG1*x[0];
- }
- } else if(x[2]>kCORBEG) {
- if(x[2]<kCOREND) {
- // Corrector dipole (because of dimuon arm)
- b[0]=kFCORN;
- }
- }
- }
+//This is the ZDC part
+ Float_t rad2=x[0]*x[0]+x[1]*x[1];
+ if(x[2]>kCORBEG1 && x[2]<kCOREND1){
+ if(rad2<kCOR1RA2){
+ b[0] = kFCORN1;
+ }
+ }
+ else if(x[2]>kCORBEG2 && x[2]<kCOREND2){
+ if(rad2<kCOR2RA2){
+ b[0] = kFCORN2;
+ }
+ }
+ else if(x[2]>kZ1BEG && x[2]<kZ1END){
+ if(rad2<kZ1RA2){
+ b[0] = -kG1*x[1];
+ b[1] = -kG1*x[0];
+ }
+ }
+ else if(x[2]>kZ2BEG && x[2]<kZ2END){
+ if(rad2<kZ2RA2){
+ b[0] = kG1*x[1];
+ b[1] = kG1*x[0];
}
}
+ else if(x[2]>kZ3BEG && x[2]<kZ3END){
+ if(rad2<kZ3RA2){
+ b[0] = kG1*x[1];
+ b[1] = kG1*x[0];
+ }
+ }
+ else if(x[2]>kZ4BEG && x[2]<kZ4END){
+ if(rad2<kZ4RA2){
+ b[0] = -kG1*x[1];
+ b[1] = -kG1*x[0];
+ }
+ }
+ else if(x[2]>kD1BEG && x[2]<kD1END){
+ if(rad2<kD1RA2){
+ b[1] = -kFDIP;
+ }
+ }
+ else if(x[2]>kD2BEG && x[2]<kD2END){
+ if(((x[0]-kXCEN1D2)*(x[0]-kXCEN1D2)+(x[1]-kYCEN1D2)*(x[1]-kYCEN1D2))<kD2RA2
+ || ((x[0]-kXCEN2D2)*(x[0]-kXCEN2D2)+(x[1]-kYCEN2D2)*(x[1]-kYCEN2D2))<kD2RA2){
+ b[1] = kFDIP;
+ }
+ }
+
+ }
}
if(fFactor!=1) {
b[0]*=fFactor;