AliPhysics  vAN-20150827 (3e81cbb)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliCFTaskVertexingHFCutVarFDSub.h
Go to the documentation of this file.
1 #ifndef ALICFTASKVERTEXINGHFCUTVARFDSUB_H
2 #define ALICFTASKVERTEXINGHFCUTVARFDSUB_H
3 /**************************************************************************
4  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * *
6  * Author: The ALICE Off-line Project. *
7  * Contributors are mentioned in the code where appropriate. *
8  * *
9  * Permission to use, copy, modify and distribute this software and its *
10  * documentation strictly for non-commercial purposes is hereby granted *
11  * without fee, provided that the above copyright notice appears in all *
12  * copies and that both the copyright notice and this permission notice *
13  * appear in the supporting documentation. The authors make no claims *
14  * about the suitability of this software for any purpose. It is *
15  * provided "as is" without express or implied warranty. *
16  **************************************************************************/
17 
18 //-----------------------------------------------------------------------
23 //-----------------------------------------------------------------------
29 //-----------------------------------------------------------------------
30 
31 #include "THnSparse.h"
32 #include "TH1F.h"
33 #include "TProfile.h"
34 
35 #include "AliAnalysisTaskSE.h"
36 #include "AliCFVertexingHF3Prong.h"
38 
39 class AliCFManager;
40 class AliRDHFCuts;
42 class TH1F;
43 
44 class AliCFTaskVertexingHFCutVarFDSub: public AliAnalysisTaskSE {
45 public:
46 
47  enum {
58  };
59 
60  enum {
61  kSnail = 0,
62  kCheetah = 1
63  };
64 
65  enum {
66  kAll = 0,
68  kL1520 = 2,
69  kKstar = 3,
70  kDelta = 4
71  };
72 
73  enum { kNtrk10=0, kNtrk10to16=1, kVZERO=2 };
74 
76  AliCFTaskVertexingHFCutVarFDSub(const Char_t* name, AliRDHFCuts* cuts, TF1* func = 0x0);
80 
83  void UserExec(Option_t *option);
84  void Init();
85  void LocalInit() {Init();}
86  void Terminate(Option_t *);
87 
89  void SetCorrelationMatrix(THnSparse* h) {fCorrelation=h;}
90  void SetAcceptanceUnf(Bool_t AcceptanceUnf) {fAcceptanceUnf = AcceptanceUnf;}
91  Bool_t GetAcceptanceUnf() const {return fAcceptanceUnf;}
92 
93 
94  // CORRECTION FRAMEWORK RELATED FUNCTIONS
95  void SetCFManager(AliCFManager* io) {fCFManager = io;}
96  AliCFManager * GetCFManager() {return fCFManager;}
97 
98  // Setters (and getters) for the config macro
99  void SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;}
100  Bool_t GetFillFromGenerated() const {return fFillFromGenerated;}
101  void SetDecayChannel (Int_t decayChannel) {fDecayChannel = decayChannel;}
102  Int_t GetDecayChannel () {return fDecayChannel;}
103  void SetUseWeight(Bool_t useWeight){fUseWeight=useWeight;}
104  Bool_t GetUseWeight() const {return fUseWeight;}
105  void SetUseMotherPtWeight(Bool_t useMotherPtWeight){fUseMotherPtWeight=useMotherPtWeight;}
106  Bool_t GetUseMotherPtWeight() const {return fUseMotherPtWeight;}
107  Double_t GetWeight(Float_t pt);
108  Double_t dNdptFit(Float_t pt, Double_t* par);
109  Double_t GetPtWeightFromHistogram(Float_t pt);
110  Double_t GetMotherPtWeightFromHistogram(Float_t motherPt);
111  Double_t GetMotherPtFromRecoDecay(AliAODRecoDecayHF* charmCandidate, TClonesArray* mcArray);
112 
113  void SetUseFlatPtWeight(Bool_t useWeight){fUseFlatPtWeight=useWeight; fUseWeight=useWeight;}
114  Bool_t GetUseFlatPtWeight() const {return fUseFlatPtWeight;}
115  void SetUseZWeight(Bool_t useWeight){fUseZWeight=useWeight;}
116  Bool_t GetUseZWeight() const {return fUseZWeight;}
117  Double_t GetZWeight(Float_t z, Int_t runnumber);
118  Double_t DodzFit(Float_t z, Double_t* par);
119 
120  void SetUseNchWeight(Bool_t useWeight){fUseNchWeight=useWeight;}
121  Bool_t GetUseNchWeight() const {return fUseNchWeight;}
122  void SetMCNchHisto(TH1F* h){
123  if(fHistoMCNch) delete fHistoMCNch;
124  fHistoMCNch=new TH1F(*h);
125  }
126  void CreateMeasuredNchHisto();
127  void SetMeasuredNchHisto(TH1F* h){
128  if(fHistoMeasNch) delete fHistoMeasNch;
129  fHistoMeasNch=new TH1F(*h);
130  }
131  Double_t GetNchWeight(Int_t nch);
134  void SetIsPPData(Bool_t flag){ fIsPPData = flag; }
135  void SetIsPPbData(Bool_t flag){ fIsPPbData = flag; }
136 
137  void SetUseNchTrackletsWeight(Bool_t useWeight = kTRUE) { fUseNchWeight=useWeight; fUseTrackletsWeight=useWeight; }
139 
142  void SetMultiplVsZProfileLHC10b(TProfile* hprof){
143  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
144  fMultEstimatorAvg[0]=new TProfile(*hprof);
145  }
146  void SetMultiplVsZProfileLHC10c(TProfile* hprof){
147  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
148  fMultEstimatorAvg[1]=new TProfile(*hprof);
149  }
150  void SetMultiplVsZProfileLHC10d(TProfile* hprof){
151  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
152  fMultEstimatorAvg[2]=new TProfile(*hprof);
153  }
154  void SetMultiplVsZProfileLHC10e(TProfile* hprof){
155  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
156  fMultEstimatorAvg[3]=new TProfile(*hprof);
157  }
158 
159  void SetMultiplVsZProfileLHC13b(TProfile* hprof){
160  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
161  fMultEstimatorAvg[0]=new TProfile(*hprof);
162  }
163  void SetMultiplVsZProfileLHC13c(TProfile* hprof){
164  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
165  fMultEstimatorAvg[1]=new TProfile(*hprof);
166  }
167 
168  TProfile* GetEstimatorHistogram(const AliVEvent* event);
169  void SetReferenceMultiplcity(Double_t rmu){fRefMult=rmu;}
170 
171  void SetDselection(UShort_t originDselection) {fOriginDselection=originDselection;}
172  UShort_t GetDselection (){return fOriginDselection;}
173  void SetSign(Char_t isSign) {fSign = isSign;}
174  Char_t GetSign() {return fSign;}
175 
176  void SetCentralitySelection(Bool_t centSelec = kTRUE) {fCentralitySelection = centSelec;}
178 
179  void SetFakeSelection(Int_t fakeSel = 0) {fFakeSelection=fakeSel;}
181 
184 
185  void SetUseMCVertex(Bool_t opt){fUseMCVertex=opt;}
186  Bool_t GetUseMCVertex(){return fUseMCVertex;}
187 
188 
197 
198  Bool_t ProcessDs(Int_t returnCodeDs) const;
199 
200  void SetConfiguration(Int_t configuration) {(configuration == kSnail) ? Printf("Slow configuration chosen, all variables will be used!") : Printf("Fast configuration chosen, all variablesOnly pt, y, phi, ct, fake, z_vtx, centrality and multiplicity will be used!"); fConfiguration = configuration;}
201  Int_t GetConfiguration() const {return fConfiguration;}
202 
203  void SetWeightFunction(TF1* func) {fFuncWeight = func;}
204  TF1* GetWeightFunction() const {return fFuncWeight;}
217 
218  void SetResonantDecay(UInt_t resonantDecay) {fResonantDecay = resonantDecay;}
219  UInt_t GetResonantDecay() const {return fResonantDecay;}
220 
225 
228 
229  void SetUseSelectionBit(Bool_t flag) { fUseSelectionBit=flag; }
230  Bool_t GetUseSelectionBit() const { return fUseSelectionBit; }
231 
232  Bool_t ProcessLctoV0Bachelor(Int_t returnCodeDs) const;
233 
234 protected:
235  AliCFManager *fCFManager;
237  THnSparse* fCorrelation;
238  TList *fListProfiles;
239  Int_t fCountMC;
240  Int_t fCountAcc;
241  Int_t fCountVertex;
242  Int_t fCountRefit;
243  Int_t fCountReco;
248  Int_t fEvents;
251  UShort_t fOriginDselection;
252  Bool_t fAcceptanceUnf;
254  Bool_t fUseWeight;
256  Double_t fWeight;
258  Bool_t fUseZWeight;
259  Bool_t fUseNchWeight;
262  Int_t fNvar;
263  TString fPartName;
264  TString fDauNames;
265  Char_t fSign;
269  Bool_t fUseMCVertex;
270  Int_t fDsOption;
271  Int_t fGenDsOption;
273  TF1* fFuncWeight;
277  TH1F* fHistoMCNch;
278  UInt_t fResonantDecay;
282  UInt_t fPDGcode;
283 
285  TProfile* fMultEstimatorAvg[4];
286  Double_t fRefMult;
288  Bool_t fIsPPData;
289  Bool_t fIsPPbData;
296  THnSparseF* fTHnAnalysis;
297  THnSparseF* fTHnGenerator;
298  TH1F* fhBptCutVar;
299  TList* fListBdecays;
300  TList* fQAHists;
301 
303  ClassDef(AliCFTaskVertexingHFCutVarFDSub,8);
304 };
306 
307 #endif
void SetCentralitySelection(Bool_t centSelec=kTRUE)
Int_t fNvar
flag to use directly the ratio of the distributions (fHistoMCNch) instead of computing it ...
Bool_t fAcceptanceUnf
flag to select D0 origins. 0 Only from charm 1 only from beauty 2 both from charm and beauty ...
Bool_t fRejectIfNoQuark
selection flag for fakes tracks
Int_t fCountRecoAcc
Reco particle found that satisfy cuts.
void SetUseMotherPtWeight(Bool_t useMotherPtWeight)
AliCFManager * GetCFManager()
global correction manager
Bool_t fFillFromGenerated
decay channel to configure the task
UShort_t fOriginDselection
flag to indicate whether data container should be filled with generated values also for reconstructed...
Bool_t fUseFlatPtWeight
weight used to fill the container
void SetFillFromGenerated(Bool_t flag)
get corr manager
Bool_t fIsPPData
flag to use the z-vtx corrected (if not use uncorrected) multiplicity estimator
AliHFsubtractBFDcuts * fObjSpr
cut on momentum conservation
Double_t fWeight
flag to decide whether to use pt-weights != 1 when filling the container or not
Double_t GetMotherPtFromRecoDecay(AliAODRecoDecayHF *charmCandidate, TClonesArray *mcArray)
Int_t fConfiguration
Ds decay option (generation level)
Int_t fCountRecoITSClusters
Reco particle found that satisfy cuts in requested acceptance.
Bool_t fIsPPbData
flag for pp data (not checking centrality)
Double_t dNdptFit(Float_t pt, Double_t *par)
Class for storing and handling D0 meson candidates properties // for estimating the feed-down fractio...
Bool_t fCentralitySelection
flag to decide wheter to keep D0 only (0), D0bar only (1), or both D0 and D0bar (2) ...
UInt_t fPDGcode
flag to use selection bit
void SetUseNchTrackletsWeight(Bool_t useWeight=kTRUE)
Bool_t fUseMCVertex
flag to remove events not geenrated with PYTHIA
TH1F * fHistoMCNch
histogram with measured Nch distribution (pp 7 TeV)
Double_t GetMotherPtWeightFromHistogram(Float_t motherPt)
Int_t fCountMC
list of profile histos for z-vtx correction
AliCFTaskVertexingHFCutVarFDSub()
multiplicity estimators
TH1F * fHistoMeasNch
user-defined histogram to calculate the Mother Pt weights
TH1F * fHistoPtWeight
user-defined function to be used to calculate weights
TF1 * fFuncWeight
configuration (slow / fast) of the CF –> different variables will be allocated (all / reduced number)...
TH1F * fhBptCutVar
Generator level histogram D0 pt, Nprongs of the decay, Mother pt.
Int_t fCountReco
Reco particle found that satisfy kTPCrefit and kITSrefit.
Bool_t ProcessDs(Int_t returnCodeDs) const
Bool_t fUseAdditionalCuts
flag for pPb data (used for multiplicity corrections)
Bool_t fUseMultRatioAsWeight
flag to decide whether to use Ncharged weights != 1 when filling the container or not ...
Int_t fGenLctoV0bachelorOption
Lc->V0+bachelor decay option (selection level)
TH1F * fHistoMotherPtWeight
user-defined histogram to calculate the Pt weights
Bool_t fUseTrackletsWeight
flag to decide whether to use Ncharged weights != 1 when filling the container or not ...
Double_t DodzFit(Float_t z, Double_t *par)
void SetCorrelationMatrix(THnSparse *h)
UNFOLDING.
Int_t fLctoV0bachelorOption
resonant deacy channel to be used if the CF should be run on resonant channels only ...
Bool_t fUseSelectionBit
Lc->V0+bachelor decay option (generation level)
Bool_t fZvtxCorrectedNtrkEstimator
refrence multiplcity (period b)
Int_t fCountRefit
Reco particle found that satisfy vertex constrained.
Double_t fRefMult
TProfile with mult vas. Z per period.
Double_t GetZWeight(Float_t z, Int_t runnumber)
TList * fQAHists
List with B hadron decays (unique entries)
TH1I * fHistEventsProcessed
pointer to the CF manager
Int_t fCountRecoPPR
Reco particle found that satisfy cuts in n. of ITS clusters.
Bool_t fUseCutsForTMVA
flag to use additional cuts needed for Lc –> K0S + p, TMVA
Bool_t fUseMotherPtWeight
flag to decide whether to use pt-weights != 1 when filling the container or not
Bool_t fUseZWeight
flag to decide to use a flat pt shape
AliCFTaskVertexingHFCutVarFDSub & operator=(const AliCFTaskVertexingHFCutVarFDSub &c)
Bool_t fUseNchWeight
flag to decide whether to use z-vtx weights != 1 when filling the container or not ...
TList * fListProfiles
response matrix for unfolding
THnSparseF * fTHnAnalysis
object for cut variation study
void SetDselection(UShort_t originDselection)
TProfile * fMultEstimatorAvg[4]
Definition of the multiplicity estimator: kNtrk10=0, kNtrk10to16=1, kVZERO=2.
Int_t fFakeSelection
flag to switch off the centrality selection
UInt_t fResonantDecay
histogram with Nch distribution from MC production
Float_t fCutOnMomConservation
flag to define which task to use for Lc –> K0S+p
AliRDHFCuts * fCuts
flag for unfolding before or after cuts.
TProfile * GetEstimatorHistogram(const AliVEvent *event)
Int_t fGenDsOption
Ds decay option (selection level)
Int_t fCountRecoPID
Reco particle found that satisfy cuts in PPR.
Int_t fDsOption
flag to use MC vertex (useful when runnign in pp)
void UserCreateOutputObjects()
ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects.
Bool_t ProcessLctoV0Bachelor(Int_t returnCodeDs) const
TString fPartName
number of variables for the container
Int_t fCountVertex
MC particle found that satisfy acceptance cuts.