]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/correlationHF/AliDxHFECorrelation.h
Code reworking to analize ESD and AOD (H.Qvigstad)
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliDxHFECorrelation.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 //* This file is property of and copyright by the ALICE Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                     *
6 //* See cxx source for full Copyright notice                           *
7
8 /// @file   AliDxHFECorrelation.h
9 /// @author Sedat Altinpinar, Hege Erdal, Matthias Richter
10 /// @date   2012-04-25
11 /// @brief  Worker class for D0-HF electron correlation
12 ///
13
14 #ifndef ALIDXHFECORRELATION_H
15 #define ALIDXHFECORRELATION_H
16
17 #include "TNamed.h"
18
19 class AliRDHFCutsD0toKpi;
20 class TH1;
21 class THnSparse;
22 class TObject;
23 class TList;
24
25 class AliDxHFECorrelation : public TNamed {
26  public:
27   /// default constructor
28   AliDxHFECorrelation(const char* name=NULL);
29   /// destructor
30   virtual ~AliDxHFECorrelation();
31
32   // event control histogram
33   enum {
34     kEventsAll = 0, // all events
35     kEventsSel,     // selected events
36     kEventsD0 ,     // events with D0s
37     kEventsD0e,     // events with correlated D0s
38     kNEventControlLabels
39   };
40
41   // init
42   int Init();
43
44   /// fill histograms from particles
45   int Fill(const TObjArray* candidatesD0, const TObjArray* candidatesElectron);
46
47   /// histogram event properties
48   virtual int HistogramEventProperties(int bin);
49
50   /// overloaded from TObject: cleanup
51   virtual void Clear(Option_t * option ="");
52   /// overloaded from TObject: print info
53   virtual void Print(Option_t *option="") const;
54   /// overloaded from TObject: draw histograms
55   virtual void Draw(Option_t *option="");
56   /// overloaded from TObject: find object by name
57   virtual TObject* FindObject(const char *name) const;
58   /// overloaded from TObject: find object by pointer
59   virtual TObject* FindObject(const TObject *obj) const;
60   /// overloaded from TObject: save to file
61   virtual void     SaveAs(const char *filename="",Option_t *option="") const; // *MENU*
62
63   virtual void SetCuts(AliRDHFCutsD0toKpi* cuts) {fCuts=cuts;}
64   virtual void SetUseMC(Bool_t useMC){fUseMC=useMC;}
65
66   Bool_t GetUseMC() const {return fUseMC;}
67   const TList* GetControlObjects() const {return fControlObjects;}
68
69
70   AliDxHFECorrelation& operator+=(const AliDxHFECorrelation& other);
71
72
73   // Probably not needed anymore, since code was changed to THnSparse
74   // but keep here in case we need it later
75   enum {
76     khD0pT,         // TH1F
77     khD0Phi,        // TH1F
78     khD0Eta,        // TH1F
79     khElectronpT,   // TH1F
80     khElectronPhi,  // TH1F
81     khElectronEta,  // TH1F
82     kNofHistograms
83   };
84
85  protected:
86   /// add control object to list, the base class becomes owner of the object
87   int AddControlObject(TObject* pObj);
88
89  private:
90   /// copy constructor
91   AliDxHFECorrelation(const AliDxHFECorrelation& other);
92   /// assignment operator
93   AliDxHFECorrelation& operator=(const AliDxHFECorrelation& other);
94
95   TObjArray* fHistograms;     // the histograms - for the moment not in use. 
96   TList* fControlObjects;     // list of control objects
97   THnSparse* fCorrProperties; // the Correlation properties of selected particles
98   TH1* fhEventControlCorr;    // event control histogram
99   AliRDHFCutsD0toKpi *fCuts;  //  Cuts 
100   Bool_t fUseMC;              // use MC info
101
102   static const char* fgkEventControlBinNames[];
103   static const char* fgkCorrControlBinNames[];
104
105   ClassDef(AliDxHFECorrelation, 2)
106 };
107 #endif