AliPhysics  5dd2c10 (5dd2c10)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Go to the documentation of this file.
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
7 /* $Id$ */
9 //*************************************************************************
17 //*************************************************************************
19 #include <TROOT.h>
20 #include <TSystem.h>
21 #include <TNtuple.h>
22 #include <TH1F.h>
23 #include <TH2F.h>
24 #include <TH3F.h>
25 #include <THnSparse.h>
26 #include <TArrayD.h>
29 #include "AliAnalysisTaskSE.h"
30 #include "AliAnalysisVertexingHF.h"
32 #include "AliAODMCHeader.h"
33 #include "AliAODMCParticle.h"
35 class AliAnalysisTaskSEDplus : public AliAnalysisTaskSE
36 {
37  public:
40  AliAnalysisTaskSEDplus(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts,Bool_t fillNtuple=kFALSE);
41  virtual ~AliAnalysisTaskSEDplus();
43  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
44  void SetDoLikeSign(Int_t dols=0){fDoLS=dols;}
45  void SetSystem(Int_t system=0){fSystem=system;}
46  void SetCutsDistr(Bool_t cutsDistr=kTRUE){fCutsDistr=cutsDistr;}
48  void SetDoMCAcceptanceHistos(Bool_t doMCAcc=kTRUE){fStepMCAcc=doMCAcc;}
49  void SetImpactParameterBinning(Int_t nbins, Float_t dmin, Float_t dmax){
51  fLowerImpPar=dmin;
52  fHigherImpPar=dmax;
53  }
54  void SetUseStrangeness(Bool_t uses=kTRUE){fUseStrangeness=uses;}
55  void SetMassLimits(Float_t range);
56  void SetMassLimits(Float_t lowlimit, Float_t uplimit);
57  void SetBinWidth(Float_t w);
58  void SetUseBit(Bool_t dols=kTRUE){fUseBit=dols;}
64  Float_t GetUpperMassLimit(){return fUpmasslimit;}
65  Float_t GetLowerMassLimit(){return fLowmasslimit;}
66  Int_t GetNBinsPt(){return fNPtBins;}
67  Float_t GetBinWidth(){return fBinWidth;}
68  Int_t GetNBinsHistos();
70  void LSAnalysis(TClonesArray *arrayOppositeSign,TClonesArray *arrayLikeSign,AliAODEvent *aod,AliAODVertex *vtx1, Int_t nDplusOS);
72  void CreateLikeSignHistos();
76  Bool_t CheckAcc(TClonesArray* arrayMC,Int_t nProng, Int_t *labDau);
77  void FillMCAcceptanceHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader);
80  virtual void UserCreateOutputObjects();
81  virtual void Init();
82  virtual void LocalInit() {Init();}
83  virtual void UserExec(Option_t *option);
84  virtual void Terminate(Option_t *option);
86  private:
90  Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
91  Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
92  Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
93  Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
94  Float_t GetTrueImpactParameter(const AliAODMCHeader *mcHeader, TClonesArray* arrayMC, const AliAODMCParticle *partDp) const;
95  Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong* d, TClonesArray* arrayMC, Float_t factor[3]) const;
97  enum {kMaxPtBins=20};
99  TList *fOutput;
100  TH1F *fHistNEvents;
107  TH1F *fPtKHist[3*kMaxPtBins];
110  TH1F *fDCAHist[3*kMaxPtBins];
111  TH1F *fDLxy[3*kMaxPtBins];
112  TH1F *fDLxyTC[3*kMaxPtBins];
113  TH1F *fCosxy[3*kMaxPtBins];
114  TH1F *fCosxyTC[3*kMaxPtBins];
126  TH2F *fCorreld0Kd0pi[3];
127  TH2F *fHistCentrality[3];
128  THnSparseF *fHistMassPtImpParTC[5];
129  THnSparseF *fMCAccPrompt;
130  THnSparseF *fMCAccBFeed;
131  TH2F *fPtVsMass;
132  TH2F *fPtVsMassTC;
133  TH3F *fYVsPt;
134  TH3F *fYVsPtTC;
135  TH2F *fYVsPtSig;
136  TH2F *fYVsPtSigTC;
137  TH2F *fPhiEtaCand;
139  TH1F *fSPDMult;
140  TNtuple *fNtupleDplus;
141  Float_t fUpmasslimit;
142  Float_t fLowmasslimit;
143  Int_t fNPtBins;
144  Float_t fBinWidth;
145  TList *fListCuts;
149  Bool_t fFillNtuple;
150  Bool_t fReadMC;
152  Bool_t fUseBit;
153  Bool_t fCutsDistr;
154  Bool_t fDoImpPar;
155  Bool_t fStepMCAcc;
156  Int_t fNImpParBins;
157  Float_t fLowerImpPar;
158  Float_t fHigherImpPar;
159  Int_t fDoLS;
161  Int_t fSystem;
164  ClassDef(AliAnalysisTaskSEDplus,22);
165 };
168 #endif
TH1F * fCosxy[3 *kMaxPtBins]
!hist. for Cosxy (LC)
THnSparseF * fMCAccPrompt
!histo for StepMCAcc for Dplus prompt (pt,y,ptB)
TH2F * fPhiEtaCand
! hist. with eta/phi distribution of candidates
Bool_t fUseStrangeness
flag for access to MC
TH1F * fSigVertHist[3 *kMaxPtBins]
!hist. for sigVert (LC)
void SetUseStrangeness(Bool_t uses=kTRUE)
AliRDHFCutsDplustoKpipi * fRDCutsAnalysis
list of cuts
virtual void UserCreateOutputObjects()
Implementation of interface methods.
TH1F * fPtpi1Hist[3 *kMaxPtBins]
!hist. for PtPi1 (LC)
void SetImpactParameterBinning(Int_t nbins, Float_t dmin, Float_t dmax)
TH3F * fYVsPt
! hist. of Y vs. Pt vs. Mass(prod. cuts)
virtual void Terminate(Option_t *option)
TH1F * fMassHistTC[3 *kMaxPtBins]
!hist. for inv mass (TC)
TH1F * fDLxy[3 *kMaxPtBins]
!hist. for DLxy (LC)
Int_t fEtaSelection
flag to do LS analysis
Float_t fLowerImpPar
nunber of bins in impact parameter histos
TH2F * fHistCentrality[3]
!hist. for cent distr (all,sel ev, )
TH1F * fPtMaxHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 5 (LC)
TH1F * fSPDMult
! hist. of spd mult
Bool_t fReadMC
flag for filling ntuple
Int_t GetLSHistoIndex(Int_t iPtBin) const
TH1F * fMassHistLSTC[5 *kMaxPtBins]
!hist. for LS inv mass (TC)
Int_t GetSignalHistoIndex(Int_t iPtBin) const
TList * fListCuts
width of one bin in output histos
void SetDoMCAcceptanceHistos(Bool_t doMCAcc=kTRUE)
TList * fOutput
! list send on output slot 0
void SetDoImpactParameterHistos(Bool_t doImp=kTRUE)
Bool_t fCutsDistr
flag to use bitmask
void LSAnalysis(TClonesArray *arrayOppositeSign, TClonesArray *arrayLikeSign, AliAODEvent *aod, AliAODVertex *vtx1, Int_t nDplusOS)
Int_t GetBackgroundHistoIndex(Int_t iPtBin) const
TH1F * fCosPHist[3 *kMaxPtBins]
!hist. for PointingAngle (LC)
TH2F * fPtVsMassTC
! hist. of pt vs. mass (analysis cuts)
void SetUseBit(Bool_t dols=kTRUE)
TH2F * fYVsPtSig
! hist. of Y vs. Pt (MC, only sig, prod. cuts)
THnSparseF * fHistMassPtImpParTC[5]
! histograms for impact parameter and cut variation study
Float_t fHigherImpPar
lower limit in impact parameter (um)
Class for cuts on AOD reconstructed D+->Kpipi.
TH1F * fMassHistLS[5 *kMaxPtBins]
!hist. for LS inv mass (LC)
void SetSystem(Int_t system=0)
TH1F * fSumd02Hist[3 *kMaxPtBins]
!hist. for sum d02 (LC)
void SetDoLikeSign(Int_t dols=0)
void FillMCAcceptanceHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader)
! hist. of Y vs. Pt vs. Mass (analysis cuts)
TH1F * fMassHistTCPlus[3 *kMaxPtBins]
!hist. for D+ inv mass (TC)
TH2F * fPtVsMass
! hist. of pt vs. mass (prod. cuts)
const Bool_t doImp
Int_t fDoLS
higher limit in impact parameter (um)
TH1F * fPtpi2Hist[3 *kMaxPtBins]
!hist. for PtPi2 (LC)
TH2F * fPhiEtaCandSigReg
! hist. eta/phi of candidates in D+ mass region
Float_t GetTrueImpactParameter(const AliAODMCHeader *mcHeader, TClonesArray *arrayMC, const AliAODMCParticle *partDp) const
Int_t fNImpParBins
flag to activate histos for StepMCAcc
void SetCutsDistr(Bool_t cutsDistr=kTRUE)
TH1F * fDLenHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 2 (LC)
Int_t GetHistoIndex(Int_t iPtBin) const
THnSparseF * fMCAccBFeed
!histo for StepMCAcc for Dplus FD (pt,y,ptB)
TH1F * fMassHist[3 *kMaxPtBins]
!hist. for inv mass (LC)
Bool_t fFillNtuple
limits for the Pt bins
Bool_t CheckAcc(TClonesArray *arrayMC, Int_t nProng, Int_t *labDau)
TH1F * fSumd02HistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 3 (LC)
TH1F * fHistNEvents
!hist. for No. of events
TH1F * fCosPHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 1 (LC)
TH1F * fPtKHist[3 *kMaxPtBins]
!hist. for PtK (LC)
Float_t fBinWidth
Number of Pt Bins.
void SetMassLimits(Float_t range)
TH2F * fYVsPtSigTC
! hist. of Y vs. Pt (MC, only sig, analysis cuts)
void SetReadMC(Bool_t readMC=kTRUE)
TH1F * fDLxyTC[3 *kMaxPtBins]
!hist. for DLxy (TC)
Int_t fSystem
eta region to accept D+ 0=all, -1 = negative, 1 = positive
TH2F * fCorreld0Kd0pi[3]
!hist. for d0k*d0pi vs. d0k*d0pi (LC)
virtual void UserExec(Option_t *option)
TH1F * fDLenHist[3 *kMaxPtBins]
!hist. for Dec Length (LC)
Bool_t fDoImpPar
flag to activate cuts distr histos
AliNormalizationCounter * fCounter
Cuts for Analysis.
TH1F * fSigVertHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 4 (LC)
Bool_t fUseBit
flag to enhance strangeness in MC to fit to data
Double_t fArrayBinLimits[kMaxPtBins+1]
AliAnalysisTaskSEDplus & operator=(const AliAnalysisTaskSEDplus &source)
const Int_t nbins
Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Float_t factor[3]) const
TH1F * fDCAHist[3 *kMaxPtBins]
!hist. for DCA (LC)
Float_t fLowmasslimit
upper inv mass limit for histos
TH1F * fCosxyTC[3 *kMaxPtBins]
!hist. for Cosxy (TC)
TNtuple * fNtupleDplus
! output ntuple
Bool_t fStepMCAcc
flag to activate impact paramter histos
Int_t fNPtBins
lower inv mass limit for histos
TH1F * fMassHistTCMinus[3 *kMaxPtBins]
!hist. for D- inv mass (TC)
TH1F * fDCAHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 6 (LC)
TH1F * fPtMaxHist[3 *kMaxPtBins]
!hist. for Pt Max (LC)