]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCRF1D.cxx
Check on curvature not position
[u/mrichter/AliRoot.git] / TPC / AliTPCRF1D.cxx
index 38d004a089c00d511e985b70c91804a24c0e16fa..dd1c4c249eecd291af063fe94325caabcd647967 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.6  2000/06/30 12:07:50  kowal2
-Updated from the TPC-PreRelease branch
+/* $Id$ */
 
-Revision 1.5.4.3  2000/06/26 07:39:42  kowal2
-Changes to obey the coding rules
-
-Revision 1.5.4.2  2000/06/25 08:38:41  kowal2
-Splitted from AliTPCtracking
-
-Revision 1.5.4.1  2000/06/14 16:48:24  kowal2
-Parameter setting improved. Removed compiler warnings
-
-Revision 1.5  2000/04/17 09:37:33  kowal2
-removed obsolete AliTPCDigitsDisplay.C
-
-Revision 1.4.8.2  2000/04/10 08:53:09  kowal2
-
-Updates by M. Ivanov
-
-
-Revision 1.4  1999/09/29 09:24:34  fca
-Introduction of the Copyright and cvs Log
-
-*/
 
 //-----------------------------------------------------------------------------
 //
@@ -55,11 +31,12 @@ Introduction of the Copyright and cvs Log
 #include "TMath.h"
 #include "AliTPCRF1D.h"
 #include "TF2.h"
-#include <iostream.h>
+#include <Riostream.h>
 #include "TCanvas.h"
 #include "TPad.h"
 #include "TStyle.h"
 #include "TH1.h"
+#include <TString.h>
 
 extern TStyle * gStyle; 
 
@@ -115,13 +92,18 @@ AliTPCRF1D::AliTPCRF1D(Bool_t direct,Int_t np,Float_t step)
   fOffset = 0.;
 }
 
-AliTPCRF1D::AliTPCRF1D(const AliTPCRF1D &prf)
+AliTPCRF1D::AliTPCRF1D(const AliTPCRF1D &prf):TObject(prf)
 {
+  
   //
   memcpy(this, &prf, sizeof(prf)); 
   fcharge = new Float_t[fNRF];
   memcpy(fcharge,prf.fcharge, fNRF);
-  fGRF = new TF1(*(prf.fGRF)); 
+  fGRF = new TF1(*(prf.fGRF));
+  //PH Change the name (add 0 to the end)
+  TString s(fGRF->GetName());
+  s+="0";
+  fGRF->SetName(s.Data());
 }
 
 AliTPCRF1D & AliTPCRF1D::operator = (const AliTPCRF1D &prf)
@@ -133,6 +115,10 @@ AliTPCRF1D & AliTPCRF1D::operator = (const AliTPCRF1D &prf)
   fcharge = new Float_t[fNRF];
   memcpy(fcharge,prf.fcharge, fNRF);
   fGRF = new TF1(*(prf.fGRF));
+   //PH Change the name (add 0 to the end)
+  TString s(fGRF->GetName());
+  s+="0";
+  fGRF->SetName(s.Data());
   return (*this);
 }
 
@@ -195,7 +181,7 @@ void AliTPCRF1D::SetGauss(Float_t sigma, Float_t padWidth,
   fpadWidth = padWidth;
   fkNorm = kNorm;
   if (fGRF !=0 ) fGRF->Delete();
-  fGRF = new TF1("fun",funGauss,-5,5,2);
+  fGRF = new TF1("funGauss",funGauss,-5,5,1);
   funParam[0]=sigma;
   forigsigma=sigma;
   fGRF->SetParameters(funParam);
@@ -213,7 +199,7 @@ void AliTPCRF1D::SetCosh(Float_t sigma, Float_t padWidth,
   fpadWidth = padWidth;
   fkNorm = kNorm;
   if (fGRF !=0 ) fGRF->Delete();
-  fGRF = new TF1("fun",        funCosh, -5.,5.,2);   
+  fGRF = new TF1("funCosh",    funCosh, -5.,5.,2);   
   funParam[0]=sigma;
   fGRF->SetParameters(funParam);
   forigsigma=sigma;
@@ -231,7 +217,7 @@ void AliTPCRF1D::SetGati(Float_t K3, Float_t padDistance, Float_t padWidth,
   fpadWidth = padWidth;
   fkNorm = kNorm;
   if (fGRF !=0 ) fGRF->Delete();
-  fGRF = new TF1("fun",        funGati, -5.,5.,2);   
+  fGRF = new TF1("funGati",    funGati, -5.,5.,2);   
   funParam[0]=padDistance;
   funParam[1]=K3;  
   fGRF->SetParameters(funParam);
@@ -333,9 +319,9 @@ void AliTPCRF1D::Streamer(TBuffer &R__b)
       AliTPCRF1D::Class()->ReadBuffer(R__b, this);
       //read functions
  
-      if (strncmp(fType,"Gauss",3)==0) {delete fGRF; fGRF = new TF1("fun",funGauss,-5.,5.,4);}
-      if (strncmp(fType,"Cosh",3)==0)  {delete fGRF; fGRF = new TF1("fun",funCosh,-5.,5.,4);}
-      if (strncmp(fType,"Gati",3)==0)  {delete fGRF; fGRF = new TF1("fun",funGati,-5.,5.,4);}  
+      if (strncmp(fType,"Gauss",3)==0) {delete fGRF; fGRF = new TF1("funGauss",funGauss,-5.,5.,4);}
+      if (strncmp(fType,"Cosh",3)==0)  {delete fGRF; fGRF = new TF1("funCosh",funCosh,-5.,5.,4);}
+      if (strncmp(fType,"Gati",3)==0)  {delete fGRF; fGRF = new TF1("funGati",funGati,-5.,5.,4);}  
       if (fGRF) fGRF->SetParameters(funParam);     
 
    } else {