]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnAnalysisTaskEff.h
Added pass1 and pass2 directories
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnAnalysisTaskEff.h
1 //
2 // Class AliRsnAnalysisTaskEff
3 //
4 // Base class for efficiency computation tasks
5 // which should be inherited by different efficiency computators
6 //
7 // author: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
8 //
9
10 #ifndef ALIRSNANALYSISTASKEFF_H
11 #define ALIRSNANALYSISTASKEFF_H
12
13 #include <TArrayI.h>
14 #include <TArrayD.h>
15 #include <TObjArray.h>
16 #include <TClonesArray.h>
17
18 #include "AliCFContainer.h"
19
20 #include "AliRsnValue.h"
21 #include "AliRsnCutSet.h"
22 #include "AliRsnVAnalysisTask.h"
23
24 class TList;
25 class AliVEvent;
26
27 class AliRsnAnalysisTaskEff : public AliRsnVAnalysisTask {
28
29 public:
30
31    AliRsnAnalysisTaskEff(const char *name = "AliRsnAnalysisTasEff");
32    AliRsnAnalysisTaskEff(const AliRsnAnalysisTaskEff& copy);
33    AliRsnAnalysisTaskEff& operator=(const AliRsnAnalysisTaskEff& copy);
34    virtual ~AliRsnAnalysisTaskEff() {;};
35    
36    // work-flow
37    AliRsnCutSet*   GetEventCuts() {return &fEventCuts;}
38    void            AddDef(TObject *def);
39    void            AddAxis(AliRsnValue *axis);
40    void            AddStepMC(TObject *set);
41    void            AddStepRec(TObject *set);
42
43    // inherited
44    virtual void    RsnUserCreateOutputObjects();
45    virtual void    RsnUserExec(Option_t*);
46    virtual void    RsnTerminate(Option_t*);
47    virtual Bool_t  RsnEventProcess();
48
49 protected:
50
51    TArrayI         FindTracks(Int_t label, AliVEvent *esd);
52    virtual void    ProcessEventESD();
53    virtual void    ProcessEventAOD();
54    virtual Int_t   NGoodSteps();
55    virtual void    FillContainer(Bool_t mcList, TObject *def);
56    
57    TObjArray       fDefs;        //  list of definitions
58    TObjArray       fStepsMC;     //  list of cuts for all steps with MC tracks
59    TObjArray       fStepsRec;    //  list of cuts for all steps with reconstructed tracks
60    TClonesArray    fAxes;        //  list of axes of efficiency plots
61    
62    TList          *fOutList;     //  global output list
63    AliRsnCutSet    fEventCuts;   //  event cuts
64    
65    TArrayD         fVar;         //! list of variables of the container (temporary)
66
67    ClassDef(AliRsnAnalysisTaskEff, 1)
68 };
69
70 #endif