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