AliPhysics  v5-07-15-01 (b3d7633)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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 <THnSparse.h>
21 
22 #include "AliAnalysisTaskSE.h"
23 #include "AliRDHFCutsDstoKKpi.h"
24 #include "AliLog.h"
25 
27 
28 
29 class AliAnalysisTaskSEDs : public AliAnalysisTaskSE
30 {
31  public:
32 
34  AliAnalysisTaskSEDs(const char *name, AliRDHFCutsDstoKKpi* analysiscuts, Int_t fillNtuple=0);
35  virtual ~AliAnalysisTaskSEDs();
36  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
37  void SetWriteOnlySignalInNtuple(Bool_t opt=kTRUE){
38  if(fReadMC) fWriteOnlySignal=opt;
39  else AliError("fReadMC has to be kTRUE");
40  }
41  void SetFillNtuple(Int_t fill=0){fFillNtuple=fill;}
42  void SetFillNSparse(Bool_t fill=kTRUE){fFillSparse=fill;}
43  void SetMassRange(Double_t rang=0.4){fMassRange=rang;}
44  void SetDoCutVarHistos(Bool_t opt=kTRUE) {fDoCutVarHistos=opt;}
45  void SetUseSelectionBit(Bool_t opt=kFALSE){ fUseSelectionBit=opt;}
46  Bool_t CheckDaugAcc(TClonesArray* arrayMC,Int_t nProng, Int_t *labDau);
47  void FillMCGenAccHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader);
48 
49  void SetInvMassBinSize(Double_t binsiz=0.002){fMassBinSize=binsiz;}
50  void SetPtBins(Int_t n, Float_t* lim);
53  virtual void UserCreateOutputObjects();
54  virtual void Init();
55  virtual void LocalInit() {Init();}
56  virtual void UserExec(Option_t *option);
57  virtual void Terminate(Option_t *option);
58 
59  private:
60  Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*4;}
61  Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*4+1;}
62  Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*4+2;}
63  Int_t GetReflSignalHistoIndex(Int_t iPtBin) const { return iPtBin*4+3;}
64 
65  enum {kMaxPtBins=20};
66 
69 
70  TList* fOutput;
71  TH1F* fHistNEvents;
72  TH1F* fChanHist[4];
73  TH1F* fMassHist[4*kMaxPtBins];
78  TH1F* fCosPHist[4*kMaxPtBins];
79  TH1F* fDLenHist[4*kMaxPtBins];
84  TH1F* fDCAHist[4*kMaxPtBins];
88  TH2F* fDalitz[4*kMaxPtBins];
91  TH2F *fPtVsMass;
92  TH2F *fPtVsMassPhi;
93  TH2F *fPtVsMassK0st;
94  TH2F *fYVsPt;
95  TH2F *fYVsPtSig;
96  TH1F *fHistCentrality[3];
98  TNtuple *fNtupleDs;
99  Int_t fFillNtuple;
100 
104 
105  Bool_t fReadMC;
109  Bool_t fFillSparse;
110  UChar_t fNPtBins;
111  TList *fListCuts; //list of cuts
112  Float_t fPtLimits[kMaxPtBins+1];
113  Double_t fMassRange;
114  Double_t fMassBinSize;
115 
118 
119  THnSparseF *fnSparse;
120  THnSparseF *fnSparseIP;
121  THnSparseF *fnSparseMC[4];
122 
128  ClassDef(AliAnalysisTaskSEDs,16);
129 };
131 
132 #endif
133 
134 
virtual void LocalInit()
TH1F * fPtMaxHist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
AliAnalysisTaskSEDs & operator=(const AliAnalysisTaskSEDs &source)
THnSparseF * fnSparseMC[4]
!<!THnSparse for topomatic variable
TH1F * fPtProng1Hist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
void SetInvMassBinSize(Double_t binsiz=0.002)
void SetUseSelectionBit(Bool_t opt=kFALSE)
void SetPtBins(Int_t n, Float_t *lim)
TH2F * fDalitzK0st[4 *kMaxPtBins]
! dalitz plot via K0* (sig,bkg,tot)
Int_t GetHistoIndex(Int_t iPtBin) const
Double_t fMassRange
limits for pt bins
TH2F * fPtVsMass
! hist. of pt vs. mass (prod. cuts)
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)
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)
TH1F * fMassHistPhi[4 *kMaxPtBins]
! hist. of mass spectra via phi (sig,bkg,tot)
THnSparseF * fnSparse
Cuts for Analysis.
TNtuple * fNtupleDs
! output ntuple
TH1F * fHistCentrality[3]
!hist. for cent distr (all,sel ev, )
void SetWriteOnlySignalInNtuple(Bool_t opt=kTRUE)
AliNormalizationCounter * fCounter
bin size for inv. mass histo
TH2F * fHistCentralityMult[3]
!hist. for cent distr vs mult (all,sel ev, )
TH1F * fHistNEvents
! hist. for No. of events
AliRDHFCutsDstoKKpi * fAnalysisCuts
TList * fOutput
! list send on output slot 0
void SetMassRange(Double_t rang=0.4)
THnSparseF * fnSparseIP
!<!THnSparse for candidates on data
Bool_t CheckDaugAcc(TClonesArray *arrayMC, Int_t nProng, Int_t *labDau)
TH2F * fDalitzPhi[4 *kMaxPtBins]
! dalitz plot via phi (sig,bkg,tot)
TH1F * fMassHistKpi[kMaxPtBins]
! hist. of mass spectra of Kpi
TH1F * fPtCandHist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
void FillMCGenAccHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader)
Int_t GetSignalHistoIndex(Int_t iPtBin) const
virtual void UserExec(Option_t *option)
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)
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 SetFillNSparse(Bool_t fill=kTRUE)
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
TH1F * fPtProng2Hist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
void SetAnalysisCuts(AliRDHFCutsDstoKKpi *cuts)
TH2F * fDalitz[4 *kMaxPtBins]
! dalitz plot (sig,bkg,tot)
TH1F * fSigVertHist[4 *kMaxPtBins]
! hist. for sigVert (Prod Cuts)
TH2F * fPtVsMassPhi
! hist. of pt vs. mass (phi selection)
TH1F * fMassHistKK[kMaxPtBins]
! hist. of mass spectra of KK
TH1F * fMassHistK0st[4 *kMaxPtBins]
! hist. of mass spectra via K0* (sig,bkg,tot)
TH2F * fYVsPt
! hist. of Y vs. Pt (prod. cuts)
TH2F * fPtVsMassK0st
! hist. of pt vs. mass (K0* selection)
TList * fListCuts
number of Pt bins
UChar_t fNPtBins
flag for usage of THnSparse
Bool_t fWriteOnlySignal
flag for access to MC
Double_t fMassBinSize
range for mass histogram
Int_t GetBackgroundHistoIndex(Int_t iPtBin) const
Float_t fPtLimits[kMaxPtBins+1]