]>
Commit | Line | Data |
---|---|---|
a2ad7da1 | 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" | |
bce70c96 | 27 | #include "AliHFCorrelator.h" |
a2ad7da1 | 28 | #include "AliNormalizationCounter.h" |
29 | ||
e61afb80 | 30 | using std::vector; |
31 | ||
a2ad7da1 | 32 | class AliAODEvent; |
33 | ||
34 | class 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 SetFillOnlyD0D0bar(Int_t flagfill){fFillOnlyD0D0bar=flagfill;} | |
51 | void SetSystem(Int_t sys){fSys=sys;} | |
52 | void SetRejectSDDClusters(Bool_t flag) {fIsRejectSDDClusters=flag; } | |
53 | void SetFillGlobalPlots(Bool_t fill=kTRUE){fFillGlobal=fill;} | |
54 | ||
55 | Int_t GetReadMC() const {return fReadMC;} | |
56 | Int_t GetFillOnlyD0D0bar() const {return fFillOnlyD0D0bar;} | |
57 | Int_t GetSystem() const {return fSys;} | |
58 | Bool_t GetRejectSDDClusters() const {return fIsRejectSDDClusters;} | |
59 | Bool_t GetFillGlobalPlots() const {return fFillGlobal;} | |
8c2d7467 | 60 | Double_t GetEtaForCorrel() {return fEtaForCorrel;} |
a2ad7da1 | 61 | |
62 | //correlations setters/printers | |
63 | void SetNPtBinsCorr(Int_t nbins) {fNPtBinsCorr = nbins;} | |
64 | void SetPtBinsLimsCorr(Double_t* ptlims) {for(int i=0;i<=fNPtBinsCorr;i++) {fBinLimsCorr.push_back(ptlims[i]);}} | |
65 | void SetPtBinsLimsCorr(Float_t* ptlims) {for(int i=0;i<=fNPtBinsCorr;i++) {fBinLimsCorr.push_back((Double_t)ptlims[i]);}} | |
66 | void SetPtTreshLow(Double_t* pttreshlow) {for(int i=0;i<fNPtBinsCorr;i++) {fPtThreshLow.push_back(pttreshlow[i]);}} | |
67 | void SetPtTreshUp(Double_t* pttreshup) {for(int i=0;i<fNPtBinsCorr;i++) {fPtThreshUp.push_back(pttreshup[i]);}} | |
68 | void PrintBinsAndLimits(); | |
69 | Int_t PtBinCorr(Double_t pt) const; | |
bce70c96 | 70 | void SetEvMixing(Bool_t mix) {fMixing=mix;} |
8c2d7467 | 71 | void SetEtaForCorrel(Double_t etacorr) {fEtaForCorrel=etacorr;} |
bce70c96 | 72 | |
73 | enum PartType {kTrack,kKCharg,kK0}; | |
74 | enum FillType {kSE, kME}; //for single event or event mixing histos fill | |
a2ad7da1 | 75 | |
76 | private: | |
77 | ||
78 | AliAnalysisTaskSED0Correlations(const AliAnalysisTaskSED0Correlations &source); | |
79 | AliAnalysisTaskSED0Correlations& operator=(const AliAnalysisTaskSED0Correlations& source); | |
80 | void FillMassHists(AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliRDHFCutsD0toKpi *cuts, TList *listout); | |
a2ad7da1 | 81 | Int_t CheckD0Origin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const; |
82 | //correlation methods | |
83 | void CreateCorrelationsObjs(); | |
bce70c96 | 84 | void CalculateCorrelations(AliAODRecoDecayHF2Prong* d, Int_t labD0=-1, TClonesArray* mcArray=0x0); |
85 | void FillSparsePlots(TClonesArray* arrayMC, AliAODRecoDecayHF2Prong *d, Int_t origD0, Int_t PdgD0, AliReducedParticle* track, Int_t type); | |
a2ad7da1 | 86 | Int_t CheckTrackOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const; |
87 | Bool_t SelectV0(AliAODv0* v0, AliAODVertex *vtx, Int_t option, Int_t idArrayV0[][2]) const; | |
a2ad7da1 | 88 | |
89 | Int_t fNPtBinsCorr; // number of pt bins per correlations | |
2ad98fc5 | 90 | std::vector<Double_t> fBinLimsCorr; // limits of pt bins per correlations |
91 | std::vector<Double_t> fPtThreshLow; // pT treshold of hadrons - low | |
92 | std::vector<Double_t> fPtThreshUp; // pT treshold of hadrons - up | |
a2ad7da1 | 93 | |
94 | Int_t fEvents; // EventCounter | |
95 | Bool_t fAlreadyFilled; // D0 in an event already analyzed (for track distribution plots) | |
96 | TList *fOutputMass; //!list send on output slot 1 | |
97 | TList *fOutputCorr; //!list of correlation histos, output slot 5 | |
98 | TList *fOutputStudy; //!list of histos with MC distributions, output slot 6 | |
99 | TH1F *fNentries; //!histogram with number of events on output slot 2 | |
100 | AliRDHFCutsD0toKpi *fCutsD0; // Cuts for D0, output 3 | |
101 | AliHFAssociatedTrackCuts *fCutsTracks;// Cuts for tracks and K0, output 7 | |
bce70c96 | 102 | AliHFCorrelator* fCorrelatorTr; // Correlator for tracks |
103 | AliHFCorrelator* fCorrelatorKc; // Correlator for charged K | |
104 | AliHFCorrelator* fCorrelatorK0; // Correlator for K0 | |
a2ad7da1 | 105 | Bool_t fReadMC; // flag for MC array: kTRUE = read it, kFALSE = do not read it |
bce70c96 | 106 | Bool_t fMixing; // flag to enable also event mixing |
a2ad7da1 | 107 | AliNormalizationCounter *fCounter; //!AliNormalizationCounter on output slot 4 |
108 | Int_t fNPtBins; // Number of pt bins | |
109 | 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) | |
110 | Int_t fIsSelectedCandidate; // selection outcome | |
111 | Int_t fSys; // fSys=0 -> p-p; fSys=1 ->PbPb | |
8c2d7467 | 112 | Double_t fEtaForCorrel; // cut for D0 eta to enable correlation with associated particles |
a2ad7da1 | 113 | Bool_t fIsRejectSDDClusters; // flag to reject events with SDD clusters |
114 | Bool_t fFillGlobal; // flag to fill global plots (in loops on tracks and V0 for each event) | |
115 | ||
bce70c96 | 116 | ClassDef(AliAnalysisTaskSED0Correlations,2); // AliAnalysisTaskSE for D0->Kpi |
a2ad7da1 | 117 | }; |
118 | ||
119 | #endif | |
120 |