Updated D0 and D+ syst errors for PbPb
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliCFTaskVertexingHF.h
CommitLineData
379592af 1#ifndef ALICFTASKVERTEXINGHF_H
2#define ALICFTASKVERTEXINGHF_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
27de2dfb 18/* $Id$ */
19
379592af 20//-----------------------------------------------------------------------
21// Class for HF corrections as a function of many variables and step
22// Author : C. Zampolli, CERN
23// D. Caffarri, Univ & INFN Padova caffarri@pd.infn.it
24// Base class for HF Unfolding - agrelli@uu.nl
25//-----------------------------------------------------------------------
26
27
28#include "AliAnalysisTaskSE.h"
29#include "AliCFVertexingHF2Prong.h"
30#include "AliCFVertexingHF.h"
31
32class TH1I;
33class TParticle ;
34class TFile ;
35class TClonesArray ;
36class AliCFManager;
37class AliAODRecoDecay;
38class AliAODRecoDecayHF2Prong;
39class AliAODMCParticle;
40class THnSparse;
f2703bd2 41class AliRDHFCuts;
379592af 42class AliCFVertexingHF2Prong;
6e2e4f50 43class AliCFVertexingHF3Prong;
379592af 44
45class AliCFTaskVertexingHF: public AliAnalysisTaskSE {
46public:
47
48 enum {
49 kStepGeneratedLimAcc = 0,
50 kStepGenerated = 1,
51 kStepAcceptance = 2,
52 kStepVertex = 3,
53 kStepRefit = 4,
54 kStepReconstructed = 5,
55 kStepRecoAcceptance = 6,
56 kStepRecoITSClusters = 7,
57 kStepRecoPPR = 8,
58 kStepRecoPID = 9
59 };
fbec9fa9 60
379592af 61
62 AliCFTaskVertexingHF();
f2703bd2 63 AliCFTaskVertexingHF(const Char_t* name, AliRDHFCuts* cuts);
379592af 64 AliCFTaskVertexingHF& operator= (const AliCFTaskVertexingHF& c);
65 AliCFTaskVertexingHF(const AliCFTaskVertexingHF& c);
66 virtual ~AliCFTaskVertexingHF();
67
68 // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
69 void UserCreateOutputObjects();
70 void UserExec(Option_t *option);
f2703bd2 71 void Init();
72 void LocalInit() {Init();}
379592af 73 void Terminate(Option_t *);
74
75 // UNFOLDING
76 void SetCorrelationMatrix(THnSparse* h) {fCorrelation=h;}
77 void SetAcceptanceUnf(Bool_t AcceptanceUnf) {fAcceptanceUnf = AcceptanceUnf;}
78 Bool_t GetAcceptanceUnf() const {return fAcceptanceUnf;}
79
80
81 // CORRECTION FRAMEWORK RELATED FUNCTIONS
82 void SetCFManager(AliCFManager* io) {fCFManager = io;} // global correction manager
83 AliCFManager * GetCFManager() {return fCFManager;} // get corr manager
84
f2703bd2 85 // Setters (and getters) for the config macro
86 void SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;}
87 Bool_t GetFillFromGenerated() const {return fFillFromGenerated;}
88 void SetDecayChannel (Int_t decayChannel) {fDecayChannel = decayChannel;}
3ee5eb83 89 Int_t GetDecayChannel () {return fDecayChannel;}
f2703bd2 90 void SetUseWeight(Bool_t useWeight){fUseWeight=useWeight;}
91 Bool_t GetUseWeight() const {return fUseWeight;}
92 Double_t GetWeight(Float_t pt);
93 Double_t dNdptFit(Float_t pt, Double_t* par);
94
6e2e4f50 95 void SetDselection(UShort_t originDselection) {fOriginDselection=originDselection;}
3ee5eb83 96 UShort_t GetDselection (){return fOriginDselection;}
97 void SetSign(Char_t isSign) {fSign = isSign;}
98 Char_t GetSign() {return fSign;}
379592af 99
fbec9fa9 100 void SetCentralitySelection(Bool_t centSelec = kTRUE) {fCentralitySelection = centSelec;}
101 Bool_t GetCentralitySelection() {return fCentralitySelection;}
b7af2639 102
1f780958 103 void SetFakeSelection(Int_t fakeSel = 0) {fFakeSelection=fakeSel;}
104 Int_t GetFakeSelection(){return fFakeSelection;}
0ada222f 105
106 void SetRejectCandidateIfNotFromQuark(Bool_t opt){fRejectIfNoQuark=opt;}
107 Bool_t GetRejectCandidateIfNotFromQuark(){return fRejectIfNoQuark;}
108
109 void SetUseMCVertex(Bool_t opt){fUseMCVertex=opt;}
110 Bool_t GetUseMCVertex(){return fUseMCVertex;}
fbec9fa9 111
379592af 112protected:
379592af 113 AliCFManager *fCFManager; // pointer to the CF manager
114 TH1I *fHistEventsProcessed; //! simple histo for monitoring the number of events processed
115 THnSparse* fCorrelation; // response matrix for unfolding
116 Int_t fCountMC; // MC particle found
117 Int_t fCountAcc; // MC particle found that satisfy acceptance cuts
118 Int_t fCountVertex; // Reco particle found that satisfy vertex constrained
119 Int_t fCountRefit; // Reco particle found that satisfy kTPCrefit and kITSrefit
120 Int_t fCountReco; // Reco particle found that satisfy cuts
121 Int_t fCountRecoAcc; // Reco particle found that satisfy cuts in requested acceptance
122 Int_t fCountRecoITSClusters; // Reco particle found that satisfy cuts in n. of ITS clusters
123 Int_t fCountRecoPPR; // Reco particle found that satisfy cuts in PPR
124 Int_t fCountRecoPID; //Reco PID step
125 Int_t fEvents; // n. of events
f2703bd2 126 Int_t fDecayChannel; // decay channel to configure the task
379592af 127 Bool_t fFillFromGenerated; // flag to indicate whether data container should be filled with generated values also for reconstructed particles
128 UShort_t fOriginDselection; // flag to select D0 origins. 0 Only from charm 1 only from beauty 2 both from charm and beauty
129 Bool_t fAcceptanceUnf; // flag for unfolding before or after cuts.
f2703bd2 130 AliRDHFCuts* fCuts; // cuts
131 Bool_t fUseWeight; //flag to decide whether to use weights != 1 when filling the container or not
132 Double_t fWeight; //weight used to fill the container
133 Int_t fNvar; // number of variables for the container
31da6b05 134 TString fPartName; // D meson name
135 TString fDauNames; // daughter in fin state
3ee5eb83 136 Char_t fSign; // flag to decide wheter to keep D0 only (0), D0bar only (1), or both D0 and D0bar (2)
b7af2639 137 Bool_t fCentralitySelection; //flag to switch off the centrality selection
fbec9fa9 138 Int_t fFakeSelection; //selection flag for fakes tracks
0ada222f 139 Bool_t fRejectIfNoQuark; // flag to remove events not geenrated with PYTHIA
140 Bool_t fUseMCVertex; // flag to use MC vertex (useful when runnign in pp)
b7af2639 141
0ada222f 142 ClassDef(AliCFTaskVertexingHF,7); // class for HF corrections as a function of many variables
379592af 143};
144
145#endif