]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliCFHeavyFlavourTaskMultiVarMultiStep.h
Possibility to perform the (pt,eta) unfolding within the CF (Alessandro)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliCFHeavyFlavourTaskMultiVarMultiStep.h
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
21 // Base class for HF Unfolding - agrelli@uu.nl
22 //-----------------------------------------------------------------------
23
24
25 #include "AliAnalysisTaskSE.h"
26
27 class TH1I;
28 class TParticle ;
29 class TFile ;
30 class TClonesArray ;
31 class AliCFManager;
32 class AliAODRecoDecay;
33 class AliAODRecoDecayHF2Prong;
34 class AliAODMCParticle;
35 class THnSparse;
36
37 class AliCFHeavyFlavourTaskMultiVarMultiStep : public AliAnalysisTaskSE {
38   public:
39
40   enum {
41     kStepGenerated       = 0,
42     kStepAcceptance      = 1,
43     kStepReconstructed   = 2,
44     kStepRecoAcceptance  = 3,
45     kStepRecoITSClusters = 4,
46     kStepRecoPPR         = 5
47   };
48
49   AliCFHeavyFlavourTaskMultiVarMultiStep();
50   AliCFHeavyFlavourTaskMultiVarMultiStep(const Char_t* name);
51   AliCFHeavyFlavourTaskMultiVarMultiStep& operator= (const AliCFHeavyFlavourTaskMultiVarMultiStep& c);
52   AliCFHeavyFlavourTaskMultiVarMultiStep(const AliCFHeavyFlavourTaskMultiVarMultiStep& c);
53   virtual ~AliCFHeavyFlavourTaskMultiVarMultiStep();
54
55   // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
56   void     UserCreateOutputObjects();
57   void     UserExec(Option_t *option);
58   void     Terminate(Option_t *);
59
60  // UNFOLDING
61   void     SetCorrelationMatrix(THnSparse* h) {fCorrelation=h;}
62   void     SetAcceptanceUnf(Bool_t AcceptanceUnf) {fAcceptanceUnf = AcceptanceUnf;}
63   Bool_t   GetAcceptanceUnf() const {return fAcceptanceUnf;}
64
65   
66   // CORRECTION FRAMEWORK RELATED FUNCTIONS
67   void           SetCFManager(AliCFManager* io) {fCFManager = io;}   // global correction manager
68   AliCFManager * GetCFManager()                 {return fCFManager;} // get corr manager
69
70   void     SetPDG(Int_t code) {fPDG = code; }     // defines the PDG code of searched HF
71   Double_t CosThetaStar(AliAODMCParticle* mcPart, AliAODMCParticle* mcPartDaughter0, AliAODMCParticle* mcPartDaughter1) const;  // returns cos(ThetaStar) of the D0 decay
72   Double_t CT(AliAODMCParticle* mcPart, AliAODMCParticle* mcPartDaughter0, AliAODMCParticle* mcPartDaughter1) const;            // returns cT of the D0 decay
73   void     SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;}
74   Bool_t   GetFillFromGenerated() const {return fFillFromGenerated;}
75   Bool_t   GetGeneratedValuesFromMCParticle(AliAODMCParticle* mcPart, TClonesArray* mcArray, Double_t* vectorMC) const;
76   void     SetMinITSClusters(Int_t minITSClusters) {fMinITSClusters = minITSClusters;}
77   Int_t    GetMinITSClusters() const {return fMinITSClusters;}
78   Int_t    CheckOrigin(AliAODMCParticle* mcPart, TClonesArray* mcArray) const;
79
80  protected:
81   Int_t           fPDG;         //  PDG code of searched V0's
82   AliCFManager   *fCFManager;   //  pointer to the CF manager
83   TH1I *fHistEventsProcessed;   //! simple histo for monitoring the number of events processed
84   THnSparse* fCorrelation;      //  response matrix for unfolding
85   Int_t fCountMC;               //  MC particle found
86   Int_t fCountAcc;              //  MC particle found that satisfy acceptance cuts
87   Int_t fCountReco;             //  Reco particle found that satisfy cuts
88   Int_t fCountRecoAcc;          //  Reco particle found that satisfy cuts in requested acceptance
89   Int_t fCountRecoITSClusters;  //  Reco particle found that satisfy cuts in n. of ITS clusters
90   Int_t fCountRecoPPR;          //  Reco particle found that satisfy cuts in PPR
91   Int_t fEvents;                //  n. of events
92   Bool_t fFillFromGenerated;    //  flag to indicate whether data container should be filled 
93                                 //  with generated values also for reconstructed particles
94   Int_t fMinITSClusters;        //  min n. of ITS clusters for RecoDecay
95   Bool_t fAcceptanceUnf;        //  flag for unfolding before or after cuts.
96   
97   ClassDef(AliCFHeavyFlavourTaskMultiVarMultiStep,2); // class for HF corrections as a function of many variables
98 };
99
100 #endif