X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliMagFC.cxx;h=0233b0296865c9c8f21ef2f3f1aa6fb0adcaca31;hb=b56d8877ffa63989b6472f8b9ad4acafbd40d811;hp=c2fff18dfcfb21dc2eb42e79a97873909e5393a1;hpb=006cb30c8d34bcf555fbb82f47cedfff696b2df2;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliMagFC.cxx b/STEER/AliMagFC.cxx index c2fff18dfcf..0233b029686 100644 --- a/STEER/AliMagFC.cxx +++ b/STEER/AliMagFC.cxx @@ -13,39 +13,35 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.3 2000/11/10 18:09:55 fca -New field map for the ZDC +/* $Id$ */ -Revision 1.2 2000/07/12 08:56:25 fca -Coding convention correction and warning removal +//------------------------------------------------------------------------- +// Constant magnetic field class +// Used by AliRun class +// Author: +//------------------------------------------------------------------------- -Revision 1.1 2000/07/11 18:24:59 fca -Coding convention corrections + few minor bug fixes - -*/ +#include +#include "AliLog.h" #include "AliMagFC.h" -#include ClassImp(AliMagFC) //________________________________________ -AliMagFC::AliMagFC(const char *name, const char *title, const Int_t integ, - const Int_t map, const Float_t factor, const Float_t fmax) - : AliMagF(name,title,integ,map,factor,fmax) +AliMagFC::AliMagFC(const char *name, const char *title, Int_t integ, + Float_t factor, Float_t fmax) + : AliMagF(name,title,integ,factor,fmax) { // // Standard constructor // - printf("Constant Field %s created: map= %d, factor= %f\n",fName.Data(),map, - factor); fType = kConst; + fMap = 1; } //________________________________________ -void AliMagFC::Field(Float_t *x, Float_t *b) +void AliMagFC::Field(Float_t *x, Float_t *b) const { // // Method to return the field in a point @@ -55,64 +51,69 @@ void AliMagFC::Field(Float_t *x, Float_t *b) if(TMath::Abs(x[2])<700 && x[0]*x[0]+(x[1]+30)*(x[1]+30) < 560*560) { b[2]=2; } else { - if ( 725 <= x[2] && x[2] <= 1225 ) { - Float_t dz = TMath::Abs(975-x[2])*0.01; - b[0]=(1-0.1*dz*dz)*7; + if ( -725 >= x[2] && x[2] >= -1225 ) { + Float_t dz = TMath::Abs(-975-x[2])*0.01; + b[0] = - (1-0.1*dz*dz)*7; } else { -//This is the ZDC part - Float_t rad2=x[0]*x[0]+x[1]*x[1]; - if(x[2]>kCORBEG2 && x[2]kZ1BEG && x[2]kZ2BEG && x[2] kCOREND2){ + if(rad2kZ3BEG && x[2] kZ1END){ + if(rad2kZ4BEG && x[2] kZ2END){ + if(rad2kD1BEG && x[2] kZ3END){ + if(rad2kD2BEG && x[2] kZ4END){ + if(rad2 kD1END){ + if(rad2 kD2END){ + if(((x[0]-kXCEN1D2)*(x[0]-kXCEN1D2)+(x[1]-kYCEN1D2)*(x[1]-kYCEN1D2))