1 #ifndef AliAnalysisTaskDStarCorrelations_H
2 #define AliAnalysisTaskDStarCorrelations_H
4 /**************************************************************************
5 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
19 /* $Id: AliAnalysisTaskDStarCorrelations.h 65139 2013-11-25 14:47:45Z fprino $ */
21 //-----------------------------------------------------------------------
24 // Author S.Bjelogrlic
26 // sandro.bjelogrlic@cern.ch
28 //-----------------------------------------------------------------------
33 #include "AliAnalysisTaskSE.h"
34 #include "AliAODEvent.h"
35 #include "AliRDHFCutsDStartoKpipi.h"
36 #include "AliEventPoolManager.h"
37 #include "AliAODRecoCascadeHF.h"
38 #include "AliHFAssociatedTrackCuts.h"
39 #include "AliNormalizationCounter.h"
40 #include "AliHFCorrelator.h"
41 #include <THnSparse.h>
42 #include "AliAnalysisUtils.h"
43 #include "AliVertexingHFUtils.h"
46 class AliAODMCParticle;
50 class AliEventPoolManager;
55 class AliAnalysisTaskDStarCorrelations : public AliAnalysisTaskSE
60 enum CollSyst {pp,pA,AA};
61 enum DEffVariable{kNone,kMult,kCentr,kRapidity,kEta};
62 enum BkgMethod{kDZeroSB, kDStarSB};
64 AliAnalysisTaskDStarCorrelations();
65 AliAnalysisTaskDStarCorrelations(const Char_t* name,AliRDHFCutsDStartoKpipi* cuts, AliHFAssociatedTrackCuts *AsscCuts, AliAnalysisTaskDStarCorrelations::CollSyst syst,Bool_t mode);
66 virtual ~AliAnalysisTaskDStarCorrelations();
70 // Implementation of interface methods
71 virtual void UserCreateOutputObjects();
73 virtual void LocalInit() {Init();}
74 virtual void UserExec(Option_t *option);
75 virtual void Terminate(Option_t *option);
77 void DefineThNSparseForAnalysis();
78 void DefineHistoForAnalysis();
79 void EnlargeDZeroMassWindow();
80 Bool_t IsDDaughter(AliAODMCParticle* d, AliAODMCParticle* track) const ;
82 // checker for event mixing
83 void EventMixingChecks(AliAODEvent * AOD);
86 void SetCorrelator(Int_t l) {fselect = l;} // select 1 for hadrons, 2 for Kaons, 3 for Kzeros
87 void SetMonteCarlo(Bool_t k) {fmontecarlo = k;}
88 void SetUseMixing (Bool_t j) {fmixing = j;}
89 void SetUseFullMode (Bool_t j) {fFullmode = j;}
90 void SetCollSys(CollSyst system){fSystem=system;} // select between pp (kFALSE) or PbPb (kTRUE)
91 void SetEfficiencyVariable(DEffVariable var){fEfficiencyVariable = var;} // set the efficiency variable to use
92 void SetBkgEstimationMethod(BkgMethod var){fBkgMethod = var;} // set the efficiency variable to use
93 void SetUseReconstruction(Bool_t reco){fReco = reco;}
94 void SetUseEfficiencyCorrection(Bool_t correction){fUseEfficiencyCorrection = correction;} // setter for using the single track efficiency correction
95 void SetUseDmesonEfficiencyCorrection(Bool_t correction){fUseDmesonEfficiencyCorrection = correction;} // setter for using the single track efficiency correction
96 void SetUseCentrality (Bool_t j) {fUseCentrality = j;} // switch for centrality (kTRUE)/multiplicity(kFALSE)
97 void SetUseHadronicChannelAtKineLevel (Bool_t use){fUseHadronicChannelAtKineLevel = use;}
98 void SetUseRemoveMoreThanOneCDmesonCandidate (Bool_t use){fRemoveMoreThanOneDmesonCandidate = use;}
101 void SetNofPhiBins(Int_t nbins){fPhiBins = nbins;} // number of delta phi bins
102 void SetLevelOfDebug(Int_t debug){fDebugLevel=debug;} // set debug level
103 void SetUseDisplacement(Int_t m) {fDisplacement=m;} // select 0 for no displ, 1 for abs displ, 2 for d0/sigma_d0
106 void SetDim(){fDim = 4;
107 fDMesonSigmas = new Float_t[4];} // standard definedt = cannot be changed from outside
109 void SetMaxDStarEta(Double_t eta){fMaxEtaDStar = eta;} // maximum eta D*
112 void SetDMesonSigmas(Float_t DStarWin, Float_t D0Win, Float_t SBmin, Float_t SBmax){
113 fDMesonSigmas[0] = DStarWin;
114 fDMesonSigmas[1] = D0Win;
115 fDMesonSigmas[2] = SBmin;
116 fDMesonSigmas[3] = SBmax;
124 void SetDeffMapvsPt(TH1D * map){fDeffMapvsPt = map;}
125 void SetDeffMapvsPtvsMult(TH2D * map){fDeffMapvsPtvsMult = (TH2D*)map;}
126 void SetDeffMapvsPtvsMultvsEta(TH2D * map){fDeffMapvsPtvsEta = map;}
133 AliAnalysisTaskDStarCorrelations(const AliAnalysisTaskDStarCorrelations &source);
134 AliAnalysisTaskDStarCorrelations& operator=(const AliAnalysisTaskDStarCorrelations& source);
136 TObject* fhandler; //! Analysis Handler
137 TClonesArray* fmcArray; //mcarray
138 AliNormalizationCounter *fCounter; // counter
139 AliHFCorrelator * fCorrelator; // object for correlations
143 Int_t fselect; // select what to correlate with a D* 1-chargedtracks,2-chargedkaons,3-k0s
144 Bool_t fmontecarlo;//switch for MC
145 Bool_t fmixing;// switch for event mixing
147 CollSyst fSystem; // pp, pPb or PbPb
148 DEffVariable fEfficiencyVariable; // set second variable to study efficiency (mult, centr, y, eta)
149 BkgMethod fBkgMethod; // bkg estimation method (dstar or dzero sidebands)
150 Bool_t fReco; // use reconstruction or MC truth
151 Bool_t fUseEfficiencyCorrection; // boolean variable to use or not the efficiency correction
152 Bool_t fUseDmesonEfficiencyCorrection; // boolean flag for the use of Dmeson efficiency correction
153 Bool_t fUseCentrality;// boolean to switch in between centrality or multiplicity
154 Bool_t fUseHadronicChannelAtKineLevel; //
155 Bool_t fRemoveMoreThanOneDmesonCandidate; // flag to remove a second, 3rd etc candidate if there is any - useful in PbPb
158 Int_t fEvents; //! number of event
159 Int_t fDebugLevel; //! debug level
160 Int_t fDisplacement; // set 0 for no displacement cut, 1 for absolute d0, 2 for d0/sigma_d0
163 Double_t fMaxEtaDStar;
164 Float_t *fDMesonSigmas;//[fDim]
165 Float_t * fD0Window; //[fNofPtBins]
170 TList *fOutput; //! user output data
171 TList *fDmesonOutput; //!output related to d meson
172 TList *fTracksOutput; //!output related to tracks
173 TList *fEMOutput; //! output with EM checks
174 TList *fCorrelationOutput; // ! output with correlation sparses
175 TList *fOutputMC; //! outpu for MC
176 AliRDHFCutsDStartoKpipi *fCuts; // Cuts D*
177 AliHFAssociatedTrackCuts *fAssocCuts; // cuts for associated
178 AliAnalysisUtils *fUtils;
179 AliAODTracklets * fTracklets; // AliAODtracklets
181 TH1D * fDeffMapvsPt; // histo for Deff mappin
182 TH2D * fDeffMapvsPtvsMult; // histo for Deff mappin
183 TH2D * fDeffMapvsPtvsEta; // histo for Deff mappin
185 ClassDef(AliAnalysisTaskDStarCorrelations,8); // class for D meson correlations