Fixes for merging output of D2H QC/SP task (Grazia)
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliAnalysisTaskDStarCorrelations.h
1 #ifndef AliAnalysisTaskDStarCorrelations_H
2 #define AliAnalysisTaskDStarCorrelations_H
3
4 /**************************************************************************
5  * Copyright(c) 1998-2009, 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 //          
23 //
24 //                                                 Author S.Bjelogrlic
25 //                         Utrecht University 
26 //                      sandro.bjelogrlic@cern.ch
27 //
28 //-----------------------------------------------------------------------
29
30 #include <TH2F.h>
31 #include <TH1D.h>
32 #include <TH3D.h>
33 #include "AliAnalysisTaskSE.h"
34 #include "AliAODEvent.h"
35 #include "AliRDHFCutsDStartoKpipi.h"
36 #include "AliEventPoolManager.h"
37 #include "AliAODRecoCascadeHF.h"
38 #include "AliHFAssociatedTrackCuts.h"
39 #include "AliNormalizationCounter.h"
40
41 class TParticle ;
42 class TClonesArray ;
43 class AliAODMCParticle;
44 class AliAODEvent;
45 class AliVParticle;
46 class TObjArray;
47 class AliEventPoolManager;
48 class AliESDEvent;
49
50
51
52 class AliAnalysisTaskDStarCorrelations : public AliAnalysisTaskSE
53 {
54
55         public :
56         AliAnalysisTaskDStarCorrelations();
57         AliAnalysisTaskDStarCorrelations(const Char_t* name,AliRDHFCutsDStartoKpipi* cuts, AliHFAssociatedTrackCuts *AsscCuts);
58         virtual ~AliAnalysisTaskDStarCorrelations();
59         
60         
61         
62         // Implementation of interface methods  
63         virtual void UserCreateOutputObjects();
64         virtual void Init();
65         virtual void LocalInit() {Init();}
66         virtual void UserExec(Option_t *option);
67         virtual void Terminate(Option_t *option);
68         
69         
70         // methods to get the tracks to correlate
71         TObjArray*  AcceptAndReduceTracks(AliAODEvent* inputEvent);
72         TObjArray*  AcceptAndReduceKZero(AliAODEvent* inputEvent, Int_t loopindex, Int_t plotassociation);
73
74         void DefineHistoForAnalysis();
75         
76         // correlators
77         void FillCorrelations(Double_t ptTrig, Double_t phiTrig, Double_t etaTrig, Double_t phiTrack, Double_t etaTrack);
78         void FillSideBandCorrelations(Double_t ptTrig, Double_t phiTrig, Double_t etaTrig, Double_t phiTrack, Double_t etaTrack);
79         void FillMCTagCorrelations(Double_t ptTrig, Double_t phiTrig,  Double_t etaTrig, Double_t ptTrack, Double_t phiTrack, Double_t etaTrack, Int_t mcSource);
80         
81         // setters
82         void SetMonteCarlo(Bool_t k) {fmontecarlo = k;}
83         void SetUseMixing (Bool_t j) {fmixing = j;}
84         void SetCorrelator(Int_t l) {fselect = l;}
85         
86
87
88         private:
89
90         AliAnalysisTaskDStarCorrelations(const AliAnalysisTaskDStarCorrelations &source);
91         AliAnalysisTaskDStarCorrelations& operator=(const AliAnalysisTaskDStarCorrelations& source); 
92
93         TObject* fhandler; //! Analysis Handler
94         AliEventPoolManager*     fPoolMgr;         //! event pool manager
95         TClonesArray* fmcArray; //mcarray
96         AliNormalizationCounter *fCounter; // counter
97         
98         
99         Int_t fselect; // select what to correlate with a D* 1-chargedtracks,2-chargedkaons,3-k0s
100         Bool_t fmontecarlo;//switch for MC
101         Bool_t fmixing;// switch for event mixing
102         Int_t fEvents; //! number of event
103         Int_t fDebug; //! debug level
104         
105         
106         TList *fOutput;                  //! user output data
107         AliRDHFCutsDStartoKpipi *fCuts;  // Cuts D*
108         AliHFAssociatedTrackCuts *fCuts2; // cuts for associated 
109                                           
110         ClassDef(AliAnalysisTaskDStarCorrelations,1); // class for D meson correlations                           
111 };
112
113 #endif