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