]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/AliDielectronHF.h
including switch to set on/off iso-track core removal, cleaning and bug fix
[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
52   // functions to add 1-dimensional objects
53   void UserProfile(const char* histClass, UInt_t valTypeP,
54                    const TVectorD * const binsX, UInt_t valTypeX, TString option="",
55                    UInt_t valTypeW=AliDielectronHistos::kNoWeights);
56   void UserHistogram(const char* histClass,
57                      const TVectorD * const binsX, UInt_t valTypeX, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
58   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,valTypeX,"",valTypeW); }
59
60   // functions to add 2-dimensional objects
61   void UserProfile(const char* histClass, UInt_t valTypeP,
62                    const TVectorD * const binsX, const TVectorD * const binsY,
63                    UInt_t valTypeX, UInt_t valTypeY, TString option="", UInt_t valTypeW=AliDielectronHistos::kNoWeights);
64   void UserHistogram(const char* histClass,
65                      const TVectorD * const binsX, const TVectorD * const binsY,
66                      UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
67   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,binsY,valTypeX,valTypeY,"",valTypeW); }
68
69   // functions to add 3-dimensional objects
70   void UserProfile(const char* histClass, UInt_t valTypeP,
71                    const TVectorD * const binsX, const TVectorD * const binsY, const TVectorD * const binsZ,
72                    UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeZ, TString option="",
73                    UInt_t valTypeW=AliDielectronHistos::kNoWeights);
74   void UserHistogram(const char* histClass,
75                      const TVectorD * const binsX, const TVectorD * const binsY, const TVectorD * const binsZ,
76                      UInt_t valTypeX, UInt_t valTypeY, UInt_t valTypeZ, UInt_t valTypeW=AliDielectronHistos::kNoWeights)
77   { UserProfile(histClass,AliDielectronHistos::kNoProfile,binsX,binsY,binsZ,valTypeX,valTypeY,valTypeZ,"",valTypeW); }
78
79   // functions to add multidimensional stuff
80   void UserSparse(const char* histClass,
81                   Int_t ndim, TObjArray *limits, UInt_t *vars, UInt_t valTypeW=AliDielectronHistos::kNoWeights);
82
83
84   // functions to define the grid
85   void AddCutVariable(AliDielectronVarManager::ValueTypes type, Int_t nbins,
86                       Double_t min, Double_t max, Bool_t log=kFALSE, Bool_t leg=kFALSE, EBinType btype=kStdBin);
87   void AddCutVariable(AliDielectronVarManager::ValueTypes type, 
88                       const char* binLimitStr, Bool_t leg=kFALSE, EBinType btype=kStdBin);
89   void AddCutVariable(AliDielectronVarManager::ValueTypes type, 
90                       TVectorD * binLimits, Bool_t leg=kFALSE, EBinType btype=kStdBin);
91
92   void Fill(Int_t pairIndex, const AliDielectronPair *particle);
93   void Fill(Int_t label1, Int_t label2, Int_t nSignal);
94   void Fill(Int_t Index, Double_t * const valuesPair, Double_t * const valuesLeg1, Double_t * const valuesLeg2);
95
96   Bool_t IsPairTypeSelected(Int_t itype);
97
98   Int_t GetNumberOfBins() const;
99   const TObjArray * GetHistArray() const { return &fArrPairType; }
100   Bool_t GetStepForMCGenerated() const   { return fStepGenerated; }
101
102 private:
103   TBits     *fUsedVars;             // list of used variables
104
105   TObjArray fArrPairType;           //-> array of pair types
106   EPairType fPairType;              // which pair combinations to include
107   TObjArray* fSignalsMC;            //! array of MC signals to be studied
108
109   UShort_t  fVarCuts[kMaxCuts];     // cut variables
110   TBits     *fVarCutType;           // array to store leg booleans
111   //  Bool_t    fVarCutType[kMaxCuts];  // array to store leg booleans
112   TObjArray fAxes;                  // Axis descriptions of the cut binning
113   UShort_t  fBinType[kMaxCuts];     // binning type of the axes
114   
115   Bool_t    fHasMC;                 // is mc array
116   Bool_t    fStepGenerated;         // switcher for generated particles
117
118   TObjArray fRefObj;               // reference object
119
120   AliDielectronHF(const AliDielectronHF &c);
121   AliDielectronHF &operator=(const AliDielectronHF &c);
122
123   
124   ClassDef(AliDielectronHF,5)         // Dielectron HF
125 };
126
127
128
129 #endif