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