]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/STRANGENESS/Correlations/AliAnalysisTaskV0ChCorrelations.h
Added histograms for the Analysis Note update
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / Correlations / AliAnalysisTaskV0ChCorrelations.h
1 /* Copyright(c) 1998-2013, ALICE Experiment at CERN, All rights reserved.  
2  * See cxx source for full Copyright notice  
3  *
4  * AliAnalysisTaskV0ChCorrelations class
5  *
6  * The task selects candidates for K0s, Lambdas and AntiLambdas (trigger particles)
7  * and calculates correlations with charged unidentified particles (associated particles) in phi and eta. 
8  * The task works with AOD events only and containes also mixing for acceptance corrections.
9  * Edited by Marek Bombara, last update January 2013, Marek.Bombara@cern.ch
10  */
11
12 #ifndef ALIANALYSISTASKV0CHCORRELATIONS_H
13 #define ALIANALYSISTASKV0CHCORRELATIONS_H
14
15 class TH1F;
16 class TH1D;
17 class TH2F;
18 class THnSparse;
19 class TList;
20 class AliPIDResponse;
21 class AliEventPoolManager;
22
23 #ifndef ALIANALYSISTASKSE_H
24 #include "AliAnalysisTaskSE.h"
25 #endif
26
27 class AliAnalysisTaskV0ChCorrelations : public AliAnalysisTaskSE {
28 public:
29    AliAnalysisTaskV0ChCorrelations(const char *name = "AliAnalysisTaskV0ChCorrelations");
30    //AliAnalysisTaskV0ChCorrelations(const AliAnalysisTaskV0ChCorrelations&);            //not implemented
31    //AliAnalysisTaskV0ChCorrelations& operator=(const AliAnalysisTaskV0ChCorrelations&); //not implemented 
32    virtual ~AliAnalysisTaskV0ChCorrelations();
33
34    // Setting the global variables
35    void SetDcaDToPV(Float_t DcaDToPV = 0.1) {fDcaDToPV = DcaDToPV;}
36    void SetDcaV0D(Float_t DcaV0D = 1.0) {fDcaV0D = DcaV0D;}
37    void SetWithChCh(Bool_t WithChCh = kFALSE) {fWithChCh = WithChCh;}
38
39    // Getting the global variables
40    Float_t GetDcaDToPV() { return fDcaDToPV; }
41    Float_t GetDcaV0D() { return fDcaV0D; }
42    Bool_t GetWithChCh() { return fWithChCh; }
43
44    virtual void     UserCreateOutputObjects();
45    virtual void     UserExec(Option_t *option);
46    virtual void     Terminate(Option_t *);
47
48    Bool_t IsMyGoodPrimaryTrack(const AliAODTrack* aodtrack);
49    Bool_t IsMyGoodDaughterTrack(const AliAODTrack* aodtrack);
50    Bool_t IsMyGoodV0(const AliAODEvent* aod, const AliAODv0* aodv0, const AliAODTrack* tr1, const AliAODTrack* tr2);
51
52 private:
53
54    AliAnalysisTaskV0ChCorrelations(const AliAnalysisTaskV0ChCorrelations&);            //not implemented
55    AliAnalysisTaskV0ChCorrelations& operator=(const AliAnalysisTaskV0ChCorrelations&); //not implemented 
56
57    Bool_t          fFillMixed;  // enable event mixing (default: ON)
58    Int_t           fMixingTracks;      // size of track buffer for event mixing
59    AliEventPoolManager*          fPoolMgr;         //! event pool manager
60
61    Float_t         fDcaDToPV;   // DCA of the daughter to primary vertex
62    Float_t         fDcaV0D;     // DCA between daughters
63    Bool_t                  fWithChCh;   // Also do ChCh correlations - for the cross-check
64
65    TList           *fOutput;        // Output list
66    AliPIDResponse  *fPIDResponse;   // PID response
67
68    TH2F            *fHistCentVtx; // centrality vs. z vertex - to see statistics for mixing
69    TH1F            *fHistMultiMain; // multiplicity of main events
70    
71    THnSparseF      *fHistMassK0;       // K0 mass
72    THnSparseF      *fHistMassLambda;     // Lambda mass
73    THnSparseF      *fHistMassAntiLambda;   // AntiLambda mass
74    
75    THnSparseF      *fHistdPhidEtaSib;   // dPhi vs. dEta, same event
76    THnSparseF      *fHistdPhidEtaMix;   // dPhi vs. dEta, mixed events
77    THnSparseF      *fHistTrigSib;   // pt of trigger particles, same event
78    THnSparseF      *fHistTrigMix;   // pt of trigger particles involved in mixing
79    THnSparseF      *fHistNTrigSib;   // count of trigger particles, same event
80
81    TH1D                    *fHistTemp;   // temporary histogram for debugging
82
83    ClassDef(AliAnalysisTaskV0ChCorrelations, 1); // class for V0Ch correlation analysis
84 };
85
86 /*  AliV0ChBasicParticle class contains only quantities 
87  *      required for the analysis in order to reduce memory consumption for event mixing.
88  */
89 class AliV0ChBasicParticle : public AliVParticle
90 {
91   public:
92     AliV0ChBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t candidate)
93       : fEta(eta), fPhi(phi), fpT(pt), fCandidate(candidate)
94     {
95     }
96     virtual ~AliV0ChBasicParticle() {}
97
98     // kinematics
99     virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
100     virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
101     virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
102     virtual Double_t Pt() const { return fpT; }
103     virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
104     virtual Bool_t   PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
105
106     virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
107     virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
108     virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
109     virtual Bool_t   XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
110
111     virtual Double_t OneOverPt()  const { AliFatal("Not implemented"); return 0; }
112     virtual Double_t Phi()        const { return fPhi; }
113     virtual Double_t Theta()      const { AliFatal("Not implemented"); return 0; }
114
115
116     virtual Double_t E()          const { AliFatal("Not implemented"); return 0; }
117     virtual Double_t M()          const { AliFatal("Not implemented"); return 0; }
118
119     virtual Double_t Eta()        const { return fEta; }
120     virtual Double_t Y()          const { AliFatal("Not implemented"); return 0; }
121
122     virtual Short_t Charge()      const { AliFatal("Not implemented"); return 0; }
123     virtual Int_t   GetLabel()    const { AliFatal("Not implemented"); return 0; }
124     // PID
125     virtual Int_t   PdgCode()     const { AliFatal("Not implemented"); return 0; }
126     virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
127
128     virtual Short_t WhichCandidate()      const { return fCandidate; }
129
130   private:
131     Float_t fEta;      // eta
132     Float_t fPhi;      // phi
133     Float_t fpT;       // pT
134     Short_t fCandidate;   // V0 candidate: 1 - K0sig, 2 - Lamsig, 3 - Alamsig, 4 - K0bg, 5 - Lambg, 6 - Alambg, 7 - Charged
135
136     ClassDef( AliV0ChBasicParticle, 1); // class required for event mixing
137 };
138
139 #endif
140