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