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