///////////////////////////////////////////////////////////////////////////////
// //
-// TPC cluster error and shape parameterization //
-// //
-// //
+// TPC cluster error, shape and charge parameterization as function
+// of drift length, and inclination angle //
+//
+// Following notation is used in following
+// Int_t dim 0 - y direction
+// 1 - z direction
+//
+// Int_t type 0 - short pads
+// 1 - medium pads
+// 2 - long pads
+// Float_t z - drift length
+//
+// Float_t angle - tangent of inclination angle at given dimension
+//
+// Implemented parameterization
+//
+//
+// 1. Resolution as function of drift length and inclination angle
+// 1.a) GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle)
+// Simple error parameterization as derived from analytical formula
+// only linear term in drift length and angle^2
+// The formula is valid only with precission +-5%
+// Separate parameterization for differnt pad geometry
+// 1.b) GetError0Par
+// Parabolic term correction - better precision
+//
+// 1.c) GetError1 - JUST FOR Study
+// Similar to GetError1
+// The angular and diffusion effect is scaling with pad length
+// common parameterization for different pad length
+//
+// 2. Error parameterization using charge
+// 2.a) GetErrorQ
+// GetError0+
+// adding 1/Q component to diffusion and angluar part
+// 2.b) GetErrorQPar
+// GetError0Par+
+// adding 1/Q component to diffusion and angluar part
+// 2.c) GetErrorQParScaled - Just for study
+// One parameterization for all pad shapes
+// Smaller precission as previous one
+//
+//
+// Example how to retrieve the paramterization:
+/*
+ AliCDBManager::Instance()->SetRun(1)
+ AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+ AliTPCClusterParam * param = AliTPCcalibDB::Instance()->GetClusterParam();
+
+ //
+ //
+ AliTPCClusterParam::SetInstance(param);
+ TF1 f1("f1","AliTPCClusterParam::SGetError0Par(1,0,x,0)",0,250);
+
+*/
+//
+// //
///////////////////////////////////////////////////////////////////////////////
#include "AliTPCClusterParam.h"
#include "TMath.h"
}
+AliTPCClusterParam::AliTPCClusterParam():
+ TObject(),
+ fRatio(0),
+ fQNorm(0)
+{
+ //
+ // Default constructor
+ //
+}
+
+AliTPCClusterParam::AliTPCClusterParam(const AliTPCClusterParam& param):
+ TObject(param),
+ fRatio(0),
+ fQNorm(0)
+{
+ //
+ // copy constructor
+ //
+ memcpy(this, ¶m,sizeof(AliTPCClusterParam));
+ if (param.fQNorm) fQNorm = (TObjArray*) param.fQNorm->Clone();
+}
+
+AliTPCClusterParam & AliTPCClusterParam::operator=(const AliTPCClusterParam& param){
+ //
+ // Assignment operator
+ //
+ if (this != ¶m) {
+ memcpy(this, ¶m,sizeof(AliTPCClusterParam));
+ if (param.fQNorm) fQNorm = (TObjArray*) param.fQNorm->Clone();
+ }
+ return *this;
+}
+
+
+AliTPCClusterParam::~AliTPCClusterParam(){
+ //
+ // destructor
+ //
+ if (fQNorm) fQNorm->Delete();
+ delete fQNorm;
+}
void AliTPCClusterParam::FitResol0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
//
//expession formula - TString *strq0 = toolkit.FitPlane(chain,"dedxQ.fElements[2]","dr++ty++tz++dr*ty++dr*tz++ty*tz++ty^2++tz^2","IPad==0",chi2,npoints,param,covar,0,100000);
- if (!fQNorm) return 0;
+ if (fQNorm==0) return 0;
TVectorD * norm = (TVectorD*)fQNorm->At(3*itype+ipad);
if (!norm) return 0;
TVectorD &no = *norm;