AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCClusterParam.h
Go to the documentation of this file.
1 #ifndef ALITPCCLUSTERPARAM_H
2 #define ALITPCCLUSTERPARAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 /* $Id: AliTPCClusterParam.h,v */
7 
10 
11 
12 #include <TObject.h>
13 #include <TVectorDfwd.h>
14 #include <TMatrixDfwd.h>
15 
16 class TTree;
17 class TObjArray;
18 class TH1;
19 class THnBase;
20 //_____________________________________________________________________________
21 class AliTPCClusterParam : public TObject {
22  public:
23  static AliTPCClusterParam* Instance();
27  virtual ~AliTPCClusterParam();
28  virtual void Print(Option_t* option = "") const;
29  void SetInstance(AliTPCClusterParam *const param){fgInstance = param;}
30  //
31  // Seting functions
32  //
33  void FitData(TTree * tree);
34  void FitResol(TTree * tree);
35  void FitRMS(TTree * tree);
36  void SetQnorm(Int_t ipad, Int_t itype, const TVectorD *const norm);
37  void SetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType, Float_t val, Int_t mode=1);
38  Double_t GetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType) const;
39  TMatrixD *GetQnormCorrMatrix(){return fQNormCorr;};
40  void ResetQnormCorr();
41  void SetWaveCorrectionMap( THnBase *WaveCorrectionMap);
42  void SetResolutionYMap( THnBase *ResolutionYMap);
43  //
44  // Charge parameterization
45  //
46  Float_t Qnorm(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz);
47  Float_t QnormHis(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz);
48 
49 
50  Float_t QnormPos(Int_t ipad, Bool_t isMax, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm, Float_t qt);
51  static Float_t SQnormPos(Int_t ipad, Bool_t isMax, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm, Float_t qt){ return fgInstance->QnormPos(ipad,isMax,pad,time,z,sy2,sz2,qm,qt);;}
52 
53  Float_t PosCorrection(Int_t type, Int_t ipad, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm);
54  static Float_t SPosCorrection(Int_t type, Int_t ipad, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm){ return fgInstance->PosCorrection(type,ipad,pad,time,z,sy2,sz2,qm);}
55  //
56  // Error parameterization
57  //
58  Float_t GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle) const;
59  Float_t GetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle) const;
60  Float_t GetError1(Int_t dim, Int_t type, Float_t z, Float_t angle) const;
61  Float_t GetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const;
62  Float_t GetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const;
63  Float_t GetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const;
64  //
65  // Shape parameterization
66  //
67  Float_t GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle) const;
68  Float_t GetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle) const;
69  Float_t GetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const;
70  Float_t GetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const;
71  Float_t GetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM) const;
72  //
73  // Correction and resolution maps
74  //
75  const THnBase *GetWaveCorrectionMap() const { return fWaveCorrectionMap; }
76  const THnBase *GetResolutionYMap() const { return fResolutionYMap; }
77  Float_t GetWaveCorrection(Int_t Type, Float_t Z, Int_t QMax, Float_t Pad, Float_t angleY ) const;
78  static Float_t SGetWaveCorrection(Int_t Type, Float_t Z, Int_t QMax, Float_t Pad, Float_t angleY ){return (fgInstance) ? fgInstance->GetWaveCorrection(Type,Z,QMax,Pad,angleY):0;}
79  //
80  //
81  //
82  void Test(TTree * tree, const char *output="TestClusterParam.root");
83  //
84  // static methods equivalents - use instance of param object - useful for tree draw and TF2 visualization
85  static Float_t SGetError0(Int_t dim, Int_t type, Float_t z, Float_t angle){
86  return fgInstance->GetError0(dim,type,z,angle);
87  }
88  static Float_t SGetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle){
89  return fgInstance->GetError0Par(dim,type,z,angle);
90  }
91  static Float_t SGetError1(Int_t dim, Int_t type, Float_t z, Float_t angle){
92  return fgInstance->GetError1(dim,type,z,angle);
93  }
94  static Float_t SGetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
95  return fgInstance->GetErrorQ(dim,type,z,angle,Qmean);
96  }
97  static Float_t SGetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
98  return fgInstance->GetErrorQPar(dim,type,z,angle,Qmean);
99  }
100  static Float_t SGetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
101  return fgInstance->GetErrorQParScaled(dim,type,z,angle,Qmean);
102  }
103 
104  static Float_t SGetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle){
105  return fgInstance->GetRMS0(dim,type,z,angle);
106  }
107  static Float_t SGetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle){
108  return fgInstance->GetRMS1(dim,type,z,angle);
109  }
110  static Float_t SGetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
111  return fgInstance->GetRMSQ(dim,type,z,angle,Qmean);
112  }
113  static Float_t SGetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
114  return fgInstance->GetRMSSigma(dim,type,z,angle,Qmean);
115  }
116  static Float_t SGetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM){
117  return fgInstance->GetShapeFactor(dim,type,z,angle,Qmean, rmsL, rmsM);
118  }
119  //
120  //
121  static Float_t SQnorm(Int_t ipad, Int_t itype,Float_t dr, Float_t ty, Float_t tz) {return fgInstance->Qnorm(ipad, itype, dr,ty,tz);}
122  static Float_t SQnormHis(Int_t ipad, Int_t itype,Float_t dr, Float_t ty, Float_t tz) {return fgInstance->QnormHis(ipad, itype, dr,ty,tz);}
123 
124  //
125  // Analytical position angular correction
126  //
127  static Double_t GaussConvolution(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1);
128  static Double_t GaussConvolutionTail(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1, Double_t tau);
129  static Double_t GaussConvolutionGamma4(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1, Double_t tau);
130  static Double_t QmaxCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t effLength=0, Float_t effDiff=1);
131  static Double_t QtotCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t qtot, Float_t thr, Float_t effLength=0, Float_t effDiff=1);
132 
133  //
134  //
135  //
136  void FitResol0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
137  void FitResol0Par(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
138  void FitResol1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error);
139  void FitResolQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
140  void FitResolQPar(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
141  void FitRMS0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
142  void FitRMS1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error);
143  void FitRMSQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
144  void FitRMSSigma(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
145  //
146  TVectorD*& PosYcor(Int_t ind) {return fPosYcor[ind];}
147  TVectorD*& PosZcor(Int_t ind) {return fPosZcor[ind];}
148  Float_t ParamS0Par(Int_t i, Int_t j, Int_t k) const {return fParamS0Par[i][j][k];}
149  TVectorD* QpadTnorm() const {return fQpadTnorm;}
150  TVectorD* QpadMnorm() const {return fQpadMnorm;}
151 
152 protected:
153  Float_t fRatio;
154  Float_t fParamS0[2][3][4];
155  Float_t fErrorS0[2][3][4];
156  Float_t fParamS0Par[2][3][7];
157  Float_t fErrorS0Par[2][3][7];
158  Float_t fParamSQ[2][3][6];
159  Float_t fErrorSQ[2][3][6];
160  Float_t fParamSQPar[2][3][9];
161  Float_t fErrorSQPar[2][3][9];
162  Float_t fParamS1[2][4];
163  Float_t fErrorS1[2][4];
164  //
165  Float_t fParamRMS0[2][3][4];
166  Float_t fErrorRMS0[2][3][4];
167  Float_t fParamRMSQ[2][3][6];
168  Float_t fErrorRMSQ[2][3][6];
169  Float_t fParamRMS1[2][5];
170  Float_t fErrorRMS1[2][5];
171  Float_t fErrorRMSSys[2];
172  Float_t fRMSSigmaRatio[2][2];
173  Float_t fRMSSigmaFit[2][3][2];
174  //
175  // charge normalization parametrization
176  //
178  TMatrixD *fQNormCorr;
180  //
181  TVectorD *fPosQTnorm[3];
182  TVectorD *fPosQMnorm[3];
183  TVectorD *fQpadTnorm;
184  TVectorD *fQpadMnorm;
185  //
186  // Position corrections
187  //
188  TVectorD *fPosYcor[3];
189  TVectorD *fPosZcor[3];
190  //
191  // Wave Correction Map
192  //
197  //
198  // Resolution Map
199  //
200  THnBase* fResolutionYMap;
201  //
203  ClassDef(AliTPCClusterParam,7) // TPC Cluster parameter class
206 };
207 
208 #endif
Float_t fErrorRMSSys[2]
systematic relative error of the parametererization
Float_t fErrorRMSQ[2][3][6]
shape parameterization coeficients
static Float_t SGetError0(Int_t dim, Int_t type, Float_t z, Float_t angle)
TVectorD * QpadMnorm() const
Float_t fParamS0[2][3][4]
error parameterization coeficients
Float_t fErrorRMS1[2][5]
shape parameterization coeficients
TMatrixD * fQNormCorr
q norm correction for analytica correction
void FitRMS0(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
static Float_t SPosCorrection(Int_t type, Int_t ipad, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm)
void FitData(TTree *tree)
Float_t fErrorSQ[2][3][6]
error parameterization coeficients
static Float_t SGetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean)
Float_t GetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
Float_t GetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
#define TObjArray
static Double_t QtotCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t qtot, Float_t thr, Float_t effLength=0, Float_t effDiff=1)
void FitRMS1(TTree *tree, Int_t dim, Float_t *param0, Float_t *error)
TVectorD * fPosQTnorm[3]
q position normalization
static Double_t QmaxCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t effLength=0, Float_t effDiff=1)
static Float_t SGetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean)
static Float_t SGetWaveCorrection(Int_t Type, Float_t Z, Int_t QMax, Float_t Pad, Float_t angleY)
static Float_t SQnorm(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz)
THnBase * fResolutionYMap
Map of resolution in Y.
const THnBase * GetResolutionYMap() const
static AliTPCClusterParam * Instance()
const THnBase * GetWaveCorrectionMap() const
Float_t fParamRMS1[2][5]
shape parameterization coeficients
void FitResol0(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
Float_t GetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
static Float_t SQnormHis(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz)
void FitRMSSigma(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
void SetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType, Float_t val, Int_t mode=1)
TVectorD * fPosZcor[3]
position correction parameterization
Float_t GetError1(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t ParamS0Par(Int_t i, Int_t j, Int_t k) const
static Double_t GaussConvolution(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1)
static Float_t SQnormPos(Int_t ipad, Bool_t isMax, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm, Float_t qt)
TTree * tree
Float_t fErrorS0Par[2][3][7]
error parameterization coeficients
Float_t fRatio
ratio of values constibution to error
Float_t fRMSSigmaFit[2][3][2]
mean value of the varation of RMS to RMS
void FitRMS(TTree *tree)
Float_t fErrorS1[2][4]
error parameterization coeficients
TVectorD * fQpadMnorm
q pad normalization - Max charge
static Float_t SGetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle)
Float_t GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Bool_t fWaveCorrectionMirroredPad
flag is the cog axis mirrored at 0.5
static Float_t SGetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean)
Float_t GetWaveCorrection(Int_t Type, Float_t Z, Int_t QMax, Float_t Pad, Float_t angleY) const
Float_t QnormHis(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz)
TObjArray * fQNormHis
q norm correction for analytical correction
TVectorD * fQpadTnorm
q pad normalization - Total charge
Float_t fParamS0Par[2][3][7]
error parameterization coeficients
TPC cluster error, shape and charge parameterization as function of drift length and inclination angl...
TVectorD *& PosZcor(Int_t ind)
void FitResolQPar(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
Float_t GetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t GetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
TVectorD * fPosQMnorm[3]
q position normalization
Double_t GetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType) const
void SetResolutionYMap(THnBase *ResolutionYMap)
void SetInstance(AliTPCClusterParam *const param)
Float_t fParamRMSQ[2][3][6]
shape parameterization coeficients
static Float_t SGetError1(Int_t dim, Int_t type, Float_t z, Float_t angle)
Float_t Qnorm(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz)
Float_t fParamS1[2][4]
error parameterization coeficients
static Float_t SGetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM)
Float_t PosCorrection(Int_t type, Int_t ipad, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm)
AliTPCClusterParam & operator=(const AliTPCClusterParam &param)
void FitRMSQ(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
Bool_t fWaveCorrectionMirroredAngle
flag is the Angle axis mirrored at 0
Float_t GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t fParamSQPar[2][3][9]
error parameterization coeficients
Float_t fErrorSQPar[2][3][9]
error parameterization coeficients
void FitResol1(TTree *tree, Int_t dim, Float_t *param0, Float_t *error)
void FitResol(TTree *tree)
Bool_t fWaveCorrectionMirroredZ
flag is the Z axis mirrored at 0
virtual void Print(Option_t *option="") const
static AliTPCClusterParam * fgInstance
Float_t GetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM) const
static Float_t SGetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean)
static Double_t GaussConvolutionGamma4(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1, Double_t tau)
Float_t fRMSSigmaRatio[2][2]
mean value of the varation of RMS to RMS
void FitResolQ(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
void Test(TTree *tree, const char *output="TestClusterParam.root")
void FitResol0Par(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
static Double_t GaussConvolutionTail(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1, Double_t tau)
TObjArray * fQNorm
q norm paramters
THnBase * fWaveCorrectionMap
dY with respect to the distance to the center of the pad
Float_t fParamSQ[2][3][6]
error parameterization coeficients
Float_t GetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t fErrorRMS0[2][3][4]
shape parameterization coeficients
void SetWaveCorrectionMap(THnBase *WaveCorrectionMap)
Float_t fErrorS0[2][3][4]
error parameterization coeficients
TMatrixD * GetQnormCorrMatrix()
TVectorD * fPosYcor[3]
position correction parameterization
TVectorD *& PosYcor(Int_t ind)
Float_t GetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
Float_t QnormPos(Int_t ipad, Bool_t isMax, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm, Float_t qt)
Float_t fParamRMS0[2][3][4]
shape parameterization coeficients
static Float_t SGetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle)
void SetQnorm(Int_t ipad, Int_t itype, const TVectorD *const norm)
static Float_t SGetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean)
TVectorD * QpadTnorm() const
static Float_t SGetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle)