X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=TPC%2FAliTPCEfield.cxx;h=6368d57e8dd9db66b9fbbd9ba32f719d1c5e2916;hp=759dfe9d3ec6389c05a1d343546ffa799c016b59;hb=HEAD;hpb=b1f0a2a55d72ef9a5834950f7793efb30a41cc1e diff --git a/TPC/AliTPCEfield.cxx b/TPC/AliTPCEfield.cxx index 759dfe9d3ec..6368d57e8dd 100644 --- a/TPC/AliTPCEfield.cxx +++ b/TPC/AliTPCEfield.cxx @@ -13,16 +13,13 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* - Calculation of the Electric field: - Sollution of laplace equation in cartezian system, with boundary condition. - Se details: - http://web.mit.edu/6.013_book/www/chapter5/5.10.html - -*/ - -/* \$Id: AliTPCEfield.cxx 41275 2010-05-16 22:23:06Z marian \$ */ +/// \class AliTPCEfield +/// +/// Solution of Laplace equation in cartesian system, with boundary condition. +/// +/// See details: +/// http://web.mit.edu/6.013_book/www/chapter5/5.10.html #include "TTreeStream.h" #include "TMath.h" @@ -30,8 +27,9 @@ #include "TRandom.h" #include "AliTPCEfield.h" +/// \cond CLASSIMP ClassImp(AliTPCEfield) - +/// \endcond AliTPCEfield* AliTPCEfield::fgInstance=0; @@ -42,7 +40,8 @@ AliTPCEfield::AliTPCEfield(): fIs2D(kTRUE), fWorkspace(0) // file with trees, pictures ... { - // + /// + for (Int_t i=0; i<3; i++){ fMin[i]=0; fMax[i]=0; } @@ -57,7 +56,8 @@ AliTPCEfield::AliTPCEfield(const char* name, Int_t maxFreq, Bool_t is2D, Bool_t fUseLinear(useLinear), fWorkspace(0) // file with trees, pictures ... { - // + /// + for (Int_t i=0; i<3; i++){ fMin[i]=0; fMax[i]=0; } @@ -67,15 +67,14 @@ AliTPCEfield::AliTPCEfield(const char* name, Int_t maxFreq, Bool_t is2D, Bool_t } void AliTPCEfield::MakeFitFunctions(Int_t maxFreq){ - // - // fit functions = f(x,y,z) = fx(x)*fy(y)*fz(z) - // function can be of following types: - // 0 - constant - // 1 - linear - // 2 - hypx - // 3 - hypy - // 4 - hypz - // + /// fit functions = \f\$ f(x,y,z) = fx(x)*fy(y)*fz(z) \f\$ + /// function can be of following types: + /// 0 - constant + /// 1 - linear + /// 2 - hypx + /// 3 - hypy + /// 4 - hypz + Int_t nfunctions=0; if (fIs2D) nfunctions = 1+(maxFreq)*8; if (!fIs2D) nfunctions = 1+(maxFreq)*8; @@ -123,17 +122,15 @@ void AliTPCEfield::MakeFitFunctions(Int_t maxFreq){ AliTPCEfield::~AliTPCEfield() { - // - // Destructor - // + /// Destructor + if (fWorkspace) delete fWorkspace; } void AliTPCEfield::SetRange(Double_t x0, Double_t x1, Double_t y0, Double_t y1, Double_t z0,Double_t z1){ - // - // Set the ranges - coordinates are rescaled in order to use proper - // cos,sin expansion in scaled space - // + /// Set the ranges - coordinates are rescaled in order to use proper + /// cos,sin expansion in scaled space + fMin[0]=x0; fMax[0]=x1; fMin[1]=y0; fMax[1]=y1; fMin[2]=z0; fMax[2]=z1; @@ -143,13 +140,12 @@ void AliTPCEfield::SetRange(Double_t x0, Double_t x1, Double_t y0, Double_t y1, void AliTPCEfield::AddBoundaryLine(Double_t x0,Double_t y0,Double_t z0, Double_t v0, Double_t x1, Double_t y1, Double_t z1,Double_t v1, Int_t id, Int_t npoints){ - // - // Add a e field boundary line - // From point (x0,y0) to point (x1,y1) - // Linear decrease of potential is assumed - // Boundary can be identified using boundary ID - // The line is written into tree Boundary - // + /// Add a e field boundary line + /// From point (x0,y0) to point (x1,y1) + /// Linear decrease of potential is assumed + /// Boundary can be identified using boundary ID + /// The line is written into tree Boundary + Double_t deltaX = (x1-x0); Double_t deltaY = (y1-y0); Double_t deltaZ = (z1-z0); @@ -171,16 +167,15 @@ void AliTPCEfield::AddBoundaryLine(Double_t x0,Double_t y0,Double_t z0, Double_ } TTree * AliTPCEfield::GetTree(const char * tname){ - // - // - // + /// + return ((*fWorkspace)<Eval(x,y,z,type); } void AliTPCEfield::FitField(){ - // - // Fit the e field - // Minimize chi2 residuals at the boundary points - // ?Tempoary sollution - integrals can be calculated analytically - - // + /// Fit the e field + /// Minimize chi2 residuals at the boundary points + /// ?Tempoary sollution - integrals can be calculated analytically - + Int_t nfun=fFitFunctions->GetNrows(); Double_t *fun =new Double_t[nfun]; fFitter= new TLinearFitter(nfun, Form("hyp%d", nfun-1)); @@ -373,9 +363,8 @@ void AliTPCEfield::FitField(){ TMatrixD* AliTPCEfield::MakeCorrelation(TMatrixD &matrix){ - // - // - // + /// + Int_t nrows = matrix.GetNrows(); TMatrixD * mat = new TMatrixD(nrows,nrows); for (Int_t irow=0; irow