1 #ifndef AliTPCCALIBTRACKSGAIN_H
2 #define AliTPCCALIBTRACKSGAIN_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
11 #include <TObjArray.h>
19 #include <AliTPCcalibBase.h>
23 class TTreeSRedirector;
30 class AliTPCClusterParam;
35 class AliTPCclusterMI;
36 class AliTrackPointArray;
38 class AliTPCcalibTracksCuts;
41 class AliTPCCClusterParam;
43 class AliTPCcalibTracksGain : public AliTPCcalibBase {
56 AliTPCcalibTracksGain();
57 AliTPCcalibTracksGain(const AliTPCcalibTracksGain& obj);
58 AliTPCcalibTracksGain(const char* name, const char* title, AliTPCcalibTracksCuts* cuts);
59 virtual ~AliTPCcalibTracksGain();
60 AliTPCcalibTracksGain& operator=(const AliTPCcalibTracksGain& rhs);
61 virtual Long64_t Merge(TCollection *list);
62 virtual void Process(AliTPCseed* seed);
63 virtual void Terminate();
64 virtual void Analyze();
66 // Tracks and cluster manipulation
68 Float_t GetGain(AliTPCclusterMI *cl);
69 Float_t GetMaxNorm(AliTPCclusterMI * cl, Float_t ky, Float_t kz);
70 Float_t GetQNorm(AliTPCclusterMI * cl, Float_t ky, Float_t kz);
71 void AddTrack(AliTPCseed* seed);
72 void DumpTrack(AliTPCseed* track);
73 Bool_t GetDedx(AliTPCseed* track, Int_t padType, Int_t*rows,
74 Int_t §or, Int_t& npoints,
75 TVectorD &dedxM, TVectorD &dedxQ,
76 TVectorD &parY, TVectorD &parZ, TVectorD & meanPos);
77 void AddCluster(AliTPCclusterMI* cluster, Float_t momenta, Float_t mdedx, Int_t padType, Float_t xcenter, TVectorD &dedxQ, TVectorD & dedxM, Float_t fraction, Float_t fraction2, Float_t dedge, TVectorD& parY, TVectorD& parZ, TVectorD& meanPos);
78 void AddTracklet(UInt_t sector, UInt_t padType,TVectorD &dedxQ, TVectorD &dedxM,TVectorD& parY, TVectorD& parZ, TVectorD& meanPos);
80 void Add(AliTPCcalibTracksGain* cal);
83 // Get Derived results - gain maps
85 AliTPCCalPad* CreateFitCalPad(UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE);
86 AliTPCCalROC* CreateFitCalROC(UInt_t sector, UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE);
87 AliTPCCalROC* CreateFitCalROC(UInt_t sector, UInt_t padType, TVectorD &fitParam, UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE);
88 AliTPCCalROC* CreateCombinedCalROC(const AliTPCCalROC* roc1, const AliTPCCalROC* roc2);
90 void Evaluate(Bool_t robust = kFALSE, Double_t frac = -1.);
91 Bool_t GetParameters(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitParam);
92 void GetErrors(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitError);
93 void GetCovarianceMatrix(UInt_t segment, UInt_t padType, UInt_t fitType, TMatrixD& covMatrix);
96 void UpdateClusterParam(AliTPCClusterParam *param);
97 TGraph * CreateAmpGraph(Int_t ipad, Bool_t qmax);
100 TLinearFitter* GetFitter(UInt_t segment, UInt_t padType, UInt_t fitType);
101 void Process(AliESDEvent *event) {AliTPCcalibBase::Process(event);};
102 void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
108 static Double_t GetPadLength(Double_t lx);
109 static Int_t GetPadType(Double_t lx);
112 AliTPCcalibTracksCuts* fCuts; // cuts that are used for sieving the tracks used for calibration
114 // kalman fit - alignment of dEdx
119 AliTPCFitPad* fSimpleFitter; // simple fitter for short pads
120 AliTPCFitPad* fSqrtFitter; // sqrt fitter for medium pads
121 AliTPCFitPad* fLogFitter; // log fitter for long pads
123 TLinearFitter* fFitter0M; // fitting of the atenuation, angular correction, and mean chamber gain
124 TLinearFitter* fFitter1M; // fitting of the atenuation, angular correction, and mean chamber gain
125 TLinearFitter* fFitter2M; // fitting of the atenuation, angular correction, and mean chamber gain
126 TLinearFitter* fFitter0T; // fitting of the atenuation, angular correction, and mean chamber gain
127 TLinearFitter* fFitter1T; // fitting of the atenuation, angular correction, and mean chamber gain
128 TLinearFitter* fFitter2T; // fitting of the atenuation, angular correction, and mean chamber gain
130 // angular adn diffusion effect fitter
132 TLinearFitter* fDFitter0M; // fitting of the atenuation, angular correction
133 TLinearFitter* fDFitter1M; // fitting of the atenuation, angular correction
134 TLinearFitter* fDFitter2M; // fitting of the atenuation, angular correction
135 TLinearFitter* fDFitter0T; // fitting of the atenuation, angular correction
136 TLinearFitter* fDFitter1T; // fitting of the atenuation, angular correction
137 TLinearFitter* fDFitter2T; // fitting of the atenuation, angular correction
139 AliTPCFitPad* fSingleSectorFitter; // just for debugging
143 UInt_t fTotalTracks; // just for debugging
144 UInt_t fAcceptedTracks; // just for debugging
150 static AliTPCParamSR* fgTPCparam; //! helper object for geometry related operations
151 static const Double_t fgkM; // value used in the transformation of the charge values for the logarithmic fitter
152 static const char* fgkDebugStreamFileName; // filename of the debug stream file
153 static const Bool_t fgkUseTotalCharge; // whether to use the cluster's total or maximum charge
155 ClassDef(AliTPCcalibTracksGain, 1);