*** V interface for TPCCalibTasks ***
[u/mrichter/AliRoot.git] / TPC / Calib / AliTPCcalibGainMult.h
CommitLineData
f72219cb 1#ifndef ALITPCCALIBGAINMULT_H
2#define ALITPCCALIBGAINMULT_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 "AliTPCcalibBase.h"
8#include "AliTPCCalPad.h"
9#include "TH3F.h"
10#include "TF1.h"
11#include "THnSparse.h"
596c62a8 12#include "THn.h"
6feb400f 13#include "TMatrixD.h"
14#include "TVectorD.h"
f72219cb 15class TH1F;
16class TList;
e3d1b1e2 17//class AliESDEvent;
18class AliVEvent;
19//class AliESDtrack;
20class AliVTrack;
21class AliVfriendTrack;
f72219cb 22class AliTPCseed;
23
24#include "TTreeStream.h"
25
26
27class AliTPCcalibGainMult:public AliTPCcalibBase {
28public:
29 AliTPCcalibGainMult();
30 AliTPCcalibGainMult(const Text_t *name, const Text_t *title);
31 virtual ~AliTPCcalibGainMult();
6feb400f 32 void SetBBParam(TVectorD * param) {fBBParam=param;}
33 // virtual void Terminate();
f72219cb 34 //
e3d1b1e2 35 //virtual void Process(AliESDEvent *event);
36 virtual void Process(AliVEvent *event);
37
38 //virtual void ProcessV0s(AliESDEvent *event);
39 //virtual void ProcessCosmic(const AliESDEvent *event);
40 //virtual void ProcessKinks(const AliESDEvent *event);
41 //virtual void ProcessTOF(const AliESDEvent *event);
42 //virtual void DumpHPT(const AliESDEvent *event);
43
44 virtual void ProcessV0s(AliVEvent *event);
45 virtual void ProcessCosmic(const AliVEvent *event);
46 virtual void ProcessKinks(const AliVEvent *event);
47 virtual void ProcessTOF(const AliVEvent *event);
48 virtual void DumpHPT(const AliVEvent *event);
49
f72219cb 50 virtual Long64_t Merge(TCollection *li);
51 virtual void Analyze();
e3d1b1e2 52 void DumpTrack(AliVTrack * track, AliVfriendTrack *ftrack, AliTPCseed * seed, Int_t index);
f72219cb 53 //
54 TH1F * GetHistNTracks() const {return fHistNTracks;};
55 TH1F * GetHistClusterShape() const {return fHistClusterShape;};
56 TH3F * GetHistQA() const {return fHistQA;};
57 //
58 THnSparseF * GetHistGainSector() const {return fHistGainSector;};
59 THnSparseF * GetHistPadEqual() const {return fHistPadEqual;};
6feb400f 60 THnSparseF * GetHistGainMult() const {return fHistGainMult;};
596c62a8 61 THnF * GetHistTopology() const {return fHistTopology;};
62 //
6feb400f 63 THnSparseF * GetHistdEdxMap() const { return fHistdEdxMap;} // 4D dedx histogram
64 THnSparseF * GetHistdEdxMax() const { return fHistdEdxMax;} // 4D dedx histogram
65 THnSparseF * GetHistdEdxTot() const { return fHistdEdxTot;} // 4D dedx histogram
66 TTree * GetdEdxTree() const {return fdEdxTree;} // tree for the later minimization
67
7e3e1a9c 68 TGraphErrors* GetGainPerChamber(Int_t padRegion=1, Bool_t plotQA=kFALSE);
8fae6121 69 TGraphErrors* GetGainPerChamberRobust(Int_t padRegion=1, Bool_t plotQA=kFALSE);
f72219cb 70 //
71 void SetMIPvalue(Float_t mip){fMIP = mip;};
72 void SetLowerTrunc(Float_t lowerTrunc){fLowerTrunc = lowerTrunc;};
73 void SetUpperTrunc(Float_t upperTrunc){fUpperTrunc = upperTrunc;};
74 void SetUseMax(Bool_t useMax){fUseMax = useMax;};
75 //
f21b5f78 76 void SetCutMinCrossRows(Int_t crossRows){fCutCrossRows = crossRows;};
77 void SetCutMaxEta(Float_t maxEta){fCutEtaWindow = maxEta;};
78 void SetCutRequireITSrefit(Bool_t requireItsRefit = kFALSE){fCutRequireITSrefit = requireItsRefit;};
79 void SetCutMaxDcaXY(Float_t maxXY){fCutMaxDcaXY = maxXY;};
80 void SetCutMaxDcaZ(Float_t maxZ){fCutMaxDcaZ = maxZ;};
81 //
ed7b1997 82 void SetMinMomentumMIP(Float_t minMom = 0.4){fMinMomentumMIP = minMom;};
83 void SetMaxMomentumMIP(Float_t maxMom = 0.6){fMaxMomentumMIP = maxMom;};
84 void SetAlephParameters(Float_t * parameters){for(Int_t j=0;j<5;j++) fAlephParameters[j] = parameters[j];};
85 //
f72219cb 86 //
e3d1b1e2 87 //void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);}
88 void Process(AliVTrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);}
f72219cb 89 void Process(AliTPCseed *track){return AliTPCcalibBase::Process(track);}
90 //
19f63078 91 void MakeLookup(THnSparse * hist, Char_t * outputFile);
92 //
f72219cb 93 void UpdateGainMap();
94 void UpdateClusterParam();
95
afa85729 96 Double_t GetEntries() const {return fHistGainSector->GetEntries();}
97
98 static void SetMergeEntriesCut(Double_t c) {fgMergeEntriesCut=c;}
f72219cb 99
100private:
afa85729 101 static Double_t fgMergeEntriesCut; //maximal number of entries for merging -can be modified via setter
102
f72219cb 103 //
104 // parameter specifications
105 //
106 Float_t fMIP; // MIP position to be in fMIP
107 Float_t fLowerTrunc; // lower truncation for dEdx
108 Float_t fUpperTrunc; // upper truncation for dEdx
109 //
110 Bool_t fUseMax; // flag if Qmax or Qtot should be used
111 //
f21b5f78 112 // track cuts
113 //
114 Int_t fCutCrossRows; // minimum number of crossed rows
115 Float_t fCutEtaWindow; // maximum eta of tracks
116 Bool_t fCutRequireITSrefit; // if ITSrefit should be required (dangerous in cpass0)
117 Float_t fCutMaxDcaXY; // max dca_xy (only TPConly resolution is guaranteed!)
118 Float_t fCutMaxDcaZ; // max dca_z (dangerous if vDrift is not calibrated)
119 //
ed7b1997 120 // definition of MIP window
121 //
122 Float_t fMinMomentumMIP; // minimum momentum of MIP region, e.g. 400 MeV
123 Float_t fMaxMomentumMIP; // maximum momentum of MIP region, e.g. 600 MeV
124 Float_t fAlephParameters[5]; // parameters for equalization in MIP window, parameter set should be =1 at MIP
125 //
f72219cb 126 // histograms
127 //
128 TH1F *fHistNTracks; // histogram showing number of ESD tracks per event
129 TH1F *fHistClusterShape; // histogram to check the cluster shape
130 TH3F *fHistQA; // dE/dx histogram showing the final spectrum
131 //
f21b5f78 132 //
f72219cb 133 THnSparseF * fHistGainSector; // histogram which shows MIP peak for each of the 3x36 sectors (pad region)
134 THnSparseF * fHistPadEqual; // histogram for the equalization of the gain in the different pad regions -> pass0
135 THnSparseF * fHistGainMult; // histogram which shows decrease of MIP signal as a function
596c62a8 136 THnF * fHistTopology; // histogram for topological corrections of signal - dip angle theta and curvature (1/pT)
6feb400f 137 TMatrixD *fPIDMatrix; //! custom PID matrix
138 //
139 THnSparseF * fHistdEdxMap; // 4D dedx histogram - per sector/phi
140 THnSparseF * fHistdEdxMax; // 5D dedx histogram - per 1/dedx, tan(theta), tan(phi), mult, pad-type
141 THnSparseF * fHistdEdxTot; // 5D dedx histogram - per 1/dedx, tan(theta), tan(phi), mult, pad-type
142 TTree * fdEdxTree; // tree for the later minimization
143 TVectorD *fBBParam; // BetheBloch parameterization used for the dedx expected calculation
f72219cb 144 //
145 AliTPCcalibGainMult(const AliTPCcalibGainMult&);
146 AliTPCcalibGainMult& operator=(const AliTPCcalibGainMult&);
147
eece0b11 148 ClassDef(AliTPCcalibGainMult, 4);
f72219cb 149};
150
151#endif
152
153