* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.7 2001/01/30 09:23:15 hristov
-Streamers removed (R.Brun)
-
-Revision 1.6 2000/09/07 11:23:27 kowal2
-Improved algoritms, coding convensions applied.
-
-Revision 1.5 2000/06/30 12:07:50 kowal2
-Updated from the TPC-PreRelease branch
-
-Revision 1.4.4.3 2000/06/26 07:39:42 kowal2
-Changes to obey the coding rules
-
-Revision 1.4.4.2 2000/06/25 08:38:41 kowal2
-Splitted from AliTPCtracking
-
-Revision 1.4.4.1 2000/06/14 16:48:24 kowal2
-Parameter setting improved. Removed compiler warnings
-
-Revision 1.4 2000/04/17 09:37:33 kowal2
-removed obsolete AliTPCDigitsDisplay.C
-
-Revision 1.3.8.2 2000/04/10 08:40:46 kowal2
-
-Small changes by M. Ivanov, improvements of algorithms
-
-Revision 1.3.8.1 2000/04/10 07:56:53 kowal2
-Not used anymore - removed
-
-Revision 1.3 1999/10/05 17:15:46 fca
-Minor syntax for the Alpha OSF
-
-Revision 1.2 1999/09/29 09:24:34 fca
-Introduction of the Copyright and cvs Log
-
-*/
+/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// AliTPCPRF2D - //
// //
///////////////////////////////////////////////////////////////////////////////
-
-#include "TMath.h"
-#include "AliTPCPRF2D.h"
-#include "TF2.h"
-#include <iostream.h>
+#include <Riostream.h>
+#include <TCanvas.h>
+#include <TClass.h>
+#include <TF2.h>
+#include <TH1.h>
+#include <TMath.h>
+#include <TPad.h>
+#include <TPaveText.h>
+#include <TStyle.h>
+#include <TText.h>
#include <string.h>
-#include "TCanvas.h"
-#include "TPad.h"
-#include "TStyle.h"
-#include "TH1.h"
-#include "AliH2F.h"
+#include "AliH2F.h"
+#include "AliTPCPRF2D.h"
-#include "TPaveText.h"
-#include "TText.h"
extern TStyle * gStyle;
ClassImp(AliTPCPRF2D)
AliTPCPRF2D::AliTPCPRF2D()
+ :TObject(),
+ fcharge(0),
+ fY1(0.),
+ fY2(0.),
+ fNYdiv(0),
+ fNChargeArray(0),
+ fChargeArray(0),
+ fHeightFull(0.),
+ fHeightS(0.),
+ fShiftY(0.),
+ fWidth(0.),
+ fK(0.),
+ fNPRF(0),
+ fNdiv(5),
+ fDStep(0.),
+ fKNorm(1.),
+ fInteg(0.),
+ fGRF(0),
+ fK3X(0.),
+ fK3Y(0.),
+ fPadDistance(0.),
+ fOrigSigmaX(0.),
+ fOrigSigmaY(0.),
+ fChargeAngle(0.),
+ fPadAngle(0.),
+ fSigmaX(0.),
+ fSigmaY(0.),
+ fMeanX(0.),
+ fMeanY(0.),
+ fInterX(0),
+ fInterY(0),
+ fCurrentY(0.),
+ fDYtoWire(0.),
+ fDStepM1(0.)
{
//default constructor for response function object
- fcharge = 0;
- fNChargeArray = 0;
- fChargeArray = 0;
+
fNPRF =fgkNPRF ;
- fSigmaX = 0;
- fSigmaY = 0;
- fGRF = 0;
- fKNorm = 1;
- fOrigSigmaY=0;
- fOrigSigmaX=0;
- fNdiv = 5;
- //set daault angels
- fChargeAngle = 0;
- fPadAngle = 0;
//chewron default values
SetPad(0.8,0.8);
SetChevron(0.2,0.0,1.0);
fcharge = &(fChargeArray[i*fNPRF]);
return GetPRFActiv(xin);
}
- else{
- //make interpolation from more fore lines
- Int_t i= Int_t(y);
- Float_t res;
- if ((i<0) || (i>=fNYdiv) ) return 0;
- Float_t z0=0;
- Float_t z1=0;
- Float_t z2=0;
- Float_t z3=0;
- if (i>0) {
- fcharge =&(fChargeArray[(i-1)*fNPRF]);
- z0 = GetPRFActiv(xin);
- }
- fcharge =&(fChargeArray[i*fNPRF]);
- z1=GetPRFActiv(xin);
- if ((i+1)<fNYdiv){
- fcharge =&(fChargeArray[(i+1)*fNPRF]);
- z2 = GetPRFActiv(xin);
- }
- if ((i+2)<fNYdiv){
- fcharge =&(fChargeArray[(i+2)*fNPRF]);
- z3 = GetPRFActiv(xin);
- }
- Float_t a,b,c,d,k,l;
- a=z1;
- b=(z2-z0)/2.;
- k=z2-a-b;
- l=(z3-z1)/2.-b;
- d=l-2*k;
- c=k-d;
- Float_t dy=y-Float_t(i);
-
- res = a+b*dy+c*dy*dy+d*dy*dy*dy;
- return res;
- }
- return 0.;
+ //make interpolation from more fore lines
+ Int_t i= Int_t(y);
+ Float_t res;
+ if ((i<0) || (i>=fNYdiv) ) return 0;
+ Float_t z0=0;
+ Float_t z1=0;
+ Float_t z2=0;
+ Float_t z3=0;
+ if (i>0) {
+ fcharge =&(fChargeArray[(i-1)*fNPRF]);
+ z0 = GetPRFActiv(xin);
+ }
+ fcharge =&(fChargeArray[i*fNPRF]);
+ z1=GetPRFActiv(xin);
+ if ((i+1)<fNYdiv){
+ fcharge =&(fChargeArray[(i+1)*fNPRF]);
+ z2 = GetPRFActiv(xin);
+ }
+ if ((i+2)<fNYdiv){
+ fcharge =&(fChargeArray[(i+2)*fNPRF]);
+ z3 = GetPRFActiv(xin);
+ }
+ Float_t a,b,c,d,k,l;
+ a=z1;
+ b=(z2-z0)/2.;
+ k=z2-a-b;
+ l=(z3-z1)/2.-b;
+ d=l-2*k;
+ c=k-d;
+ Float_t dy=y-Float_t(i);
+
+ res = a+b*dy+c*dy*dy+d*dy*dy*dy;
+ return res;
}
fOrigSigmaY=sigmaY;
sprintf(fType,"Gauss");
if (fGRF !=0 ) fGRF->Delete();
- fGRF = new TF2("fun",funGauss2D,-5.,5.,-5.,5.,4);
+ fGRF = new TF2("funGauss2D",funGauss2D,-5.,5.,-5.,5.,4);
funParam[0]=sigmaX;
funParam[1]=sigmaY;
fOrigSigmaY=sigmaY;
sprintf(fType,"Cosh");
if (fGRF !=0 ) fGRF->Delete();
- fGRF = new TF2("fun", funCosh2D,-5.,5.,-5.,5.,4);
+ fGRF = new TF2("funCosh2D", funCosh2D,-5.,5.,-5.,5.,4);
funParam[0]=sigmaX;
funParam[1]=sigmaY;
funParam[2]=fK;
fPadDistance=padDistance;
sprintf(fType,"Gati");
if (fGRF !=0 ) fGRF->Delete();
- fGRF = new TF2("fun", funGati2D,-5.,5.,-5.,5.,5);
+ fGRF = new TF2("funGati2D", funGati2D,-5.,5.,-5.,5.,5);
funParam[0]=padDistance;
funParam[1]=K3X;
if (strncmp(fType,"User",3)!=0){
delete fGRF;
if (strncmp(fType,"Gauss",3)==0)
- fGRF = new TF2("fun",funGauss2D,-5.,5.,-5.,5.,4);
+ fGRF = new TF2("funGauss2D",funGauss2D,-5.,5.,-5.,5.,4);
if (strncmp(fType,"Cosh",3)==0)
- fGRF = new TF2("fun",funCosh2D,-5.,5.,-5.,5.,4);
+ fGRF = new TF2("funCosh2D",funCosh2D,-5.,5.,-5.,5.,4);
if (strncmp(fType,"Gati",3)==0)
- fGRF = new TF2("fun",funGati2D,-5.,5.,-5.,5.,5);
+ fGRF = new TF2("funGati2D",funGati2D,-5.,5.,-5.,5.,5);
if (fGRF!=0) fGRF->SetParameters(funParam);
}
//calculate conversion coefitient to convert position to virtual wire