1 #ifndef ALIANALYSISTASKSESIGNIFICANCE_H
2 #define ALIANALYSISTASKSESIGNIFICANCE_H
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 //*************************************************************************
10 // AliAnalysisTaskSESignificane to calculate effects on
11 // significance of D mesons cut
12 // Authors: G. Ortona, ortona@to.infn.it
13 // F. Prino, prino@to.infn.it
14 // Renu Bala, bala@to.infn.it
15 // Chiara Bianchin, cbianchi@pd.infn.it
16 //*************************************************************************
18 #include "AliAnalysisTaskSE.h"
19 #include "AliAnalysisVertexingHF.h"
22 class AliMultiDimVector;
25 class AliAnalysisTaskSESignificance : public AliAnalysisTaskSE
29 enum FeedDownEnum {kBoth,kCharmOnly,kBeautyOnly};
30 enum ChanDs {kAllReson,kPhi,kK0star};
32 AliAnalysisTaskSESignificance();
33 AliAnalysisTaskSESignificance(const char *name, TList *listMDV,AliRDHFCuts *RDCuts, Int_t decaychannel,Int_t selectionlevel=AliRDHFCuts::kAll);
35 virtual ~AliAnalysisTaskSESignificance();
37 Bool_t CheckConsistency();
38 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
39 void SetBFeedDown(FeedDownEnum flagB);//see enum
40 void SetDFromCharmOnly(){SetBFeedDown(kCharmOnly);}
41 void SetDFromBeautyOnly(){SetBFeedDown(kBeautyOnly);}
42 void SetMassLimits(Float_t range,Int_t pdg);
43 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
44 void SetNBins(Int_t nbins){fNBins=nbins;}
45 void SetFillWithPartAntiPartBoth(Int_t value){fPartOrAndAntiPart=value;}
46 void SetDsChannel(Int_t chan){fDsChannel=chan;}
47 void SetUseSelBit(Bool_t selBit=kTRUE){fUseSelBit=selBit;}
49 //void SetMultiVector(const AliMultiDimVector *MultiDimVec){fMultiDimVec->CopyStructure(MultiDimVec);}
50 Float_t GetUpperMassLimit()const {return fUpmasslimit;}
51 Float_t GetLowerMassLimit()const {return fLowmasslimit;}
52 Int_t GetNBins()const {return fNBins;}
53 Int_t GetFillWithPartAntiPartBoth()const {return fPartOrAndAntiPart;}
54 Int_t GetBFeedDown()const {return fBFeedDown;}
55 Int_t GetDsChannel()const {return fDsChannel;}
56 Bool_t GetUseSelBit()const {return fUseSelBit;}
58 // Implementation of interface methods
59 virtual void UserCreateOutputObjects();
60 virtual void LocalInit();// {Init();}
61 virtual void UserExec(Option_t *option);
62 virtual void Terminate(Option_t *option);
66 void SetPDGdaughterDstoKKpi(){
67 fPDGdaughters[0]=321;//K
68 fPDGdaughters[1]=321;//K
69 fPDGdaughters[2]=211;//pi
70 fPDGdaughters[3]=0; //empty
72 void SetPDGdaughterDstopiKK(){
73 fPDGdaughters[0]=211;//pi
74 fPDGdaughters[1]=321;//K
75 fPDGdaughters[2]=321;//K
76 fPDGdaughters[3]=0; //empty
79 AliAnalysisTaskSESignificance(const AliAnalysisTaskSESignificance &source);
80 AliAnalysisTaskSESignificance& operator=(const AliAnalysisTaskSESignificance& source);
82 Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
83 Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
84 Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
85 Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
86 Int_t CheckOrigin(const AliAODMCParticle* mcPart, const TClonesArray* mcArray) const;
88 void FillDplus(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index,Int_t isSel);
89 void FillD02p(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index, Int_t isSel);
90 void FillDs(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index,Int_t isSel,Int_t optDecay);
91 void FillDstar(AliAODRecoCascadeHF* dstarD0pi,TClonesArray *arrayMC,Int_t index,Int_t isSel);
92 void FillD04p(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index,Int_t isSel);
93 void FillLambdac(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index, Int_t isSel);
99 enum {kMaxNHist=500000};
100 enum {kDplustoKpipi,kD0toKpi,kDstartoKpipi,kDstoKKpi,kD0toKpipipi,kLambdactopKpi};
102 TList *fOutput; //! list send on output slot 0
103 TList *fCutList; //Multidimvector container
104 TH1F *fMassHist[kMaxNHist]; //!hist. for inv mass
105 TH1F *fSigHist[kMaxNHist]; //!hist. for inv mass (sig from MC truth)
106 TH1F *fBkgHist[kMaxNHist]; //!hist. for inv mass (bkg from MC truth)
107 TH1F *fRflHist[kMaxNHist]; //!hist. for inv mass (bkg from MC truth)
108 TH1F* fHistNEvents; //! hist of n of aods
109 Float_t fUpmasslimit; //upper inv mass limit for histos
110 Float_t fLowmasslimit; //lower inv mass limit for histos
111 AliRDHFCuts *fRDCuts;//prong cut values
112 Int_t fNPtBins; //number of pt bins
113 Bool_t fReadMC; //flag for access to MC
114 Bool_t fUseSelBit; //flag to use selection bit (speed up candidates selection)
115 FeedDownEnum fBFeedDown; //flag to search for D from B decays
116 Int_t fDecChannel; //decay channel identifier
117 Int_t fPDGmother; // PDG code of D meson
118 Int_t fNProngs; // number of prong of the decay channel
119 Int_t fPDGdaughters[4]; // PDG codes of daughters
120 TString fBranchName; // AOD branch name for channel
121 Int_t fSelectionlevel; //selection level: kALL,kTracks,kCandidate
122 Int_t fNVars; // number of selection variables
123 Float_t fVars[kMaxCutVar]; // array with values of cut variables
124 Int_t fNBins; //number of bins in the mass histograms
125 Int_t fPartOrAndAntiPart; //fill histograms with particle only (+1), antiparticle only (-1), both (0)
126 Int_t fDsChannel; // Ds resonant channel selected
127 Int_t fPDGDStarToD0pi[2]; //PDG codes for the particles in the D* -> pi + D0 decay
128 Int_t fPDGD0ToKpi[2]; //PDG codes for the particles in the D0 -> K + pi decay
130 ClassDef(AliAnalysisTaskSESignificance,5); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates