New field map for the ZDC
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Nov 2000 18:09:55 +0000 (18:09 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Nov 2000 18:09:55 +0000 (18:09 +0000)
STEER/AliMagF.h
STEER/AliMagFC.cxx
STEER/AliMagFCM.cxx
STEER/AliMagFDM.cxx

index 57a9e3c..30f4c81 100644 (file)
@@ -39,22 +39,27 @@ protected:
   static const Float_t kG1=20.03;
   static const Float_t kFDIP=-37.34;
   static const Float_t kFDIMU=6.;
-  static const Float_t kFCORN=11.72;
+  static const Float_t kFCORN1=9.4;
+  static const Float_t kFCORN2=-9.4;
 //
 // ZBEG       Beginning of the inner triplet
 // D1BEG      Beginning of separator dipole 1
 // D2BEG      Beginning of separator dipole 2
 // CORBEG     Corrector dipole beginning (because of dimuon arm)
 //
-  static const Float_t kCORBEG=1920,kCOREND=kCORBEG+190, kCORRA2=4.5*4.5;
+  static const Float_t kCORBEG1=805,kCOREND1=kCORBEG1+340, kCOR1RA2=4.5*4.5;
+  static const Float_t kCORBEG2=19216,kCOREND2=kCORBEG2+170, kCOR2RA2=4.5*4.5;
 //
   static const Float_t kZBEG=2300;
   static const Float_t kZ1BEG=kZBEG+   0,kZ1END=kZ1BEG+630,kZ1RA2=3.5*3.5;
   static const Float_t kZ2BEG=kZBEG+ 880,kZ2END=kZ2BEG+550,kZ2RA2=3.5*3.5;
   static const Float_t kZ3BEG=kZBEG+1530,kZ3END=kZ3BEG+550,kZ3RA2=3.5*3.5;
   static const Float_t kZ4BEG=kZBEG+2430,kZ4END=kZ4BEG+630,kZ4RA2=3.5*3.5;
-  static const Float_t kD1BEG=5843.5    ,kD1END=kD1BEG+945,kD1RA2=4.5*4.5;
-  static const Float_t kD2BEG=12113.2   ,kD2END=kD2BEG+945,kD2RA2=4.5*.5;
+  static const Float_t kD1BEG=5838.3    ,kD1END=kD1BEG+945,kD1RA2=4.5*4.5;
+  static const Float_t kD2BEG=12147.6   ,kD2END=kD2BEG+945,kD2RA2=4.5*4.5;
+//
+  static const Float_t kXCEN1D2=-9.7    ,kYCEN1D2=0.;
+  static const Float_t kXCEN2D2=9.7     ,kYCEN2D2=0.;
 
 //ZDC part -------------------------------------------------------------------
 
index 215bd67..f708df6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -55,57 +58,53 @@ void AliMagFC::Field(Float_t *x, Float_t *b)
       }
       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;
-             }
-           }
-         }
-       }
+    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) {
index 26af5e4..d145de1 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -124,59 +127,55 @@ void AliMagFCM::Field(Float_t *x, Float_t *b)
        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;
index cae64b0..c19c203 100644 (file)
 
 /*
 $Log$
+Revision 1.5  2000/10/27 14:17:04  morsch
+- Bug causing segmentation violation during muon reconstruction corrected
+- Coding rule violations corrected.
+(Galina Chabratova)
+
 Revision 1.4  2000/10/02 21:28:14  fca
 Removal of useless dependecies via forward declarations
 
@@ -268,59 +273,54 @@ if ((kfZbg/100<xL3[2] && xL3[2]<=zCmin && r0<=rPmax) || ((zCmin<xL3[2] && xL3[2]
 } 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;
-              b[0]=-kFCORN;
-            }
-          }
-        }
+    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;