1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //-----------------------------------------------------------------------
17 // This class compares the global reconstruction with the MC information
18 // Author : Marta Verweij - UU
19 //-----------------------------------------------------------------------
21 #ifndef ALIPWG4HIGHPTTRACKQA_H
22 #define ALIPWG4HIGHPTTRACKQA_H
24 #include "AliAnalysisTaskSE.h"
35 class AliESDtrackCuts;
39 class AliGenPythiaEventHeader;
41 //class AliAnalysisHelperJetTasks;
43 class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
46 AliPWG4HighPtTrackQA();
47 AliPWG4HighPtTrackQA(const char *name);
48 virtual ~AliPWG4HighPtTrackQA() {;}
50 // virtual void ConnectInputData(Option_t *);
51 virtual void UserCreateOutputObjects();
52 virtual void UserExec(Option_t *option);
53 virtual void Terminate(Option_t *);
54 virtual Bool_t Notify(); //Copied from AliAnalysisTaskJetSpectrum2
56 enum DataType {kESD,kAOD};
58 Bool_t IsPbPb() {return fIsPbPb;} //is PbPb data?
59 Bool_t SelectEvent(); //decides if event is used for analysis
60 Int_t CalculateCentrality(AliVEvent *ev);
61 Int_t CalculateCentrality(AliESDEvent *esd);
62 Int_t CalculateCentrality(AliAODEvent *aod);
65 void FillHistograms();
69 void SetDataType(DataType d) {fDataType = d;}
70 void SetIsPbPb(Bool_t cs) {fIsPbPb = cs;}
71 void SetCentralityClass(int cent) {fCentClass=cent;}
72 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
73 void SetTrackType(Int_t trackType) {fTrackType = trackType;}
74 void SetFilterMask(UInt_t filterMask) {fFilterMask = filterMask;}
76 void SetPtMax(Float_t ptmax) {fPtMax = ptmax;}
77 void SetNVariables(Int_t nv) {fNVariables = nv;}
79 Float_t GetPtMax() {return fPtMax;}
80 Float_t GetTPCClusterInfo(AliAODTrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159) const;
82 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
83 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
88 AliPWG4HighPtTrackQA(const AliPWG4HighPtTrackQA&);
89 AliPWG4HighPtTrackQA& operator=(const AliPWG4HighPtTrackQA&);
91 DataType fDataType; //! kESD or kAOD
94 AliESDEvent *fESD; //! ESD object
95 const AliESDVertex *fVtx; //! vertex object
97 AliESDtrackCuts *fTrackCuts; // TrackCuts
98 Int_t fTrackType; // 0: global track; 1:TPConly track 2: TPConly constrained track 3: global ITSrefit
99 UInt_t fFilterMask; //! Select tracks from specific track cuts belonging to certain filter mask for AOD analysis
101 Float_t fPtMax; // Maximum pT for histograms
103 Bool_t fIsPbPb; // kTRUE if PbPb
104 Int_t fCentClass; // Select only events from predefined centrality class
117 10: chi2PerClusterTPC
119 12: (#crossed rows)/(#findable clusters)
121 Int_t fNVariables; // Number of variables
122 TArrayF *fVariables; // QA variables
124 Float_t fAvgTrials; // Average number of trials
126 TH1F *fNEventAll; //! Event counter
127 TH1F *fNEventSel; //! Event counter
128 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
130 TH1F *fh1Centrality; //! Centrality
132 TProfile* fh1Xsec; //! pythia cross section and trials
133 TH1F* fh1Trials; //! trials which are added
134 TH1F* fh1PtHard; //! pt hard of the event
135 TH1F* fh1PtHardTrials; //! pt hard of the event
137 TH1F *fh1NTracksAll; //! All tracks
138 TH1F *fh1NTracksReject; //! Reason why track was rejected
139 TH1F *fh1NTracksSel; //! Number of accepted tracks
141 TH1F *fPtAll; //! Pt spectrum all charged particles
142 TH1F *fPtSel; //! Pt spectrum all selected charged particles by fTrackCuts
143 TH2F *fPtPhi; //! Pt vs Phi
144 TH2F *fPtEta; //! Pt vs Eta
145 TH2F *fPtDCA2D; //! Pt vs DCA2D
146 TH2F *fPtDCAZ; //! Pt vs DCAZ
147 TH2F *fPtNClustersTPC; //! Pt vs nClustersTPC
148 TH2F *fPtNPointITS; //! Pt vs nPointITS
149 TH2F *fPtChi2C; //! Pt vs Chi2C
150 TH2F *fPtNSigmaToVertex; //! Pt vs nSigmaToVertex
151 TH2F *fPtRelUncertainty1Pt; //! Pt vs relUncertainty1Pt
152 TH2F *fPtChi2PerClusterTPC; //! Pt vs Chi2PerClusterTPC
153 TH2F *fPtNCrossedRows; //! Pt vs NCrossedRows
154 TH2F *fPtNCrossedRowsNClusF; //! Pt vs NCrossedRows/NClusF
155 TH3F *fPtNCrRNCrRNClusF; //! Pt vs NCrossedRows vs NCrossedRows/NClusF
158 TList *fHistList; //! List of Histograms
161 ClassDef(AliPWG4HighPtTrackQA,1)