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