Line data Source code
1 : #ifndef AliTPCCALIBTRACKSGAIN_H
2 : #define AliTPCCALIBTRACKSGAIN_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : #include <TVectorDfwd.h>
8 : #include <TMatrixDfwd.h>
9 :
10 : #include <AliTPCcalibBase.h>
11 :
12 : using namespace std;
13 :
14 : class TTreeSRedirector;
15 : class TObjString;
16 : class TLinearFitter;
17 : class TProfile;
18 : class TProfile2D;
19 : class TH1F;
20 :
21 : class AliTPCClusterParam;
22 : class AliTPCParamSR;
23 : class AliTPCCalROC;
24 : class AliTPCCalPad;
25 : class AliTPCseed;
26 : class AliTPCclusterMI;
27 : class AliTrackPointArray;
28 : class TTreeStream;
29 : class AliTPCcalibTracksCuts;
30 : class AliTPCFitPad;
31 : class TGraph;
32 : class AliTPCCClusterParam;
33 :
34 : class AliTPCcalibTracksGain : public AliTPCcalibBase {
35 : public:
36 : enum {
37 : kShortPads = 0,
38 : kMediumPads = 1,
39 : kLongPads = 2
40 : };
41 : enum {
42 : kSimpleFitter = 0,
43 : kSqrtFitter = 1,
44 : kLogFitter = 2
45 : };
46 :
47 : AliTPCcalibTracksGain();
48 : AliTPCcalibTracksGain(const AliTPCcalibTracksGain& obj);
49 : AliTPCcalibTracksGain(const char* name, const char* title, AliTPCcalibTracksCuts* cuts);
50 : virtual ~AliTPCcalibTracksGain();
51 : AliTPCcalibTracksGain& operator=(const AliTPCcalibTracksGain& rhs);
52 : virtual Long64_t Merge(TCollection *list);
53 : virtual void Process(AliTPCseed* seed);
54 : virtual void Terminate();
55 : virtual void Analyze();
56 : //
57 : // Tracks and cluster manipulation
58 : //
59 : Float_t GetGain(AliTPCclusterMI *cl);
60 : Float_t GetMaxNorm(AliTPCclusterMI * cl, Float_t ky, Float_t kz);
61 : Float_t GetQNorm(AliTPCclusterMI * cl, Float_t ky, Float_t kz);
62 : void AddTrack(AliTPCseed* seed);
63 : void DumpTrack(AliTPCseed* track);
64 : Bool_t GetDedx(AliTPCseed* track, Int_t padType, Int_t*rows,
65 : Int_t §or, Int_t& npoints,
66 : TVectorD &dedxM, TVectorD &dedxQ,
67 : TVectorD &parY, TVectorD &parZ, TVectorD & meanPos);
68 : 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);
69 : void AddTracklet(UInt_t sector, UInt_t padType,TVectorD &dedxQ, TVectorD &dedxM,TVectorD& parY, TVectorD& parZ, TVectorD& meanPos);
70 :
71 : void Add(AliTPCcalibTracksGain* cal);
72 :
73 : //
74 : // Get Derived results - gain maps
75 : //
76 : AliTPCCalPad* CreateFitCalPad(UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE);
77 : AliTPCCalROC* CreateFitCalROC(UInt_t sector, UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE);
78 : AliTPCCalROC* CreateFitCalROC(UInt_t sector, UInt_t padType, TVectorD &fitParam, UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE);
79 : AliTPCCalROC* CreateCombinedCalROC(const AliTPCCalROC* roc1, const AliTPCCalROC* roc2);
80 : //
81 : void Evaluate(Bool_t robust = kFALSE, Double_t frac = -1.);
82 : Bool_t GetParameters(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitParam);
83 : void GetErrors(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitError);
84 : void GetCovarianceMatrix(UInt_t segment, UInt_t padType, UInt_t fitType, TMatrixD& covMatrix);
85 : //
86 : //
87 : void UpdateClusterParam(AliTPCClusterParam *param);
88 : TGraph * CreateAmpGraph(Int_t ipad, Bool_t qmax);
89 :
90 :
91 : TLinearFitter* GetFitter(UInt_t segment, UInt_t padType, UInt_t fitType);
92 0 : void Process(AliESDEvent *event) {AliTPCcalibBase::Process(event);};
93 0 : void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
94 :
95 : public:
96 : //
97 : // Helper function
98 : //
99 : static Double_t GetPadLength(Double_t lx);
100 : static Int_t GetPadType(Double_t lx);
101 : //
102 : //
103 : AliTPCcalibTracksCuts* fCuts; // cuts that are used for sieving the tracks used for calibration
104 : //
105 : // kalman fit - alignment of dEdx
106 : //
107 : //
108 : // Fitters
109 : //
110 : AliTPCFitPad* fSimpleFitter; // simple fitter for short pads
111 : AliTPCFitPad* fSqrtFitter; // sqrt fitter for medium pads
112 : AliTPCFitPad* fLogFitter; // log fitter for long pads
113 : //
114 : TLinearFitter* fFitter0M; // fitting of the atenuation, angular correction, and mean chamber gain
115 : TLinearFitter* fFitter1M; // fitting of the atenuation, angular correction, and mean chamber gain
116 : TLinearFitter* fFitter2M; // fitting of the atenuation, angular correction, and mean chamber gain
117 : TLinearFitter* fFitter0T; // fitting of the atenuation, angular correction, and mean chamber gain
118 : TLinearFitter* fFitter1T; // fitting of the atenuation, angular correction, and mean chamber gain
119 : TLinearFitter* fFitter2T; // fitting of the atenuation, angular correction, and mean chamber gain
120 : //
121 : // angular adn diffusion effect fitter
122 : //
123 : TLinearFitter* fDFitter0M; // fitting of the atenuation, angular correction
124 : TLinearFitter* fDFitter1M; // fitting of the atenuation, angular correction
125 : TLinearFitter* fDFitter2M; // fitting of the atenuation, angular correction
126 : TLinearFitter* fDFitter0T; // fitting of the atenuation, angular correction
127 : TLinearFitter* fDFitter1T; // fitting of the atenuation, angular correction
128 : TLinearFitter* fDFitter2T; // fitting of the atenuation, angular correction
129 : //
130 : AliTPCFitPad* fSingleSectorFitter; // just for debugging
131 : //
132 : // Conters
133 : //
134 : UInt_t fTotalTracks; // just for debugging
135 : UInt_t fAcceptedTracks; // just for debugging
136 : //
137 : //
138 : //
139 : // Setup
140 : //
141 : static AliTPCParamSR* fgTPCparam; //! helper object for geometry related operations
142 : static const Double_t fgkM; // value used in the transformation of the charge values for the logarithmic fitter
143 : static const char* fgkDebugStreamFileName; // filename of the debug stream file
144 : static const Bool_t fgkUseTotalCharge; // whether to use the cluster's total or maximum charge
145 :
146 6 : ClassDef(AliTPCcalibTracksGain, 1);
147 : };
148 :
149 : #endif
|