]>
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> | |
55e173ac | 18 | #include <TObjString.h> |
811e9cbd | 19 | #include <THnSparse.h> |
20 | #include "AliAnalysisTaskSE.h" | |
21 | #include "AliAODTrack.h" | |
22 | #include "AliNormalizationCounter.h" | |
23 | #include "AliRDHFCuts.h" | |
24 | ||
25 | class AliAnalysisTaskCombinHF : public AliAnalysisTaskSE | |
26 | { | |
f2221737 | 27 | public: |
28 | ||
811e9cbd | 29 | AliAnalysisTaskCombinHF(); |
30 | AliAnalysisTaskCombinHF(Int_t meson, AliRDHFCuts* analysiscuts); | |
31 | virtual ~AliAnalysisTaskCombinHF(); | |
f2221737 | 32 | |
811e9cbd | 33 | virtual void UserCreateOutputObjects(); |
34 | virtual void Init(){}; | |
35 | virtual void LocalInit() {Init();} | |
36 | virtual void UserExec(Option_t *option); | |
37 | virtual void Terminate(Option_t *option); | |
e123a7f7 | 38 | virtual void FinishTaskOutput(); |
f2221737 | 39 | |
811e9cbd | 40 | void SetReadMC(Bool_t read){fReadMC=read;} |
93f0ffc1 | 41 | |
55e173ac | 42 | void SetEventMixingWithCuts(Double_t maxDeltaVz, Double_t maxDeltaMult){ |
43 | fDoEventMixing=2; fMaxzVertDistForMix=maxDeltaVz; fMaxMultDiffForMix=maxDeltaMult; | |
44 | } | |
45 | void SetEventMixingWithPools(){fDoEventMixing=1;} | |
46 | void SetEventMixingOff(){fDoEventMixing=0;} | |
47 | void SetNumberOfEventsForMixing(Int_t minn){fNumberOfEventsForMixing=minn;} | |
664cc8af | 48 | |
93f0ffc1 | 49 | void ConfigureZVertPools(Int_t nPools, Double_t* zVertLimits); |
50 | void ConfigureMultiplicityPools(Int_t nPools, Double_t* multLimits); | |
ebc460de | 51 | void SelectPromptD(){fPromptFeeddown=kPrompt;} |
52 | void SelectFeeddownD(){fPromptFeeddown=kFeeddown;} | |
53 | void SelectPromptAndFeeddownD(){fPromptFeeddown=kBoth;} | |
54 | void SetGoUpToQuark(Bool_t opt){fGoUpToQuark=opt;} | |
a25d1750 | 55 | void SetKeepNegIDtracks(Bool_t nid){fKeepNegID=nid;}//set it to kTRUE only if you know what you are doing |
811e9cbd | 56 | void SetTrackCuts(AliESDtrackCuts* cuts){ |
57 | if(fTrackCutsAll) delete fTrackCutsAll; | |
58 | fTrackCutsAll=new AliESDtrackCuts(*cuts); | |
59 | } | |
60 | void SetPionTrackCuts(AliESDtrackCuts* cuts){ | |
61 | if(fTrackCutsPion) delete fTrackCutsPion; | |
62 | fTrackCutsPion=new AliESDtrackCuts(*cuts); | |
63 | } | |
64 | void SetKaonTrackCuts(AliESDtrackCuts* cuts){ | |
65 | if(fTrackCutsKaon) delete fTrackCutsKaon; | |
66 | fTrackCutsKaon=new AliESDtrackCuts(*cuts); | |
67 | } | |
68 | void SetPIDHF(AliAODPidHF* pid){ | |
69 | if(fPidHF) delete fPidHF; | |
70 | fPidHF=new AliAODPidHF(*pid); | |
71 | } | |
72 | void SetRDHFCuts(AliRDHFCuts* cuts){ | |
73 | fAnalysisCuts=cuts; | |
74 | } | |
f2221737 | 75 | void SetFilterMask(UInt_t mask=16){fFilterMask=mask;} |
811e9cbd | 76 | void SetAnalysisLevel(Int_t level){fFullAnalysis=level;} |
77 | void ConfigureRotation(Int_t n, Double_t phimin, Double_t phimax){ | |
78 | fNRotations=n; | |
79 | fMinAngleForRot=phimin; | |
80 | fMaxAngleForRot=phimax; | |
81 | } | |
f2221737 | 82 | void SetMassWindow(Double_t minMass, Double_t maxMass){fMinMass=minMass; fMaxMass=maxMass;} |
83 | void SetMaxPt(Double_t maxPt){fMaxPt=maxPt;} | |
adf098d9 | 84 | void SetPtBinWidth(Double_t binw){fPtBinWidth=binw;} |
f2221737 | 85 | void SetEtaAccCut(Double_t etacut){fEtaAccCut=etacut;} |
86 | void SetPtAccCut(Double_t ptcut){fPtAccCut=ptcut;} | |
62fe43a2 | 87 | void SetMultiplicityRange(Double_t mmin=-0.5, Double_t mmax=199.5){ |
88 | fMinMultiplicity=mmin; | |
89 | fMaxMultiplicity=mmax; | |
90 | } | |
91 | ||
f2221737 | 92 | void SetPIDstrategy(Int_t strat){fPIDstrategy=strat;} |
93 | void SetMaxPforIDPion(Double_t maxpIdPion){fmaxPforIDPion=maxpIdPion;} | |
94 | void SetMaxPforIDKaon(Double_t maxpIdKaon){fmaxPforIDKaon=maxpIdKaon;} | |
95 | void SetPIDselCaseZero(Int_t strat){fPIDselCaseZero=strat;} | |
96 | void SetBayesThres(Double_t thresKaon, Double_t thresPion){ | |
97 | fBayesThresKaon=thresKaon; | |
98 | fBayesThresPion=thresPion; | |
99 | } | |
100 | ||
811e9cbd | 101 | Bool_t IsTrackSelected(AliAODTrack* track); |
102 | Bool_t IsKaon(AliAODTrack* track); | |
103 | Bool_t IsPion(AliAODTrack* track); | |
104 | Bool_t SelectAODTrack(AliAODTrack *track, AliESDtrackCuts *cuts); | |
f2221737 | 105 | |
811e9cbd | 106 | 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); |
107 | 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); | |
93f0ffc1 | 108 | void FillMEHistos(Int_t pdgD,Int_t nProngs, AliAODRecoDecay* tmpRD, Double_t* px, Double_t* py, Double_t* pz, UInt_t *pdgdau); |
55e173ac | 109 | void FillMEHistosLS(Int_t pdgD,Int_t nProngs, AliAODRecoDecay* tmpRD, Double_t* px, Double_t* py, Double_t* pz, UInt_t *pdgdau, Int_t charge); |
ebc460de | 110 | void FillGenHistos(TClonesArray* arrayMC); |
93f0ffc1 | 111 | Bool_t CheckAcceptance(TClonesArray* arrayMC, Int_t nProng, Int_t *labDau); |
664cc8af | 112 | Int_t GetPoolIndex(Double_t zvert, Double_t mult); |
113 | void ResetPool(Int_t poolIndex); | |
55e173ac | 114 | void DoMixingWithPools(Int_t poolIndex); |
115 | void DoMixingWithCuts(); | |
116 | Bool_t CanBeMixed(Double_t zv1, Double_t zv2, Double_t mult1, Double_t mult2); | |
811e9cbd | 117 | enum EMesonSpecies {kDzero, kDplus, kDstar, kDs}; |
ebc460de | 118 | enum EPrompFd {kNone,kPrompt,kFeeddown,kBoth}; |
f2221737 | 119 | enum EPIDstrategy {knSigma, kBayesianMaxProb, kBayesianThres}; |
120 | ||
121 | private: | |
122 | ||
811e9cbd | 123 | AliAnalysisTaskCombinHF(const AliAnalysisTaskCombinHF &source); |
f2221737 | 124 | AliAnalysisTaskCombinHF& operator=(const AliAnalysisTaskCombinHF& source); |
125 | ||
811e9cbd | 126 | TList *fOutput; //! list send on output slot 0 |
ebc460de | 127 | TH1F *fHistNEvents; //!hist. for No. of events |
128 | TH1F *fHistTrackStatus; //!hist. of status of tracks | |
129 | TH1F *fHistCheckOrigin; //!hist. of origin (c/b) of D meson | |
130 | TH1F *fHistCheckOriginSel; //!hist. of origin (c/b) of D meson | |
131 | TH1F *fHistCheckDecChan; //!hist. of decay channel of D meson | |
132 | TH1F *fHistCheckDecChanAcc; //!hist. of decay channel of D meson in acc. | |
62fe43a2 | 133 | TH3F *fPtVsYVsMultGen; //! hist. of Y vs. Pt vs. Mult generated (all D) |
134 | TH3F *fPtVsYVsMultGenLargeAcc; //! hist. of Y vs. Pt vs. Mult generated (|y|<0.9) | |
135 | TH3F *fPtVsYVsMultGenLimAcc; //! hist. of Y vs. Pt vs. Mult generated (|y|<0.5) | |
136 | TH3F *fPtVsYVsMultGenAcc; //! hist. of Y vs. Pt vs. Mult generated (D in acc) | |
137 | TH3F *fPtVsYVsMultReco; //! hist. of Y vs. Pt vs. Mult generated (Reco D) | |
ebc460de | 138 | TH3F *fMassVsPtVsY; //! hist. of Y vs. Pt vs. Mass (all cand) |
811e9cbd | 139 | TH3F *fMassVsPtVsYRot; //! hist. of Y vs. Pt vs. Mass (rotations) |
140 | TH3F *fMassVsPtVsYLSpp; //! hist. of Y vs. Pt vs. Mass (like sign ++) | |
141 | TH3F *fMassVsPtVsYLSmm; //! hist. of Y vs. Pt vs. Mass (like sign --) | |
142 | TH3F *fMassVsPtVsYSig; //! hist. of Y vs. Pt vs. Mass (signal) | |
143 | TH3F *fMassVsPtVsYRefl; //! hist. of Y vs. Pt vs. Mass (reflections) | |
144 | TH3F *fMassVsPtVsYBkg; //! hist. of Y vs. Pt vs. Mass (background) | |
145 | TH1F *fNSelected; //! hist. of n. of selected D+ | |
146 | TH1F *fNormRotated; //! hist. rotated/selected D+ | |
147 | TH1F *fDeltaMass; //! hist. mass difference after rotations | |
148 | THnSparse *fDeltaMassFullAnalysis; //! hist. mass difference after rotations with more details | |
93f0ffc1 | 149 | TH3F *fMassVsPtVsYME; //! hist. of Y vs. Pt vs. Mass (mixedevents) |
55e173ac | 150 | TH3F *fMassVsPtVsYMELSpp; //! hist. of Y vs. Pt vs. Mass (mixedevents) |
151 | TH3F *fMassVsPtVsYMELSmm; //! hist. of Y vs. Pt vs. Mass (mixedevents) | |
664cc8af | 152 | TH2F* fEventsPerPool; //! hist with number of events per pool |
55e173ac | 153 | TH2F* fMixingsPerPool; //! hist with number of mixings per pool |
811e9cbd | 154 | UInt_t fFilterMask; // FilterMask |
155 | AliESDtrackCuts* fTrackCutsAll; // track selection | |
156 | AliESDtrackCuts* fTrackCutsPion; // pion track selection | |
157 | AliESDtrackCuts* fTrackCutsKaon; // kaon track selection | |
158 | AliAODPidHF* fPidHF; // PID configuration | |
159 | AliRDHFCuts *fAnalysisCuts; // Cuts for candidates | |
f2221737 | 160 | |
811e9cbd | 161 | Double_t fMinMass; // minimum value of invariant mass |
162 | Double_t fMaxMass; // maximum value of invariant mass | |
f2221737 | 163 | Double_t fMaxPt; // maximum pT value for inv. mass histograms |
adf098d9 | 164 | Double_t fPtBinWidth; // width of pt bin (GeV/c) |
ebc460de | 165 | Double_t fEtaAccCut; // eta limits for acceptance step |
166 | Double_t fPtAccCut; // pt limits for acceptance step | |
f2221737 | 167 | |
811e9cbd | 168 | Int_t fNRotations; // number of rotations |
169 | Double_t fMinAngleForRot; // minimum angle for track rotation | |
170 | Double_t fMaxAngleForRot; // maximum angle for track rotation | |
171 | Double_t fMinAngleForRot3; // minimum angle for track rotation (3rd prong) | |
172 | Double_t fMaxAngleForRot3; // maximum angle for track rotation (3rd prong) | |
f2221737 | 173 | |
811e9cbd | 174 | AliNormalizationCounter *fCounter;//!Counter for normalization |
f2221737 | 175 | |
811e9cbd | 176 | Int_t fMeson; // mesonSpecies (see enum) |
ebc460de | 177 | Bool_t fReadMC; // flag for access to MC |
f2221737 | 178 | Int_t fPromptFeeddown; // flag to select prompt (1), feeddown (2) or all (3) |
ebc460de | 179 | Bool_t fGoUpToQuark; // flag for definition of c,b origin |
180 | Int_t fFullAnalysis; // flag to set analysis level (0 is the fastest) | |
f2221737 | 181 | |
182 | Int_t fPIDstrategy; // knSigma, kBayesianMaxProb, kBayesianThres | |
a25d1750 | 183 | Double_t fmaxPforIDPion; // flag for upper p limit for id band for pion |
184 | Double_t fmaxPforIDKaon; // flag for upper p limit for id band for kaon | |
185 | Bool_t fKeepNegID; // flag to keep also track with negative ID (default kFALSE, change it only if you know what you are doing) | |
f2221737 | 186 | Int_t fPIDselCaseZero; // flag to change PID strategy |
187 | Double_t fBayesThresKaon; // threshold for kaon identification via Bayesian PID | |
188 | Double_t fBayesThresPion; // threshold for pion identification via Bayesian PID | |
93f0ffc1 | 189 | |
55e173ac | 190 | Int_t fDoEventMixing; // flag for event mixing |
191 | Int_t fNumberOfEventsForMixing; // maximum number of events to be used in event mixing | |
192 | Double_t fMaxzVertDistForMix; // cut on zvertex distance for event mixing with cuts | |
193 | Double_t fMaxMultDiffForMix; // cut on multiplicity difference for event mixing with cuts | |
93f0ffc1 | 194 | Int_t fNzVertPools; // number of pools in z vertex for event mixing |
86e54d96 | 195 | Int_t fNzVertPoolsLimSize; // number of pools in z vertex for event mixing +1 |
196 | Double_t* fzVertPoolLims; //[fNzVertPoolsLimSize] limits of the pools in zVertex | |
93f0ffc1 | 197 | Int_t fNMultPools; // number of pools in multiplicity for event mixing |
86e54d96 | 198 | Int_t fNMultPoolsLimSize; // number of pools in multiplicity for event mixing +1 |
199 | Double_t* fMultPoolLims; //[fNMultPoolsLimSize] limits of the pools in multiplicity | |
55e173ac | 200 | Int_t fNOfPools; // number of pools |
664cc8af | 201 | TTree** fEventBuffer; //! structure for event mixing |
55e173ac | 202 | TObjString* fEventInfo; // unique event Id for event mixing checks |
93f0ffc1 | 203 | Double_t fVtxZ; // zVertex |
204 | Double_t fMultiplicity; // multiplicity | |
62fe43a2 | 205 | Double_t fMinMultiplicity; // lower limit for multiplcities in MC histos |
206 | Double_t fMaxMultiplicity; // upper limit for multiplcities in MC histos | |
93f0ffc1 | 207 | TObjArray* fKaonTracks; // array of kaon-compatible tracks (TLorentzVectors) |
208 | TObjArray* fPionTracks; // array of pion-compatible tracks (TLorentzVectors) | |
62fe43a2 | 209 | ClassDef(AliAnalysisTaskCombinHF,10); // D0D+ task from AOD tracks |
811e9cbd | 210 | }; |
211 | ||
212 | #endif |