]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/AliDielectronHF.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[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
19 #include "AliDielectronVarManager.h"
20 #include "AliDielectronHistos.h"
21
22 class AliDielectronHF : public TNamed {
23 public:
24   enum { kMaxCuts=20 };
25   enum EBinType {
26     kStdBin=0,
27     kBinToMax,
28     kBinFromMin,
29     kSymBin
30   };
31   enum EPairType {
32     kOSonly=0,  kOSandLS, kOSandROT, kOSandMIX, kAll, kMConly
33   };
34
35   AliDielectronHF();
36   AliDielectronHF(const char*name, const char* title);
37
38   virtual ~AliDielectronHF();
39
40   void Init();
41   void SetSignalsMC(TObjArray* array)    {fSignalsMC = array;}
42   void SetStepForMCGenerated(Bool_t switcher=kTRUE)    {fStepGenerated = switcher;}
43   void SetPairTypes(EPairType ptype=kOSonly) { fPairType=ptype; }
44
45   // functions to add 1-dimensional objects
46   void UserProfile(const char* histClass, UInt_t valTypeP,
47                    const TVectorD * const binsX, UInt_t valTypeX, TString option="",
48                    UInt_t valTypeW=AliDielectronHistos::kNoWeights);
49   void UserHistogram(const char* histClass,
50                      const TVectorD * const binsX, UInt_t valTypeX, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
51   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,valTypeX,"",valTypeW); }
52
53   // functions to add 2-dimensional objects
54   void UserProfile(const char* histClass, UInt_t valTypeP,
55                    const TVectorD * const binsX, const TVectorD * const binsY,
56                    UInt_t valTypeX, UInt_t valTypeY, TString option="", UInt_t valTypeW=AliDielectronHistos::kNoWeights);
57   void UserHistogram(const char* histClass,
58                      const TVectorD * const binsX, const TVectorD * const binsY,
59                      UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
60   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,binsY,valTypeX,valTypeY,"",valTypeW); }
61
62   // functions to add 3-dimensional objects
63   void UserProfile(const char* histClass, UInt_t valTypeP,
64                    const TVectorD * const binsX, const TVectorD * const binsY, const TVectorD * const binsZ,
65                    UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeZ, TString option="",
66                    UInt_t valTypeW=AliDielectronHistos::kNoWeights);
67   void UserHistogram(const char* histClass,
68                      const TVectorD * const binsX, const TVectorD * const binsY, const TVectorD * const binsZ,
69                      UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeZ, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
70   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,binsY,binsZ,valTypeX,valTypeY,valTypeZ,"",valTypeW); }
71
72
73   // functions to define the grid
74   void AddCutVariable(AliDielectronVarManager::ValueTypes type, Int_t nbins,
75                       Double_t min, Double_t max, Bool_t log=kFALSE, Bool_t leg=kFALSE, EBinType btype=kStdBin);
76   void AddCutVariable(AliDielectronVarManager::ValueTypes type, 
77                       const char* binLimitStr, Bool_t leg=kFALSE, EBinType btype=kStdBin);
78   void AddCutVariable(AliDielectronVarManager::ValueTypes type, 
79                       TVectorD * binLimits, Bool_t leg=kFALSE, EBinType btype=kStdBin);
80
81   void Fill(Int_t pairIndex, const AliDielectronPair *particle);
82   void Fill(Int_t label1, Int_t label2, Int_t nSignal);
83   void Fill(Int_t Index, Double_t * const valuesPair, Double_t * const valuesLeg1, Double_t * const valuesLeg2);
84
85   Bool_t IsPairTypeSelected(Int_t itype);
86
87   Int_t GetNumberOfBins() const;
88   const TObjArray * GetHistArray() const { return &fArrPairType; }
89   Bool_t GetStepForMCGenerated() const   { return fStepGenerated; }
90
91 private:
92   TObjArray fArrPairType;           //-> array of pair types
93   EPairType fPairType;              // which pair combinations to include
94   TObjArray* fSignalsMC;            //! array of MC signals to be studied
95
96   UShort_t  fVarCuts[kMaxCuts];     // cut variables
97   Bool_t    fVarCutType[kMaxCuts];  // array to store leg booleans
98   TObjArray fAxes;                  // Axis descriptions of the cut binning
99   UShort_t  fBinType[kMaxCuts];     // binning type of the axes
100   
101   Bool_t    fHasMC;                 // is mc array
102   Bool_t    fStepGenerated;         // switcher for generated particles
103
104   TObjArray fRefObj;               // reference object
105
106   AliDielectronHF(const AliDielectronHF &c);
107   AliDielectronHF &operator=(const AliDielectronHF &c);
108
109   
110   ClassDef(AliDielectronHF,3)         // Dielectron HF
111 };
112
113
114
115 #endif