]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliAnalysisTaskDCA.h
committing on behalf of Silvia... new macros for HFE analysis on the train (Markus
[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
37 class AliVEvent;
38 class AliVertexerTracks;
39 class AliHFEpid;
40 class AliHFEcuts;
41 class AliHFEextraCuts;
42
43 class AliAnalysisTaskDCA : public AliAnalysisTaskSE{
44  public:
45
46   typedef enum{
47     kPostProcess = 0,
48     kImpactPar = 1,
49     kPrimVtx = 2,
50     kCombinedPid = 3,
51     kHFEpid = 4, 
52     kKFdca = 5
53   }Switches_t;
54
55   enum{
56     kHasMCdata = BIT(19),
57     kAODanalysis = BIT(20)
58   };
59   
60   AliAnalysisTaskDCA();
61   AliAnalysisTaskDCA(const char * name);
62   AliAnalysisTaskDCA(const AliAnalysisTaskDCA &ref);
63   AliAnalysisTaskDCA& operator=(const AliAnalysisTaskDCA &ref);
64   virtual ~AliAnalysisTaskDCA();
65   
66   virtual void UserCreateOutputObjects();
67   virtual void UserExec(Option_t *);
68   virtual void Terminate(Option_t *);
69
70
71   void PrintStatus() const;
72   void Load(TString filename = "impactPar.root");
73   void PostProcess();
74   void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
75
76   void SetNclustersITS(Int_t nITSclusters){ fNclustersITS = nITSclusters;};
77   void SetMinPrimVtxContrib( Int_t nPrimVtxContrib){ fMinNprimVtxContrbutor = nPrimVtxContrib; };  
78
79   Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fPlugins, plug); };
80   void SwitchOnPlugin(Int_t plug);
81
82   Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
83   Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
84   Bool_t HasMCData() const { return TestBit(kHasMCdata); }
85   void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); };
86
87   void SetPIDdetectors(Char_t * const detectors){ fPIDdetectors = detectors; }
88   void SetPIDStrategy(UInt_t strategy) { fPIDstrategy = strategy; }
89   void AddPIDdetector(TString detector);
90
91   void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
92   void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
93
94
95  private:
96
97   void MakeParticleContainer();
98   void ProcessDcaAnalysis();
99     
100   UShort_t fPlugins;                   // Enabled Plugins 
101   AliHFEcuts *fCuts;                   // Cut Collection
102
103   AliESDpid *fDefaultPID;               //! Default ESD PID
104   AliHFEpid *fHFEpid;                  //! PID
105   TString fPIDdetectors;               // Detectors for Particle Identification
106   UInt_t fPIDstrategy;                 // PID Strategy
107
108   AliCFManager *fCFM;                  //! Correction Framework Manager
109   AliHFEdca *fDCA;                     // fDCA 
110
111   Int_t fNclustersITS;                 // ITS clusters
112   Int_t fMinNprimVtxContrbutor;        // minimum number of primary contributors
113                                                
114   TH1I *fNEvents;                      //! counter for the number of Events
115   TList *fResidualList;                //! histograms for the residuals 
116   TList *fPullList;                    //! histograms for the pull
117   TList *fDcaList;                     //! histograms for the dca
118   TList *fKfDcaList;                     //! histograms for the kf dca
119   TList *fMcVertexList;                //! histograms for the MC vertex  
120   TList *fDataDcaList;                 //! histograms for the data dca
121   TList *fDataVertexList;              //! histograms for the data vertex
122   TList *fDataPullList;                //! histograms for the data pull
123   TList *fMcPidList;                   //! pid - MC: ESD combined pid
124   TList *fDataPidList;                 //! pid -Data: ESD combined pid
125
126   TList *fHfeDcaList;                  //! hfe pid: mc dca 
127   TList *fHfeDataDcaList;              //! hfe pid: data dca 
128
129   TList *fOutput;                      //! Container for Task Output
130
131   ClassDef(AliAnalysisTaskDCA, 1);     // The DCA Analysis Task
132 };
133 #endif
134