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