Coverity fix
[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;
f09774b4 18class TProfile;
89b48e9e 19class TTree;
20class TString;
21class AliESDEvent;
22class AliESDfriend;
23class AliITSTPArrayFit;
ee3292b1 24class AliTrackPointArray;
89b48e9e 25
26#include "AliAnalysisTaskSE.h"
27
28class AliAnalysisTaskITSAlignQA : public AliAnalysisTaskSE {
29
30 public:
31
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 }
76
77 void SetOCDBInfo(UInt_t runNb, const char *location) {
78 fRunNb=runNb;
79 fOCDBLocation=location;
80 }
81
82 Bool_t AcceptTrack(AliESDtrack * track);
83
84 void CreateSPDHistos();
85 void CreateSDDHistos();
86 void CreateSSDHistos();
87
88 void FitAndFillSPD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
9ea163ca 89 void FitAndFillSDDrphi(const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
90 void FitAndFillSDDz(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
89b48e9e 91 void FitAndFillSSD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
92 void SetPtBinLimits(Int_t nBins, Double_t* xbins){
93 fNPtBins=nBins;
94 if(nBins>kMaxPtBins) fNPtBins=kMaxPtBins;
95 for(Int_t iBin=0; iBin<=fNPtBins; iBin++) fPtBinLimits[iBin]=xbins[iBin];
96 }
97 void LoadGeometryFromOCDB();
98
99 private:
100 AliAnalysisTaskITSAlignQA(const AliAnalysisTaskITSAlignQA &source);
101 AliAnalysisTaskITSAlignQA& operator=(const AliAnalysisTaskITSAlignQA &source);
102
103 enum {kNSPDmods = 240};
104 enum {kNSDDmods = 260};
105 enum {kNSSDmods = 1698};
106 enum {kMaxPtBins = 12};
107
108 TList* fOutput; //! Histos with residuals
109 TH1F* fHistNEvents; //! histo with N of events
110 TH1F* fHistPtAccept; //! histo of pt distribution of accepted tracks
111
112 TH2F* fHistSPDResidX[kNSPDmods]; //! histos of SPD residuals along Xloc vs. Pt
113 TH2F* fHistSPDResidZ[kNSPDmods]; //! histos of SPD residuals along Zloc vs. Pt
f09774b4 114 TH2F* fHistSDDResidX[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Pt
115 TH2F* fHistSDDResidZ[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Pt
89b48e9e 116 TH2F* fHistSSDResidX[kNSSDmods]; //! histos of SSD residuals along Xloc vs. Pt
117 TH2F* fHistSSDResidZ[kNSSDmods]; //! histos of SSD residuals along Zloc vs. Pt
118
119 TH2F* fHistSDDResidXvsX[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Xloc
120 TH2F* fHistSDDResidXvsZ[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Zloc
121 TH2F* fHistSDDResidZvsX[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Xloc
122 TH2F* fHistSDDResidZvsZ[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Zloc
123 TH2F* fHistSDDdEdxvsDrTime[kNSDDmods]; //! histos of SDD dE/dx vs. drift time
124 TH1F* fHistSDDDrTimeAll[kNSDDmods]; //! histos of SDD drift time (all clusters)
125 TH1F* fHistSDDDrTimeExtra[kNSDDmods]; //! histos of SDD drift time (extra clusters)
126 TH1F* fHistSDDDrTimeAttac[kNSDDmods]; //! histos of SDD drift time (attached clusters)
f09774b4 127 //
128 // RS
129 TProfile* fHProfSDDResidXvsXD[kNSDDmods][2]; // ! profile histos of SDD residuals along Xloc vs. Drift distance, each side separately
130 TProfile* fHProfSDDDrTimevsXD[kNSDDmods][2]; // ! profile histos of SDD drift time vs. Drift distance, each side separately
131 TProfile* fHProfSDDResidXvsZ[kNSDDmods][2]; // ! profile histos of SDD residuals along Xloc vs. Z (anode), each side separately
132 TProfile* fHProfSDDDrTimevsZ[kNSDDmods][2]; // ! profile histos of SDD drift time vs. Z (anode), each side separately
133 //
89b48e9e 134 Bool_t fDoSPDResiduals; // Flag to enable histos of SPD residuals
135 Bool_t fDoSDDResiduals; // Flag to enable histos of SDD residuals
136 Bool_t fDoSSDResiduals; // Flag to enable histos of SSD residuals
137 Bool_t fDoSDDdEdxCalib; // Flag to enable histos for SDD dE/dx calibration
138 Bool_t fUseITSsaTracks; // Flag for using standalone ITS tracks
9ea163ca 139 Bool_t fLoadGeometry; // Flag to control the loading of geometry from OCDB
89b48e9e 140 Int_t fMinITSpts; // Minimum number of ITS points per track
141 Int_t fMinTPCpts; // Minimum number of TPC points per track
142 Float_t fMinPt; // Minimum pt to accept tracks
143 Int_t fNPtBins; // number of pt bins
144 Double_t fPtBinLimits[kMaxPtBins+1]; // limits of Pt bins
145
146 AliITSTPArrayFit* fFitter; // Track Point fitter
147 Int_t fRunNb; // Run number
148 TString fOCDBLocation; // OCDB location
149
f09774b4 150 ClassDef(AliAnalysisTaskITSAlignQA,3);
89b48e9e 151};
152
153
154#endif