]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/AliDielectronHF.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronHF.h
1 #ifndef ALIDIELECTRONHF_H
2 #define ALIDIELECTRONHF_H
3
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //#############################################################
8 //#                                                           # 
9 //#         Class AliDielectronHF                     #
10 //#                                                           #
11 //#  Authors:                                                 #
12 //#   Julian Book, Uni-Frankfurt / Julian.Book@cern.ch        #
13 //#                                                           #
14 //#############################################################
15
16 #include <TNamed.h>
17 #include <TObjArray.h>
18 #include <TBits.h>
19 #include <THnBase.h>
20
21 #include "AliDielectronVarManager.h"
22 #include "AliDielectronHistos.h"
23
24 class AliDielectronHF : public TNamed {
25 public:
26   enum { kMaxCuts=20 };
27   enum EBinType {
28     kStdBin=0,
29     kBinToMax,
30     kBinFromMin,
31     kSymBin
32   };
33   enum EPairType {
34     //    kOSonly=0,  kOSandLS, kOSandROT, kOSandMIX, kAll, kMConly
35     kAll=0, kMConly,
36     kSeAll,   kSeOnlyOS,
37     kMeAll,   kMeOnlyOS,
38     kSeMeAll, kSeMeOnlyOS,
39     kSeReAll, kSeReOnlyOS,
40   };
41
42   AliDielectronHF();
43   AliDielectronHF(const char*name, const char* title);
44
45   virtual ~AliDielectronHF();
46
47   void Init();
48   void SetSignalsMC(TObjArray* array)    {fSignalsMC = array;}
49   void SetStepForMCGenerated(Bool_t switcher=kTRUE)    {fStepGenerated = switcher;}
50   void SetPairTypes(EPairType ptype) { fPairType=ptype; }
51   void SetEventArray(Bool_t switcher=kTRUE) {fEventArray=switcher;}
52
53   // functions to add 1-dimensional objects
54   void UserProfile(const char* histClass, UInt_t valTypeP,
55                    const TVectorD * const binsX, UInt_t valTypeX, TString option="",
56                    UInt_t valTypeW=AliDielectronHistos::kNoWeights);
57   void UserHistogram(const char* histClass,
58                      const TVectorD * const binsX, UInt_t valTypeX, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
59   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,valTypeX,"",valTypeW); }
60
61   // functions to add 2-dimensional objects
62   void UserProfile(const char* histClass, UInt_t valTypeP,
63                    const TVectorD * const binsX, const TVectorD * const binsY,
64                    UInt_t valTypeX, UInt_t valTypeY, TString option="", UInt_t valTypeW=AliDielectronHistos::kNoWeights);
65   void UserHistogram(const char* histClass,
66                      const TVectorD * const binsX, const TVectorD * const binsY,
67                      UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
68   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,binsY,valTypeX,valTypeY,"",valTypeW); }
69
70   // functions to add 3-dimensional objects
71   void UserProfile(const char* histClass, UInt_t valTypeP,
72                    const TVectorD * const binsX, const TVectorD * const binsY, const TVectorD * const binsZ,
73                    UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeZ, TString option="",
74                    UInt_t valTypeW=AliDielectronHistos::kNoWeights);
75   void UserHistogram(const char* histClass,
76                      const TVectorD * const binsX, const TVectorD * const binsY, const TVectorD * const binsZ,
77                      UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeZ, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
78   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,binsY,binsZ,valTypeX,valTypeY,valTypeZ,"",valTypeW); }
79
80   // functions to add multidimensional stuff
81   void UserSparse(const char* histClass,
82                   Int_t ndim, TObjArray *limits, UInt_t *vars, UInt_t valTypeW=AliDielectronHistos::kNoWeights);
83
84
85   // functions to define the grid
86   void AddCutVariable(AliDielectronVarManager::ValueTypes type, Int_t nbins,
87                       Double_t min, Double_t max, Bool_t log=kFALSE, Bool_t leg=kFALSE, EBinType btype=kStdBin);
88   void AddCutVariable(AliDielectronVarManager::ValueTypes type, 
89                       const char* binLimitStr, Bool_t leg=kFALSE, EBinType btype=kStdBin);
90   void AddCutVariable(AliDielectronVarManager::ValueTypes type, 
91                       TVectorD * binLimits, Bool_t leg=kFALSE, EBinType btype=kStdBin);
92
93   void Fill(Int_t pairIndex, const AliDielectronPair *particle);
94   void Fill(Int_t label1, Int_t label2, Int_t nSignal);
95   void Fill(Int_t Index, Double_t * const valuesPair, Double_t * const valuesLeg1, Double_t * const valuesLeg2);
96
97   Bool_t IsPairTypeSelected(Int_t itype);
98
99   Int_t GetNumberOfBins() const;
100   const TObjArray * GetHistArray() const { return &fArrPairType; }
101   Bool_t GetStepForMCGenerated()   const { return fStepGenerated; }
102   Bool_t IsEventArray()           const { return fEventArray; }
103   
104   
105
106 private:
107   TBits     *fUsedVars;             // list of used variables
108
109   TObjArray fArrPairType;           //-> array of pair types
110   EPairType fPairType;              // which pair combinations to include
111   TObjArray* fSignalsMC;            //! array of MC signals to be studied
112
113   UShort_t  fVarCuts[kMaxCuts];     // cut variables
114   TBits     *fVarCutType;           // array to store leg booleans
115   //  Bool_t    fVarCutType[kMaxCuts];  // array to store leg booleans
116   TObjArray fAxes;                  // Axis descriptions of the cut binning
117   UShort_t  fBinType[kMaxCuts];     // binning type of the axes
118   
119   Bool_t    fHasMC;                 // is mc array
120   Bool_t    fStepGenerated;         // switcher for generated particles
121   Bool_t    fEventArray;            // switch OFF pair types and ON event array
122   TObjArray fRefObj;               // reference object
123
124   AliDielectronHF(const AliDielectronHF &c);
125   AliDielectronHF &operator=(const AliDielectronHF &c);
126
127   
128   ClassDef(AliDielectronHF,6)         // Dielectron HF
129 };
130
131
132
133 #endif