Updates.
[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 }
89b48e9e 59 void SetUseITSstandaloneTracks(Bool_t use){
60 fUseITSsaTracks=use;
61 }
9ea163ca 62 void SetLoadGeometryFromOCDB(Bool_t opt){
63 fLoadGeometry=opt;
64 }
65
89b48e9e 66 void SetMinITSPoints(Int_t minp=3){
67 fMinITSpts=minp;
68 }
69 void SetMinTPCPoints(Int_t minp=70){
70 fMinTPCpts=minp;
71 }
72 void SetMinPt(Float_t minpt=1.0){
73 fMinPt=minpt;
74 }
75
76 void SetOCDBInfo(UInt_t runNb, const char *location) {
77 fRunNb=runNb;
78 fOCDBLocation=location;
79 }
80
81 Bool_t AcceptTrack(AliESDtrack * track);
82
83 void CreateSPDHistos();
84 void CreateSDDHistos();
85 void CreateSSDHistos();
86
87 void FitAndFillSPD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
9ea163ca 88 void FitAndFillSDDrphi(const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
89 void FitAndFillSDDz(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
89b48e9e 90 void FitAndFillSSD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
91 void SetPtBinLimits(Int_t nBins, Double_t* xbins){
92 fNPtBins=nBins;
93 if(nBins>kMaxPtBins) fNPtBins=kMaxPtBins;
94 for(Int_t iBin=0; iBin<=fNPtBins; iBin++) fPtBinLimits[iBin]=xbins[iBin];
95 }
96 void LoadGeometryFromOCDB();
97
98 private:
99 AliAnalysisTaskITSAlignQA(const AliAnalysisTaskITSAlignQA &source);
100 AliAnalysisTaskITSAlignQA& operator=(const AliAnalysisTaskITSAlignQA &source);
101
102 enum {kNSPDmods = 240};
103 enum {kNSDDmods = 260};
104 enum {kNSSDmods = 1698};
105 enum {kMaxPtBins = 12};
106
107 TList* fOutput; //! Histos with residuals
108 TH1F* fHistNEvents; //! histo with N of events
109 TH1F* fHistPtAccept; //! histo of pt distribution of accepted tracks
110
111 TH2F* fHistSPDResidX[kNSPDmods]; //! histos of SPD residuals along Xloc vs. Pt
112 TH2F* fHistSPDResidZ[kNSPDmods]; //! histos of SPD residuals along Zloc vs. Pt
113 TH2F* fHistSDDResidX[kNSSDmods]; //! histos of SDD residuals along Xloc vs. Pt
114 TH2F* fHistSDDResidZ[kNSSDmods]; //! histos of SDD residuals along Zloc vs. Pt
115 TH2F* fHistSSDResidX[kNSSDmods]; //! histos of SSD residuals along Xloc vs. Pt
116 TH2F* fHistSSDResidZ[kNSSDmods]; //! histos of SSD residuals along Zloc vs. Pt
117
118 TH2F* fHistSDDResidXvsX[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Xloc
119 TH2F* fHistSDDResidXvsZ[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Zloc
120 TH2F* fHistSDDResidZvsX[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Xloc
121 TH2F* fHistSDDResidZvsZ[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Zloc
122 TH2F* fHistSDDdEdxvsDrTime[kNSDDmods]; //! histos of SDD dE/dx vs. drift time
123 TH1F* fHistSDDDrTimeAll[kNSDDmods]; //! histos of SDD drift time (all clusters)
124 TH1F* fHistSDDDrTimeExtra[kNSDDmods]; //! histos of SDD drift time (extra clusters)
125 TH1F* fHistSDDDrTimeAttac[kNSDDmods]; //! histos of SDD drift time (attached clusters)
126
127
128 Bool_t fDoSPDResiduals; // Flag to enable histos of SPD residuals
129 Bool_t fDoSDDResiduals; // Flag to enable histos of SDD residuals
130 Bool_t fDoSSDResiduals; // Flag to enable histos of SSD residuals
131 Bool_t fDoSDDdEdxCalib; // Flag to enable histos for SDD dE/dx calibration
132 Bool_t fUseITSsaTracks; // Flag for using standalone ITS tracks
9ea163ca 133 Bool_t fLoadGeometry; // Flag to control the loading of geometry from OCDB
89b48e9e 134 Int_t fMinITSpts; // Minimum number of ITS points per track
135 Int_t fMinTPCpts; // Minimum number of TPC points per track
136 Float_t fMinPt; // Minimum pt to accept tracks
137 Int_t fNPtBins; // number of pt bins
138 Double_t fPtBinLimits[kMaxPtBins+1]; // limits of Pt bins
139
140 AliITSTPArrayFit* fFitter; // Track Point fitter
141 Int_t fRunNb; // Run number
142 TString fOCDBLocation; // OCDB location
143
9ea163ca 144 ClassDef(AliAnalysisTaskITSAlignQA,2);
89b48e9e 145};
146
147
148#endif