Correct sign for calculated b_y (outside measured region).
[u/mrichter/AliRoot.git] / TPC / AliTPCClusterParam.h
CommitLineData
12ca5da1 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
8////////////////////////////////////////////////////
9// //
10// TPC cluster error and shape parameterization //
11// //
12////////////////////////////////////////////////////
13
14
15#include <TObject.h>
16class TTree;
17
18//_____________________________________________________________________________
19class AliTPCClusterParam : public TObject {
20 public:
21 static AliTPCClusterParam* Instance();
22 AliTPCClusterParam(){fRatio=0.01;}
23 virtual ~AliTPCClusterParam(){;}
24 virtual void Print(Option_t* option = "") const;
25 void SetInstance(AliTPCClusterParam*param){fgInstance = param;}
26 void FitData(TTree * tree);
27 Float_t GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle);
28 Float_t GetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle);
29 Float_t GetError1(Int_t dim, Int_t type, Float_t z, Float_t angle);
30 Float_t GetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean);
31 Float_t GetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean);
32 Float_t GetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean);
33 Float_t GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle);
34 Float_t GetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle);
35 Float_t GetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean);
36 Float_t GetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean);
37 Float_t GetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM);
38
39 void Test(TTree * tree, const char *output="TestClusterParam.root");
40 //
41 // static methods equivalents - use instance of param object - useful for tree draw and TF2 visualization
42 static Float_t SGetError0(Int_t dim, Int_t type, Float_t z, Float_t angle){
43 return fgInstance->GetError0(dim,type,z,angle);
44 }
45 static Float_t SGetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle){
46 return fgInstance->GetError0Par(dim,type,z,angle);
47 }
48 static Float_t SGetError1(Int_t dim, Int_t type, Float_t z, Float_t angle){
49 return fgInstance->GetError1(dim,type,z,angle);
50 }
51 static Float_t SGetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
52 return fgInstance->GetErrorQ(dim,type,z,angle,Qmean);
53 }
54 static Float_t SGetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
55 return fgInstance->GetErrorQPar(dim,type,z,angle,Qmean);
56 }
57 static Float_t SGetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
58 return fgInstance->GetErrorQParScaled(dim,type,z,angle,Qmean);
59 }
60
61 static Float_t SGetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle){
62 return fgInstance->GetRMS0(dim,type,z,angle);
63 }
64 static Float_t SGetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle){
65 return fgInstance->GetRMS1(dim,type,z,angle);
66 }
67 static Float_t SGetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
68 return fgInstance->GetRMSQ(dim,type,z,angle,Qmean);
69 }
70 static Float_t SGetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
71 return fgInstance->GetRMSSigma(dim,type,z,angle,Qmean);
72 }
73 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){
74 return fgInstance->GetShapeFactor(dim,type,z,angle,Qmean, rmsL, rmsM);
75 }
76 //
77 //
78 void FitResol(TTree * tree);
79 void FitRMS(TTree * tree);
80 protected:
81 void FitResol0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
82 void FitResol0Par(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
83 void FitResol1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error);
84 void FitResolQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
85 void FitResolQPar(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
86 void FitRMS0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
87 void FitRMS1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error);
88 void FitRMSQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
89 void FitRMSSigma(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error);
90 //
91 Float_t fRatio; //ratio of values constibution to error
92 Float_t fParamS0[2][3][4]; //error parameterization coeficients
93 Float_t fErrorS0[2][3][4]; //error parameterization coeficients
94 Float_t fParamS0Par[2][3][7]; //error parameterization coeficients
95 Float_t fErrorS0Par[2][3][7]; //error parameterization coeficients
96 Float_t fParamSQ[2][3][6]; //error parameterization coeficients
97 Float_t fErrorSQ[2][3][6]; //error parameterization coeficients
98 Float_t fParamSQPar[2][3][9]; //error parameterization coeficients
99 Float_t fErrorSQPar[2][3][9]; //error parameterization coeficients
100 Float_t fParamS1[2][4]; //error parameterization coeficients
101 Float_t fErrorS1[2][4]; //error parameterization coeficients
102 //
103 Float_t fParamRMS0[2][3][4]; //shape parameterization coeficients
104 Float_t fErrorRMS0[2][3][4]; //shape parameterization coeficients
105 Float_t fParamRMSQ[2][3][6]; //shape parameterization coeficients
106 Float_t fErrorRMSQ[2][3][6]; //shape parameterization coeficients
107 Float_t fParamRMS1[2][5]; //shape parameterization coeficients
108 Float_t fErrorRMS1[2][5]; //shape parameterization coeficients
109 Float_t fErrorRMSSys[2]; // systematic relative error of the parametererization
110 Float_t fRMSSigmaRatio[2][2]; // mean value of the varation of RMS to RMS
111 Float_t fRMSSigmaFit[2][3][2]; // mean value of the varation of RMS to RMS
112 //
113 protected:
114 static AliTPCClusterParam* fgInstance; //! Instance of this class (singleton implementation)
115 ClassDef(AliTPCClusterParam,1) // TPC ROC class
116};
117
118#endif