]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWGHF/correlationHF/AliAnalysisTaskSED0Correlations.h
Fix (AndreaR)
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliAnalysisTaskSED0Correlations.h
... / ...
CommitLineData
1#ifndef ALIANALYSISTASKSED0CORRELATIONS_H
2#define ALIANALYSISTASKSED0CORRELATIONS_H
3
4/* Copyright(c) 1998-2012, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9//*************************************************************************
10// Class AliAnalysisTaskSED0Correlations
11// AliAnalysisTaskSE for D0 candidates (2Prongs) and hadrons correlations
12// Authors:
13// C.Bianchin, chiara.bianchin@pd.infn.it
14// F.Colamaria, fabio.colamaria@ba.infn.it
15//*************************************************************************
16
17#include <TROOT.h>
18#include <TSystem.h>
19#include <TNtuple.h>
20#include <TTree.h>
21#include <TH1F.h>
22#include <THnSparse.h>
23
24#include "AliAnalysisTaskSE.h"
25#include "AliRDHFCutsD0toKpi.h"
26#include "AliHFAssociatedTrackCuts.h"
27#include "AliHFCorrelator.h"
28#include "AliNormalizationCounter.h"
29
30using std::vector;
31
32class AliAODEvent;
33
34class AliAnalysisTaskSED0Correlations : public AliAnalysisTaskSE
35{
36 public:
37
38 AliAnalysisTaskSED0Correlations();
39 AliAnalysisTaskSED0Correlations(const char *name,AliRDHFCutsD0toKpi* cutsD0, AliHFAssociatedTrackCuts* cutsTrk);
40 virtual ~AliAnalysisTaskSED0Correlations();
41
42 // Implementation of interface methods
43 virtual void UserCreateOutputObjects();
44 virtual void Init();
45 virtual void LocalInit() {Init();}
46 virtual void UserExec(Option_t *option);
47 virtual void Terminate(Option_t *option);
48
49 void SetReadMC(Bool_t readMC=kFALSE){fReadMC=readMC;}
50 void SetMCReconstructedTracks(Bool_t recoTrMC=kTRUE){fRecoTr=recoTrMC;}
51 void SetMCReconstructedD0(Bool_t recoD0MC=kTRUE){fRecoD0=recoD0MC;}
52 void SetMCSelEventType(Bool_t sel=kFALSE){fSelEvType=sel;}
53 void SetFillOnlyD0D0bar(Int_t flagfill){fFillOnlyD0D0bar=flagfill;}
54 void SetSystem(Int_t sys){fSys=sys;}
55 void SetRejectSDDClusters(Bool_t flag) {fIsRejectSDDClusters=flag; }
56 void SetFillGlobalPlots(Bool_t fill=kTRUE){fFillGlobal=fill;}
57 void SetSoftPiFlag(Bool_t piflag) {fSoftPiCut=piflag;}
58 void SetMEAxisThresh(Bool_t methresh) {fMEAxisThresh=methresh;}
59 void SetKaonCorrelations(Bool_t kaonCorr) {fKaonCorr=kaonCorr;}
60
61 Int_t GetReadMC() const {return fReadMC;}
62 Int_t GetMCReconstructedTracks() const {return fRecoTr;}
63 Int_t GetMCReconstructedD0() const {return fRecoD0;}
64 Int_t GetMCSelEventType() const {return fSelEvType;}
65 Int_t GetFillOnlyD0D0bar() const {return fFillOnlyD0D0bar;}
66 Int_t GetSystem() const {return fSys;}
67 Bool_t GetRejectSDDClusters() const {return fIsRejectSDDClusters;}
68 Bool_t GetFillGlobalPlots() const {return fFillGlobal;}
69 Double_t GetEtaForCorrel() {return fEtaForCorrel;}
70 Double_t GetMultEv() {return fMultEv;}
71 Bool_t GetSoftPiFlag() const {return fSoftPiCut;}
72 Bool_t GetMEAxisThresh() const {return fMEAxisThresh;}
73 Bool_t GetKaonCorrelations() const {return fKaonCorr;}
74
75 //correlations setters/printers
76 void SetNPtBinsCorr(Int_t nbins) {fNPtBinsCorr = nbins;}
77 void SetPtBinsLimsCorr(Double_t* ptlims) {for(int i=0;i<=fNPtBinsCorr;i++) {fBinLimsCorr.push_back(ptlims[i]);}}
78 void SetPtBinsLimsCorr(Float_t* ptlims) {for(int i=0;i<=fNPtBinsCorr;i++) {fBinLimsCorr.push_back((Double_t)ptlims[i]);}}
79 void SetPtTreshLow(Double_t* pttreshlow) {for(int i=0;i<fNPtBinsCorr;i++) {fPtThreshLow.push_back(pttreshlow[i]);}}
80 void SetPtTreshUp(Double_t* pttreshup) {for(int i=0;i<fNPtBinsCorr;i++) {fPtThreshUp.push_back(pttreshup[i]);}}
81
82 void PrintBinsAndLimits();
83 Int_t PtBinCorr(Double_t pt) const;
84 void SetEvMixing(Bool_t mix) {fMixing=mix;}
85 void SetEtaForCorrel(Double_t etacorr) {fEtaForCorrel=etacorr;}
86
87 enum PartType {kTrack,kKCharg,kK0};
88 enum FillType {kSE, kME}; //for single event or event mixing histos fill
89
90 private:
91
92 AliAnalysisTaskSED0Correlations(const AliAnalysisTaskSED0Correlations &source);
93 AliAnalysisTaskSED0Correlations& operator=(const AliAnalysisTaskSED0Correlations& source);
94 void FillMassHists(AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliRDHFCutsD0toKpi *cuts, TList *listout);
95 Int_t CheckD0Origin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const;
96 //correlation methods
97 void CreateCorrelationsObjs();
98 void CalculateCorrelations(AliAODRecoDecayHF2Prong* d, Int_t labD0=-1, TClonesArray* mcArray=0x0);
99 void CalculateCorrelationsMCKine(AliAODMCParticle* d, TClonesArray* mcArray=0x0);
100 void FillSparsePlots(TClonesArray* arrayMC, Double_t mInv[], Int_t origD0, Int_t PdgD0, AliReducedParticle* track, Int_t ptbin, Int_t type, Double_t wg=1.);
101 Int_t CheckTrackOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const;
102 Bool_t IsDDaughter(AliAODMCParticle* d, AliAODMCParticle* track, TClonesArray* mcArray) const;
103 Bool_t SelectV0(AliAODv0* v0, AliAODVertex *vtx, Int_t option, Int_t idArrayV0[][2]) const;
104 Bool_t IsSoftPion_MCKine(AliAODMCParticle* d, AliAODMCParticle* track, TClonesArray* arrayMC) const;
105
106 Int_t fNPtBinsCorr; // number of pt bins per correlations
107 std::vector<Double_t> fBinLimsCorr; // limits of pt bins per correlations
108 std::vector<Double_t> fPtThreshLow; // pT treshold of hadrons - low
109 std::vector<Double_t> fPtThreshUp; // pT treshold of hadrons - up
110
111 Int_t fEvents; // EventCounter
112 Bool_t fAlreadyFilled; // D0 in an event already analyzed (for track distribution plots)
113 TList *fOutputMass; //!list send on output slot 1
114 TList *fOutputCorr; //!list of correlation histos, output slot 5
115 TList *fOutputStudy; //!list of histos with MC distributions, output slot 6
116 TH1F *fNentries; //!histogram with number of events on output slot 2
117 AliRDHFCutsD0toKpi *fCutsD0; // Cuts for D0, output 3
118 AliHFAssociatedTrackCuts *fCutsTracks;// Cuts for tracks and K0, output 7
119 AliHFCorrelator* fCorrelatorTr; // Correlator for tracks
120 AliHFCorrelator* fCorrelatorKc; // Correlator for charged K
121 AliHFCorrelator* fCorrelatorK0; // Correlator for K0
122 Bool_t fReadMC; // flag for MC array: kTRUE = read it, kFALSE = do not read it
123 Bool_t fRecoTr; // flag for using MC reconstructed (kTRUE) or pure kinematic MC (kFALSE) - Associated tracks
124 Bool_t fRecoD0; // flag for using MC reconstructed (kTRUE) or pure kinematic MC (kFALSE) - D0
125 Bool_t fSelEvType; // flag for enabling selection of event tpye (PP, GS, FE, ...) on MC analysis
126 Bool_t fMixing; // flag to enable also event mixing
127 AliNormalizationCounter *fCounter; //!AliNormalizationCounter on output slot 4
128 Int_t fNPtBins; // Number of pt bins
129 Int_t fFillOnlyD0D0bar; // flag to fill mass histogram with D0/D0bar only (0 = fill with both, 1 = fill with D0 only, 2 = fill with D0bar only)
130 Int_t fIsSelectedCandidate; // selection outcome
131 Int_t fSys; // fSys=0 -> p-p; fSys=1 ->PbPb
132 Double_t fEtaForCorrel; // cut for D0 eta to enable correlation with associated particles
133 Bool_t fIsRejectSDDClusters; // flag to reject events with SDD clusters
134 Bool_t fFillGlobal; // flag to fill global plots (in loops on tracks and V0 for each event)
135 Double_t fMultEv; // event multiplicity (for trigger eff)
136 Bool_t fSoftPiCut; // flag to activate soft pion cut on Data
137 Bool_t fMEAxisThresh; // flag to fill threshold axis in ME plots
138 Bool_t fKaonCorr; // enables correlations of D0-Kcharg and D0-K0
139
140 ClassDef(AliAnalysisTaskSED0Correlations,5); // AliAnalysisTaskSE for D0->Kpi
141};
142
143#endif
144