]>
Commit | Line | Data |
---|---|---|
f5ec6c30 | 1 | #ifndef ALICFHEAVYFLAVOURTASKMULTIVARMULTISTEP_H |
2 | #define ALICFHEAVYFLAVOURTASKMULTIVARMULTISTEP_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 | ||
f5ec6c30 | 20 | //----------------------------------------------------------------------- |
21 | // Class for HF corrections as a function of many variables and step | |
22 | // Author : C. Zampolli, CERN | |
a5d92cb4 | 23 | // Base class for HF Unfolding - agrelli@uu.nl |
f5ec6c30 | 24 | //----------------------------------------------------------------------- |
25 | ||
26 | ||
27 | #include "AliAnalysisTaskSE.h" | |
28 | ||
29 | class TH1I; | |
30 | class TParticle ; | |
31 | class TFile ; | |
32 | class TClonesArray ; | |
33 | class AliCFManager; | |
34 | class AliAODRecoDecay; | |
35 | class AliAODRecoDecayHF2Prong; | |
36 | class AliAODMCParticle; | |
a5d92cb4 | 37 | class THnSparse; |
174db2b5 | 38 | class AliRDHFCutsD0toKpi; |
f5ec6c30 | 39 | |
40 | class AliCFHeavyFlavourTaskMultiVarMultiStep : public AliAnalysisTaskSE { | |
41 | public: | |
42 | ||
43 | enum { | |
174db2b5 | 44 | kStepGeneratedLimAcc = 0, |
45 | kStepGenerated = 1, | |
46 | kStepAcceptance = 2, | |
47 | kStepVertex = 3, | |
48 | kStepRefit = 4, | |
49 | kStepReconstructed = 5, | |
50 | kStepRecoAcceptance = 6, | |
51 | kStepRecoITSClusters = 7, | |
52 | kStepRecoPPR = 8, | |
53 | kStepRecoPID = 9 | |
f5ec6c30 | 54 | }; |
55 | ||
56 | AliCFHeavyFlavourTaskMultiVarMultiStep(); | |
174db2b5 | 57 | AliCFHeavyFlavourTaskMultiVarMultiStep(const Char_t* name, AliRDHFCutsD0toKpi* cuts); |
f5ec6c30 | 58 | AliCFHeavyFlavourTaskMultiVarMultiStep& operator= (const AliCFHeavyFlavourTaskMultiVarMultiStep& c); |
59 | AliCFHeavyFlavourTaskMultiVarMultiStep(const AliCFHeavyFlavourTaskMultiVarMultiStep& c); | |
60 | virtual ~AliCFHeavyFlavourTaskMultiVarMultiStep(); | |
61 | ||
62 | // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects | |
63 | void UserCreateOutputObjects(); | |
64 | void UserExec(Option_t *option); | |
ae3d971c | 65 | void Init(); |
66 | void LocalInit() {Init();} | |
f5ec6c30 | 67 | void Terminate(Option_t *); |
a5d92cb4 | 68 | |
69 | // UNFOLDING | |
70 | void SetCorrelationMatrix(THnSparse* h) {fCorrelation=h;} | |
71 | void SetAcceptanceUnf(Bool_t AcceptanceUnf) {fAcceptanceUnf = AcceptanceUnf;} | |
72 | Bool_t GetAcceptanceUnf() const {return fAcceptanceUnf;} | |
73 | ||
f5ec6c30 | 74 | |
75 | // CORRECTION FRAMEWORK RELATED FUNCTIONS | |
76 | void SetCFManager(AliCFManager* io) {fCFManager = io;} // global correction manager | |
77 | AliCFManager * GetCFManager() {return fCFManager;} // get corr manager | |
78 | ||
79 | void SetPDG(Int_t code) {fPDG = code; } // defines the PDG code of searched HF | |
23e6959e | 80 | Double_t CosThetaStar(const AliAODMCParticle* mcPart, const AliAODMCParticle* mcPartDaughter0, const AliAODMCParticle* mcPartDaughter1) const; // returns cos(ThetaStar) of the D0 decay |
81 | Double_t CT(const AliAODMCParticle* mcPart, const AliAODMCParticle* mcPartDaughter0, const AliAODMCParticle* mcPartDaughter1) const; // returns cT of the D0 decay | |
f5ec6c30 | 82 | void SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;} |
83 | Bool_t GetFillFromGenerated() const {return fFillFromGenerated;} | |
23e6959e | 84 | Bool_t GetGeneratedValuesFromMCParticle(AliAODMCParticle* mcPart, const TClonesArray* mcArray, Double_t* vectorMC) const; |
f5ec6c30 | 85 | void SetMinITSClusters(Int_t minITSClusters) {fMinITSClusters = minITSClusters;} |
86 | Int_t GetMinITSClusters() const {return fMinITSClusters;} | |
23e6959e | 87 | Int_t CheckOrigin(const AliAODMCParticle* mcPart, const TClonesArray* mcArray) const; |
f5ec6c30 | 88 | |
23e6959e | 89 | void SetKeepD0fromB(Bool_t keepD0fromB) {fKeepD0fromB=keepD0fromB;} |
90 | Bool_t GetKeepD0fromB() const {return fKeepD0fromB;} | |
c59e1898 | 91 | void SetKeepD0fromBOnly(Bool_t keepD0fromBOnly){ fKeepD0fromBOnly=keepD0fromBOnly; } |
23e6959e | 92 | Bool_t GetKeepD0fromBOnly() const { return fKeepD0fromBOnly;} |
ae3d971c | 93 | void SetUseWeight(Bool_t useWeight){fUseWeight=useWeight;} |
94 | Bool_t GetUseWeight() const {return fUseWeight;} | |
95 | Double_t GetWeight(Float_t pt); | |
23e6959e | 96 | Double_t DodNdptFit(Float_t pt, const Double_t* par) const; |
3ee5eb83 | 97 | void SetSign(Char_t isSign) {fSign = isSign;} |
23e6959e | 98 | Char_t GetSign() const {return fSign;} |
f6d06004 | 99 | |
f5ec6c30 | 100 | protected: |
101 | Int_t fPDG; // PDG code of searched V0's | |
4df1e470 | 102 | AliCFManager *fCFManager; // pointer to the CF manager |
f5ec6c30 | 103 | TH1I *fHistEventsProcessed; //! simple histo for monitoring the number of events processed |
a5d92cb4 | 104 | THnSparse* fCorrelation; // response matrix for unfolding |
f5ec6c30 | 105 | Int_t fCountMC; // MC particle found |
106 | Int_t fCountAcc; // MC particle found that satisfy acceptance cuts | |
ae3e319c | 107 | Int_t fCountVertex; // Reco particle found that satisfy vertex constrained |
108 | Int_t fCountRefit; // Reco particle found that satisfy kTPCrefit and kITSrefit | |
f5ec6c30 | 109 | Int_t fCountReco; // Reco particle found that satisfy cuts |
110 | Int_t fCountRecoAcc; // Reco particle found that satisfy cuts in requested acceptance | |
111 | Int_t fCountRecoITSClusters; // Reco particle found that satisfy cuts in n. of ITS clusters | |
112 | Int_t fCountRecoPPR; // Reco particle found that satisfy cuts in PPR | |
174db2b5 | 113 | Int_t fCountRecoPID; // Reco particle found that satisfy cuts in PPR, and PID condition |
f5ec6c30 | 114 | Int_t fEvents; // n. of events |
115 | Bool_t fFillFromGenerated; // flag to indicate whether data container should be filled | |
116 | // with generated values also for reconstructed particles | |
117 | Int_t fMinITSClusters; // min n. of ITS clusters for RecoDecay | |
a5d92cb4 | 118 | Bool_t fAcceptanceUnf; // flag for unfolding before or after cuts. |
f6d06004 | 119 | |
120 | Bool_t fKeepD0fromB; // flag to consider also D0 coming from B | |
c59e1898 | 121 | Bool_t fKeepD0fromBOnly; // flag to consider _only_ D0 coming from B |
174db2b5 | 122 | AliRDHFCutsD0toKpi* fCuts; // cuts |
ae3d971c | 123 | Bool_t fUseWeight; // flag to decide whether to use weights != 1 when filling the container or not |
124 | Double_t fWeight; // weight used to fill the container | |
3ee5eb83 | 125 | Char_t fSign; // flag to decide wheter to keep D0 only (0), D0bar only (1), or both D0 and D0bar (2) |
f5ec6c30 | 126 | |
3ee5eb83 | 127 | ClassDef(AliCFHeavyFlavourTaskMultiVarMultiStep,7); // class for HF corrections as a function of many variables |
f5ec6c30 | 128 | }; |
129 | ||
130 | #endif |