]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/JetTasks/AliPWG4HighPtTrackQA.h
added switch for event slection in cluster task, updated plot notand JetSpectrum...
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliPWG4HighPtTrackQA.h
CommitLineData
d756027f 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16//-----------------------------------------------------------------------
2b553e6f 17// This class stores QA variables as function of pT for different type
18// of tracks and track selection criteria
d756027f 19// Author : Marta Verweij - UU
20//-----------------------------------------------------------------------
21
22#ifndef ALIPWG4HIGHPTTRACKQA_H
23#define ALIPWG4HIGHPTTRACKQA_H
24
25#include "AliAnalysisTaskSE.h"
26
27class TH1F;
28class TH2F;
29class TH3F;
30class TProfile;
31class TList;
32class TArrayF;
33
34class AliVEvent;
35class AliESDEvent;
36class AliESDtrackCuts;
37class AliESDVertex;
38class AliAODTrack;
39
40class AliGenPythiaEventHeader;
41class AliMCEvent;
42//class AliAnalysisHelperJetTasks;
43
44class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
45
46 public:
47 AliPWG4HighPtTrackQA();
48 AliPWG4HighPtTrackQA(const char *name);
49 virtual ~AliPWG4HighPtTrackQA() {;}
50
51 // virtual void ConnectInputData(Option_t *);
52 virtual void UserCreateOutputObjects();
53 virtual void UserExec(Option_t *option);
54 virtual void Terminate(Option_t *);
55 virtual Bool_t Notify(); //Copied from AliAnalysisTaskJetSpectrum2
56
57 enum DataType {kESD,kAOD};
58
59 Bool_t IsPbPb() {return fIsPbPb;} //is PbPb data?
60 Bool_t SelectEvent(); //decides if event is used for analysis
61 Int_t CalculateCentrality(AliVEvent *ev);
62 Int_t CalculateCentrality(AliESDEvent *esd);
63 Int_t CalculateCentrality(AliAODEvent *aod);
64 void DoAnalysisESD();
65 void DoAnalysisAOD();
66 void FillHistograms();
67
68
69 //Setters
70 void SetDataType(DataType d) {fDataType = d;}
71 void SetIsPbPb(Bool_t cs) {fIsPbPb = cs;}
72 void SetCentralityClass(int cent) {fCentClass=cent;}
73 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
74 void SetTrackType(Int_t trackType) {fTrackType = trackType;}
75 void SetFilterMask(UInt_t filterMask) {fFilterMask = filterMask;}
76
2b553e6f 77 void SetSigmaConstrainedMax(Double_t sigma) {fSigmaConstrainedMax=sigma;}
d756027f 78 void SetPtMax(Float_t ptmax) {fPtMax = ptmax;}
79 void SetNVariables(Int_t nv) {fNVariables = nv;}
80
81 Float_t GetPtMax() {return fPtMax;}
82 Float_t GetTPCClusterInfo(AliAODTrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159) const;
83
84 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
85 static Bool_t PythiaInfoFromFile(const char* currFile,Float_t &fXsec,Float_t &fTrials);// get the cross section and the trails either from pyxsec.root or from pysec_hists.root
86
87 protected:
88
89 private:
90 AliPWG4HighPtTrackQA(const AliPWG4HighPtTrackQA&);
91 AliPWG4HighPtTrackQA& operator=(const AliPWG4HighPtTrackQA&);
92
93 DataType fDataType; //! kESD or kAOD
94
95 AliVEvent *fEvent;
96 AliESDEvent *fESD; //! ESD object
97 const AliESDVertex *fVtx; //! vertex object
98
99 AliESDtrackCuts *fTrackCuts; // TrackCuts
100 Int_t fTrackType; // 0: global track; 1:TPConly track 2: TPConly constrained track 3: global ITSrefit
101 UInt_t fFilterMask; //! Select tracks from specific track cuts belonging to certain filter mask for AOD analysis
102
2b553e6f 103 Double_t fSigmaConstrainedMax; // max sigma on constrained fit
d756027f 104 Float_t fPtMax; // Maximum pT for histograms
105
106 Bool_t fIsPbPb; // kTRUE if PbPb
107 Int_t fCentClass; // Select only events from predefined centrality class
108
109 /*
110 0: pt
111 1: phi
112 2: eta
113 3: dca2D
114 4: dcaZ
115 5: nClustersTPC
116 6: nPointITS
117 7: chi2C
118 8: nSigmaToVertex
119 9: relUncertainty1Pt
120 10: chi2PerClusterTPC
121 11: #crossed rows
122 12: (#crossed rows)/(#findable clusters)
123 */
124 Int_t fNVariables; // Number of variables
125 TArrayF *fVariables; // QA variables
126
127 Float_t fAvgTrials; // Average number of trials
128
129 TH1F *fNEventAll; //! Event counter
130 TH1F *fNEventSel; //! Event counter
131 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
132
133 TH1F *fh1Centrality; //! Centrality
134
135 TProfile* fh1Xsec; //! pythia cross section and trials
136 TH1F* fh1Trials; //! trials which are added
137 TH1F* fh1PtHard; //! pt hard of the event
138 TH1F* fh1PtHardTrials; //! pt hard of the event
139
140 TH1F *fh1NTracksAll; //! All tracks
141 TH1F *fh1NTracksReject; //! Reason why track was rejected
142 TH1F *fh1NTracksSel; //! Number of accepted tracks
143
144 TH1F *fPtAll; //! Pt spectrum all charged particles
145 TH1F *fPtSel; //! Pt spectrum all selected charged particles by fTrackCuts
146 TH2F *fPtPhi; //! Pt vs Phi
147 TH2F *fPtEta; //! Pt vs Eta
148 TH2F *fPtDCA2D; //! Pt vs DCA2D
149 TH2F *fPtDCAZ; //! Pt vs DCAZ
150 TH2F *fPtNClustersTPC; //! Pt vs nClustersTPC
151 TH2F *fPtNPointITS; //! Pt vs nPointITS
152 TH2F *fPtChi2C; //! Pt vs Chi2C
153 TH2F *fPtNSigmaToVertex; //! Pt vs nSigmaToVertex
154 TH2F *fPtRelUncertainty1Pt; //! Pt vs relUncertainty1Pt
2b553e6f 155 TH2F *fPtUncertainty1Pt; //! Pt vs Uncertainty1Pt
d756027f 156 TH2F *fPtChi2PerClusterTPC; //! Pt vs Chi2PerClusterTPC
157 TH2F *fPtNCrossedRows; //! Pt vs NCrossedRows
158 TH2F *fPtNCrossedRowsNClusF; //! Pt vs NCrossedRows/NClusF
159 TH3F *fPtNCrRNCrRNClusF; //! Pt vs NCrossedRows vs NCrossedRows/NClusF
160
2b553e6f 161 //histos for covariance matrix elements
162 TH2F *fPtSigmaY2; //! Pt vs sigma(y)^2 extCov[0]
163 TH2F *fPtSigmaZ2; //! Pt vs sigma(z)^2 extCov[2]
164 TH2F *fPtSigmaSnp2; //! Pt vs sigma(Snp)^2 extCov[5]
165 TH2F *fPtSigmaTgl2; //! Pt vs sigma(Tgl)^2 extCov[9]
166 TH2F *fPtSigma1Pt2; //! Pt vs sigma(1/pT)^2 extCov[14]
d756027f 167
168 TList *fHistList; //! List of Histograms
169
170
171 ClassDef(AliPWG4HighPtTrackQA,1)
172
173};
174#endif