New task for ITS alignment monitoring (Francesco, Gian Michele)
[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;
23
24#include "AliAnalysisTaskSE.h"
25
26class AliAnalysisTaskITSAlignQA : public AliAnalysisTaskSE {
27
28 public:
29
30 AliAnalysisTaskITSAlignQA();
31 virtual ~AliAnalysisTaskITSAlignQA();
32
33 virtual void UserExec(Option_t *option);
34 virtual void UserCreateOutputObjects();
35 virtual void Terminate(Option_t *option);
36
37 void SetDoSPDResiduals(Bool_t opt){
38 fDoSPDResiduals=opt;
39 }
40 void SetDoSDDResiduals(Bool_t opt){
41 fDoSDDResiduals=opt;
42 }
43 void SetDoSSDResiduals(Bool_t opt){
44 fDoSSDResiduals=opt;
45 }
46 void SetDoSDDdEdxCalib(Bool_t opt){
47 fDoSDDdEdxCalib=opt;
48 }
49 void SetDoAllResiduals(){
50 fDoSPDResiduals=kTRUE;
51 fDoSDDResiduals=kTRUE;
52 fDoSSDResiduals=kTRUE;
53 }
54 void SetDoAll(){
55 SetDoAllResiduals();
56 fDoSDDdEdxCalib=kTRUE;
57 }
58
59 void SetUseITSstandaloneTracks(Bool_t use){
60 fUseITSsaTracks=use;
61 }
62 void SetMinITSPoints(Int_t minp=3){
63 fMinITSpts=minp;
64 }
65 void SetMinTPCPoints(Int_t minp=70){
66 fMinTPCpts=minp;
67 }
68 void SetMinPt(Float_t minpt=1.0){
69 fMinPt=minpt;
70 }
71
72 void SetOCDBInfo(UInt_t runNb, const char *location) {
73 fRunNb=runNb;
74 fOCDBLocation=location;
75 }
76
77 Bool_t AcceptTrack(AliESDtrack * track);
78
79 void CreateSPDHistos();
80 void CreateSDDHistos();
81 void CreateSSDHistos();
82
83 void FitAndFillSPD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
84 void FitAndFillSDD(const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
85 void FitAndFillSSD(Int_t iLayer, const AliTrackPointArray *array, Int_t npts, AliESDtrack * track);
86 void SetPtBinLimits(Int_t nBins, Double_t* xbins){
87 fNPtBins=nBins;
88 if(nBins>kMaxPtBins) fNPtBins=kMaxPtBins;
89 for(Int_t iBin=0; iBin<=fNPtBins; iBin++) fPtBinLimits[iBin]=xbins[iBin];
90 }
91 void LoadGeometryFromOCDB();
92
93 private:
94 AliAnalysisTaskITSAlignQA(const AliAnalysisTaskITSAlignQA &source);
95 AliAnalysisTaskITSAlignQA& operator=(const AliAnalysisTaskITSAlignQA &source);
96
97 enum {kNSPDmods = 240};
98 enum {kNSDDmods = 260};
99 enum {kNSSDmods = 1698};
100 enum {kMaxPtBins = 12};
101
102 TList* fOutput; //! Histos with residuals
103 TH1F* fHistNEvents; //! histo with N of events
104 TH1F* fHistPtAccept; //! histo of pt distribution of accepted tracks
105
106 TH2F* fHistSPDResidX[kNSPDmods]; //! histos of SPD residuals along Xloc vs. Pt
107 TH2F* fHistSPDResidZ[kNSPDmods]; //! histos of SPD residuals along Zloc vs. Pt
108 TH2F* fHistSDDResidX[kNSSDmods]; //! histos of SDD residuals along Xloc vs. Pt
109 TH2F* fHistSDDResidZ[kNSSDmods]; //! histos of SDD residuals along Zloc vs. Pt
110 TH2F* fHistSSDResidX[kNSSDmods]; //! histos of SSD residuals along Xloc vs. Pt
111 TH2F* fHistSSDResidZ[kNSSDmods]; //! histos of SSD residuals along Zloc vs. Pt
112
113 TH2F* fHistSDDResidXvsX[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Xloc
114 TH2F* fHistSDDResidXvsZ[kNSDDmods]; //! histos of SDD residuals along Xloc vs. Zloc
115 TH2F* fHistSDDResidZvsX[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Xloc
116 TH2F* fHistSDDResidZvsZ[kNSDDmods]; //! histos of SDD residuals along Zloc vs. Zloc
117 TH2F* fHistSDDdEdxvsDrTime[kNSDDmods]; //! histos of SDD dE/dx vs. drift time
118 TH1F* fHistSDDDrTimeAll[kNSDDmods]; //! histos of SDD drift time (all clusters)
119 TH1F* fHistSDDDrTimeExtra[kNSDDmods]; //! histos of SDD drift time (extra clusters)
120 TH1F* fHistSDDDrTimeAttac[kNSDDmods]; //! histos of SDD drift time (attached clusters)
121
122
123 Bool_t fDoSPDResiduals; // Flag to enable histos of SPD residuals
124 Bool_t fDoSDDResiduals; // Flag to enable histos of SDD residuals
125 Bool_t fDoSSDResiduals; // Flag to enable histos of SSD residuals
126 Bool_t fDoSDDdEdxCalib; // Flag to enable histos for SDD dE/dx calibration
127 Bool_t fUseITSsaTracks; // Flag for using standalone ITS tracks
128 Int_t fMinITSpts; // Minimum number of ITS points per track
129 Int_t fMinTPCpts; // Minimum number of TPC points per track
130 Float_t fMinPt; // Minimum pt to accept tracks
131 Int_t fNPtBins; // number of pt bins
132 Double_t fPtBinLimits[kMaxPtBins+1]; // limits of Pt bins
133
134 AliITSTPArrayFit* fFitter; // Track Point fitter
135 Int_t fRunNb; // Run number
136 TString fOCDBLocation; // OCDB location
137
138 ClassDef(AliAnalysisTaskITSAlignQA,1);
139};
140
141
142#endif