* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.5.4.3 2000/06/26 07:39:42 kowal2
-Changes to obey the coding rules
+/* $Id$ */
-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
-
-*/
//-----------------------------------------------------------------------------
//
//
-#include "TMath.h"
+#include <Riostream.h>
+#include <TCanvas.h>
+#include <TClass.h>
+#include <TF2.h>
+#include <TH1.h>
+#include <TMath.h>
+#include <TPad.h>
+#include <TString.h>
+#include <TStyle.h>
+
#include "AliTPCRF1D.h"
-#include "TF2.h"
-#include <iostream.h>
-#include "TCanvas.h"
-#include "TPad.h"
-#include "TStyle.h"
-#include "TH1.h"
extern TStyle * gStyle;
AliTPCRF1D::AliTPCRF1D(Bool_t direct,Int_t np,Float_t step)
+ :TObject(),
+ fNRF(0),
+ fDSTEPM1(0.),
+ fcharge(0),
+ forigsigma(0.),
+ fpadWidth(3.5),
+ fkNorm(0.5),
+ fInteg(0.),
+ fGRF(0),
+ fSigma(0.),
+ fOffset(0.),
+ fDirect(kFALSE),
+ fPadDistance(0.)
{
//default constructor for response function object
fDirect=direct;
fcharge = new Float_t[fNRF];
if (step>0) fDSTEPM1=1./step;
else fDSTEPM1 = 1./fgRFDSTEP;
- fSigma = 0;
- fGRF = 0;
- fkNorm = 0.5;
- fpadWidth = 3.5;
- forigsigma=0.;
- fOffset = 0.;
}
AliTPCRF1D::AliTPCRF1D(const AliTPCRF1D &prf)
+ :TObject(prf),
+ fNRF(0),
+ fDSTEPM1(0.),
+ fcharge(0),
+ forigsigma(0.),
+ fpadWidth(3.5),
+ fkNorm(0.5),
+ fInteg(0.),
+ fGRF(0),
+ fSigma(0.),
+ fOffset(0.),
+ fDirect(kFALSE),
+ fPadDistance(0.)
{
+
//
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)
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);
}
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);
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;
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);
void AliTPCRF1D::Streamer(TBuffer &R__b)
{
// Stream an object of class AliTPCRF1D.
- Float_t dummy;
if (R__b.IsReading()) {
- Version_t R__v = R__b.ReadVersion(); if (R__v) { }
- TObject::Streamer(R__b);
- //read pad parameters
- R__b >> fpadWidth;
- //read charge parameters
- R__b >> fType[0];
- R__b >> fType[1];
- R__b >> fType[2];
- R__b >> fType[3];
- R__b >> fType[4];
- R__b >> forigsigma;
- R__b >> fkNorm;
- R__b >> dummy; //dummuy instead fK3X in previous
- R__b >> fPadDistance;
- R__b >> fInteg;
- R__b >> fOffset;
+ AliTPCRF1D::Class()->ReadBuffer(R__b, this);
//read functions
- if (fGRF!=0) {
- delete [] fGRF;
- fGRF=0;
- }
- if (strncmp(fType,"User",3)==0){
- fGRF= new TF1;
- R__b>>fGRF;
- }
- if (strncmp(fType,"Gauss",3)==0)
- fGRF = new TF1("fun",funGauss,-5.,5.,4);
- if (strncmp(fType,"Cosh",3)==0)
- fGRF = new TF1("fun",funCosh,-5.,5.,4);
- if (strncmp(fType,"Gati",3)==0)
- fGRF = new TF1("fun",funGati,-5.,5.,4);
- R__b >>fDSTEPM1;
- R__b >>fNRF;
- R__b.ReadFastArray(fcharge,fNRF);
- R__b.ReadFastArray(funParam,5);
- if (fGRF!=0) fGRF->SetParameters(funParam);
+ 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 {
- R__b.WriteVersion(AliTPCRF1D::IsA());
- TObject::Streamer(R__b);
- //write pad width
- R__b << fpadWidth;
- //write charge parameters
- R__b << fType[0];
- R__b << fType[1];
- R__b << fType[2];
- R__b << fType[3];
- R__b << fType[4];
- R__b << forigsigma;
- R__b << fkNorm;
- R__b << dummy; //dummuy instead fK3X in previouis
- R__b << fPadDistance;
- R__b << fInteg;
- R__b << fOffset;
- //write interpolation parameters
- if (strncmp(fType,"User",3)==0) R__b <<fGRF;
- R__b <<fDSTEPM1;
- R__b <<fNRF;
- R__b.WriteFastArray(fcharge,fNRF);
- R__b.WriteFastArray(funParam,5);
+ AliTPCRF1D::Class()->WriteBuffer(R__b, this);
}
}