1 /* Copyright(c) 1998-2013, ALICE Experiment at CERN, All rights reserved.
2 * See cxx source for full Copyright notice
4 * AliAnalysisTaskV0ChCorrelations class
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
12 #ifndef ALIANALYSISTASKV0CHCORRELATIONS_H
13 #define ALIANALYSISTASKV0CHCORRELATIONS_H
21 class AliEventPoolManager;
23 #ifndef ALIANALYSISTASKSE_H
24 #include "AliAnalysisTaskSE.h"
27 class AliAnalysisTaskV0ChCorrelations : public AliAnalysisTaskSE {
29 AliAnalysisTaskV0ChCorrelations(const char *name = "AliAnalysisTaskV0ChCorrelations");
30 //AliAnalysisTaskV0ChCorrelations(const AliAnalysisTaskV0ChCorrelations&); //not implemented
31 //AliAnalysisTaskV0ChCorrelations& operator=(const AliAnalysisTaskV0ChCorrelations&); //not implemented
32 virtual ~AliAnalysisTaskV0ChCorrelations();
34 // Setting the global variables
35 void SetAnalysisMC(Bool_t AnalysisMC = kTRUE) {fAnalysisMC = AnalysisMC;}
36 void SetDcaDToPV(Float_t DcaDToPV = 0.1) {fDcaDToPV = DcaDToPV;}
37 void SetDcaV0D(Float_t DcaV0D = 1.0) {fDcaV0D = DcaV0D;}
38 void SetWithChCh(Bool_t WithChCh = kTRUE) {fWithChCh = WithChCh;}
39 void SetOStatus(Int_t OStatus = 1) {fOStatus = OStatus;}
41 // Getting the global variables
42 Float_t GetDcaDToPV() { return fDcaDToPV; }
43 Float_t GetDcaV0D() { return fDcaV0D; }
44 Bool_t GetWithChCh() { return fWithChCh; }
45 Int_t GetOStatus() { return fOStatus; }
47 virtual void UserCreateOutputObjects();
48 virtual void UserExec(Option_t *option);
49 virtual void Terminate(Option_t *);
51 Bool_t IsMyGoodPrimaryTrack(const AliAODTrack* aodtrack);
52 Bool_t IsMyGoodDaughterTrack(const AliAODTrack* aodtrack);
53 Bool_t IsMyGoodV0(const AliAODEvent* aod, const AliAODv0* aodv0, const AliAODTrack* tr1, const AliAODTrack* tr2, Int_t osta);
54 void RemovingInjectedSignal(TObjArray* tracks, TObject* mcObj, Int_t maxLabel);
58 AliAnalysisTaskV0ChCorrelations(const AliAnalysisTaskV0ChCorrelations&); //not implemented
59 AliAnalysisTaskV0ChCorrelations& operator=(const AliAnalysisTaskV0ChCorrelations&); //not implemented
61 Bool_t fAnalysisMC; // enable MC study
62 Bool_t fFillMixed; // enable event mixing (default: ON)
63 Int_t fMixingTracks; // size of track buffer for event mixing
64 AliEventPoolManager* fPoolMgr; //! event pool manager
66 Float_t fDcaDToPV; // DCA of the daughter to primary vertex
67 Float_t fDcaV0D; // DCA between daughters
68 Bool_t fWithChCh; // Also do ChCh correlations - for the cross-check
69 Int_t fOStatus; // checks for online and offline V0s
71 TList *fOutput; // Output list
72 AliPIDResponse *fPIDResponse; // PID response
74 TH2F *fHistCentVtx; // centrality vs. z vertex - to see statistics for mixing
75 TH1F *fHistMultiMain; // multiplicity of main events
77 THnSparseF *fHistMassK0; // K0 mass
78 THnSparseF *fHistMassLambda; // Lambda mass
79 THnSparseF *fHistMassAntiLambda; // AntiLambda mass
81 THnSparseF *fHistdPhidEtaSib; // dPhi vs. dEta, same event
82 THnSparseF *fHistdPhidEtaMix; // dPhi vs. dEta, mixed events
83 THnSparseF *fHistNTrigSib; // pt of trigger particles, same event
85 THnSparseF *fHistMCPtCentTrig; // pt vs. centrality of MC trigger particles
86 THnSparseF *fHistRCPtCentTrig; // pt vs. centrality of reconstructed trigger particles
87 TH2D *fHistMCPtCentAs; // pt vs. centrality of MC associated particles
88 TH2D *fHistRCPtCentAs; // pt vs. centrality of reconstructed associated particles
89 TH2D *fHistRCPtCentAll; // pt vs. centrality of reconstructed all primary+secondary particles
91 TH1D *fHistTemp; // temporary histogram for debugging
92 TH1D *fHistTemp2; // temporary histogram for debugging
94 ClassDef(AliAnalysisTaskV0ChCorrelations, 1); // class for V0Ch correlation analysis
97 /* AliV0ChBasicParticle class contains only quantities
98 * required for the analysis in order to reduce memory consumption for event mixing.
100 class AliV0ChBasicParticle : public AliVParticle
103 AliV0ChBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t candidate)
104 : fEta(eta), fPhi(phi), fpT(pt), fCandidate(candidate)
107 virtual ~AliV0ChBasicParticle() {}
110 virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
111 virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
112 virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
113 virtual Double_t Pt() const { return fpT; }
114 virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
115 virtual Bool_t PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
117 virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
118 virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
119 virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
120 virtual Bool_t XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
122 virtual Double_t OneOverPt() const { AliFatal("Not implemented"); return 0; }
123 virtual Double_t Phi() const { return fPhi; }
124 virtual Double_t Theta() const { AliFatal("Not implemented"); return 0; }
127 virtual Double_t E() const { AliFatal("Not implemented"); return 0; }
128 virtual Double_t M() const { AliFatal("Not implemented"); return 0; }
130 virtual Double_t Eta() const { return fEta; }
131 virtual Double_t Y() const { AliFatal("Not implemented"); return 0; }
133 virtual Short_t Charge() const { AliFatal("Not implemented"); return 0; }
134 virtual Int_t GetLabel() const { AliFatal("Not implemented"); return 0; }
136 virtual Int_t PdgCode() const { AliFatal("Not implemented"); return 0; }
137 virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
139 virtual Short_t WhichCandidate() const { return fCandidate; }
145 Short_t fCandidate; // V0 candidate: 1 - K0sig, 2 - Lamsig, 3 - Alamsig, 4 - K0bg, 5 - Lambg, 6 - Alambg
147 ClassDef( AliV0ChBasicParticle, 1); // class required for event mixing