]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWG3/vertexingHF/AliCFTaskVertexingHF.h
Coverity
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliCFTaskVertexingHF.h
... / ...
CommitLineData
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
18/* $Id$ */
19
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;
41class AliRDHFCuts;
42class AliCFVertexingHF2Prong;
43class AliCFVertexingHF3Prong;
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 };
60
61 enum {
62 kSnail = 0, // slow configuration, all variables
63 kCheetah = 1 // fast configuration, only a subset of variables
64 };
65
66 AliCFTaskVertexingHF();
67 AliCFTaskVertexingHF(const Char_t* name, AliRDHFCuts* cuts);
68 AliCFTaskVertexingHF& operator= (const AliCFTaskVertexingHF& c);
69 AliCFTaskVertexingHF(const AliCFTaskVertexingHF& c);
70 virtual ~AliCFTaskVertexingHF();
71
72 // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
73 void UserCreateOutputObjects();
74 void UserExec(Option_t *option);
75 void Init();
76 void LocalInit() {Init();}
77 void Terminate(Option_t *);
78
79 // UNFOLDING
80 void SetCorrelationMatrix(THnSparse* h) {fCorrelation=h;}
81 void SetAcceptanceUnf(Bool_t AcceptanceUnf) {fAcceptanceUnf = AcceptanceUnf;}
82 Bool_t GetAcceptanceUnf() const {return fAcceptanceUnf;}
83
84
85 // CORRECTION FRAMEWORK RELATED FUNCTIONS
86 void SetCFManager(AliCFManager* io) {fCFManager = io;} // global correction manager
87 AliCFManager * GetCFManager() {return fCFManager;} // get corr manager
88
89 // Setters (and getters) for the config macro
90 void SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;}
91 Bool_t GetFillFromGenerated() const {return fFillFromGenerated;}
92 void SetDecayChannel (Int_t decayChannel) {fDecayChannel = decayChannel;}
93 Int_t GetDecayChannel () {return fDecayChannel;}
94 void SetUseWeight(Bool_t useWeight){fUseWeight=useWeight;}
95 Bool_t GetUseWeight() const {return fUseWeight;}
96 Double_t GetWeight(Float_t pt);
97 Double_t dNdptFit(Float_t pt, Double_t* par);
98
99 void SetDselection(UShort_t originDselection) {fOriginDselection=originDselection;}
100 UShort_t GetDselection (){return fOriginDselection;}
101 void SetSign(Char_t isSign) {fSign = isSign;}
102 Char_t GetSign() {return fSign;}
103
104 void SetCentralitySelection(Bool_t centSelec = kTRUE) {fCentralitySelection = centSelec;}
105 Bool_t GetCentralitySelection() {return fCentralitySelection;}
106
107 void SetFakeSelection(Int_t fakeSel = 0) {fFakeSelection=fakeSel;}
108 Int_t GetFakeSelection(){return fFakeSelection;}
109
110 void SetRejectCandidateIfNotFromQuark(Bool_t opt){fRejectIfNoQuark=opt;}
111 Bool_t GetRejectCandidateIfNotFromQuark(){return fRejectIfNoQuark;}
112
113 void SetUseMCVertex(Bool_t opt){fUseMCVertex=opt;}
114 Bool_t GetUseMCVertex(){return fUseMCVertex;}
115
116
117 void SetKeepDsViaPhi(){fDsOption=1;}
118 void SetKeepDsViaK0star(){fDsOption=2;}
119 void SetKeepAllDs(){fDsOption=3;}
120
121 Bool_t ProcessDs(Int_t returnCodeDs) const;
122
123 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;}
124 Int_t GetConfiguration() const {return fConfiguration;}
125
126protected:
127 AliCFManager *fCFManager; // pointer to the CF manager
128 TH1I *fHistEventsProcessed; //! simple histo for monitoring the number of events processed
129 THnSparse* fCorrelation; // response matrix for unfolding
130 Int_t fCountMC; // MC particle found
131 Int_t fCountAcc; // MC particle found that satisfy acceptance cuts
132 Int_t fCountVertex; // Reco particle found that satisfy vertex constrained
133 Int_t fCountRefit; // Reco particle found that satisfy kTPCrefit and kITSrefit
134 Int_t fCountReco; // Reco particle found that satisfy cuts
135 Int_t fCountRecoAcc; // Reco particle found that satisfy cuts in requested acceptance
136 Int_t fCountRecoITSClusters; // Reco particle found that satisfy cuts in n. of ITS clusters
137 Int_t fCountRecoPPR; // Reco particle found that satisfy cuts in PPR
138 Int_t fCountRecoPID; //Reco PID step
139 Int_t fEvents; // n. of events
140 Int_t fDecayChannel; // decay channel to configure the task
141 Bool_t fFillFromGenerated; // flag to indicate whether data container should be filled with generated values also for reconstructed particles
142 UShort_t fOriginDselection; // flag to select D0 origins. 0 Only from charm 1 only from beauty 2 both from charm and beauty
143 Bool_t fAcceptanceUnf; // flag for unfolding before or after cuts.
144 AliRDHFCuts* fCuts; // cuts
145 Bool_t fUseWeight; //flag to decide whether to use weights != 1 when filling the container or not
146 Double_t fWeight; //weight used to fill the container
147 Int_t fNvar; // number of variables for the container
148 TString fPartName; // D meson name
149 TString fDauNames; // daughter in fin state
150 Char_t fSign; // flag to decide wheter to keep D0 only (0), D0bar only (1), or both D0 and D0bar (2)
151 Bool_t fCentralitySelection; //flag to switch off the centrality selection
152 Int_t fFakeSelection; //selection flag for fakes tracks
153 Bool_t fRejectIfNoQuark; // flag to remove events not geenrated with PYTHIA
154 Bool_t fUseMCVertex; // flag to use MC vertex (useful when runnign in pp)
155 Int_t fDsOption; // Ds decay option
156 Int_t fConfiguration; // configuration (slow / fast) of the CF --> different variables will be allocated (all / reduced number)
157
158 ClassDef(AliCFTaskVertexingHF,8); // class for HF corrections as a function of many variables
159};
160
161#endif