AliPIDResponse related
[u/mrichter/AliRoot.git] / PWG1 / ITS / AliAnalysisTaskITSAlignQA.h
CommitLineData
89b48e9e 1#ifndef ALIANALYSISTASKITSALIGNQA
2#define ALIANALYSISTASKITSALIGNQA
3
4/* Copyright(c) 1998-2012, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//*************************************************************************
8// Class AliAnalysiTaskITSAlignQA
9// AliAnalysisTaskSE to extract from ESD + ESDfriends
10// the track-to-point residuals and dE/dx vs, time for SDD modules
11//
12// Author: F. Prino, prino@to.infn.it
13//*************************************************************************
14
15class TList;
16class TH1F;
17class TH2F;
18class TTree;
19class TString;
20class AliESDEvent;
21class AliESDfriend;
22class AliITSTPArrayFit;
ee3292b1 23class AliTrackPointArray;
89b48e9e 24
25#include "AliAnalysisTaskSE.h"
26
27class AliAnalysisTaskITSAlignQA : public AliAnalysisTaskSE {
28
29 public:
30
31 AliAnalysisTaskITSAlignQA();
32 virtual ~AliAnalysisTaskITSAlignQA();
33
34 virtual void UserExec(Option_t *option);
35 virtual void UserCreateOutputObjects();
36 virtual void Terminate(Option_t *option);
37
38 void SetDoSPDResiduals(Bool_t opt){
39 fDoSPDResiduals=opt;
40 }
41 void SetDoSDDResiduals(Bool_t opt){
42 fDoSDDResiduals=opt;
43 }
44 void SetDoSSDResiduals(Bool_t opt){
45 fDoSSDResiduals=opt;
46 }
47 void SetDoSDDdEdxCalib(Bool_t opt){
48 fDoSDDdEdxCalib=opt;
49 }
50 void SetDoAllResiduals(){
51 fDoSPDResiduals=kTRUE;
52 fDoSDDResiduals=kTRUE;
53 fDoSSDResiduals=kTRUE;
54 }
55 void SetDoAll(){
56 SetDoAllResiduals();
57 fDoSDDdEdxCalib=kTRUE;
58 }
59
60 void SetUseITSstandaloneTracks(Bool_t use){
61 fUseITSsaTracks=use;
62 }
63 void SetMinITSPoints(Int_t minp=3){
64 fMinITSpts=minp;
65 }
66 void SetMinTPCPoints(Int_t minp=70){
67 fMinTPCpts=minp;
68 }
69 void SetMinPt(Float_t minpt=1.0){
70 fMinPt=minpt;
71 }
72
73 void SetOCDBInfo(UInt_t runNb, const char *location) {
74 fRunNb=runNb;
75 fOCDBLocation=location;
76 }
77
78 Bool_t AcceptTrack(AliESDtrack * track);
79
80 void CreateSPDHistos();
81 void CreateSDDHistos();
82 void CreateSSDHistos();
83
84 void FitAndFillSPD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
85 void FitAndFillSDD(const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
86 void FitAndFillSSD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
87 void SetPtBinLimits(Int_t nBins, Double_t* xbins){
88 fNPtBins=nBins;
89 if(nBins>kMaxPtBins) fNPtBins=kMaxPtBins;
90 for(Int_t iBin=0; iBin<=fNPtBins; iBin++) fPtBinLimits[iBin]=xbins[iBin];
91 }
92 void LoadGeometryFromOCDB();
93
94 private:
95 AliAnalysisTaskITSAlignQA(const AliAnalysisTaskITSAlignQA &source);
96 AliAnalysisTaskITSAlignQA& operator=(const AliAnalysisTaskITSAlignQA &source);
97
98 enum {kNSPDmods = 240};
99 enum {kNSDDmods = 260};
100 enum {kNSSDmods = 1698};
101 enum {kMaxPtBins = 12};
102
103 TList* fOutput; //! Histos with residuals
104 TH1F* fHistNEvents; //! histo with N of events
105 TH1F* fHistPtAccept; //! histo of pt distribution of accepted tracks
106
107 TH2F* fHistSPDResidX[kNSPDmods]; //! histos of SPD residuals along Xloc vs. Pt
108 TH2F* fHistSPDResidZ[kNSPDmods]; //! histos of SPD residuals along Zloc vs. Pt
109 TH2F* fHistSDDResidX[kNSSDmods]; //! histos of SDD residuals along Xloc vs. Pt
110 TH2F* fHistSDDResidZ[kNSSDmods]; //! histos of SDD residuals along Zloc vs. Pt
111 TH2F* fHistSSDResidX[kNSSDmods]; //! histos of SSD residuals along Xloc vs. Pt
112 TH2F* fHistSSDResidZ[kNSSDmods]; //! histos of SSD residuals along Zloc vs. Pt
113
114 TH2F* fHistSDDResidXvsX[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Xloc
115 TH2F* fHistSDDResidXvsZ[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Zloc
116 TH2F* fHistSDDResidZvsX[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Xloc
117 TH2F* fHistSDDResidZvsZ[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Zloc
118 TH2F* fHistSDDdEdxvsDrTime[kNSDDmods]; //! histos of SDD dE/dx vs. drift time
119 TH1F* fHistSDDDrTimeAll[kNSDDmods]; //! histos of SDD drift time (all clusters)
120 TH1F* fHistSDDDrTimeExtra[kNSDDmods]; //! histos of SDD drift time (extra clusters)
121 TH1F* fHistSDDDrTimeAttac[kNSDDmods]; //! histos of SDD drift time (attached clusters)
122
123
124 Bool_t fDoSPDResiduals; // Flag to enable histos of SPD residuals
125 Bool_t fDoSDDResiduals; // Flag to enable histos of SDD residuals
126 Bool_t fDoSSDResiduals; // Flag to enable histos of SSD residuals
127 Bool_t fDoSDDdEdxCalib; // Flag to enable histos for SDD dE/dx calibration
128 Bool_t fUseITSsaTracks; // Flag for using standalone ITS tracks
129 Int_t fMinITSpts; // Minimum number of ITS points per track
130 Int_t fMinTPCpts; // Minimum number of TPC points per track
131 Float_t fMinPt; // Minimum pt to accept tracks
132 Int_t fNPtBins; // number of pt bins
133 Double_t fPtBinLimits[kMaxPtBins+1]; // limits of Pt bins
134
135 AliITSTPArrayFit* fFitter; // Track Point fitter
136 Int_t fRunNb; // Run number
137 TString fOCDBLocation; // OCDB location
138
139 ClassDef(AliAnalysisTaskITSAlignQA,1);
140};
141
142
143#endif