]>
Commit | Line | Data |
---|---|---|
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 | ||
15 | class TList; | |
16 | class TH1F; | |
17 | class TH2F; | |
f09774b4 | 18 | class TProfile; |
89b48e9e | 19 | class TTree; |
20 | class TString; | |
21 | class AliESDEvent; | |
22 | class AliESDfriend; | |
23 | class AliITSTPArrayFit; | |
ee3292b1 | 24 | class AliTrackPointArray; |
6a5f5ccc | 25 | class AliITSSumTP; |
89b48e9e | 26 | |
27 | #include "AliAnalysisTaskSE.h" | |
28 | ||
29 | class AliAnalysisTaskITSAlignQA : public AliAnalysisTaskSE { | |
30 | ||
31 | public: | |
00a2ed4c | 32 | enum {kEvAll=0,kEvCnt,kEvVtx,kEvPlp,kNTracks,kNEvStatBins, kEvAcc=kEvPlp}; |
89b48e9e | 33 | AliAnalysisTaskITSAlignQA(); |
34 | virtual ~AliAnalysisTaskITSAlignQA(); | |
35 | ||
36 | virtual void UserExec(Option_t *option); | |
37 | virtual void UserCreateOutputObjects(); | |
38 | virtual void Terminate(Option_t *option); | |
39 | ||
6a5f5ccc | 40 | void SetDoFillTPTree(Bool_t opt){ |
41 | fDoFillTPTree=opt; | |
42 | } | |
89b48e9e | 43 | void SetDoSPDResiduals(Bool_t opt){ |
44 | fDoSPDResiduals=opt; | |
45 | } | |
46 | void SetDoSDDResiduals(Bool_t opt){ | |
47 | fDoSDDResiduals=opt; | |
48 | } | |
49 | void SetDoSSDResiduals(Bool_t opt){ | |
50 | fDoSSDResiduals=opt; | |
51 | } | |
52 | void SetDoSDDdEdxCalib(Bool_t opt){ | |
53 | fDoSDDdEdxCalib=opt; | |
54 | } | |
826883ac | 55 | void SetDoSDDVDriftCalib(Bool_t opt){ |
56 | fDoSDDVDriftCalib=opt; | |
57 | } | |
58 | void SetDoSDDDriftTime(Bool_t opt){ | |
59 | fDoSDDDriftTime=opt; | |
60 | } | |
89b48e9e | 61 | void SetDoAllResiduals(){ |
62 | fDoSPDResiduals=kTRUE; | |
63 | fDoSDDResiduals=kTRUE; | |
64 | fDoSSDResiduals=kTRUE; | |
65 | } | |
66 | void SetDoAll(){ | |
67 | SetDoAllResiduals(); | |
68 | fDoSDDdEdxCalib=kTRUE; | |
69 | } | |
89b48e9e | 70 | void SetUseITSstandaloneTracks(Bool_t use){ |
71 | fUseITSsaTracks=use; | |
72 | } | |
9ea163ca | 73 | void SetLoadGeometryFromOCDB(Bool_t opt){ |
74 | fLoadGeometry=opt; | |
75 | } | |
76 | ||
89b48e9e | 77 | void SetMinITSPoints(Int_t minp=3){ |
78 | fMinITSpts=minp; | |
79 | } | |
80 | void SetMinTPCPoints(Int_t minp=70){ | |
81 | fMinTPCpts=minp; | |
82 | } | |
83 | void SetMinPt(Float_t minpt=1.0){ | |
84 | fMinPt=minpt; | |
85 | } | |
6a5f5ccc | 86 | void SetUseTPCMomentum(Bool_t v=kTRUE) { fUseTPCMomentum = v;} |
87 | // | |
df69bb07 | 88 | void SetMinVtxContributors(Int_t n=5) { fMinVtxContributors = n; } |
89 | void SetUseVertex(Bool_t v=kTRUE) { fUseVertex = v; } | |
90 | void SetUseVertexForZOnly(Bool_t v=kTRUE) { fUseVertexForZOnly = v; } // Use the vertex for SDD Z residuals only | |
5104b23e | 91 | void SetRemovePileupWithSPD(Bool_t opt=kTRUE) { fRemovePileupWithSPD = opt; } |
00a2ed4c | 92 | void SetMinMaxMult(Double_t mn=0,Double_t mx=1e9) {fMinMult=mn; fMaxMult=mx;} |
6a5f5ccc | 93 | void SetCutDCA(double xy, double z) {fCutDCAXY = xy; fCutDCAZ = z;} |
94 | ||
00a2ed4c | 95 | void SetOCDBInfo(UInt_t runNb, const char *location) { |
89b48e9e | 96 | fRunNb=runNb; |
97 | fOCDBLocation=location; | |
98 | } | |
99 | ||
6a5f5ccc | 100 | Bool_t GetUseTPCMomentum() const {return fUseTPCMomentum;} |
101 | Bool_t AcceptTrack(const AliESDtrack * track, const AliESDVertex* vtx=0); | |
5104b23e | 102 | Bool_t AcceptVertex(const AliESDVertex * vtx, const AliESDVertex * vtxSPD); |
00a2ed4c | 103 | Bool_t AcceptCentrality(const AliESDEvent *esd) const; |
89b48e9e | 104 | void CreateSPDHistos(); |
105 | void CreateSDDHistos(); | |
106 | void CreateSSDHistos(); | |
107 | ||
108 | void FitAndFillSPD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track); | |
9ea163ca | 109 | void FitAndFillSDDrphi(const AliTrackPointArray *array, Int_t npts, AliESDtrack * track); |
110 | void FitAndFillSDDz(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track); | |
89b48e9e | 111 | void FitAndFillSSD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track); |
112 | void SetPtBinLimits(Int_t nBins, Double_t* xbins){ | |
113 | fNPtBins=nBins; | |
114 | if(nBins>kMaxPtBins) fNPtBins=kMaxPtBins; | |
115 | for(Int_t iBin=0; iBin<=fNPtBins; iBin++) fPtBinLimits[iBin]=xbins[iBin]; | |
116 | } | |
117 | void LoadGeometryFromOCDB(); | |
df69bb07 | 118 | AliTrackPointArray* PrepareTrack(const AliTrackPointArray* inp, const AliESDVertex* vtx=0); |
119 | void PrepareVertexConstraint(const AliESDVertex* vtx, AliTrackPoint &point); | |
6a5f5ccc | 120 | // |
121 | void CreateUserInfo(); | |
89b48e9e | 122 | private: |
123 | AliAnalysisTaskITSAlignQA(const AliAnalysisTaskITSAlignQA &source); | |
124 | AliAnalysisTaskITSAlignQA& operator=(const AliAnalysisTaskITSAlignQA &source); | |
125 | ||
126 | enum {kNSPDmods = 240}; | |
127 | enum {kNSDDmods = 260}; | |
128 | enum {kNSSDmods = 1698}; | |
129 | enum {kMaxPtBins = 12}; | |
df69bb07 | 130 | enum {kVtxSensVID=14371}; // dummy VID for "vertex" point |
89b48e9e | 131 | |
132 | TList* fOutput; //! Histos with residuals | |
133 | TH1F* fHistNEvents; //! histo with N of events | |
134 | TH1F* fHistPtAccept; //! histo of pt distribution of accepted tracks | |
135 | ||
136 | TH2F* fHistSPDResidX[kNSPDmods]; //! histos of SPD residuals along Xloc vs. Pt | |
137 | TH2F* fHistSPDResidZ[kNSPDmods]; //! histos of SPD residuals along Zloc vs. Pt | |
f09774b4 | 138 | TH2F* fHistSDDResidX[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Pt |
139 | TH2F* fHistSDDResidZ[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Pt | |
89b48e9e | 140 | TH2F* fHistSSDResidX[kNSSDmods]; //! histos of SSD residuals along Xloc vs. Pt |
141 | TH2F* fHistSSDResidZ[kNSSDmods]; //! histos of SSD residuals along Zloc vs. Pt | |
142 | ||
143 | TH2F* fHistSDDResidXvsX[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Xloc | |
144 | TH2F* fHistSDDResidXvsZ[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Zloc | |
145 | TH2F* fHistSDDResidZvsX[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Xloc | |
146 | TH2F* fHistSDDResidZvsZ[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Zloc | |
147 | TH2F* fHistSDDdEdxvsDrTime[kNSDDmods]; //! histos of SDD dE/dx vs. drift time | |
148 | TH1F* fHistSDDDrTimeAll[kNSDDmods]; //! histos of SDD drift time (all clusters) | |
149 | TH1F* fHistSDDDrTimeExtra[kNSDDmods]; //! histos of SDD drift time (extra clusters) | |
150 | TH1F* fHistSDDDrTimeAttac[kNSDDmods]; //! histos of SDD drift time (attached clusters) | |
f09774b4 | 151 | // |
152 | // RS | |
153 | TProfile* fHProfSDDResidXvsXD[kNSDDmods][2]; // ! profile histos of SDD residuals along Xloc vs. Drift distance, each side separately | |
154 | TProfile* fHProfSDDDrTimevsXD[kNSDDmods][2]; // ! profile histos of SDD drift time vs. Drift distance, each side separately | |
155 | TProfile* fHProfSDDResidXvsZ[kNSDDmods][2]; // ! profile histos of SDD residuals along Xloc vs. Z (anode), each side separately | |
156 | TProfile* fHProfSDDDrTimevsZ[kNSDDmods][2]; // ! profile histos of SDD drift time vs. Z (anode), each side separately | |
157 | // | |
89b48e9e | 158 | Bool_t fDoSPDResiduals; // Flag to enable histos of SPD residuals |
159 | Bool_t fDoSDDResiduals; // Flag to enable histos of SDD residuals | |
160 | Bool_t fDoSSDResiduals; // Flag to enable histos of SSD residuals | |
161 | Bool_t fDoSDDdEdxCalib; // Flag to enable histos for SDD dE/dx calibration | |
826883ac | 162 | Bool_t fDoSDDVDriftCalib; // Flag to enable histos for SDD VDrift calibration |
163 | Bool_t fDoSDDDriftTime; // Flag to enable histos for SDD Drift times | |
6a5f5ccc | 164 | Bool_t fDoFillTPTree; // Flag to enable tree with trackpoints |
89b48e9e | 165 | Bool_t fUseITSsaTracks; // Flag for using standalone ITS tracks |
9ea163ca | 166 | Bool_t fLoadGeometry; // Flag to control the loading of geometry from OCDB |
df69bb07 | 167 | Bool_t fUseVertex; // Use the vertex as an extra point |
168 | Bool_t fUseVertexForZOnly; // Use the vertex for SDD Z residuals only | |
6a5f5ccc | 169 | Bool_t fUseTPCMomentum; // for the curv. constraint use TPC momentum rather than global |
df69bb07 | 170 | Int_t fMinVtxContributors; // min N contributors to accept vertex if fUseVertex is on |
5104b23e | 171 | Bool_t fRemovePileupWithSPD; // Use/not use pileup rejection with SPD |
89b48e9e | 172 | Int_t fMinITSpts; // Minimum number of ITS points per track |
173 | Int_t fMinTPCpts; // Minimum number of TPC points per track | |
174 | Float_t fMinPt; // Minimum pt to accept tracks | |
175 | Int_t fNPtBins; // number of pt bins | |
00a2ed4c | 176 | Double_t fMinMult; // min centrality cut |
177 | Double_t fMaxMult; // max centrality cut | |
89b48e9e | 178 | Double_t fPtBinLimits[kMaxPtBins+1]; // limits of Pt bins |
6a5f5ccc | 179 | Double_t fCutDCAXY; // apply rough XY DCA cut in case of vtx constraint, in terms of standard deviations |
180 | Double_t fCutDCAZ; // apply rough Z DCA cut in case of vtx constraint in terms of standard deviations | |
89b48e9e | 181 | AliITSTPArrayFit* fFitter; // Track Point fitter |
6a5f5ccc | 182 | AliITSSumTP* fITSSumTP; // TracPoints summary objects |
89b48e9e | 183 | Int_t fRunNb; // Run number |
184 | TString fOCDBLocation; // OCDB location | |
6a5f5ccc | 185 | ClassDef(AliAnalysisTaskITSAlignQA,6); |
89b48e9e | 186 | }; |
187 | ||
188 | ||
189 | #endif | |
df69bb07 | 190 | |
5104b23e | 191 |