1 #ifndef ALITRDCALIBRATION_H
2 #define ALITRDCALIBRATION_H
4 // macro for extremely simple analysis
6 ///////////////////////////////////////////////////////////////////////////////
8 // TRD calibration class //
10 ///////////////////////////////////////////////////////////////////////////////
12 #include "AliTRDrecoTask.h"
24 class AliTRDCalibraFillHisto;
25 class AliTRDCalibraVector;
26 class AliTRDCalibraMode;
28 class AliTRDtrackInfo;
30 class AliTRDcalibration : public AliTRDrecoTask
35 // Plots registered for this task
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
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
58 virtual ~AliTRDcalibration();
60 virtual void CreateOutputObjects();
61 virtual void Exec(Option_t *option);
62 virtual void Terminate(Option_t *);
63 virtual Bool_t GetRefFigure(Int_t ifig);
64 virtual Bool_t PostProcess();
66 Bool_t FillGraphIndex(const TObjArray *vectora, TGraph *graph) const;
67 Bool_t AddStatsPerDetector(const TH2I *ch);
68 Bool_t AddStatsPerDetector(const TProfile2D *ph, Int_t i);
70 Bool_t SetNrphiFromTObject(const char *name, Int_t i, AliTRDCalibraMode *calibMode) const;
71 Bool_t SetNzFromTObject(const char *name, Int_t i, AliTRDCalibraMode *calibMode) const;
73 Int_t GetNumberOfGroupsPRF(const char* nametitle) const;
74 TH2I *GetSumCH() const { return fCHSum; };
75 TH2D *GetSumDet() const { return fDetSum;};
76 AliTRDCalibraVector *GetSumDetVector() const { return fDetSumVector;};
77 TObjArray *GetArrayCalib() const { return fArrayCalib; };
80 void SetHisto2d(Bool_t histo2d) {fHisto2d=histo2d;};
81 void SetVector2d(Bool_t vector2d) {fVector2d=vector2d;};
82 void SetVdriftLinear(Bool_t vdriftLinear) {fVdriftLinear = vdriftLinear;};
83 void SetNbTimeBins(Int_t nbTimeBins) {fNbTimeBins=nbTimeBins;};
84 void SetLow(Int_t low) {flow=low;};
85 void SetHigh(Int_t high) {fhigh=high;};
86 void SetNz(Short_t nz, Int_t i) {fNz[i]=nz;};
87 void SetNrphi(Short_t nrphi, Int_t i) {fNrphi[i]=nrphi;};
88 void SetFillZero(Bool_t fillZero) {ffillZero = fillZero;};
89 void SetNormalizeNbOfCluster(Bool_t normalizeNbOfCluster) {fnormalizeNbOfCluster = normalizeNbOfCluster;};
90 void SetMaxCluster(Float_t maxcluster) {fmaxCluster = maxcluster; };
91 void SetOfflineTracks() {fOfflineTracks=kTRUE; fStandaloneTracks=kFALSE; };
92 void SetStandaloneTracks() {fStandaloneTracks=kTRUE; fOfflineTracks=kFALSE; };
93 void SetCompressPerDetector(Bool_t compressPerDetector=kTRUE) {fCompressPerDetector=compressPerDetector; };
96 AliTRDtrackInfo *fTrackInfo; //track info
98 AliTRDtrackV1 *ftrdTrack; //trdtrack
99 AliTRDcluster *fcl; //cluster
101 AliTRDCalibraFillHisto *fTRDCalibraFillHisto; //! calibration analyse object
102 TH1F *fNbTRDTrack; //! nb ESD tracks used
103 TH1F *fNbTRDTrackOffline; //! nb ESD tracks offline used
104 TH1F *fNbTRDTrackStandalone; //! nb ESD tracks standalone used
105 TH1F *fNbTRDTracklet; //! nb tracklets used
106 TH1F *fNbTRDTrackletOffline; //! nb tracklets offline used
107 TH1F *fNbTRDTrackletStandalone; //! nb tracklets standalone used
108 TH1F *fNbTimeBin; //! nb Time Bin
109 TH1F *fNbTimeBinOffline; //! nb Time Bin offline
110 TH1F *fNbTimeBinStandalone; //! nb Time Bin standalone
111 TH1F *fNbClusters; //! nb Clusters
112 TH1F *fNbClustersOffline; //! nb Clusters offline
113 TH1F *fNbClustersStandalone; //! nb Clusters standalone
114 TProfile2D *fPHSM; //! Per SM
115 TH2I *fCHSM; //! Per SM
117 TProfile2D *fPHSum; //! All together PH
118 TH2I *fCHSum; //! All together CH during the task, used also if want to use AddStatsPerDetector
119 TH2D *fDetSum; //! AddStatsPerDetector
120 AliTRDCalibraVector *fDetSumVector; //! AddStatsPerDetector
122 Bool_t fHisto2d; //! histo
123 Bool_t fVector2d; //! vector
124 Bool_t fVdriftLinear; //! vdrift Linear
126 Int_t flow; //! lower limit nb of clusters
127 Int_t fhigh; //! higher limit nb of clusters
128 Int_t fNbTimeBins; //! number of timebins
129 Bool_t ffillZero; //! fill zero
130 Short_t fNz[3]; //! Nz mode
131 Short_t fNrphi[3]; //! Nrphi mode
132 Bool_t fnormalizeNbOfCluster; //! normalize with number of clusters
133 Float_t fmaxCluster; //! maxcluster (noise at the end)
134 Bool_t fOfflineTracks; //! Offline refited tracks
135 Bool_t fStandaloneTracks; //! Take only standalone tracks
137 Bool_t fCompressPerDetector; //! Compress per detector
139 TObjArray *fGraph; //! array of graphs filled in PostProcess
140 TObjArray *fArrayCalib; //! array of calibration objects filled in PostProcess
141 Bool_t fPostProcess; //Post process
143 AliTRDcalibration(const AliTRDcalibration&);
144 AliTRDcalibration& operator=(const AliTRDcalibration&);
146 ClassDef(AliTRDcalibration, 1) // calibration task