X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliMagFDM.cxx;h=5604727cbac68f08273663e47b5fecbd32fec476;hb=7f06a34f543bcd676dec8598307e961b4227fbf7;hp=50264c8fb865433534839bf68bf570e825f6ec5a;hpb=e2afb3b68fe35ef24d08011ecde1da0fbf967d28;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliMagFDM.cxx b/STEER/AliMagFDM.cxx index 50264c8fb86..5604727cbac 100644 --- a/STEER/AliMagFDM.cxx +++ b/STEER/AliMagFDM.cxx @@ -13,60 +13,19 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.12 2001/05/28 14:10:35 morsch -SetSolenoidField method to set the L3 field strength. 2 kG is default. +/* $Id$ */ -Revision 1.11 2001/02/08 13:18:00 hristov -Print removed (J.Gosset) - -Revision 1.10 2001/01/18 13:21:30 morsch -Take pi from TMath. - -Revision 1.9 2001/01/17 20:02:20 morsch -In the AliMagFDM tree call-by-reference functions were changed to -call-by-value, what is more adequate for our task. There were added -a few comments and put protection to values of cos > 1.000 in -AliMagFDM.cxx. (Galina Chabratova) - -Revision 1.8 2000/12/18 10:44:01 morsch -Possibility to set field map by passing pointer to objet of type AliMagF via -SetField(). -Example: -gAlice->SetField(new AliMagFCM("Map2", "$(ALICE_ROOT)/data/field01.dat",2,1.,10.)); - -Revision 1.7 2000/12/01 11:20:27 alibrary -Corrector dipole removed from ZDC - -Revision 1.6 2000/11/10 18:09:55 fca -New field map for the ZDC - -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 - -Revision 1.3 2000/07/13 16:19:09 fca -Mainly coding conventions + some small bug fixes - -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 - -*/ +//------------------------------------------------------------------------- +// Field with Magnetic Field map +// Used by AliRun class +// Author: +//------------------------------------------------------------------------- #include #include "TSystem.h" #include "AliMagFDM.h" - ClassImp(AliMagFDM) @@ -105,9 +64,9 @@ AliMagFDM::AliMagFDM(): } //_______________________________________________________________________ -AliMagFDM::AliMagFDM(const char *name, const char *title, const Int_t integ, - const Float_t factor, const Float_t fmax): - AliMagF(name,title,integ,factor,fmax), +AliMagFDM::AliMagFDM(const char *name, const char *title, Int_t integ, + Float_t factor, Float_t fmax): + AliMagFC(name,title,integ,factor,fmax), fSolenoid(0), fInd(0), fZmin(0), @@ -155,7 +114,7 @@ void AliMagFDM::Field(Float_t *xfi, Float_t *b) // Main routine to compute the field in a point // const Double_t keps=0.1E-06; - const Double_t PI2=2.*TMath::Pi(); + const Double_t kPI2=2.*TMath::Pi(); const Double_t kone=1; const Int_t kiip=33; @@ -180,11 +139,15 @@ void AliMagFDM::Field(Float_t *xfi, Float_t *b) Double_t zz1, zz2,yy1,yy2,x2,x1; // --- start the map fiel from z = 502.92 cm --- +// +// This map has been calculated in a coordinate system in which the muon spectrometer sits at z > 0 +// Transfor correspondingly. - x[0] = xfi[0]; - x[1] = xfi[1]; - x[2] = xfi[2]; + x[0] = - xfi[0]; + x[1] = xfi[1]; + x[2] = - xfi[2]; b[0]=b[1]=b[2]=0; +// // printf("x[0] %f,x[1] %f,x[2] %f\n",x[0],x[1],x[2]); Double_t rr=TMath::Sqrt(x[0]*x[0]+x[1]*x[1]); @@ -246,10 +209,10 @@ if ((kfZbg/100 0 ) {ph0=PI2/2 - ph0;} - if (xL3[0] < 0 && yyp < 0 ) {ph0=PI2/2 + ph0;} - if (xL3[0] > 0 && yyp < 0 ) {ph0=PI2 - ph0;} - if (ph0 > PI2) { ph0=ph0 - PI2;} + if (xL3[0] < 0 && yyp > 0 ) {ph0=kPI2/2 - ph0;} + if (xL3[0] < 0 && yyp < 0 ) {ph0=kPI2/2 + ph0;} + if (xL3[0] > 0 && yyp < 0 ) {ph0=kPI2 - ph0;} + if (ph0 > kPI2) { ph0=ph0 - kPI2;} if (kcphi==777) { printf("xL3[0] %e, xL3[1] %e, xL3[2] %e, yyp %e, r0 %e, ph0 %e\n",xL3[0],xL3[1],xL3[2],yyp,r0,ph0); } @@ -299,9 +262,9 @@ if ((kfZbg/100kCORBEG2 && x[2]kZ1BEG && x[2]kZ2BEG && x[2]kZ3BEG && x[2]kZ4BEG && x[2]kD1BEG && x[2]kD2BEG && x[2]