AliPhysics  2853087 (2853087)
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"
36 {
37  public:
40  AliAnalysisTaskSEDplus(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts,Int_t fillNtuple=0);
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 SetDoCutVarsSparses(Bool_t doSparse=kTRUE){fDoSparse=doSparse;}
49  void SetDoTrackVarHistos(Bool_t doTrackHist=kTRUE){fDoTrackVarHist=doTrackHist;}
50  void SetDoMCAcceptanceHistos(Bool_t doMCAcc=kTRUE){fStepMCAcc=doMCAcc;}
53  fLowerImpPar=dmin;
54  fHigherImpPar=dmax;
55  }
56  void SetUseStrangeness(Bool_t uses=kTRUE){fUseStrangeness=uses;}
57  void SetMassLimits(Float_t range);
58  void SetMassLimits(Float_t lowlimit, Float_t uplimit);
59  void SetBinWidth(Float_t w);
60  void SetUseBit(Bool_t dols=kTRUE){fUseBit=dols;}
68  void SetCutOnNtracklets(Bool_t applycut=kTRUE, Int_t Ntrckmin=0, Int_t Ntrckmax=100) {
69  fCutOnTrckl=applycut;
70  fNtrcklMin=Ntrckmin;
71  fNtrcklMax=Ntrckmax;
72  }
80  void LSAnalysis(TClonesArray *arrayOppositeSign,TClonesArray *arrayLikeSign,AliAODEvent *aod,AliAODVertex *vtx1, Int_t nDplusOS);
82  void CreateLikeSignHistos();
84  void CreateCutVarsSparses();
85  void CreateTrackVarHistos();
88  Bool_t CheckAcc(TClonesArray* arrayMC,Int_t nProng, Int_t *labDau);
89  void FillMCAcceptanceHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader, Int_t tracklets);
92  virtual void UserCreateOutputObjects();
93  virtual void Init();
94  virtual void LocalInit() {Init();}
95  virtual void UserExec(Option_t *option);
96  virtual void Terminate(Option_t *option);
98  private:
102  Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
103  Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
104  Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
105  Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
106  Float_t GetTrueImpactParameter(const AliAODMCHeader *mcHeader, TClonesArray* arrayMC, const AliAODMCParticle *partDp) const;
107  Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong* d, TClonesArray* arrayMC, Float_t factor[3]) const;
112  TH1F* fHistNEvents;
114  TH1F** fMassHist;
115  TH1F** fMassHistPlus;
116  TH1F** fMassHistMinus;
117  TH1F** fMassHistNoPid;
118  TH1F** fCosPHist;
119  TH1F** fDLenHist;
120  TH1F** fSumd02Hist;
121  TH1F** fSigVertHist;
122  TH1F** fPtMaxHist;
123  TH1F** fPtKHist;
124  TH1F** fPtpi1Hist;
125  TH1F** fPtpi2Hist;
126  TH1F** fDCAHist;
127  TH1F** fDLxy;
128  TH1F** fCosxy;
131  THnSparseF *fHistMassPtImpPar[5];
132  THnSparseF *fSparseCutVars[3];
133  THnSparseF *fHistTrackVar;
134  THnSparseF *fMCAccPrompt;
135  THnSparseF *fMCAccBFeed;
148  TH1F *fSPDMult;
150  TH1F* fDeltaID;
153  TH1F** fMassHistLS;
154  TH1F** fCosPHistLS;
155  TH1F** fDLenHistLS;
156  TH1F** fSumd02HistLS;
157  TH1F** fSigVertHistLS;
158  TH1F** fPtMaxHistLS;
159  TH1F** fDCAHistLS;
161  TNtuple *fNtupleDplus;
171  Bool_t fReadMC;
192  ClassDef(AliAnalysisTaskSEDplus,31);
193 };
196 #endif
THnSparseF * fMCAccPrompt
!histo for StepMCAcc for Dplus prompt (pt,y,ptB)
Bool_t fCutOnTrckl
maximum number of tracklets
TH2F * fPhiEtaCand
! hist. with eta/phi distribution of candidates
TH1F ** fSigVertHist
!hist. for sigVert (topol+PID)
TH1F ** fSumd02HistLS
!hist. for LS cuts variable 3 (topol+PID)
void FillMCAcceptanceHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader, Int_t tracklets)
Bool_t fUseStrangeness
flag for access to MC
void SetUseStrangeness(Bool_t uses=kTRUE)
AliRDHFCutsDplustoKpipi * fRDCutsAnalysis
list of cuts
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Definition: External.C:260
THnSparseF * fHistMassPtImpPar[5]
! histograms for impact parameter
Definition: External.C:236
TH2F * fYVsPtSigNoPid
! hist. of Y vs. Pt (MC, only sig, w/o PID)
TH1F ** fMassHistLS
!hist. for LS inv mass (topol+PID)
Int_t fAODProtection
flag for filling ntuple 0 no NTuple 1 big Ntuple 2 small NTuple
TH2F * fPtVsMassPlus
! hist. of pt vs. mass, D+ candidates (topol+PID cuts)
Bool_t fDoSparse
flag to activate impact paramter histos
void SetImpactParameterBinning(Int_t nbins, Float_t dmin, Float_t dmax)
TH3F * fYVsPt
! hist. of Y vs. Pt vs. Mass (topol+PID cuts)
virtual void Terminate(Option_t *option)
TH1F ** fMassHistMinus
! hist. for D- inv mass (topol+PID cuts)
TH1F ** fSumd02Hist
!hist. for sum d02 (topol+PID)
Int_t fEtaSelection
flag to do LS analysis
Bool_t fDoTrackVarHist
flag to activate sparses for cut variation study
Float_t fLowerImpPar
nunber of bins in impact parameter histos
TH2F * fHistCentrality[3]
!hist. for cent distr (all,sel ev, )
TH1F * fSPDMult
! hist. of spd mult
Int_t GetLSHistoIndex(Int_t iPtBin) const
TH1F ** fCosxy
!hist. for Cosxy (topol+PID)
Int_t GetSignalHistoIndex(Int_t iPtBin) const
THnSparseF * fHistTrackVar
! histograms for track cuts study
TH1F ** fPtpi1Hist
!hist. for PtPi1 (topol+PID)
TH1F ** fDLenHistLS
!hist. for LS cuts variable 2 (topol+PID)
TList * fListCuts
width of one bin in output histos
void SetDoMCAcceptanceHistos(Bool_t doMCAcc=kTRUE)
TH2F * fPtVsMassGoodDaus
! hist. of pt vs. mass (topol+PID cuts)
TList * fOutput
! list send on output slot 0
void SetDoImpactParameterHistos(Bool_t doImp=kTRUE)
Bool_t fCutsDistr
flag to use bitmask
TH1F ** fPtMaxHist
!hist. for Pt Max (topol+PID)
TH1F ** fDCAHistLS
!hist. for LS cuts variable 6 (topol+PID)
void LSAnalysis(TClonesArray *arrayOppositeSign, TClonesArray *arrayLikeSign, AliAODEvent *aod, AliAODVertex *vtx1, Int_t nDplusOS)
Int_t GetBackgroundHistoIndex(Int_t iPtBin) const
void SetCutOnNtracklets(Bool_t applycut=kTRUE, Int_t Ntrckmin=0, Int_t Ntrckmax=100)
void SetUseBit(Bool_t dols=kTRUE)
TH2F * fYVsPtSig
! hist. of Y vs. Pt (MC, only sig, topol+PID cuts)
TH1F ** fPtKHist
!hist. for PtK (topol+PID)
Float_t fHigherImpPar
lower limit in impact parameter (um)
Class for cuts on AOD reconstructed D+->Kpipi.
void SetSystem(Int_t system=0)
int Int_t
Definition: External.C:63
void SetDoLikeSign(Int_t dols=0)
const Bool_t doImp
float Float_t
Definition: External.C:68
TH1F ** fMassHistPlus
! hist. for D+ inv mass (topol+PID cuts)
TH2F * fPtVsMassBadDaus
! hist. of pt vs. mass (topol+PID cuts)
TH2F * fPtVsMass
! hist. of pt vs. mass (topol+PID cuts)
TH1F ** fPtMaxHistLS
!hist. for LS cuts variable 5 (topol+PID)
Int_t fDoLS
higher limit in impact parameter (um)
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 for quark/hadron level identification of prompt and feeddown
void SetCutsDistr(Bool_t cutsDistr=kTRUE)
TH3F * fYVsPtNoPid
! hist. of Y vs. Pt vs. Mass(w/o PID)
Int_t GetHistoIndex(Int_t iPtBin) const
THnSparseF * fMCAccBFeed
!histo for StepMCAcc for Dplus FD (pt,y,ptB)
void SetDoCutVarsSparses(Bool_t doSparse=kTRUE)
TH1F ** fMassHistNoPid
! hist. for inv mass (w/o PID)
TH1F ** fMassHist
! hist. for inv mass (topol+PID cuts)
TH2F * fPtVsMassNoPid
! hist. of pt vs. mass (w/o PID)
Bool_t CheckAcc(TClonesArray *arrayMC, Int_t nProng, Int_t *labDau)
void SetAODMismatchProtection(Int_t opt=1)
TH1F ** fDLenHist
!hist. for Dec Length (topol+PID)
TH1F * fHistNEvents
! hist. for No. of events
Float_t fBinWidth
Number of Pt Bins.
void SetMassLimits(Float_t range)
TH1F ** fCosPHistLS
!hist. for LS cuts variable 1 (topol+PID)
void SetReadMC(Bool_t readMC=kTRUE)
TH1F ** fCosPHist
!hist. for PointingAngle (topol+PID)
TH1F ** fDCAHist
!hist. for DCA (topol+PID)
Int_t fSystem
eta region to accept D+ 0=all, -1 = negative, 1 = positive
TH2F * fCorreld0Kd0pi[3]
!hist. for d0k*d0pi vs. d0k*d0pi (topol+PID)
virtual void UserExec(Option_t *option)
Bool_t fDoImpPar
flag to activate cuts distr histos
AliNormalizationCounter * fCounter
Cuts for Analysis.
Bool_t fUseBit
flag to enhance strangeness in MC to fit to data
const char Option_t
Definition: External.C:48
TH1F ** fDLxy
!hist. for DLxy (topol+PID)
AliAnalysisTaskSEDplus & operator=(const AliAnalysisTaskSEDplus &source)
TH2F * fPtVsMassMinus
! hist. of pt vs. mass, D- candidates (topol+PID cuts)
const Int_t nbins
TH1F ** fSigVertHistLS
!hist. for LS cuts variable 4 (topol+PID)
bool Bool_t
Definition: External.C:53
void SetUseQuarkLevelTag(Bool_t opt)
Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Float_t factor[3]) const
Float_t fLowmasslimit
upper inv mass limit for histos
TH1F * fHistNCandidates
! hist. for No. of candidates
TNtuple * fNtupleDplus
! output ntuple
Bool_t fStepMCAcc
flag to activate track variable cut studies
Int_t fNPtBins
lower inv mass limit for histos
Bool_t fUseQuarkTagInKine
flag to activate histos for StepMCAcc
void SetDoTrackVarHistos(Bool_t doTrackHist=kTRUE)
THnSparseF * fSparseCutVars[3]
! histograms for cut variation study
Int_t fNtrcklMax
minimum number of tracklets
TH1F ** fPtpi2Hist
!hist. for PtPi2 (topol+PID)