]>
Commit | Line | Data |
---|---|---|
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 | ||
32 | class TH1I; | |
33 | class TParticle ; | |
34 | class TFile ; | |
35 | class TClonesArray ; | |
36 | class AliCFManager; | |
37 | class AliAODRecoDecay; | |
38 | class AliAODRecoDecayHF2Prong; | |
39 | class AliAODMCParticle; | |
40 | class THnSparse; | |
5b37c6e5 | 41 | class TF1; |
f2703bd2 | 42 | class AliRDHFCuts; |
379592af | 43 | class AliCFVertexingHF2Prong; |
6e2e4f50 | 44 | class AliCFVertexingHF3Prong; |
379592af | 45 | |
46 | class AliCFTaskVertexingHF: public AliAnalysisTaskSE { | |
47 | public: | |
48 | ||
49 | enum { | |
50 | kStepGeneratedLimAcc = 0, | |
51 | kStepGenerated = 1, | |
52 | kStepAcceptance = 2, | |
53 | kStepVertex = 3, | |
54 | kStepRefit = 4, | |
55 | kStepReconstructed = 5, | |
56 | kStepRecoAcceptance = 6, | |
57 | kStepRecoITSClusters = 7, | |
58 | kStepRecoPPR = 8, | |
59 | kStepRecoPID = 9 | |
60 | }; | |
fbec9fa9 | 61 | |
ec5288c3 | 62 | enum { |
63 | kSnail = 0, // slow configuration, all variables | |
64 | kCheetah = 1 // fast configuration, only a subset of variables | |
65 | }; | |
379592af | 66 | |
67 | AliCFTaskVertexingHF(); | |
5b37c6e5 | 68 | AliCFTaskVertexingHF(const Char_t* name, AliRDHFCuts* cuts, TF1* func = 0x0); |
379592af | 69 | AliCFTaskVertexingHF& operator= (const AliCFTaskVertexingHF& c); |
70 | AliCFTaskVertexingHF(const AliCFTaskVertexingHF& c); | |
71 | virtual ~AliCFTaskVertexingHF(); | |
72 | ||
73 | // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects | |
74 | void UserCreateOutputObjects(); | |
75 | void UserExec(Option_t *option); | |
f2703bd2 | 76 | void Init(); |
77 | void LocalInit() {Init();} | |
379592af | 78 | void Terminate(Option_t *); |
79 | ||
80 | // UNFOLDING | |
81 | void SetCorrelationMatrix(THnSparse* h) {fCorrelation=h;} | |
82 | void SetAcceptanceUnf(Bool_t AcceptanceUnf) {fAcceptanceUnf = AcceptanceUnf;} | |
83 | Bool_t GetAcceptanceUnf() const {return fAcceptanceUnf;} | |
84 | ||
85 | ||
86 | // CORRECTION FRAMEWORK RELATED FUNCTIONS | |
87 | void SetCFManager(AliCFManager* io) {fCFManager = io;} // global correction manager | |
88 | AliCFManager * GetCFManager() {return fCFManager;} // get corr manager | |
89 | ||
f2703bd2 | 90 | // Setters (and getters) for the config macro |
91 | void SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;} | |
92 | Bool_t GetFillFromGenerated() const {return fFillFromGenerated;} | |
93 | void SetDecayChannel (Int_t decayChannel) {fDecayChannel = decayChannel;} | |
3ee5eb83 | 94 | Int_t GetDecayChannel () {return fDecayChannel;} |
f2703bd2 | 95 | void SetUseWeight(Bool_t useWeight){fUseWeight=useWeight;} |
96 | Bool_t GetUseWeight() const {return fUseWeight;} | |
97 | Double_t GetWeight(Float_t pt); | |
98 | Double_t dNdptFit(Float_t pt, Double_t* par); | |
99 | ||
6e2e4f50 | 100 | void SetDselection(UShort_t originDselection) {fOriginDselection=originDselection;} |
3ee5eb83 | 101 | UShort_t GetDselection (){return fOriginDselection;} |
102 | void SetSign(Char_t isSign) {fSign = isSign;} | |
103 | Char_t GetSign() {return fSign;} | |
379592af | 104 | |
fbec9fa9 | 105 | void SetCentralitySelection(Bool_t centSelec = kTRUE) {fCentralitySelection = centSelec;} |
106 | Bool_t GetCentralitySelection() {return fCentralitySelection;} | |
b7af2639 | 107 | |
1f780958 | 108 | void SetFakeSelection(Int_t fakeSel = 0) {fFakeSelection=fakeSel;} |
109 | Int_t GetFakeSelection(){return fFakeSelection;} | |
0ada222f | 110 | |
111 | void SetRejectCandidateIfNotFromQuark(Bool_t opt){fRejectIfNoQuark=opt;} | |
112 | Bool_t GetRejectCandidateIfNotFromQuark(){return fRejectIfNoQuark;} | |
113 | ||
114 | void SetUseMCVertex(Bool_t opt){fUseMCVertex=opt;} | |
115 | Bool_t GetUseMCVertex(){return fUseMCVertex;} | |
fbec9fa9 | 116 | |
6c62cb59 | 117 | |
118 | void SetKeepDsViaPhi(){fDsOption=1;} | |
119 | void SetKeepDsViaK0star(){fDsOption=2;} | |
120 | void SetKeepAllDs(){fDsOption=3;} | |
121 | ||
122 | Bool_t ProcessDs(Int_t returnCodeDs) const; | |
ec5288c3 | 123 | |
124 | 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;} | |
125 | Int_t GetConfiguration() const {return fConfiguration;} | |
6c62cb59 | 126 | |
5b37c6e5 | 127 | void SetWeightFunction(TF1* func) {fFuncWeight = func;} |
128 | TF1* GetWeightFunction() const {return fFuncWeight;} | |
129 | ||
379592af | 130 | protected: |
379592af | 131 | AliCFManager *fCFManager; // pointer to the CF manager |
132 | TH1I *fHistEventsProcessed; //! simple histo for monitoring the number of events processed | |
133 | THnSparse* fCorrelation; // response matrix for unfolding | |
134 | Int_t fCountMC; // MC particle found | |
135 | Int_t fCountAcc; // MC particle found that satisfy acceptance cuts | |
136 | Int_t fCountVertex; // Reco particle found that satisfy vertex constrained | |
137 | Int_t fCountRefit; // Reco particle found that satisfy kTPCrefit and kITSrefit | |
138 | Int_t fCountReco; // Reco particle found that satisfy cuts | |
139 | Int_t fCountRecoAcc; // Reco particle found that satisfy cuts in requested acceptance | |
140 | Int_t fCountRecoITSClusters; // Reco particle found that satisfy cuts in n. of ITS clusters | |
141 | Int_t fCountRecoPPR; // Reco particle found that satisfy cuts in PPR | |
142 | Int_t fCountRecoPID; //Reco PID step | |
143 | Int_t fEvents; // n. of events | |
f2703bd2 | 144 | Int_t fDecayChannel; // decay channel to configure the task |
379592af | 145 | Bool_t fFillFromGenerated; // flag to indicate whether data container should be filled with generated values also for reconstructed particles |
146 | UShort_t fOriginDselection; // flag to select D0 origins. 0 Only from charm 1 only from beauty 2 both from charm and beauty | |
147 | Bool_t fAcceptanceUnf; // flag for unfolding before or after cuts. | |
f2703bd2 | 148 | AliRDHFCuts* fCuts; // cuts |
149 | Bool_t fUseWeight; //flag to decide whether to use weights != 1 when filling the container or not | |
150 | Double_t fWeight; //weight used to fill the container | |
151 | Int_t fNvar; // number of variables for the container | |
31da6b05 | 152 | TString fPartName; // D meson name |
153 | TString fDauNames; // daughter in fin state | |
3ee5eb83 | 154 | Char_t fSign; // flag to decide wheter to keep D0 only (0), D0bar only (1), or both D0 and D0bar (2) |
b7af2639 | 155 | Bool_t fCentralitySelection; //flag to switch off the centrality selection |
fbec9fa9 | 156 | Int_t fFakeSelection; //selection flag for fakes tracks |
0ada222f | 157 | Bool_t fRejectIfNoQuark; // flag to remove events not geenrated with PYTHIA |
158 | Bool_t fUseMCVertex; // flag to use MC vertex (useful when runnign in pp) | |
6c62cb59 | 159 | Int_t fDsOption; // Ds decay option |
ec5288c3 | 160 | Int_t fConfiguration; // configuration (slow / fast) of the CF --> different variables will be allocated (all / reduced number) |
5b37c6e5 | 161 | TF1* fFuncWeight; // user-defined function to be used to calculate weights |
b7af2639 | 162 | |
5b37c6e5 | 163 | ClassDef(AliCFTaskVertexingHF,9); // class for HF corrections as a function of many variables |
379592af | 164 | }; |
165 | ||
166 | #endif |