AliPhysics  a56b849 (a56b849)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskCombinHF.h
Go to the documentation of this file.
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 
7 /* $Id: $ */
8 
15 
16 #include <TH1F.h>
17 #include <TH3F.h>
18 #include <TObjString.h>
19 #include <THnSparse.h>
20 #include "AliAnalysisTaskSE.h"
21 #include "AliAODTrack.h"
23 #include "AliRDHFCuts.h"
24 
26 {
27 public:
28 
31  virtual ~AliAnalysisTaskCombinHF();
32 
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);
38  virtual void FinishTaskOutput();
39 
40  void SetReadMC(Bool_t read){fReadMC=read;}
41 
42  void SetEventMixingWithCuts(Double_t maxDeltaVz, Double_t maxDeltaMult){
43  fDoEventMixing=2; fMaxzVertDistForMix=maxDeltaVz; fMaxMultDiffForMix=maxDeltaMult;
44  }
48 
49  void ConfigureZVertPools(Int_t nPools, Double_t* zVertLimits);
50  void ConfigureMultiplicityPools(Int_t nPools, Double_t* multLimits);
55  void SetKeepNegIDtracks(Bool_t nid){fKeepNegID=nid;}//set it to kTRUE only if you know what you are doing
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  }
69  fPhiMassCut=cut;
70  }
73  }
76  }
77  void SetPIDHF(AliAODPidHF* pid){
78  if(fPidHF) delete fPidHF;
79  fPidHF=new AliAODPidHF(*pid);
80  }
81  void SetRDHFCuts(AliRDHFCuts* cuts){
82  fAnalysisCuts=cuts;
83  }
84  void SetFilterMask(UInt_t mask=16){fFilterMask=mask;}
85  void SetAnalysisLevel(Int_t level){fFullAnalysis=level;}
87  fNRotations=n;
89  fMaxAngleForRot=phimax;
90  }
92  fNRotations3=n;
94  fMaxAngleForRot3=phimax;
95  }
97  void SetMaxPt(Double_t maxPt){fMaxPt=maxPt;}
99  void SetEtaAccCut(Double_t etacut){fEtaAccCut=etacut;}
100  void SetPtAccCut(Double_t ptcut){fPtAccCut=ptcut;}
101  void SetMultiplicityRange(Double_t mmin=-0.5, Double_t mmax=199.5){
102  fMinMultiplicity=mmin;
103  fMaxMultiplicity=mmax;
104  }
105 
106  void SetPIDstrategy(Int_t strat){fPIDstrategy=strat;}
107  void SetMaxPforIDPion(Double_t maxpIdPion){fmaxPforIDPion=maxpIdPion;}
108  void SetMaxPforIDKaon(Double_t maxpIdKaon){fmaxPforIDKaon=maxpIdKaon;}
110  void SetBayesThres(Double_t thresKaon, Double_t thresPion){
111  fBayesThresKaon=thresKaon;
112  fBayesThresPion=thresPion;
113  }
114 
115  Bool_t IsTrackSelected(AliAODTrack* track);
116  Bool_t IsKaon(AliAODTrack* track);
117  Bool_t IsPion(AliAODTrack* track);
118  Bool_t SelectAODTrack(AliAODTrack *track, AliESDtrackCuts *cuts);
119 
120  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);
121  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);
122  void FillMEHistos(Int_t pdgD,Int_t nProngs, AliAODRecoDecay* tmpRD, Double_t* px, Double_t* py, Double_t* pz, UInt_t *pdgdau);
123  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);
124  void FillGenHistos(TClonesArray* arrayMC, Bool_t isEvSel);
125  Bool_t CheckAcceptance(TClonesArray* arrayMC, Int_t nProng, Int_t *labDau);
126  Int_t GetPoolIndex(Double_t zvert, Double_t mult);
127  void ResetPool(Int_t poolIndex);
128  void DoMixingWithPools(Int_t poolIndex);
129  void DoMixingWithCuts();
130  Bool_t CanBeMixed(Double_t zv1, Double_t zv2, Double_t mult1, Double_t mult2);
134 
135 private:
136 
139  Double_t ComputeInvMassKK(AliAODTrack* tr1, AliAODTrack* tr2) const;
140 
142  TH1F *fHistNEvents;
146  TH3F* fHistTrackEtaMultZv; // track distribution vs. era z vertex and mult
164  TH1F *fNSelected;
165  TH1F *fNormRotated;
166  TH1F *fDeltaMass;
174  AliESDtrackCuts* fTrackCutsAll;
175  AliESDtrackCuts* fTrackCutsPion;
176  AliESDtrackCuts* fTrackCutsKaon;
178  Double_t fCutCos3PiKPhiRFrame; // cut on the Ds decay angles
179  Double_t fCutCosPiDsLabFrame; // cut on the Ds decay angles
182 
189 
196 
198 
204 
212 
219  Double_t* fzVertPoolLims; //[fNzVertPoolsLimSize] limits of the pools in zVertex
222  Double_t* fMultPoolLims; //[fNMultPoolsLimSize] limits of the pools in multiplicity
225  TObjString* fEventInfo;
232 
234  ClassDef(AliAnalysisTaskCombinHF,13);
235 };
237 
238 #endif
Int_t charge
Double_t fEtaAccCut
width of pt bin (GeV/c)
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)
Bool_t IsTrackSelected(AliAODTrack *track)
void SetMultiplicityRange(Double_t mmin=-0.5, Double_t mmax=199.5)
double Double_t
Definition: External.C:58
Definition: External.C:260
Double_t fMaxzVertDistForMix
maximum number of events to be used in event mixing
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)
Int_t fNzVertPoolsLimSize
number of pools in z vertex for event mixing
TH3F * fMassVsPtVsYMELSpp
! hist. of Y vs. Pt vs. Mass (mixedevents)
Bool_t IsKaon(AliAODTrack *track)
void SetRDHFCuts(AliRDHFCuts *cuts)
Definition: External.C:236
void SetPionTrackCuts(AliESDtrackCuts *cuts)
Bool_t CheckAcceptance(TClonesArray *arrayMC, Int_t nProng, Int_t *labDau)
TH1F * fHistTrackStatus
!hist. of status of tracks
void SetTrackCuts(AliESDtrackCuts *cuts)
AliNormalizationCounter * fCounter
maximum angle for track rotation (3rd prong)
TH3F * fPtVsYVsMultGenAccEvSel
! hist. of Y vs. Pt vs. Mult generated (D in acc, sel ev.)
Bool_t IsPion(AliAODTrack *track)
Int_t fNMultPoolsLimSize
number of pools in multiplicity for event mixing
Double_t fCutCos3PiKPhiRFrame
cut on the KK inv mass for phi selection
void FillMEHistos(Int_t pdgD, Int_t nProngs, AliAODRecoDecay *tmpRD, Double_t *px, Double_t *py, Double_t *pz, UInt_t *pdgdau)
void ConfigureMultiplicityPools(Int_t nPools, Double_t *multLimits)
Double_t fMaxMultiplicity
lower limit for multiplcities in MC histos
TH1F * fNSelected
! hist. of n. of selected D+
TList * fOutput
! list send on output slot 0
Bool_t fReadMC
mesonSpecies (see enum)
TH3F * fMassVsPtVsY
! hist. of Y vs. Pt vs. Mass (all cand)
TH2F * fHistEventMultZvEvSel
!hist. of evnt Mult vs. Zv for selected ev
Double_t fMinAngleForRot
number of rotations
Double_t fPtAccCut
eta limits for acceptance step
void SetCutCosPiDsLabFrame(Double_t cut)
TH3F * fPtVsYVsMultGen
! hist. of Y vs. Pt vs. Mult generated (all D)
Double_t fPtBinWidth
maximum pT value for inv. mass histograms
void SetKaonTrackCuts(AliESDtrackCuts *cuts)
void ConfigureZVertPools(Int_t nPools, Double_t *zVertLimits)
Bool_t fKeepNegID
flag for upper p limit for id band for kaon
TTree ** fEventBuffer
number of pools
Double_t fBayesThresPion
threshold for kaon identification via Bayesian PID
Double_t fMaxPt
maximum value of invariant mass
TH3F * fPtVsYVsMultReco
! hist. of Y vs. Pt vs. Mult generated (Reco D)
Int_t fNRotations3
maximum angle for track rotation
void FillGenHistos(TClonesArray *arrayMC, Bool_t isEvSel)
TH2F * fHistEventMultZv
!hist. of evnt Mult vs. Zv for all events
TH3F * fPtVsYVsMultGenLimAcc
! hist. of Y vs. Pt vs. Mult generated (|y|<0.5)
void SetMassWindow(Double_t minMass, Double_t maxMass)
void SetBayesThres(Double_t thresKaon, Double_t thresPion)
Bool_t CanBeMixed(Double_t zv1, Double_t zv2, Double_t mult1, Double_t mult2)
Double_t fPhiMassCut
kaon track selection
AliAnalysisTaskCombinHF & operator=(const AliAnalysisTaskCombinHF &source)
Int_t fPIDselCaseZero
flag to keep also track with negative ID (default kFALSE, change it only if you know what you are doi...
void SetPtBinWidth(Double_t binw)
TH1F * fHistNEvents
!hist. for No. of events
TH1F * fNormRotated
! hist. rotated/selected D+
TH3F * fMassVsPtVsYLSmm
! hist. of Y vs. Pt vs. Mass (like sign –)
int Int_t
Definition: External.C:63
void SetPIDHF(AliAODPidHF *pid)
unsigned int UInt_t
Definition: External.C:33
Double_t fMaxAngleForRot
minimum angle for track rotation
Int_t GetPoolIndex(Double_t zvert, Double_t mult)
Double_t fMinAngleForRot3
number of rotations (3rd prong)
AliESDtrackCuts * fTrackCutsAll
FilterMask.
AliRDHFCuts * fAnalysisCuts
PID configuration.
void ConfigureRotation(Int_t n, Double_t phimin, Double_t phimax)
void SetMaxPt(Double_t maxPt)
THnSparse * fDeltaMassFullAnalysis
! hist. mass difference after rotations with more details
Int_t fNzVertPools
cut on multiplicity difference for event mixing with cuts
TH3F * fMassVsPtVsYSig
! hist. of Y vs. Pt vs. Mass (signal)
Int_t fFullAnalysis
flag for definition of c,b origin
void SetNumberOfEventsForMixing(Int_t minn)
Double_t * fzVertPoolLims
number of pools in z vertex for event mixing +1
void SetMaxPforIDPion(Double_t maxpIdPion)
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)
void SetEventMixingWithCuts(Double_t maxDeltaVz, Double_t maxDeltaMult)
virtual void UserExec(Option_t *option)
virtual void Terminate(Option_t *option)
Double_t ComputeInvMassKK(AliAODTrack *tr1, AliAODTrack *tr2) const
Double_t fMinMultiplicity
multiplicity
Double_t fMinMass
Cuts for candidates.
Int_t fPIDstrategy
flag to set analysis level (0 is the fastest)
Double_t fVtxZ
unique event Id for event mixing checks
AliESDtrackCuts * fTrackCutsKaon
pion track selection
void SetPtAccCut(Double_t ptcut)
Bool_t fGoUpToQuark
flag to select prompt (1), feeddown (2) or all (3)
Bool_t SelectAODTrack(AliAODTrack *track, AliESDtrackCuts *cuts)
TH1F * fHistCheckDecChanAcc
!hist. of decay channel of D meson in acc.
void SetAnalysisLevel(Int_t level)
Int_t fDoEventMixing
threshold for pion identification via Bayesian PID
TH3F * fPtVsYVsMultGenAcc
! hist. of Y vs. Pt vs. Mult generated (D in acc)
TH3F * fMassVsPtVsYME
! hist. of Y vs. Pt vs. Mass (mixedevents)
void SetEtaAccCut(Double_t etacut)
TH3F * fPtVsYVsMultGenLargeAcc
! hist. of Y vs. Pt vs. Mult generated (|y|<0.9)
Double_t fmaxPforIDKaon
flag for upper p limit for id band for pion
TH2F * fEventsPerPool
! hist with number of events per pool
TH3F * fMassVsPtVsYBkg
! hist. of Y vs. Pt vs. Mass (background)
Double_t minMass
TH2F * fMixingsPerPool
! hist with number of mixings per pool
void SetCutOnCos3PiKPhiRFrame(Double_t cut)
TH3F * fMassVsPtVsYLSpp
! hist. of Y vs. Pt vs. Mass (like sign ++)
void SetMaxPforIDKaon(Double_t maxpIdKaon)
void ConfigureRotation3rdProng(Int_t n, Double_t phimin, Double_t phimax)
Int_t fNumberOfEventsForMixing
flag for event mixing
TObjArray * fPionTracks
array of kaon-compatible tracks (TLorentzVectors)
void DoMixingWithPools(Int_t poolIndex)
Int_t fNRotations
pt limits for acceptance step
const char Option_t
Definition: External.C:48
void SetFilterMask(UInt_t mask=16)
TH1F * fHistCheckOriginSel
!hist. of origin (c/b) of D meson
Double_t fBayesThresKaon
flag to change PID strategy
TH1F * fDeltaMass
! hist. mass difference after rotations
TObjArray * fKaonTracks
upper limit for multiplcities in MC histos
Double_t maxMass
bool Bool_t
Definition: External.C:53
Int_t fPromptFeeddown
flag for access to MC
void SetCutOnKKInvMass(Double_t cut)
Double_t fMaxMultDiffForMix
cut on zvertex distance for event mixing with cuts
Double_t fMaxMass
minimum value of invariant mass
TString meson
TH3F * fMassVsPtVsYMELSmm
! hist. of Y vs. Pt vs. Mass (mixedevents)
TH1F * fHistCheckDecChan
!hist. of decay channel of D meson
Double_t fmaxPforIDPion
knSigma, kBayesianMaxProb, kBayesianThres
TH3F * fMassVsPtVsYRefl
! hist. of Y vs. Pt vs. Mass (reflections)
Double_t * fMultPoolLims
number of pools in multiplicity for event mixing +1
Double_t fMaxAngleForRot3
minimum angle for track rotation (3rd prong)
const Double_t phimin
TH3F * fMassVsPtVsYRot
! hist. of Y vs. Pt vs. Mass (rotations)
TH1F * fHistCheckOrigin
!hist. of origin (c/b) of D meson