AliPhysics  vAN-20150810 (e477c3b)
 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 class TH3F;
44 
45 class AliCFTaskVertexingHFCutVarFDSub: public AliAnalysisTaskSE {
46 public:
47 
48  enum {
59  };
60 
61  enum {
62  kSnail = 0,
63  kCheetah = 1
64  };
65 
66  enum {
67  kAll = 0,
69  kL1520 = 2,
70  kKstar = 3,
71  kDelta = 4
72  };
73 
74  enum { kNtrk10=0, kNtrk10to16=1, kVZERO=2 };
75 
77  AliCFTaskVertexingHFCutVarFDSub(const Char_t* name, AliRDHFCuts* cuts, TF1* func = 0x0);
81 
84  void UserExec(Option_t *option);
85  void Init();
86  void LocalInit() {Init();}
87  void Terminate(Option_t *);
88 
90  void SetCorrelationMatrix(THnSparse* h) {fCorrelation=h;}
91  void SetAcceptanceUnf(Bool_t AcceptanceUnf) {fAcceptanceUnf = AcceptanceUnf;}
92  Bool_t GetAcceptanceUnf() const {return fAcceptanceUnf;}
93 
94 
95  // CORRECTION FRAMEWORK RELATED FUNCTIONS
96  void SetCFManager(AliCFManager* io) {fCFManager = io;}
97  AliCFManager * GetCFManager() {return fCFManager;}
98 
99  // Setters (and getters) for the config macro
100  void SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;}
101  Bool_t GetFillFromGenerated() const {return fFillFromGenerated;}
102  void SetDecayChannel (Int_t decayChannel) {fDecayChannel = decayChannel;}
103  Int_t GetDecayChannel () {return fDecayChannel;}
104  void SetUseWeight(Bool_t useWeight){fUseWeight=useWeight;}
105  Bool_t GetUseWeight() const {return fUseWeight;}
106  Double_t GetWeight(Float_t pt);
107  Double_t dNdptFit(Float_t pt, Double_t* par);
108  Double_t GetPtWeightFromHistogram(Float_t pt);
109 
110  void SetUseFlatPtWeight(Bool_t useWeight){fUseFlatPtWeight=useWeight; fUseWeight=useWeight;}
111  Bool_t GetUseFlatPtWeight() const {return fUseFlatPtWeight;}
112  void SetUseZWeight(Bool_t useWeight){fUseZWeight=useWeight;}
113  Bool_t GetUseZWeight() const {return fUseZWeight;}
114  Double_t GetZWeight(Float_t z, Int_t runnumber);
115  Double_t DodzFit(Float_t z, Double_t* par);
116 
117  void SetUseNchWeight(Bool_t useWeight){fUseNchWeight=useWeight;}
118  Bool_t GetUseNchWeight() const {return fUseNchWeight;}
119  void SetMCNchHisto(TH1F* h){
120  if(fHistoMCNch) delete fHistoMCNch;
121  fHistoMCNch=new TH1F(*h);
122  }
123  void CreateMeasuredNchHisto();
124  void SetMeasuredNchHisto(TH1F* h){
125  if(fHistoMeasNch) delete fHistoMeasNch;
126  fHistoMeasNch=new TH1F(*h);
127  }
128  Double_t GetNchWeight(Int_t nch);
131  void SetIsPPData(Bool_t flag){ fIsPPData = flag; }
132  void SetIsPPbData(Bool_t flag){ fIsPPbData = flag; }
133 
134  void SetUseNchTrackletsWeight(Bool_t useWeight = kTRUE) { fUseNchWeight=useWeight; fUseTrackletsWeight=useWeight; }
136 
139  void SetMultiplVsZProfileLHC10b(TProfile* hprof){
140  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
141  fMultEstimatorAvg[0]=new TProfile(*hprof);
142  }
143  void SetMultiplVsZProfileLHC10c(TProfile* hprof){
144  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
145  fMultEstimatorAvg[1]=new TProfile(*hprof);
146  }
147  void SetMultiplVsZProfileLHC10d(TProfile* hprof){
148  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
149  fMultEstimatorAvg[2]=new TProfile(*hprof);
150  }
151  void SetMultiplVsZProfileLHC10e(TProfile* hprof){
152  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
153  fMultEstimatorAvg[3]=new TProfile(*hprof);
154  }
155 
156  void SetMultiplVsZProfileLHC13b(TProfile* hprof){
157  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
158  fMultEstimatorAvg[0]=new TProfile(*hprof);
159  }
160  void SetMultiplVsZProfileLHC13c(TProfile* hprof){
161  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
162  fMultEstimatorAvg[1]=new TProfile(*hprof);
163  }
164 
165  TProfile* GetEstimatorHistogram(const AliVEvent* event);
166  void SetReferenceMultiplcity(Double_t rmu){fRefMult=rmu;}
167 
168  void SetDselection(UShort_t originDselection) {fOriginDselection=originDselection;}
169  UShort_t GetDselection (){return fOriginDselection;}
170  void SetSign(Char_t isSign) {fSign = isSign;}
171  Char_t GetSign() {return fSign;}
172 
173  void SetCentralitySelection(Bool_t centSelec = kTRUE) {fCentralitySelection = centSelec;}
175 
176  void SetFakeSelection(Int_t fakeSel = 0) {fFakeSelection=fakeSel;}
178 
181 
182  void SetUseMCVertex(Bool_t opt){fUseMCVertex=opt;}
183  Bool_t GetUseMCVertex(){return fUseMCVertex;}
184 
185 
194 
195  Bool_t ProcessDs(Int_t returnCodeDs) const;
196 
197  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;}
198  Int_t GetConfiguration() const {return fConfiguration;}
199 
200  void SetWeightFunction(TF1* func) {fFuncWeight = func;}
201  TF1* GetWeightFunction() const {return fFuncWeight;}
213 
214  void SetResonantDecay(UInt_t resonantDecay) {fResonantDecay = resonantDecay;}
215  UInt_t GetResonantDecay() const {return fResonantDecay;}
216 
221 
224 
225  void SetUseSelectionBit(Bool_t flag) { fUseSelectionBit=flag; }
226  Bool_t GetUseSelectionBit() const { return fUseSelectionBit; }
227 
228  Bool_t ProcessLctoV0Bachelor(Int_t returnCodeDs) const;
229 
230 protected:
231  AliCFManager *fCFManager;
233  THnSparse* fCorrelation;
234  TList *fListProfiles;
235  Int_t fCountMC;
236  Int_t fCountAcc;
237  Int_t fCountVertex;
238  Int_t fCountRefit;
239  Int_t fCountReco;
244  Int_t fEvents;
247  UShort_t fOriginDselection;
248  Bool_t fAcceptanceUnf;
250  Bool_t fUseWeight;
251  Double_t fWeight;
253  Bool_t fUseZWeight; // flag to decide whether to use z-vtx weights != 1 when filling the container or not
254  Bool_t fUseNchWeight;
257  Int_t fNvar;
258  TString fPartName;
259  TString fDauNames;
260  Char_t fSign;
264  Bool_t fUseMCVertex;
265  Int_t fDsOption;
266  Int_t fGenDsOption;
268  TF1* fFuncWeight;
271  TH1F* fHistoMCNch;
272  UInt_t fResonantDecay;
276  UInt_t fPDGcode;
277 
279  TProfile* fMultEstimatorAvg[4];
280  Double_t fRefMult;
282  Bool_t fIsPPData;
283  Bool_t fIsPPbData;
290  THnSparseF* fhSparseCutVar;
291  TH3F* fhPtCutVar;
292  TH1F* fhBptCutVar;
293  TList* fListBdecays;
294  TList* fQAHists;
295 
297  ClassDef(AliCFTaskVertexingHFCutVarFDSub,7);
298 };
300 
301 #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.
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
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)
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)
Int_t fCountMC
list of profile histos for z-vtx correction
AliCFTaskVertexingHFCutVarFDSub()
multiplicity estimators
TH1F * fHistoMeasNch
user-defined histogram to calculate the 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)
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.
THnSparseF * fhSparseCutVar
object for cut variation study
Bool_t fUseCutsForTMVA
flag to use additional cuts needed for Lc –> K0S + p, TMVA
Bool_t fUseZWeight
flag to decide to use a flat pt shape
AliCFTaskVertexingHFCutVarFDSub & operator=(const AliCFTaskVertexingHFCutVarFDSub &c)
TList * fListProfiles
response matrix for unfolding
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.