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