AliPhysics  251aa1e (251aa1e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSEDplus.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSEDPLUS_H
2 #define ALIANALYSISTASKSEDPLUS_H
3 
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
9 //*************************************************************************
17 //*************************************************************************
18 
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>
27 
29 #include "AliAnalysisTaskSE.h"
30 #include "AliAnalysisVertexingHF.h"
32 #include "AliAODMCHeader.h"
33 #include "AliAODMCParticle.h"
34 
36 {
37  public:
38 
40  AliAnalysisTaskSEDplus(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts,Int_t fillNtuple=0);
41  virtual ~AliAnalysisTaskSEDplus();
42 
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;}
62 
67 
73 
74  void LSAnalysis(TClonesArray *arrayOppositeSign,TClonesArray *arrayLikeSign,AliAODEvent *aod,AliAODVertex *vtx1, Int_t nDplusOS);
75 
76  void CreateLikeSignHistos();
78  void CreateCutVarsSparses();
79  void CreateTrackVarHistos();
81 
82  Bool_t CheckAcc(TClonesArray* arrayMC,Int_t nProng, Int_t *labDau);
83  void FillMCAcceptanceHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader);
84 
86  virtual void UserCreateOutputObjects();
87  virtual void Init();
88  virtual void LocalInit() {Init();}
89  virtual void UserExec(Option_t *option);
90  virtual void Terminate(Option_t *option);
91 
92  private:
93 
96  Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
97  Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
98  Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
99  Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
100  Float_t GetTrueImpactParameter(const AliAODMCHeader *mcHeader, TClonesArray* arrayMC, const AliAODMCParticle *partDp) const;
101  Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong* d, TClonesArray* arrayMC, Float_t factor[3]) const;
102 
103  enum {kMaxPtBins=20};
105 
107  TH1F *fHistNEvents;
115  TH1F *fPtKHist[3*kMaxPtBins];
118  TH1F *fDCAHist[3*kMaxPtBins];
119  TH1F *fDLxy[3*kMaxPtBins];
120  TH1F *fCosxy[3*kMaxPtBins];
133  THnSparseF *fHistMassPtImpPar[5];
134  THnSparseF *fSparseCutVars[3];
135  THnSparseF *fHistTrackVar;
136  THnSparseF *fMCAccPrompt;
137  THnSparseF *fMCAccBFeed;
148  TH1F *fSPDMult;
150  TH1F* fDeltaID;
152  TNtuple *fNtupleDplus;
163  Bool_t fReadMC;
179 
181  ClassDef(AliAnalysisTaskSEDplus,29);
182 };
184 
185 #endif
TH1F * fCosxy[3 *kMaxPtBins]
!hist. for Cosxy (topol+PID)
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 (topol+PID)
void SetUseStrangeness(Bool_t uses=kTRUE)
AliRDHFCutsDplustoKpipi * fRDCutsAnalysis
list of cuts
virtual void UserCreateOutputObjects()
Implementation of interface methods.
double Double_t
Definition: External.C:58
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 * fPtpi1Hist[3 *kMaxPtBins]
!hist. for PtPi1 (topol+PID)
Int_t fAODProtection
flag for filling ntuple 0 no NTuple 1 big Ntuple 2 small NTuple
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 * fDLxy[3 *kMaxPtBins]
!hist. for DLxy (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 * fPtMaxHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 5 (topol+PID)
TH1F * fSPDMult
! hist. of spd mult
Int_t GetLSHistoIndex(Int_t iPtBin) const
Int_t GetSignalHistoIndex(Int_t iPtBin) const
THnSparseF * fHistTrackVar
! histograms for track cuts study
TH1F * fMassHistNoPid[3 *kMaxPtBins]
!hist. for inv mass (w/o 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
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 (topol+PID)
void SetUseBit(Bool_t dols=kTRUE)
TH2F * fYVsPtSig
! hist. of Y vs. Pt (MC, only sig, topol+PID cuts)
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 (topol+PID)
void SetSystem(Int_t system=0)
int Int_t
Definition: External.C:63
Int_t fFillNtuple
limits for the Pt bins
TH1F * fSumd02Hist[3 *kMaxPtBins]
!hist. for sum d02 (topol+PID)
void SetDoLikeSign(Int_t dols=0)
float Float_t
Definition: External.C:68
void FillMCAcceptanceHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader)
TH1F * fMassHistPlus[3 *kMaxPtBins]
!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)
const Bool_t doImp
Int_t fDoLS
higher limit in impact parameter (um)
TH1F * fPtpi2Hist[3 *kMaxPtBins]
!hist. for PtPi2 (topol+PID)
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)
TH1F * fDLenHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 2 (topol+PID)
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)
TH1F * fMassHist[3 *kMaxPtBins]
!hist. for inv mass (topol+PID cuts)
void SetDoCutVarsSparses(Bool_t doSparse=kTRUE)
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 * fSumd02HistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 3 (topol+PID)
TH1F * fHistNEvents
!hist. for No. of events
TH1F * fCosPHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 1 (topol+PID)
TH1F * fPtKHist[3 *kMaxPtBins]
!hist. for PtK (topol+PID)
Float_t fBinWidth
Number of Pt Bins.
void SetMassLimits(Float_t range)
void SetReadMC(Bool_t readMC=kTRUE)
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)
TH1F * fDLenHist[3 *kMaxPtBins]
!hist. for Dec Length (topol+PID)
Bool_t fDoImpPar
flag to activate cuts distr histos
AliNormalizationCounter * fCounter
Cuts for Analysis.
TH1F * fSigVertHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 4 (topol+PID)
Bool_t fUseBit
flag to enhance strangeness in MC to fit to data
const char Option_t
Definition: External.C:48
Double_t fArrayBinLimits[kMaxPtBins+1]
AliAnalysisTaskSEDplus & operator=(const AliAnalysisTaskSEDplus &source)
const Int_t nbins
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
TH1F * fDCAHist[3 *kMaxPtBins]
!hist. for DCA (topol+PID)
Float_t fLowmasslimit
upper inv mass limit for histos
TH1F * fMassHistMinus[3 *kMaxPtBins]
!hist. for D- inv mass (topol+PID cuts)
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
TH1F * fDCAHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 6 (topol+PID)
TH1F * fPtMaxHist[3 *kMaxPtBins]
!hist. for Pt Max (topol+PID)