]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/global/AliAnalysisTaskVertexESD.h
Updates in D+ histos and ntuples (Renu, Francesco, Elena)
[u/mrichter/AliRoot.git] / PWGPP / 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        *fhSPDVertexZonly; //! output histo
67   TH1F        *fhTRKVertexX; //! output histo
68   TH1F        *fhTRKVertexY; //! output histo
69   TH1F        *fhTRKVertexZ; //! output histo
70   TH1F        *fhTPCVertexX; //! output histo
71   TH1F        *fhTPCVertexY; //! output histo
72   TH1F        *fhTPCVertexZ; //! output histo
73   TH2F        *fhTrackRefs;     //! output histo
74   TTree       *fTreeBeamSpot;  //! output tree beam spot
75
76   TH1F        *fhTriggeredTrklets; //! output histo
77   TH1F        *fhSPD3DTrklets; //! output histo
78   TH1F        *fhSPDZTrklets; //! output histo
79   TH1F        *fhTRKTrklets; //! output histo
80   TH1F        *fhTRKcTrklets; //! output histo
81   TH1F        *fhTRKncTrklets; //! output histo
82   TH1F        *fhTPCTrklets; //! output histo
83   TH1F        *fhTPCcTrklets; //! output histo
84   TH1F        *fhTPCncTrklets; //! output histo
85   TH1F        *fhSPD3DZreco; //! output histo
86   TH1F        *fhSPDZZreco; //! output histo
87
88
89   TH1F        *fhSPDVertexXPile; //! output histo
90   TH1F        *fhSPDVertexYPile; //! output histo
91   TH1F        *fhSPDVertexZPile; //! output histo
92   TH1F        *fhSPDVertexDiffZPileContr2; //! output histo
93   TH1F        *fhSPDVertexDiffZPileContr3; //! output histo
94   TH1F        *fhSPDVertexDiffZPileContr4; //! output histo
95   TH1F        *fhSPDVertexDiffZPileContr5; //! output histo
96   TH1F        *fhSPDVertexDiffZPileDefault; //! output histo
97   TH1F        *fhSPDContributorsPile; //! output histo
98   TH2F        *fhSPDDispContributors; //! output histo
99   AliVEvent::EOfflineTriggerTypes    fTriggerType; //flag to set trigger type
100         
101   TH2F        *fhntrksSPDvsSPDcls;//!  output histo correlation contributors vs number of clustrers spd 
102   TH2F        *fhntrksZvsSPDcls; //! output histo correlation contributors vs number of clustrers spd
103
104  private:    
105
106   AliAnalysisTaskVertexESD(const AliAnalysisTaskVertexESD&); // not implemented
107   AliAnalysisTaskVertexESD& operator=(const AliAnalysisTaskVertexESD&); // not implemented
108   AliESDVertex* ReconstructPrimaryVertexTPC(Bool_t constr=kFALSE) const;
109   AliESDVertex* ReconstructPrimaryVertexITSTPC(Bool_t constr=kFALSE,Int_t mode=0) const;
110   
111   ClassDef(AliAnalysisTaskVertexESD,11); // primary vertex analysis
112 };
113
114 #endif