AliPhysics  aaf9c62 (aaf9c62)
AliAnalysisTaskSEDs.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKDS_H
2 #define ALIANALYSISTASKDS_H
3 
4 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
15 
16 #include <TROOT.h>
17 #include <TSystem.h>
18 #include <TH1F.h>
19 #include <TH2F.h>
20 #include <TH3F.h>
21 #include <THnSparse.h>
22 
23 #include "AliAnalysisTaskSE.h"
24 #include "AliRDHFCutsDstoKKpi.h"
25 #include "AliLog.h"
26 
28 
29 
31 {
32  public:
33 
35 
37  AliAnalysisTaskSEDs(const char *name, AliRDHFCutsDstoKKpi* analysiscuts, Int_t fillNtuple=0);
38  virtual ~AliAnalysisTaskSEDs();
39  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
42  else AliError("fReadMC has to be kTRUE");
43  }
44  void SetFillNtuple(Int_t fill=0){fFillNtuple=fill;}
45  void SetFillNSparse(Bool_t fill=kTRUE){fFillSparse=fill;}
46  void SetFillNSparseDplus(Bool_t fill=kTRUE){fFillSparseDplus=fill;if(fill)fFillSparse=fill;}
49  void SetMassRange(Double_t rang=0.4){fMassRange=rang;}
53  void SetUseRotBkg(Bool_t flag=kFALSE) {fDoRotBkg=flag;}
54  void SetUseBkgFromPhiSB(Bool_t flag=kFALSE) {fDoBkgPhiSB=flag;}
57  void SetFillTracklets(Bool_t flag) {fUseTrkl=flag;}
58  void SetFillCentralityAxis(Int_t flag=0);
59  Bool_t CheckDaugAcc(TClonesArray* arrayMC,Int_t nProng, Int_t *labDau);
60  Bool_t GetUseWeight() const {return fUseWeight;}
61  void FillMCGenAccHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader, Double_t nTracklets);
62  void GenerateRotBkg(AliAODRecoDecayHF3Prong *d, Int_t dec, Int_t iPtBin);
65  void CreateIPSparse();
66  Float_t GetTrueImpactParameterDstoPhiPi(const AliAODMCHeader *mcHeader, TClonesArray* arrayMC, const AliAODMCParticle *partDs) const;
67 
74 
75  void SetInvMassBinSize(Double_t binsiz=0.002){fMassBinSize=binsiz;}
76  void SetPtBins(Int_t n, Float_t* lim);
78  void SetSystem(Int_t system){fSystem = system;}
79 
81 
83 
85  virtual void UserCreateOutputObjects();
86  virtual void Init();
87  virtual void LocalInit() {Init();}
88  virtual void UserExec(Option_t *option);
89  virtual void Terminate(Option_t *option);
90 
91  private:
92  Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*4;}
93  Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*4+1;}
94  Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*4+2;}
95  Int_t GetReflSignalHistoIndex(Int_t iPtBin) const { return iPtBin*4+3;}
96 
98 
101 
103  TH1F* fHistNEvents;
104  TH1F* fHistoPtWeight; //-> user-defined histogram to calculate the Pt weights
105  TH1F* fChanHist[4];
123  TH1F* fDCAHist[4*kMaxPtBins];
140  TH1F *fHistCentrality[3];
155  TNtuple *fNtupleDs;
161 
181  UChar_t fNPtBins;
183  TList *fListCuts; //list of cuts
190 
191 
194 
195  THnSparseF *fnSparse;
196  THnSparseF *fnSparseIP;
197  THnSparseF *fnSparseMC[4];
198  THnSparseF *fnSparseMCDplus[4];
203  THnSparseF *fImpParSparse;
204  THnSparseF *fImpParSparseMC[4];
205 
208 
210  ClassDef(AliAnalysisTaskSEDs,27);
211 };
213 
214 #endif
215 
216 
virtual void LocalInit()
THnSparseF * fnSparseMCDplus[4]
TH1F * fPtMaxHist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
AliAnalysisTaskSEDs & operator=(const AliAnalysisTaskSEDs &source)
void SetFillNSparseDplus(Bool_t fill=kTRUE)
THnSparseF * fnSparseMC[4]
!<!THnSparse for topomatic variable
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
TH1F * fPtProng1Hist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
void SetUseRotBkg(Bool_t flag=kFALSE)
TH3F * fCosPxyHist3D
! cosPxy vs Ds mass vs pt
TH1F * fDLenxyHist[4 *kMaxPtBins]
! hist. of norm decay length XY (sig,bkg,tot)
void SetInvMassBinSize(Double_t binsiz=0.002)
TH1F * fNormIPHist[4 *kMaxPtBins]
! hist. for topomatic variable
TH3F * fPtProng1Hist3D
! Pt prong1 vs Ds mass vs pt
void SetUseSelectionBit(Bool_t opt=kFALSE)
void SetPtBins(Int_t n, Float_t *lim)
TH1F * fNDLenxyHist[4 *kMaxPtBins]
! hist. of decay length XY (sig,bkg,tot)
TH2F * fDalitzK0st[4 *kMaxPtBins]
! dalitz plot via K0* (sig,bkg,tot)
Bool_t fFillSparseDplus
flag for usage of THnSparse
Int_t GetHistoIndex(Int_t iPtBin) const
void SetSystem(Int_t system)
THnSparseF * fImpParSparse
!<!THnSparse for MC for D+->kkpi
TH3F * fSigVertHist3D
! SigVert vs Ds mass vs pt
Double_t fMassRange
limits for pt bins
TH2F * fPtVsMass
! hist. of pt vs. mass (prod. cuts)
void SetFillCentralityAxis(Int_t flag=0)
TH1F * fPtProng0Hist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
void SetFillNtuple(Int_t fill=0)
TH2F * fYVsPtSig
! hist. of Y vs. Pt (MC, only sig, prod. cuts)
THnSparseF * fImpParSparseMC[4]
!<!THnSparse for imp. par. on data
Float_t GetTrueImpactParameterDstoPhiPi(const AliAODMCHeader *mcHeader, TClonesArray *arrayMC, const AliAODMCParticle *partDs) const
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Bool_t fFillSparse
flag for usage of HasSelectionBit
TH1F * fSumd02Hist[4 *kMaxPtBins]
! hist. for sum d02 (Prod Cuts)
TH3F * fCosPiKPhiHist3D
! cosPiKPhi vs Ds mass vs pt
TH1F * fMassHistPhi[4 *kMaxPtBins]
! hist. of mass spectra via phi (sig,bkg,tot)
TH1F * fCosPiKPhiHist[4 *kMaxPtBins]
! hist. for CosPiKPhi
Bool_t fDoBkgPhiSB
flag to create rotational bkg (rotating pi track)
THnSparseF * fnSparse
Cuts for Analysis.
TNtuple * fNtupleDs
! output ntuple
void SetFillNSparseAcceptanceLevel(Bool_t fill=kTRUE)
TH1F * fMassRotBkgHistPhi[kMaxPtBins]
! hist. of bkg generated from rot. of the pion
void GenerateRotBkg(AliAODRecoDecayHF3Prong *d, Int_t dec, Int_t iPtBin)
Bool_t fDoRotBkg
flag for filling true reconstructed Ds at acceptance level (see FillMCGenAccHistos) ...
TH3F * fPtProng0Hist3D
! Pt prong0 vs Ds mass vs pt
TH1F * fHistCentrality[3]
!hist. for cent distr (all,sel ev, )
void SetPtWeightsFromFONLL5anddataoverLHC16i2a()
TH3F * fDCAHist3D
! DCA vs Ds mass vs pt
int Int_t
Definition: External.C:63
TH3F * fCosPHist3D
! cosP vs Ds mass vs pt
void SetWriteOnlySignalInNtuple(Bool_t opt=kTRUE)
AliNormalizationCounter * fCounter
flag to set mass window of phi meson (when using pion rotation to create bkg)
float Float_t
Definition: External.C:68
TH2F * fHistCentralityMult[3]
!hist. for cent distr vs mult (all,sel ev, )
TH1F * fHistNEvents
! hist. for No. of events
Double_t GetPtWeightFromHistogram(Double_t pt)
AliRDHFCutsDstoKKpi * fAnalysisCuts
TList * fOutput
! list send on output slot 0
void SetPhiMassRange4RotBkg(Double_t range)
TH2F * fHistAllV0multNTPCout
! histo for V0mult vs #tracks TPCout (all)
Bool_t fUseTrkl
flag to decide whether to use pt-weights != 1 when filling the container or not
TH1F * fCosPxyHist[4 *kMaxPtBins]
! hist. of cosXY pointing angle (sig,bkg,tot)
void SetPtWeightsFromFONLL5andTAMUoverLHC16i2abc()
void SetMassRange(Double_t rang=0.4)
THnSparseF * fnSparseIP
!<!THnSparse for candidates on data
TH3F * fPtProng2Hist3D
! Pt prong2 vs Ds mass vs pt
Bool_t CheckDaugAcc(TClonesArray *arrayMC, Int_t nProng, Int_t *labDau)
see enum
TH2F * fDalitzPhi[4 *kMaxPtBins]
! dalitz plot via phi (sig,bkg,tot)
TH2F * fHistSelV0multNTPCout
! histo for V0mult vs #tracks TPCout (sel)
TH3F * fDLenHist3D
! Dlen vs Ds mass vs pt
TH1F * fMassHistKpi[kMaxPtBins]
! hist. of mass spectra of Kpi
TH1F * fMassRSBkgHistPhi[kMaxPtBins]
! hist. of bkg generated from right phi sideband + pion
TH3F * fNormIPHist3D
! nIP vs Ds mass vs pt
TH1F * fPtCandHist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
Bool_t fReadMC
0 = pp, 1 = pPb,PbPb
Int_t fAODProtection
flag to fill sparse with Ntracklets
TH1F * fCosPiDsHist[4 *kMaxPtBins]
! hist. for CosPiDs
Int_t GetSignalHistoIndex(Int_t iPtBin) const
TH1F * fMassLSBkgHistPhi[kMaxPtBins]
! hist. of bkg generated from left phi sideband + pion
virtual void UserExec(Option_t *option)
void SetFillTracklets(Bool_t flag)
Int_t GetReflSignalHistoIndex(Int_t iPtBin) const
virtual void Terminate(Option_t *option)
TH1F * fCosPHist[4 *kMaxPtBins]
! hist. of cos pointing angle (sig,bkg,tot)
TString fCentEstName
name of the AliMultSelection object to be considered
TH3F * fDLenxyHist3D
! Dlenxy vs Ds mass vs pt
Bool_t fFillImpParSparse
flag for usage of THnSparse
Bool_t fDoCutV0multTPCout
flag to create bkg from phi sidebands
void SetFillNSparseImpPar(Bool_t fill=kTRUE)
Bool_t fUseWeight
flag to activate cut on V0mult vs #tracks TPCout
void SetUseBkgFromPhiSB(Bool_t flag=kFALSE)
TH1F * fDLenHist[4 *kMaxPtBins]
! hist. of decay length (sig,bkg,tot)
void SetReadMC(Bool_t readMC=kTRUE)
Bool_t fUseSelectionBit
flag to create and fill histos with distributions of cut variables
void SetUseCutV0multVsTPCout(Bool_t flag)
void SetFillNSparse(Bool_t fill=kTRUE)
const char Option_t
Definition: External.C:48
void SetDoCutVarHistos(Bool_t opt=kTRUE)
TH1F * fChanHist[4]
! hist. with KKpi and piKK candidates (sig,bkg,tot)
TH1F * fMassHist[4 *kMaxPtBins]
! hist. of mass spectra (sig,bkg,tot)
TH1F * fDCAHist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
Bool_t fDoCutVarHistos
flag to control ntuple writing in MC
Bool_t GetUseWeight() const
TH1F * fPtProng2Hist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
bool Bool_t
Definition: External.C:53
void SetAODMismatchProtection(Int_t opt=1)
void SetAnalysisCuts(AliRDHFCutsDstoKKpi *cuts)
void SetPtWeightsFromFONLL5andBAMPSoverLHC16i2abc()
void FillMCGenAccHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader, Double_t nTracklets)
TH2F * fDalitz[4 *kMaxPtBins]
! dalitz plot (sig,bkg,tot)
TH1F * fSigVertHist[4 *kMaxPtBins]
! hist. for sigVert (Prod Cuts)
TH3F * fNDLenxyHist3D
! NDlenxy vs Ds mass vs pt
TH2F * fPtVsMassPhi
! hist. of pt vs. mass (phi selection)
TH1F * fMassHistKK[kMaxPtBins]
! hist. of mass spectra of KK
void SetMultSelectionObjectName(TString str)
TH1F * fMassHistK0st[4 *kMaxPtBins]
! hist. of mass spectra via K0* (sig,bkg,tot)
TH2F * fYVsPt
! hist. of Y vs. Pt (prod. cuts)
Bool_t fFillAcceptanceLevel
flag for usage of sparse for imp. parameter
TString fMultSelectionObjectName
!<!THnSparse for imp. par. on MC
TH2F * fPtVsMassK0st
! hist. of pt vs. mass (K0* selection)
TList * fListCuts
number of Pt bins
UChar_t fNPtBins
-1: no protection, 0: check AOD/dAOD nEvents only, 1: check AOD/dAOD nEvents + TProcessID names ...
Bool_t fWriteOnlySignal
flag for access to MC
TH3F * fCosPiDsHist3D
! cosPiDs vs Ds mass vs pt
Double_t fMassBinSize
range for mass histogram
Double_t fminMass
bin size for inv. mass histo
Int_t GetBackgroundHistoIndex(Int_t iPtBin) const
Float_t fPtLimits[kMaxPtBins+1]