]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/vertexingHF/AliAnalysisTaskSEDplus.h
Possibility to select positive and negatiev eta regions for D+
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / AliAnalysisTaskSEDplus.h
CommitLineData
5d836c02 1#ifndef ALIANALYSISTASKSEDPLUS_H
2#define ALIANALYSISTASKSEDPLUS_H
d486095a 3
4/* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
27de2dfb 7/* $Id$ */
8
d486095a 9//*************************************************************************
10// Class AliAnalysisTaskSEDplus
4afc48a2 11// AliAnalysisTaskSE for the D+ candidates Invariant Mass Histogram and
12//comparison of heavy-flavour decay candidates
d486095a 13// to MC truth (kinematics stored in the AOD)
4afc48a2 14// Renu Bala, bala@to.infn.it
993bfba1 15// F. Prino, prino@to.infn.it
16// G. Ortona, ortona@to.infn.it
d486095a 17//*************************************************************************
18
19#include <TROOT.h>
20#include <TSystem.h>
21#include <TNtuple.h>
22#include <TH1F.h>
595cc7e2 23#include <TH2F.h>
3de19caa 24#include <THnSparse.h>
82bb8d4b 25#include <TArrayD.h>
d486095a 26
4c230f6d 27#include "AliRDHFCutsDplustoKpipi.h"
d486095a 28#include "AliAnalysisTaskSE.h"
29#include "AliAnalysisVertexingHF.h"
a96083b9 30#include "AliNormalizationCounter.h"
7d9ca2b5 31#include "AliAODMCHeader.h"
32#include "AliAODMCParticle.h"
d486095a 33
34class AliAnalysisTaskSEDplus : public AliAnalysisTaskSE
35{
36 public:
37
38 AliAnalysisTaskSEDplus();
d48d81b5 39 AliAnalysisTaskSEDplus(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts,Bool_t fillNtuple=kFALSE);
d486095a 40 virtual ~AliAnalysisTaskSEDplus();
82bb8d4b 41
4afc48a2 42 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
3ec9254b 43 void SetDoLikeSign(Int_t dols=0){fDoLS=dols;}
aa7302d4 44 void SetSystem(Int_t system=0){fSystem=system;}
2edd194d 45 void SetCutsDistr(Bool_t cutsDistr=kTRUE){fCutsDistr=cutsDistr;}
7d9ca2b5 46 void SetDoImpactParameterHistos(Bool_t doImp=kTRUE){fDoImpPar=doImp;}
3de19caa 47 void SetImpactParameterBinning(Int_t nbins, Float_t dmin, Float_t dmax){
48 fNImpParBins=nbins;
49 fLowerImpPar=dmin;
50 fHigherImpPar=dmax;
51 }
a96083b9 52 void SetUseStrangeness(Bool_t uses=kTRUE){fUseStrangeness=uses;}
82bb8d4b 53 void SetMassLimits(Float_t range);
54 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
993bfba1 55 void SetBinWidth(Float_t w);
5fc4893f 56 void SetUseBit(Bool_t dols=kTRUE){fUseBit=dols;}
3de19caa 57
cee75703 58 void SetUseOnlyPositiveEta(){fEtaSelection=1;}
59 void SetUseOnlyNegativeEta(){fEtaSelection=-1;}
60 void SetUseFullEta(){fEtaSelection=0;}
82bb8d4b 61
62 Float_t GetUpperMassLimit(){return fUpmasslimit;}
63 Float_t GetLowerMassLimit(){return fLowmasslimit;}
64 Int_t GetNBinsPt(){return fNPtBins;}
993bfba1 65 Float_t GetBinWidth(){return fBinWidth;}
66 Int_t GetNBinsHistos();
82bb8d4b 67
68 void LSAnalysis(TClonesArray *arrayOppositeSign,TClonesArray *arrayLikeSign,AliAODEvent *aod,AliAODVertex *vtx1, Int_t nDplusOS);
5d836c02 69 Int_t CheckOrigin(TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate) const;
7d9ca2b5 70 void CreateLikeSignHistos();
71 void CreateImpactParameterHistos();
72
d486095a 73 // Implementation of interface methods
74 virtual void UserCreateOutputObjects();
75 virtual void Init();
76 virtual void LocalInit() {Init();}
77 virtual void UserExec(Option_t *option);
78 virtual void Terminate(Option_t *option);
4afc48a2 79
d486095a 80 private:
81
82 AliAnalysisTaskSEDplus(const AliAnalysisTaskSEDplus &source);
83 AliAnalysisTaskSEDplus& operator=(const AliAnalysisTaskSEDplus& source);
82bb8d4b 84 Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
85 Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
86 Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
87 Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
5d836c02 88 Float_t GetTrueImpactParameter(const AliAODMCHeader *mcHeader, TClonesArray* arrayMC, const AliAODMCParticle *partDp) const;
70675e50 89 Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong* d, TClonesArray* arrayMC, Float_t factor[3]) const;
af636507 90
73173a6a 91 enum {kMaxPtBins=20};
82bb8d4b 92
d486095a 93 TList *fOutput; //! list send on output slot 0
3ec9254b 94 TH1F *fHistNEvents; //!hist. for No. of events
82bb8d4b 95 TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC)
3ec9254b 96 TH1F *fCosPHist[3*kMaxPtBins]; //!hist. for PointingAngle (LC)
97 TH1F *fDLenHist[3*kMaxPtBins]; //!hist. for Dec Length (LC)
98 TH1F *fSumd02Hist[3*kMaxPtBins]; //!hist. for sum d02 (LC)
99 TH1F *fSigVertHist[3*kMaxPtBins]; //!hist. for sigVert (LC)
100 TH1F *fPtMaxHist[3*kMaxPtBins]; //!hist. for Pt Max (LC)
101 TH1F *fPtKHist[3*kMaxPtBins]; //!hist. for PtK (LC)
102 TH1F *fPtpi1Hist[3*kMaxPtBins]; //!hist. for PtPi1 (LC)
103 TH1F *fPtpi2Hist[3*kMaxPtBins]; //!hist. for PtPi2 (LC)
104 TH1F *fDCAHist[3*kMaxPtBins]; //!hist. for DCA (LC)
105 TH1F *fDLxy[3*kMaxPtBins]; //!hist. for DLxy (LC)
106 TH1F *fDLxyTC[3*kMaxPtBins]; //!hist. for DLxy (TC)
107 TH1F *fCosxy[3*kMaxPtBins]; //!hist. for Cosxy (LC)
108 TH1F *fCosxyTC[3*kMaxPtBins]; //!hist. for Cosxy (TC)
7d9ca2b5 109 TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
bb69f127 110 TH1F *fMassHistTCPlus[3*kMaxPtBins]; //!hist. for D+ inv mass (TC)
111 TH1F *fMassHistTCMinus[3*kMaxPtBins]; //!hist. for D- inv mass (TC)
82bb8d4b 112 TH1F *fMassHistLS[5*kMaxPtBins];//!hist. for LS inv mass (LC)
ba9ae5b2 113 TH1F *fCosPHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 1 (LC)
114 TH1F *fDLenHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 2 (LC)
115 TH1F *fSumd02HistLS[3*kMaxPtBins];//!hist. for LS cuts variable 3 (LC)
116 TH1F *fSigVertHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 4 (LC)
117 TH1F *fPtMaxHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 5 (LC)
118 TH1F *fDCAHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 6 (LC)
82bb8d4b 119 TH1F *fMassHistLSTC[5*kMaxPtBins];//!hist. for LS inv mass (TC)
cdc197b1 120 TH2F *fCorreld0Kd0pi[3]; //!hist. for d0k*d0pi vs. d0k*d0pi (LC)
9125e019 121 TH2F *fHistCentrality[3];//!hist. for cent distr (all,sel ev, )
3de19caa 122 THnSparseF *fHistMassPtImpParTC[5];//! histograms for impact paramter studies
cee75703 123 TH2F *fPtVsMass; //! hist. of pt vs. mass (prod. cuts)
595cc7e2 124 TH2F *fPtVsMassTC; //! hist. of pt vs. mass (analysis cuts)
125 TH2F *fYVsPt; //! hist. of Y vs. Pt (prod. cuts)
126 TH2F *fYVsPtTC; //! hist. of Y vs. Pt (analysis cuts)
127 TH2F *fYVsPtSig; //! hist. of Y vs. Pt (MC, only sig, prod. cuts)
128 TH2F *fYVsPtSigTC; //! hist. of Y vs. Pt (MC, only sig, analysis cuts)
d48d81b5 129 TH1F *fSPDMult; //! hist. of spd mult
1f4e9722 130 TNtuple *fNtupleDplus; //! output ntuple
82bb8d4b 131 Float_t fUpmasslimit; //upper inv mass limit for histos
132 Float_t fLowmasslimit; //lower inv mass limit for histos
4c230f6d 133 Int_t fNPtBins; //Number of Pt Bins
993bfba1 134 Float_t fBinWidth;//width of one bin in output histos
4c230f6d 135 TList *fListCuts; //list of cuts
4c230f6d 136 AliRDHFCutsDplustoKpipi *fRDCutsAnalysis; //Cuts for Analysis
a96083b9 137 AliNormalizationCounter *fCounter;//!Counter for normalization
82bb8d4b 138 Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins
1f4e9722 139 Bool_t fFillNtuple; // flag for filling ntuple
82bb8d4b 140 Bool_t fReadMC; //flag for access to MC
a96083b9 141 Bool_t fUseStrangeness;//flag to enhance strangeness in MC to fit to data
7d9ca2b5 142 Bool_t fUseBit; // flag to use bitmask
2edd194d 143 Bool_t fCutsDistr; // flag to activate cuts distr histos
7d9ca2b5 144 Bool_t fDoImpPar; // flag to activate impact paramter histos
3de19caa 145 Int_t fNImpParBins; // nunber of bins in impact parameter histos
146 Float_t fLowerImpPar; // lower limit in impact parameter (um)
147 Float_t fHigherImpPar; // higher limit in impact parameter (um)
7d9ca2b5 148 Int_t fDoLS; // flag to do LS analysis
cee75703 149 Int_t fEtaSelection; // eta region to accept D+ 0=all, -1 = negative, 1 = positive
aa7302d4 150 Int_t fSystem; //0=pp,1=PbPb
d486095a 151
cee75703 152 ClassDef(AliAnalysisTaskSEDplus,20); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates
d486095a 153};
154
155#endif