Coverity
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSESignificance.h
CommitLineData
cbedddce 1#ifndef ALIANALYSISTASKSESIGNIFICANCE_H
2#define ALIANALYSISTASKSESIGNIFICANCE_H
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
cbedddce 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//*************************************************************************
17
18#include "AliAnalysisTaskSE.h"
19#include "AliAnalysisVertexingHF.h"
20
21class TH1F;
22class AliMultiDimVector;
23class AliRDHFCuts;
24
25class AliAnalysisTaskSESignificance : public AliAnalysisTaskSE
26{
27 public:
28
33c5731e 29 enum FeedDownEnum {kBoth,kCharmOnly,kBeautyOnly};
c135594e 30 enum ChanDs {kAllReson,kPhi,kK0star};
33c5731e 31
cbedddce 32 AliAnalysisTaskSESignificance();
33 AliAnalysisTaskSESignificance(const char *name, TList *listMDV,AliRDHFCuts *RDCuts, Int_t decaychannel,Int_t selectionlevel=AliRDHFCuts::kAll);
34
35 virtual ~AliAnalysisTaskSESignificance();
36
3aa6ce53 37 Bool_t CheckConsistency();
cbedddce 38 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
33c5731e 39 void SetBFeedDown(FeedDownEnum flagB);//see enum
40 void SetDFromCharmOnly(){SetBFeedDown(kCharmOnly);}
41 void SetDFromBeautyOnly(){SetBFeedDown(kBeautyOnly);}
cbedddce 42 void SetMassLimits(Float_t range,Int_t pdg);
43 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
f80a6da9 44 void SetNBins(Int_t nbins){fNBins=nbins;}
45 void SetFillWithPartAntiPartBoth(Int_t value){fPartOrAndAntiPart=value;}
c135594e 46 void SetDsChannel(Int_t chan){fDsChannel=chan;}
bb4bb9fc 47 void SetUseSelBit(Bool_t selBit=kTRUE){fUseSelBit=selBit;}
c135594e 48
cbedddce 49 //void SetMultiVector(const AliMultiDimVector *MultiDimVec){fMultiDimVec->CopyStructure(MultiDimVec);}
f80a6da9 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;}
33c5731e 54 Int_t GetBFeedDown()const {return fBFeedDown;}
c135594e 55 Int_t GetDsChannel()const {return fDsChannel;}
bb4bb9fc 56 Bool_t GetUseSelBit()const {return fUseSelBit;}
f80a6da9 57
cbedddce 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);
63
64 private:
65
c135594e 66 void SetPDGdaughterDstoKKpi(){
67 fPDGdaughters[0]=321;//K
68 fPDGdaughters[1]=321;//K
69 fPDGdaughters[2]=211;//pi
70 fPDGdaughters[3]=0; //empty
71 }
72 void SetPDGdaughterDstopiKK(){
73 fPDGdaughters[0]=211;//pi
74 fPDGdaughters[1]=321;//K
75 fPDGdaughters[2]=321;//K
76 fPDGdaughters[3]=0; //empty
77 }
78
cbedddce 79 AliAnalysisTaskSESignificance(const AliAnalysisTaskSESignificance &source);
196a3266 80 AliAnalysisTaskSESignificance& operator=(const AliAnalysisTaskSESignificance& source);
81 void SetPDGCodes();
cbedddce 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;}
bb4bb9fc 86 Int_t CheckOrigin(const AliAODMCParticle* mcPart, const TClonesArray* mcArray) const;
f80a6da9 87
196a3266 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);
c135594e 90 void FillDs(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index,Int_t isSel,Int_t optDecay);
5b8639e7 91 void FillDstar(AliAODRecoCascadeHF* dstarD0pi,TClonesArray *arrayMC,Int_t index,Int_t isSel);
196a3266 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);
f80a6da9 94
95
a6003e0a 96 enum {kMaxPtBins=8};
97 enum {kMaxCutVar=10};
cbedddce 98 enum {kMaxSteps=10};
99 enum {kMaxNHist=500000};
5ecc6e9b 100 enum {kDplustoKpipi,kD0toKpi,kDstartoKpipi,kDstoKKpi,kD0toKpipipi,kLambdactopKpi};
cbedddce 101
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
bb4bb9fc 114 Bool_t fUseSelBit; //flag to use selection bit (speed up candidates selection)
33c5731e 115 FeedDownEnum fBFeedDown; //flag to search for D from B decays
cbedddce 116 Int_t fDecChannel; //decay channel identifier
196a3266 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
f80a6da9 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)
c135594e 126 Int_t fDsChannel; // Ds resonant channel selected
5b8639e7 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
f80a6da9 129
bb4bb9fc 130 ClassDef(AliAnalysisTaskSESignificance,5); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates
cbedddce 131};
132
133#endif