]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliAnalysisTaskDCA.h
Added pass1 and pass2 directories
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliAnalysisTaskDCA.h
1 #ifndef ALIANALYSISTASKDCA_H
2 #define ALIANALYSISTASKDCA_H
3
4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 *                                                                        *
7 * Author: The ALICE Off-line Project.                                    *
8 * Contributors are mentioned in the code where appropriate.              *
9 *                                                                        *
10 * Permission to use, copy, modify and distribute this software and its   *
11 * documentation strictly for non-commercial purposes is hereby granted   *
12 * without fee, provided that the above copyright notice appears in all   *
13 * copies and that both the copyright notice and this permission notice   *
14 * appear in the supporting documentation. The authors make no claims     *
15 * about the suitability of this software for any purpose. It is          *
16 * provided "as is" without express or implied warranty.                  *
17 **************************************************************************/
18
19 /* $Id$ */ 
20
21 //
22 // Task for impact parameter (DCA) analysis
23 // study DCA in rphi (xy) and z: resolution and pull 
24 // For further information see implementation file
25
26
27 #ifndef ALIANALYSISTASKSE_H
28 #include "AliAnalysisTaskSE.h"
29 #endif
30
31 class TH1I; 
32 class TH1F; 
33 class TList;
34 class AliLog;
35 class AliCFManager;
36 class AliESDEvent;
37 class AliESDtrackCuts;
38 class AliMCEvent;
39 class AliVParticle;
40
41 class AliVEvent;
42 class AliVertexerTracks;
43 class AliHFEpid;
44 class AliHFEcuts;
45 class AliHFEextraCuts;
46
47 class AliAnalysisTaskDCA : public AliAnalysisTaskSE{
48  public:
49
50   typedef enum{
51     kPostProcess = 0,
52     kImpactPar = 1,
53     kPrimVtx = 2,
54     kCombinedPid = 3,
55     kHFEpid = 4, 
56     kKFdca = 5
57   }Switches_t;
58
59   enum{
60     kHasMCdata = BIT(19),
61     kAODanalysis = BIT(20)
62   };
63   
64   AliAnalysisTaskDCA();
65   AliAnalysisTaskDCA(const char * name);
66   AliAnalysisTaskDCA(const AliAnalysisTaskDCA &ref);
67   AliAnalysisTaskDCA& operator=(const AliAnalysisTaskDCA &ref);
68   virtual ~AliAnalysisTaskDCA();
69   
70   virtual void UserCreateOutputObjects();
71   virtual void UserExec(Option_t *);
72   virtual void Terminate(Option_t *);
73
74
75   void PrintStatus() const;
76   void Load(TString filename = "impactPar.root");
77   void PostProcess();
78   void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
79
80   void SetNclustersITS(Int_t nITSclusters){ fNclustersITS = nITSclusters;};
81   void SetMinPrimVtxContrib( Int_t nPrimVtxContrib){ fMinNprimVtxContrbutor = nPrimVtxContrib; };  
82
83   Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fPlugins, plug); };
84   void SwitchOnPlugin(Int_t plug);
85
86   Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
87   Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
88   Bool_t HasMCData() const { return TestBit(kHasMCdata); }
89   void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); };
90
91   void SetPIDdetectors(Char_t * const detectors){ fPIDdetectors = detectors; }
92   void SetPIDStrategy(UInt_t strategy) { fPIDstrategy = strategy; }
93   void AddPIDdetector(TString detector);
94
95   void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
96   void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
97
98
99  private:
100
101   void MakeParticleContainer();
102   void ProcessDcaAnalysis();
103     
104   UShort_t fPlugins;                   // Enabled Plugins 
105   AliHFEcuts *fCuts;                   // Cut Collection
106
107   AliESDpid *fDefaultPID;               //! Default ESD PID
108   AliHFEpid *fHFEpid;                  //! PID
109   TString fPIDdetectors;               // Detectors for Particle Identification
110   UInt_t fPIDstrategy;                 // PID Strategy
111
112   AliCFManager *fCFM;                  //! Correction Framework Manager
113   AliHFEdca *fDCA;                     // fDCA 
114
115   Int_t fNclustersITS;                 // ITS clusters
116   Int_t fMinNprimVtxContrbutor;        // minimum number of primary contributors
117                                                
118   TH1I *fNEvents;                      //! counter for the number of Events
119   TList *fResidualList;                //! histograms for the residuals 
120   TList *fPullList;                    //! histograms for the pull
121   TList *fDcaList;                     //! histograms for the dca
122   TList *fKfDcaList;                     //! histograms for the kf dca
123   TList *fMcVertexList;                //! histograms for the MC vertex  
124   TList *fDataDcaList;                 //! histograms for the data dca
125   TList *fDataVertexList;              //! histograms for the data vertex
126   TList *fDataPullList;                //! histograms for the data pull
127   TList *fMcPidList;                   //! pid - MC: ESD combined pid
128   TList *fDataPidList;                 //! pid -Data: ESD combined pid
129
130   TList *fHfeDcaList;                  //! hfe pid: mc dca 
131   TList *fHfeDataDcaList;              //! hfe pid: data dca 
132
133   TList *fOutput;                      //! Container for Task Output
134
135   ClassDef(AliAnalysisTaskDCA, 1);     // The DCA Analysis Task
136 };
137 #endif
138