AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskSEDstoK0sK.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSEDSTOK0SK_H
2 #define ALIANALYSISTASKSEDSTOK0SK_H
3 
4 /* Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
18 
19 
20 #include <TROOT.h>
21 #include <TSystem.h>
22 #include <TH1F.h>
23 #include <TH2F.h>
24 #include <TList.h>
25 #include <TNtuple.h>
26 
27 #include "AliAnalysisTaskSE.h"
28 #include "AliAODEvent.h"
29 #include "AliAODRecoCascadeHF.h"
31 #include "AliRDHFCutsDstoK0sK.h"
32 
33 
34 
36 {
37 public:
38 
39 
41  AliAnalysisTaskSEDstoK0sK(const char *name,
42  AliRDHFCutsDstoK0sK *cuts,
43  Bool_t readMC,
44  Bool_t fillNtuple,
45  Int_t nCutsTuple,
46  Float_t *minCutsTuple,
47  Float_t *maxCutsTuple);
49 
50 
51  // Implementation of interface methods
52  virtual void Init();
53  virtual void LocalInit() { Init(); }
54  virtual void UserCreateOutputObjects();
55  virtual void UserExec(Option_t* /*option*/);
56  virtual void Terminate(Option_t* /*option*/);
57 
58 
59  // Setters
62  void SetPtBins(Int_t nBins, Float_t* limitsPt);
63  void SetMassRangeAndBinSize(Float_t range, Float_t bin) { fMassRange = range; fMassBinSize = bin; }
64  void SetCutsTupleVariables(Int_t nCuts, Float_t *minCuts, Float_t *maxCuts);
65 
66 
67 
68 protected:
69 
70 
71  enum { kMaxPtBins=20, kNTupleVars=28, kNTupleVarsMC=29 };
72 
73 
76 
77 
78  void FillHistogramsVar(AliAODRecoCascadeHF* dCan, AliRDHFCuts::ESelLevel selFlag, TClonesArray* mcArray = 0);
79  void FillHistogramsPID(AliAODRecoCascadeHF* dCan, AliRDHFCuts::ESelLevel selFlag, TClonesArray* mcArray = 0);
80  void FillTheTree(AliAODRecoCascadeHF* dCan, AliAODEvent* aod, TClonesArray* mcArray);
83  Int_t MatchToMCDstoK0sKSignal(AliAODRecoCascadeHF* dCan, TClonesArray* mcArray);
84  Int_t MatchToMCDplustoK0spiSignal(AliAODRecoCascadeHF* dCan, TClonesArray* mcArray);
85 
86 
87  // Outputs
94  TNtuple* fOutputNtuple;
95 
96 
97  // Histograms of output slot #3 (fOutputSele)
98  TH1F* fHisNEvents;
99  TH1F* fHisCentrality[3];
109 
110 
111  // Histograms of output slot #4 (fOutputCand) and #5 (fOutputPID)
127 
128 
129  // Data members for analysis
140 
142 
144  ClassDef(AliAnalysisTaskSEDstoK0sK, 1);
145 };
147 
148 
149 
151 {
152  Int_t pdgDgDstoK0sK[2] = {321, 310};
153  Int_t pdgDgK0stoPions[2] = {211, 211};
154  return (Int_t) dCan->MatchToMC(431, pdgDgDstoK0sK[1], pdgDgDstoK0sK, pdgDgK0stoPions, mcArray, kTRUE);
155 }
156 
157 
159 {
160  Int_t pdgDgDplustoK0spi[2] = {211, 310};
161  Int_t pdgDgK0stoPions[2] = {211, 211};
162  return (Int_t) dCan->MatchToMC(411, pdgDgDplustoK0spi[1], pdgDgDplustoK0spi, pdgDgK0stoPions, mcArray, kTRUE);
163 }
164 
165 
166 #endif
Bool_t fReadMC
Bin size of invariant mass histograms (GeV)
TList * fOutputCand
! Candidate level histograms: TList sent to output slot #4
Bool_t fUseSelectionBit
Flag for accessing MC.
AliRDHFCutsDstoK0sK * fAnalysisCuts
TH2F * fHisDecayLxyDs[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
Definition: External.C:236
Int_t fAODProtection
Maximum cut values for tuple variables.
Int_t MatchToMC(Int_t pdgabs, Int_t pdgabs2prong, Int_t *pdgDg, Int_t *pdgDg2prong, TClonesArray *mcArray, Bool_t isV0=kFALSE) const
Float_t fMassRange
Limits of Pt bins.
Float_t fMassBinSize
Size range of invariant mass histograms.
Bool_t fFillNtuple
Flag for using selection bit (to select Ds flags)
Float_t ComputeSigmaVert(const AliAODEvent *aod, AliAODRecoCascadeHF *dCan) const
AliNormalizationCounter * fCounter
Cut object for Analysis on output slot #1.
TH2F * fHisCosPointingXYDs[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisInvMassK0s[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TList * fOutputMC
! PID level histograms: TList sent to output slot #5
TNtuple * fOutputNtuple
! TNtuple for candidates on data sent to output slot #4
Float_t fCutsMinTupleVars[kNTupleVars]
Flag for using THnSparse.
void FillHistogramsPID(AliAODRecoCascadeHF *dCan, AliRDHFCuts::ESelLevel selFlag, TClonesArray *mcArray=0)
Float_t fCutsMaxTupleVars[kNTupleVars]
Minimum cut values for tuple variables.
virtual void Terminate(Option_t *)
void SetMassRangeAndBinSize(Float_t range, Float_t bin)
int Int_t
Definition: External.C:63
TH2F * fHisCosThetaStarBach[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
float Float_t
Definition: External.C:68
Class for cuts on AOD reconstructed Ds->K0S+K.
void SetCutsTupleVariables(Int_t nCuts, Float_t *minCuts, Float_t *maxCuts)
AliAnalysisTaskSE to produce Ds->K0S+K invariant mass spectra and THnSparse for cut optimisations...
void FillTheTree(AliAODRecoCascadeHF *dCan, AliAODEvent *aod, TClonesArray *mcArray)
Int_t MatchToMCDplustoK0spiSignal(AliAODRecoCascadeHF *dCan, TClonesArray *mcArray)
void SetPtBins(Int_t nBins, Float_t *limitsPt)
TH2F * fHisInvMassDplus[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
Float_t CosThetaK0sBachRFrame(AliAODRecoCascadeHF *dCan) const
TH2F * fHisCosThetaStarK0s[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisPtK0s[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisRapiditySel
! Rapidity selected (kCandidate) candidates
TH1F * fHisCentrality[3]
! Centrality: all, selected and rejected
TList * fOutputSele
! Various histograms of selected events: TList sent to output slot #3
TH2F * fHisDCAK0sBach[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
AliAnalysisTaskSEDstoK0sK & operator=(const AliAnalysisTaskSEDstoK0sK &source)
TH1F * fHisNEvents
! Counter: events and candidates
TH2F * fHisImpParBach[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
Float_t fPtLimits[kMaxPtBins+1]
Number of Pt bins.
TList * fOutputPID
! PID level histograms: TList sent to output slot #5
const char Option_t
Definition: External.C:48
void FillHistogramsVar(AliAODRecoCascadeHF *dCan, AliRDHFCuts::ESelLevel selFlag, TClonesArray *mcArray=0)
TH2F * fHisInvMassDs[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
bool Bool_t
Definition: External.C:53
TH2F * fHisImpParK0s[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisCTauK0s[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisCosPointingDs[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisPtBachelor[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisNormDecayLxyDs[5]
! (kCandidate, kPID, mcSignal, mcBackground, mcReflection)
TH2F * fHisCentralityVsMult[3]
! Centrality VS Multiplicity: all, selected and rejected
Int_t MatchToMCDstoK0sKSignal(AliAODRecoCascadeHF *dCan, TClonesArray *mcArray)
TH2F * fHisRapidity
! Rapidity all candidates