]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/TRD/AliTRDcalibration.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGPP / TRD / AliTRDcalibration.h
CommitLineData
1ee39b3a 1#ifndef ALITRDCALIBRATION_H
2#define ALITRDCALIBRATION_H
3
4// macro for extremely simple analysis
5
6///////////////////////////////////////////////////////////////////////////////
7// //
8// TRD calibration class //
9// //
10///////////////////////////////////////////////////////////////////////////////
11
12#include "AliTRDrecoTask.h"
13
14class TList;
15class TObject;
16class TH1F;
17class TProfile2D;
18class TGraph;
19class TH2I;
20class TH2D;
21class TTree;
22class TObjArray;
23class AliTRDtrackV1;
24class AliTRDCalibraFillHisto;
25class AliTRDCalibraVector;
26class AliTRDCalibraMode;
27class AliTRDcluster;
28class AliTRDtrackInfo;
29
30class AliTRDcalibration : public AliTRDrecoTask
31{
32
33public:
34
35 // Plots registered for this task
36 enum{
37 kNbTrack = 0 // Nb tracks per event
38 ,kNbTracklet = 1 // Nb of traklets per detector
39 ,kNbTimeBin = 2 // Nb of clusters per timebin
40 ,kNbClusters = 3 // Nb of clusters per tracklet
41 ,kPHSum = 4 // All integrated PH
42 ,kCHSum = 5 // All integrated CH
43 ,kPH2D = 6 // PH2D
44 ,kCH2D = 7 // CH2D
45 ,kPRF2D = 8 // PRF2D
46 ,kPH2DVector = 9 // PH2D
47 ,kCH2DVector = 10 // CH2D
48 ,kPRF2DVector = 11 // PRF2D
49 ,kLinearFitter = 12 // For the one with the most stats
50 ,kGainFactor = 13 // Gain factor
51 ,kVdriftT0Factor = 14 // VdriftT0 average pulse height
52 ,kVdriftLorentzAngleFactor = 15 // VdriftLorentzAngle
53 ,kPRFFactor = 16 //PRF Factor
54 };
55
56
57 AliTRDcalibration();
f8f46e4d 58 AliTRDcalibration(char* name);
1ee39b3a 59 virtual ~AliTRDcalibration();
60
f8f46e4d 61 virtual void UserCreateOutputObjects();
62 virtual void UserExec(Option_t *option);
1ee39b3a 63 virtual void Terminate(Option_t *);
64 virtual Bool_t GetRefFigure(Int_t ifig);
65 virtual Bool_t PostProcess();
66
67 Bool_t FillGraphIndex(const TObjArray *vectora, TGraph *graph) const;
68 Bool_t AddStatsPerDetector(const TH2I *ch);
69 Bool_t AddStatsPerDetector(const TProfile2D *ph, Int_t i);
70
71 Bool_t SetNrphiFromTObject(const char *name, Int_t i, AliTRDCalibraMode *calibMode) const;
72 Bool_t SetNzFromTObject(const char *name, Int_t i, AliTRDCalibraMode *calibMode) const;
73
74 Int_t GetNumberOfGroupsPRF(const char* nametitle) const;
75 TH2I *GetSumCH() const { return fCHSum; };
76 TH2D *GetSumDet() const { return fDetSum;};
77 AliTRDCalibraVector *GetSumDetVector() const { return fDetSumVector;};
1fb72fc9 78 TObjArray *GetArrayCalib() const { return fArrayCalib; };
1ee39b3a 79
1ee39b3a 80
81 void SetHisto2d(Bool_t histo2d) {fHisto2d=histo2d;};
82 void SetVector2d(Bool_t vector2d) {fVector2d=vector2d;};
83 void SetVdriftLinear(Bool_t vdriftLinear) {fVdriftLinear = vdriftLinear;};
41753415 84 void SetNbTimeBins(Int_t nbTimeBins) {fNbTimeBins=nbTimeBins;};
1ee39b3a 85 void SetLow(Int_t low) {flow=low;};
86 void SetHigh(Int_t high) {fhigh=high;};
87 void SetNz(Short_t nz, Int_t i) {fNz[i]=nz;};
88 void SetNrphi(Short_t nrphi, Int_t i) {fNrphi[i]=nrphi;};
89 void SetFillZero(Bool_t fillZero) {ffillZero = fillZero;};
90 void SetNormalizeNbOfCluster(Bool_t normalizeNbOfCluster) {fnormalizeNbOfCluster = normalizeNbOfCluster;};
91 void SetMaxCluster(Float_t maxcluster) {fmaxCluster = maxcluster; };
92 void SetOfflineTracks() {fOfflineTracks=kTRUE; fStandaloneTracks=kFALSE; };
93 void SetStandaloneTracks() {fStandaloneTracks=kTRUE; fOfflineTracks=kFALSE; };
94 void SetCompressPerDetector(Bool_t compressPerDetector=kTRUE) {fCompressPerDetector=compressPerDetector; };
1fb72fc9 95
1ee39b3a 96private:
97 AliTRDtrackInfo *fTrackInfo; //track info
98
99 AliTRDtrackV1 *ftrdTrack; //trdtrack
100 AliTRDcluster *fcl; //cluster
101
102 AliTRDCalibraFillHisto *fTRDCalibraFillHisto; //! calibration analyse object
103 TH1F *fNbTRDTrack; //! nb ESD tracks used
104 TH1F *fNbTRDTrackOffline; //! nb ESD tracks offline used
105 TH1F *fNbTRDTrackStandalone; //! nb ESD tracks standalone used
106 TH1F *fNbTRDTracklet; //! nb tracklets used
107 TH1F *fNbTRDTrackletOffline; //! nb tracklets offline used
108 TH1F *fNbTRDTrackletStandalone; //! nb tracklets standalone used
109 TH1F *fNbTimeBin; //! nb Time Bin
110 TH1F *fNbTimeBinOffline; //! nb Time Bin offline
111 TH1F *fNbTimeBinStandalone; //! nb Time Bin standalone
112 TH1F *fNbClusters; //! nb Clusters
113 TH1F *fNbClustersOffline; //! nb Clusters offline
114 TH1F *fNbClustersStandalone; //! nb Clusters standalone
1fb72fc9 115 TProfile2D *fPHSM; //! Per SM
116 TH2I *fCHSM; //! Per SM
1ee39b3a 117
1fb72fc9 118 TProfile2D *fPHSum; //! All together PH
119 TH2I *fCHSum; //! All together CH during the task, used also if want to use AddStatsPerDetector
120 TH2D *fDetSum; //! AddStatsPerDetector
121 AliTRDCalibraVector *fDetSumVector; //! AddStatsPerDetector
1ee39b3a 122
5935a6da 123 Bool_t fHisto2d; // histo
124 Bool_t fVector2d; // vector
125 Bool_t fVdriftLinear; // vdrift Linear
1fb72fc9 126
5935a6da 127 Int_t flow; // lower limit nb of clusters
128 Int_t fhigh; // higher limit nb of clusters
129 Int_t fNbTimeBins; // number of timebins
130 Bool_t ffillZero; // fill zero
131 Short_t fNz[3]; // Nz mode
132 Short_t fNrphi[3]; // Nrphi mode
133 Bool_t fnormalizeNbOfCluster; // normalize with number of clusters
134 Float_t fmaxCluster; // maxcluster (noise at the end)
135 Bool_t fOfflineTracks; // Offline refited tracks
136 Bool_t fStandaloneTracks; // Take only standalone tracks
1ee39b3a 137
138 Bool_t fCompressPerDetector; //! Compress per detector
139
1ee39b3a 140 TObjArray *fGraph; //! array of graphs filled in PostProcess
1fb72fc9 141 TObjArray *fArrayCalib; //! array of calibration objects filled in PostProcess
1ee39b3a 142 Bool_t fPostProcess; //Post process
143
144 AliTRDcalibration(const AliTRDcalibration&);
145 AliTRDcalibration& operator=(const AliTRDcalibration&);
146
147 ClassDef(AliTRDcalibration, 1) // calibration task
148};
149#endif