]>
Commit | Line | Data |
---|---|---|
811e9cbd | 1 | #ifndef ALIANALYSISTASKCOMBINHF_H |
2 | #define ALIANALYSISTASKCOMBINHF_H | |
3 | ||
4 | /* Copyright(c) 1998-2018, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
f2221737 | 7 | /* $Id: $ */ |
811e9cbd | 8 | |
9 | //************************************************************************* | |
10 | // Class AliAnalysisTaskCombinHF | |
11 | // AliAnalysisTaskSE to build D meson candidates by combining tracks | |
12 | // background is computed LS and track rotations is | |
13 | // Authors: F. Prino, A. Rossi | |
14 | ///////////////////////////////////////////////////////////// | |
15 | ||
16 | #include <TH1F.h> | |
17 | #include <TH3F.h> | |
18 | #include <THnSparse.h> | |
19 | #include "AliAnalysisTaskSE.h" | |
20 | #include "AliAODTrack.h" | |
21 | #include "AliNormalizationCounter.h" | |
22 | #include "AliRDHFCuts.h" | |
23 | ||
24 | class AliAnalysisTaskCombinHF : public AliAnalysisTaskSE | |
25 | { | |
f2221737 | 26 | public: |
27 | ||
811e9cbd | 28 | AliAnalysisTaskCombinHF(); |
29 | AliAnalysisTaskCombinHF(Int_t meson, AliRDHFCuts* analysiscuts); | |
30 | virtual ~AliAnalysisTaskCombinHF(); | |
f2221737 | 31 | |
811e9cbd | 32 | virtual void UserCreateOutputObjects(); |
33 | virtual void Init(){}; | |
34 | virtual void LocalInit() {Init();} | |
35 | virtual void UserExec(Option_t *option); | |
36 | virtual void Terminate(Option_t *option); | |
f2221737 | 37 | |
811e9cbd | 38 | void SetReadMC(Bool_t read){fReadMC=read;} |
ebc460de | 39 | void SelectPromptD(){fPromptFeeddown=kPrompt;} |
40 | void SelectFeeddownD(){fPromptFeeddown=kFeeddown;} | |
41 | void SelectPromptAndFeeddownD(){fPromptFeeddown=kBoth;} | |
42 | void SetGoUpToQuark(Bool_t opt){fGoUpToQuark=opt;} | |
a25d1750 | 43 | void SetKeepNegIDtracks(Bool_t nid){fKeepNegID=nid;}//set it to kTRUE only if you know what you are doing |
811e9cbd | 44 | void SetTrackCuts(AliESDtrackCuts* cuts){ |
45 | if(fTrackCutsAll) delete fTrackCutsAll; | |
46 | fTrackCutsAll=new AliESDtrackCuts(*cuts); | |
47 | } | |
48 | void SetPionTrackCuts(AliESDtrackCuts* cuts){ | |
49 | if(fTrackCutsPion) delete fTrackCutsPion; | |
50 | fTrackCutsPion=new AliESDtrackCuts(*cuts); | |
51 | } | |
52 | void SetKaonTrackCuts(AliESDtrackCuts* cuts){ | |
53 | if(fTrackCutsKaon) delete fTrackCutsKaon; | |
54 | fTrackCutsKaon=new AliESDtrackCuts(*cuts); | |
55 | } | |
56 | void SetPIDHF(AliAODPidHF* pid){ | |
57 | if(fPidHF) delete fPidHF; | |
58 | fPidHF=new AliAODPidHF(*pid); | |
59 | } | |
60 | void SetRDHFCuts(AliRDHFCuts* cuts){ | |
61 | fAnalysisCuts=cuts; | |
62 | } | |
f2221737 | 63 | void SetFilterMask(UInt_t mask=16){fFilterMask=mask;} |
811e9cbd | 64 | void SetAnalysisLevel(Int_t level){fFullAnalysis=level;} |
65 | void ConfigureRotation(Int_t n, Double_t phimin, Double_t phimax){ | |
66 | fNRotations=n; | |
67 | fMinAngleForRot=phimin; | |
68 | fMaxAngleForRot=phimax; | |
69 | } | |
f2221737 | 70 | void SetMassWindow(Double_t minMass, Double_t maxMass){fMinMass=minMass; fMaxMass=maxMass;} |
71 | void SetMaxPt(Double_t maxPt){fMaxPt=maxPt;} | |
72 | void SetEtaAccCut(Double_t etacut){fEtaAccCut=etacut;} | |
73 | void SetPtAccCut(Double_t ptcut){fPtAccCut=ptcut;} | |
74 | ||
75 | void SetPIDstrategy(Int_t strat){fPIDstrategy=strat;} | |
76 | void SetMaxPforIDPion(Double_t maxpIdPion){fmaxPforIDPion=maxpIdPion;} | |
77 | void SetMaxPforIDKaon(Double_t maxpIdKaon){fmaxPforIDKaon=maxpIdKaon;} | |
78 | void SetPIDselCaseZero(Int_t strat){fPIDselCaseZero=strat;} | |
79 | void SetBayesThres(Double_t thresKaon, Double_t thresPion){ | |
80 | fBayesThresKaon=thresKaon; | |
81 | fBayesThresPion=thresPion; | |
82 | } | |
83 | ||
811e9cbd | 84 | Bool_t IsTrackSelected(AliAODTrack* track); |
85 | Bool_t IsKaon(AliAODTrack* track); | |
86 | Bool_t IsPion(AliAODTrack* track); | |
87 | Bool_t SelectAODTrack(AliAODTrack *track, AliESDtrackCuts *cuts); | |
f2221737 | 88 | |
811e9cbd | 89 | Bool_t FillHistos(Int_t pdgD,Int_t nProngs, AliAODRecoDecay* tmpRD, Double_t* px, Double_t* py, Double_t* pz, UInt_t *pdgdau, TClonesArray *arrayMC, Int_t* dgLabels); |
90 | void FillLSHistos(Int_t pdgD,Int_t nProngs, AliAODRecoDecay* tmpRD, Double_t* px, Double_t* py, Double_t* pz, UInt_t *pdgdau, Int_t charge); | |
ebc460de | 91 | void FillGenHistos(TClonesArray* arrayMC); |
92 | Bool_t CheckAcceptance(TClonesArray* arrayMC, Int_t nProng, Int_t *labDau); | |
f2221737 | 93 | |
811e9cbd | 94 | enum EMesonSpecies {kDzero, kDplus, kDstar, kDs}; |
ebc460de | 95 | enum EPrompFd {kNone,kPrompt,kFeeddown,kBoth}; |
f2221737 | 96 | enum EPIDstrategy {knSigma, kBayesianMaxProb, kBayesianThres}; |
97 | ||
98 | private: | |
99 | ||
811e9cbd | 100 | AliAnalysisTaskCombinHF(const AliAnalysisTaskCombinHF &source); |
f2221737 | 101 | AliAnalysisTaskCombinHF& operator=(const AliAnalysisTaskCombinHF& source); |
102 | ||
811e9cbd | 103 | TList *fOutput; //! list send on output slot 0 |
ebc460de | 104 | TH1F *fHistNEvents; //!hist. for No. of events |
105 | TH1F *fHistTrackStatus; //!hist. of status of tracks | |
106 | TH1F *fHistCheckOrigin; //!hist. of origin (c/b) of D meson | |
107 | TH1F *fHistCheckOriginSel; //!hist. of origin (c/b) of D meson | |
108 | TH1F *fHistCheckDecChan; //!hist. of decay channel of D meson | |
109 | TH1F *fHistCheckDecChanAcc; //!hist. of decay channel of D meson in acc. | |
110 | TH2F *fPtVsYGen; //! hist. of Y vs. Pt generated (all D) | |
f31ef968 | 111 | TH2F *fPtVsYGenLargeAcc; //! hist. of Y vs. Pt generated (|y|<0.9) |
ebc460de | 112 | TH2F *fPtVsYGenLimAcc; //! hist. of Y vs. Pt generated (|y|<0.5) |
113 | TH2F *fPtVsYGenAcc; //! hist. of Y vs. Pt generated (D in acc) | |
114 | TH2F *fPtVsYReco; //! hist. of Y vs. Pt generated (Reco D) | |
115 | TH3F *fMassVsPtVsY; //! hist. of Y vs. Pt vs. Mass (all cand) | |
811e9cbd | 116 | TH3F *fMassVsPtVsYRot; //! hist. of Y vs. Pt vs. Mass (rotations) |
117 | TH3F *fMassVsPtVsYLSpp; //! hist. of Y vs. Pt vs. Mass (like sign ++) | |
118 | TH3F *fMassVsPtVsYLSmm; //! hist. of Y vs. Pt vs. Mass (like sign --) | |
119 | TH3F *fMassVsPtVsYSig; //! hist. of Y vs. Pt vs. Mass (signal) | |
120 | TH3F *fMassVsPtVsYRefl; //! hist. of Y vs. Pt vs. Mass (reflections) | |
121 | TH3F *fMassVsPtVsYBkg; //! hist. of Y vs. Pt vs. Mass (background) | |
122 | TH1F *fNSelected; //! hist. of n. of selected D+ | |
123 | TH1F *fNormRotated; //! hist. rotated/selected D+ | |
124 | TH1F *fDeltaMass; //! hist. mass difference after rotations | |
125 | THnSparse *fDeltaMassFullAnalysis; //! hist. mass difference after rotations with more details | |
f2221737 | 126 | |
811e9cbd | 127 | UInt_t fFilterMask; // FilterMask |
128 | AliESDtrackCuts* fTrackCutsAll; // track selection | |
129 | AliESDtrackCuts* fTrackCutsPion; // pion track selection | |
130 | AliESDtrackCuts* fTrackCutsKaon; // kaon track selection | |
131 | AliAODPidHF* fPidHF; // PID configuration | |
132 | AliRDHFCuts *fAnalysisCuts; // Cuts for candidates | |
f2221737 | 133 | |
811e9cbd | 134 | Double_t fMinMass; // minimum value of invariant mass |
135 | Double_t fMaxMass; // maximum value of invariant mass | |
f2221737 | 136 | Double_t fMaxPt; // maximum pT value for inv. mass histograms |
ebc460de | 137 | Double_t fEtaAccCut; // eta limits for acceptance step |
138 | Double_t fPtAccCut; // pt limits for acceptance step | |
f2221737 | 139 | |
811e9cbd | 140 | Int_t fNRotations; // number of rotations |
141 | Double_t fMinAngleForRot; // minimum angle for track rotation | |
142 | Double_t fMaxAngleForRot; // maximum angle for track rotation | |
143 | Double_t fMinAngleForRot3; // minimum angle for track rotation (3rd prong) | |
144 | Double_t fMaxAngleForRot3; // maximum angle for track rotation (3rd prong) | |
f2221737 | 145 | |
811e9cbd | 146 | AliNormalizationCounter *fCounter;//!Counter for normalization |
f2221737 | 147 | |
811e9cbd | 148 | Int_t fMeson; // mesonSpecies (see enum) |
ebc460de | 149 | Bool_t fReadMC; // flag for access to MC |
f2221737 | 150 | Int_t fPromptFeeddown; // flag to select prompt (1), feeddown (2) or all (3) |
ebc460de | 151 | Bool_t fGoUpToQuark; // flag for definition of c,b origin |
152 | Int_t fFullAnalysis; // flag to set analysis level (0 is the fastest) | |
f2221737 | 153 | |
154 | Int_t fPIDstrategy; // knSigma, kBayesianMaxProb, kBayesianThres | |
a25d1750 | 155 | Double_t fmaxPforIDPion; // flag for upper p limit for id band for pion |
156 | Double_t fmaxPforIDKaon; // flag for upper p limit for id band for kaon | |
157 | Bool_t fKeepNegID; // flag to keep also track with negative ID (default kFALSE, change it only if you know what you are doing) | |
f2221737 | 158 | Int_t fPIDselCaseZero; // flag to change PID strategy |
159 | Double_t fBayesThresKaon; // threshold for kaon identification via Bayesian PID | |
160 | Double_t fBayesThresPion; // threshold for pion identification via Bayesian PID | |
161 | ||
f31ef968 | 162 | ClassDef(AliAnalysisTaskCombinHF,4); // D0D+ task from AOD tracks |
811e9cbd | 163 | }; |
164 | ||
165 | #endif |