AliPhysics  63e47e1 (63e47e1)
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 
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;}
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
101  void SetDecayChannel (Int_t decayChannel) {fDecayChannel = decayChannel;}
104  Bool_t GetUseWeight() const {return fUseWeight;}
105  void SetUseMotherPtWeight(Bool_t useMotherPtWeight){fUseMotherPtWeight=useMotherPtWeight;}
108  Double_t dNdptFit(Float_t pt, Double_t* par);
111  Double_t GetMotherPtFromRecoDecay(AliAODRecoDecayHF* charmCandidate, TClonesArray* mcArray);
112 
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 
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  }
134  void SetIsPPData(Bool_t flag){ fIsPPData = flag; }
135  void SetIsPPbData(Bool_t flag){ fIsPPbData = flag; }
136 
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);
170 
171  void SetDselection(UShort_t originDselection) {fOriginDselection=originDselection;}
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 
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;}
202 
203  void SetWeightFunction(TF1* func) {fFuncWeight = func;}
204  TF1* GetWeightFunction() const {return fFuncWeight;}
217 
218  void SetResonantDecay(UInt_t resonantDecay) {fResonantDecay = resonantDecay;}
220 
225 
228 
231 
232  Bool_t ProcessLctoV0Bachelor(Int_t returnCodeDs) const;
233 
234 protected:
235  AliCFManager *fCFManager;
237  THnSparse* fCorrelation;
273  TF1* fFuncWeight;
277  TH1F* fHistoMCNch;
283 
285  TProfile* fMultEstimatorAvg[4];
296  THnSparseF* fTHnAnalysis;
297  THnSparseF* fTHnGenerator;
298  TH1F* fhBptCutVar;
299  TH1F* fhBquarkPt;
300  TH1F* fhCquarkPt;
303 
305  ClassDef(AliCFTaskVertexingHFCutVarFDSub,10);
306 };
308 
309 #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.
double Double_t
Definition: External.C:58
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)
char Char_t
Definition: External.C:18
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...
TCanvas * c
Definition: TestFitELoss.C:172
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.
int Int_t
Definition: External.C:63
Bool_t ProcessDs(Int_t returnCodeDs) const
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
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 useWeight
Definition: anaTree.C:26
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.
unsigned short UShort_t
Definition: External.C:28
Int_t fFakeSelection
flag to switch off the centrality selection
const char Option_t
Definition: External.C:48
UInt_t fResonantDecay
histogram with Nch distribution from MC production
Float_t fCutOnMomConservation
flag to define which task to use for Lc –> K0S+p
bool Bool_t
Definition: External.C:53
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.