]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/global/AliAnalysisTaskVertexESD.h
Possibility to select the trigger type (Davide)
[u/mrichter/AliRoot.git] / PWG1 / global / AliAnalysisTaskVertexESD.h
1 #ifndef AliAnalysisTaskVertexESD_cxx
2 #define AliAnalysisTaskVertexESD_cxx
3
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
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:
12 // - SPD tracklets
13 // - ITS+TPC tracks
14 // - TPC-only tracks
15 //
16 // Author: A.Dainese, andrea.dainese@pd.infn.it
17 //*************************************************************************
18
19 class TNtuple;
20 class TH1F;
21 class TH2F;
22 class AliESDEvent;
23 class AliESDVertex;
24 class AliVEvent;
25
26 #include "AliAnalysisTaskSE.h"
27
28 class AliAnalysisTaskVertexESD : public AliAnalysisTaskSE 
29 {
30  public:
31
32   AliAnalysisTaskVertexESD(const char *name = "AliAnalysisTaskVertexESD");
33   virtual ~AliAnalysisTaskVertexESD(); 
34   
35   virtual void   UserCreateOutputObjects();
36   virtual void   UserExec(Option_t *option);
37   virtual void   Terminate(Option_t *);
38   void           SetCheckEventType(Bool_t check=kTRUE) {fCheckEventType=check;}
39   Bool_t         GetReadMC() const { return fReadMC; }
40   void           SetReadMC(Bool_t flag=kTRUE) { fReadMC=flag; if(flag) fCheckEventType=kFALSE;}
41   void           SetRerecoVertexTPC(Bool_t flag=kTRUE) { fRecoVtxTPC=flag; }
42   void           SetRerecoVertexITSTPC(Bool_t flag=kTRUE) { fRecoVtxITSTPC=flag; }
43   void           SetRerecoVertexITSTPCHalfEvent(Bool_t flag=kTRUE) { fRecoVtxITSTPCHalfEvent=flag; }
44   void           SetOnlyITSTPCTracks() {fOnlyITSTPCTracks=kTRUE;}
45   void           SetOnlyITSSATracks() {fOnlyITSSATracks=kTRUE;}
46   void           SetFillNtuple(Bool_t fill=kTRUE) {fFillNtuple=fill;}  
47   void           SetFillNtupleBeamSpot(Bool_t fillBeamSpot=kFALSE){fFillTreeBeamSpot = fillBeamSpot;}
48   void           SetTriggerType(AliVEvent::EOfflineTriggerTypes triggerType) {fTriggerType = triggerType;}
49
50  protected:
51   Bool_t       fCheckEventType; // read only events of type 7
52   Bool_t       fReadMC;         // read Monte Carlo
53   Bool_t       fRecoVtxTPC;     // reco TPC vertex on the flight
54   Bool_t       fRecoVtxITSTPC;  // reco ITS+TPC vertex on the flight
55   Bool_t       fRecoVtxITSTPCHalfEvent;  // reco ITS+TPC vertex with even and odd tracks
56   Bool_t       fOnlyITSTPCTracks; // only ITS-TPC tracks to redo ITSTPC vertex
57   Bool_t       fOnlyITSSATracks;  // only ITS-SA tracks to redo ITSTPC vertex
58   Bool_t       fFillNtuple;      // fill ntuple  
59   Bool_t       fFillTreeBeamSpot; //beam spot info in a tree
60   AliESDEvent *fESD;            // ESD object
61   TList       *fOutput;         //! list send on output slot 0
62   TNtuple     *fNtupleVertexESD;//! output ntuple
63   TH1F        *fhSPDVertexX; //! output histo
64   TH1F        *fhSPDVertexY; //! output histo
65   TH1F        *fhSPDVertexZ; //! output histo
66   TH1F        *fhTRKVertexX; //! output histo
67   TH1F        *fhTRKVertexY; //! output histo
68   TH1F        *fhTRKVertexZ; //! output histo
69   TH1F        *fhTPCVertexX; //! output histo
70   TH1F        *fhTPCVertexY; //! output histo
71   TH1F        *fhTPCVertexZ; //! output histo
72   TH2F        *fhTrackRefs;     //! output histo
73   TTree       *fTreeBeamSpot;  //! output tree beam spot
74
75   TH1F        *fhTriggeredTrklets; //! output histo
76   TH1F        *fhSPD3DTrklets; //! output histo
77   TH1F        *fhSPDZTrklets; //! output histo
78   TH1F        *fhTRKTrklets; //! output histo
79   TH1F        *fhTRKcTrklets; //! output histo
80   TH1F        *fhTRKncTrklets; //! output histo
81   TH1F        *fhTPCTrklets; //! output histo
82   TH1F        *fhTPCcTrklets; //! output histo
83   TH1F        *fhTPCncTrklets; //! output histo
84   TH1F        *fhSPD3DZreco; //! output histo
85   TH1F        *fhSPDZZreco; //! output histo
86
87
88   TH1F        *fhSPDVertexXPile; //! output histo
89   TH1F        *fhSPDVertexYPile; //! output histo
90   TH1F        *fhSPDVertexZPile; //! output histo
91   TH1F        *fhSPDVertexDiffZPileContr2; //! output histo
92   TH1F        *fhSPDVertexDiffZPileContr3; //! output histo
93   TH1F        *fhSPDVertexDiffZPileContr4; //! output histo
94   TH1F        *fhSPDVertexDiffZPileContr5; //! output histo
95   TH1F        *fhSPDContributorsPile; //! output histo
96   TH2F        *fhSPDDispContributors; //! output histo
97   AliVEvent::EOfflineTriggerTypes    fTriggerType; //flag to set trigger type
98
99  private:    
100
101   AliAnalysisTaskVertexESD(const AliAnalysisTaskVertexESD&); // not implemented
102   AliAnalysisTaskVertexESD& operator=(const AliAnalysisTaskVertexESD&); // not implemented
103   AliESDVertex* ReconstructPrimaryVertexTPC(Bool_t constr=kFALSE) const;
104   AliESDVertex* ReconstructPrimaryVertexITSTPC(Bool_t constr=kFALSE,Int_t mode=0) const;
105   
106   ClassDef(AliAnalysisTaskVertexESD,10); // primary vertex analysis
107 };
108
109 #endif