X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliMagF.cxx;h=e755d69798c0b2b53edf1bf2d826085133555d85;hb=42c4004e4015c008faa9b61f6c4238e3f1d42b93;hp=1dd9ed0880c71f79577c9434adba8fe15ebb9f83;hpb=dd045843596bc6e210ba7557b44ca567074c20a0;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliMagF.cxx b/STEER/AliMagF.cxx index 1dd9ed0880c..e755d69798c 100644 --- a/STEER/AliMagF.cxx +++ b/STEER/AliMagF.cxx @@ -15,6 +15,20 @@ /* $Log$ +Revision 1.7 2000/10/02 21:28:14 fca +Removal of useless dependecies via forward declarations + +Revision 1.6 2000/07/11 18:24:59 fca +Coding convention corrections + few minor bug fixes + +Revision 1.5 2000/06/09 19:55:18 morsch +Introduce new class AliMagFDM - Galina Chabratova + + +Revision 1.4 2000/03/28 12:40:24 fca +Introduce factor for magnetic field + + Revision 1.3 1999/09/29 09:24:29 fca Introduction of the Copyright and cvs Log @@ -22,328 +36,48 @@ Introduction of the Copyright and cvs Log #include "AliMagF.h" -#include "TSystem.h" + #include #include -//ZDC part ------------------------------------------------------------------- - - static const Float_t G1=20.03; - static const Float_t FDIP=-37.34; - static const Float_t FDIMU=6.; - static const Float_t FCORN=11.72; -// -// 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 CORBEG=1920,COREND=CORBEG+190, CORRA2=4.5*4.5; -// - static const Float_t ZBEG=2300; - static const Float_t Z1BEG=ZBEG+ 0,Z1END=Z1BEG+630,Z1RA2=3.5*3.5; - static const Float_t Z2BEG=ZBEG+ 880,Z2END=Z2BEG+550,Z2RA2=3.5*3.5; - static const Float_t Z3BEG=ZBEG+1530,Z3END=Z3BEG+550,Z3RA2=3.5*3.5; - static const Float_t Z4BEG=ZBEG+2430,Z4END=Z4BEG+630,Z4RA2=3.5*3.5; - static const Float_t D1BEG=5843.5 ,D1END=D1BEG+945,D1RA2=4.5*4.5; - static const Float_t D2BEG=12113.2 ,D2END=D2BEG+945,D2RA2=4.5*.5; - -//ZDC part ------------------------------------------------------------------- ClassImp(AliMagF) //________________________________________ -AliMagF::AliMagF(const char *name, const char *title, const Int_t integ, const Int_t map, +AliMagF::AliMagF(const char *name, const char *title, const Int_t integ, const Float_t factor, const Float_t fmax) : TNamed(name,title) { - fMap = map; - fType = Undef; - fInteg = integ; - fFactor = factor; - fMax = fmax; + // + // Standard constructor + // + if(integ<0 || integ > 2) { + Warning("SetField", + "Invalid magnetic field flag: %5d; Helix tracking chosen instead\n" + ,integ); + fInteg = 2; + } else { + fInteg = integ; + } + fType = kUndef; + fFactor = factor; + fMax = fmax; } //________________________________________ void AliMagF::Field(Float_t*, Float_t *b) { + // + // Method to return the field in one point -- dummy in this case + // printf("Undefined MagF Field called, returning 0\n"); b[0]=b[1]=b[2]=0; } -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) -{ - printf("Constant Field %s created: map= %d, factor= %f\n",fName.Data(),map,factor); - fType = Const; -} -//________________________________________ -void AliMagFC::Field(Float_t *x, Float_t *b) -{ - b[0]=b[1]=b[2]=0; - if(fMap==1) { - 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; - } - else { -//This is the ZDC part - Float_t rad2=x[0]*x[0]+x[1]*x[1]; - if(rad2D2BEG) { - -// Separator Dipole D2 - if(x[2]D1BEG) { - -// Separator Dipole D1 - if(x[2]Z4BEG) { - if(x[2] 3060 - b[0]=-G1*x[1]; - b[1]=-G1*x[0]; - } - } else if(x[2]>Z3BEG) { - if(x[2] 2080 - b[0]=G1*x[1]; - b[1]=G1*x[0]; - } - } else if(x[2]>Z2BEG) { - if(x[2] 1430 - b[0]=G1*x[1]; - b[1]=G1*x[0]; - } - } else if(x[2]>Z1BEG) { - if(x[2] 630 - b[0]=-G1*x[1]; - b[1]=-G1*x[0]; - } - } else if(x[2]>CORBEG) { - if(x[2]D2BEG) { - -// Separator Dipole D2 - if(x[2]D1BEG) { - -// Separator Dipole D1 - if(x[2]Z4BEG) { - if(x[2] 3060 - b[0]=-G1*x[1]; - b[1]=-G1*x[0]; - } - } else if(x[2]>Z3BEG) { - if(x[2] 2080 - b[0]=G1*x[1]; - b[1]=G1*x[0]; - } - } else if(x[2]>Z2BEG) { - if(x[2] 1430 - b[0]=G1*x[1]; - b[1]=G1*x[0]; - } - } else if(x[2]>Z1BEG) { - if(x[2] 630 - b[0]=-G1*x[1]; - b[1]=-G1*x[0]; - } - } else if(x[2]>CORBEG) { - if(x[2]ExpandPathName(fTitle.Data()); - magfile=fopen(fname,"r"); - delete [] fname; - if (magfile) { - fscanf(magfile,"%d %d %d %f %f %f %f %f %f", - &fXn, &fYn, &fZn, &fXdel, &fYdel, &fZdel, &fXbeg, &fYbeg, &fZbeg); - printf("fXn %d, fYn %d, fZn %d, fXdel %f, fYdel %f, fZdel %f, fXbeg %f, fYbeg %f, fZbeg %f\n", - fXn, fYn, fZn, fXdel, fYdel, fZdel, fXbeg, fYbeg, fZbeg); - fXdeli=1./fXdel; - fYdeli=1./fYdel; - fZdeli=1./fZdel; - fB = new TVector(3*fXn*fYn*fZn); - for (iz=0; iz