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