]>
Commit | Line | Data |
---|---|---|
10757ee9 | 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 <TChain.h> | |
8 | #include <TNamed.h> | |
9 | ||
10 | ||
11 | #include <TObjArray.h> | |
12 | #include <TH2D.h> | |
13 | #include <TVectorD.h> | |
14 | #include <TMatrixD.h> | |
15 | ||
16 | #include <iostream> | |
17 | #include <TH1F.h> | |
18 | ||
19 | using namespace std; | |
20 | ||
21 | class TTreeSRedirector; | |
22 | class TH3F; | |
23 | class TLinearFitter; | |
24 | ||
25 | class AliTPCClusterParam; | |
26 | class AliTPCParamSR; | |
27 | class AliTPCCalROC; | |
28 | class AliTPCCalPad; | |
29 | class AliTPCseed; | |
30 | class AliTPCclusterMI; | |
31 | class AliTrackPointArray; | |
32 | class TTreeStream; | |
33 | class AliTPCcalibTracksCuts; | |
34 | class AliTPCFitPad; | |
35 | class TObjString; | |
36 | ||
37 | class AliTPCcalibTracksGain : public TNamed { | |
38 | public: | |
39 | enum { | |
40 | kShortPads = 0, | |
41 | kMediumPads = 1, | |
42 | kLongPads = 2 | |
43 | }; | |
44 | enum { | |
45 | kSimpleFitter = 0, | |
46 | kSqrtFitter = 1, | |
47 | kLogFitter = 2 | |
48 | }; | |
49 | ||
50 | AliTPCcalibTracksGain(); | |
51 | AliTPCcalibTracksGain(const AliTPCcalibTracksGain& obj); | |
52 | AliTPCcalibTracksGain(const char* name, const char* title, AliTPCcalibTracksCuts* cuts, TNamed* debugStreamPrefix = 0, AliTPCcalibTracksGain* prevIter = 0); | |
53 | virtual ~AliTPCcalibTracksGain(); | |
54 | AliTPCcalibTracksGain& operator=(const AliTPCcalibTracksGain& rhs); | |
55 | ||
56 | static void AddInfo(TChain* chain, char* debugStreamPrefix = 0, char* prevIterFileName = 0); | |
57 | Bool_t AcceptTrack(AliTPCseed* track); | |
58 | void Terminate(); | |
59 | void Add(AliTPCcalibTracksGain* cal); | |
60 | void AddTrack(AliTPCseed* seed); | |
61 | 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); | |
62 | void Process(AliTPCseed* seed); | |
63 | Long64_t Merge(TCollection *list); | |
64 | void Evaluate(Bool_t robust = kFALSE, Double_t frac = -1.); | |
65 | void GetParameters(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitParam); | |
66 | void GetErrors(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitError); | |
67 | Double_t GetRedChi2(UInt_t segment, UInt_t padType, UInt_t fitType); | |
68 | void GetCovarianceMatrix(UInt_t segment, UInt_t padType, UInt_t fitType, TMatrixD& covMatrix); | |
69 | AliTPCCalPad* CreateFitCalPad(UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE); | |
70 | AliTPCCalROC* CreateFitCalROC(UInt_t sector, UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE); | |
71 | AliTPCCalROC* CreateFitCalROC(UInt_t sector, UInt_t padType, TVectorD &fitParam, UInt_t fitType, Bool_t undoTransformation = kFALSE, Bool_t normalizeToPadSize = kFALSE); | |
72 | AliTPCCalROC* CreateCombinedCalROC(const AliTPCCalROC* roc1, const AliTPCCalROC* roc2); | |
73 | TLinearFitter* GetFitter(UInt_t segment, UInt_t padType, UInt_t fitType); | |
74 | static Double_t GetPadLength(Double_t lx); | |
75 | static Int_t GetPadType(Double_t lx); | |
76 | void DumpTrack(AliTPCseed* track); | |
77 | Bool_t GetDedx(AliTPCseed* track, Int_t padType, Int_t* rows); | |
78 | ||
79 | static Bool_t GetRowPad(Double_t lx, Double_t ly, Int_t& row, Int_t& pad); // just for debugging | |
80 | protected: | |
81 | ||
82 | UInt_t fTotalTracks; // just for debugging | |
83 | UInt_t fAcceptedTracks; // just for debugging | |
84 | AliTPCCalPad* fDebugCalPadRaw; // just for debugging | |
85 | AliTPCCalPad* fDebugCalPadCorr; // just for debugging | |
86 | ||
87 | TTreeSRedirector* fDebugStream; //! debug stream for debugging | |
88 | ||
89 | AliTPCFitPad* fSimpleFitter; // simple fitter for short pads | |
90 | AliTPCFitPad* fSqrtFitter; // sqrt fitter for medium pads | |
91 | AliTPCFitPad* fLogFitter; // log fitter for long pads | |
92 | AliTPCFitPad* fSingleSectorFitter; // just for debugging | |
93 | ||
94 | AliTPCcalibTracksGain* fPrevIter; // the calibration object in its previous iteration (will not be owned by the new object, don't forget to delete it!) | |
95 | ||
96 | UInt_t fNShortClusters[36]; // number of clusters registered on short pads | |
97 | UInt_t fNMediumClusters[36]; // number of clusters registered on medium pads | |
98 | UInt_t fNLongClusters[36]; // number of clusters registered on long pads | |
99 | TObjString* fDebugStreamPrefix; // pathname of the final location of the debug stream file (may also be an xrootd directory) | |
100 | AliTPCcalibTracksCuts* fCuts; // cuts that are used for sieving the tracks used for calibration | |
101 | ||
102 | static AliTPCParamSR* fgTPCparam; //! helper object for geometry related operations | |
103 | static const Double_t fgkM; // value used in the transformation of the charge values for the logarithmic fitter | |
104 | static const char* fgkDebugStreamFileName; // filename of the debug stream file | |
105 | static const Bool_t fgkUseTotalCharge; // whether to use the cluster's total or maximum charge | |
106 | ||
107 | ClassDef(AliTPCcalibTracksGain, 1); | |
108 | }; | |
109 | ||
110 | #endif |