1 #ifndef AliAnalysisTaskVertexESD_cxx
2 #define AliAnalysisTaskVertexESD_cxx
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //*************************************************************************
8 // Class AliAnalysisTaskVertexESD
9 // AliAnalysisTask to extract from ESD the information for the analysis
10 // of the primary vertex reconstruction efficiency and resolution
11 // (for MC events) and distributions (for real data). Three vertices:
16 // Author: A.Dainese, andrea.dainese@pd.infn.it
17 //*************************************************************************
25 #include "AliAnalysisTaskSE.h"
27 class AliAnalysisTaskVertexESD : public AliAnalysisTaskSE
31 AliAnalysisTaskVertexESD(const char *name = "AliAnalysisTaskVertexESD");
32 virtual ~AliAnalysisTaskVertexESD();
34 virtual void UserCreateOutputObjects();
35 virtual void UserExec(Option_t *option);
36 virtual void Terminate(Option_t *);
37 void SetCheckEventType(Bool_t check=kTRUE) {fCheckEventType=check;}
38 Bool_t GetReadMC() const { return fReadMC; }
39 void SetReadMC(Bool_t flag=kTRUE) { fReadMC=flag; if(flag) fCheckEventType=kFALSE;}
40 void SetRerecoVertexTPC(Bool_t flag=kTRUE) { fRecoVtxTPC=flag; }
41 void SetRerecoVertexITSTPC(Bool_t flag=kTRUE) { fRecoVtxITSTPC=flag; }
42 void SetOnlyITSTPCTracks() {fOnlyITSTPCTracks=kTRUE;}
43 void SetOnlyITSSATracks() {fOnlyITSSATracks=kTRUE;}
44 void SetFillNtuple(Bool_t fill=kTRUE) {fFillNtuple=fill;}
47 Bool_t fCheckEventType; // read only events of type 7
48 Bool_t fReadMC; // read Monte Carlo
49 Bool_t fRecoVtxTPC; // reco TPC vertex on the flight
50 Bool_t fRecoVtxITSTPC; // reco ITS+TPC vertex on the flight
51 Bool_t fOnlyITSTPCTracks; // only ITS-TPC tracks to redo ITSTPC vertex
52 Bool_t fOnlyITSSATracks; // only ITS-SA tracks to redo ITSTPC vertex
53 Bool_t fFillNtuple; // fill ntuple
54 AliESDEvent *fESD; // ESD object
55 TList *fOutput; //! list send on output slot 0
56 TNtuple *fNtupleVertexESD;//! output ntuple
57 TH1F *fhSPDVertexX; //! output histo
58 TH1F *fhSPDVertexY; //! output histo
59 TH1F *fhSPDVertexZ; //! output histo
60 TH1F *fhTRKVertexX; //! output histo
61 TH1F *fhTRKVertexY; //! output histo
62 TH1F *fhTRKVertexZ; //! output histo
63 TH1F *fhTPCVertexX; //! output histo
64 TH1F *fhTPCVertexY; //! output histo
65 TH1F *fhTPCVertexZ; //! output histo
66 TH2F *fhTrackRefs; //! output histo
70 AliAnalysisTaskVertexESD(const AliAnalysisTaskVertexESD&); // not implemented
71 AliAnalysisTaskVertexESD& operator=(const AliAnalysisTaskVertexESD&); // not implemented
72 AliESDVertex* ReconstructPrimaryVertexTPC(Bool_t constr=kFALSE) const;
73 AliESDVertex* ReconstructPrimaryVertexITSTPC(Bool_t constr=kFALSE) const;
75 ClassDef(AliAnalysisTaskVertexESD,7); // primary vertex analysis