]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/dielectron/AliDielectronCF.h
Fixes for bug #77230: PWG3 par files
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliDielectronCF.h
1 #ifndef ALIDIELECTRONCF_H
2 #define ALIDIELECTRONCF_H
3 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //#############################################################
7 //#                                                           #
8 //#             Class AliDielectronCF                         #
9 //#       Dielectron Correction Framework Manager             #
10 //#                                                           #
11 //#  Authors:                                                 #
12 //#   Anton     Andronic, GSI / A.Andronic@gsi.de             #
13 //#   Ionut C.  Arsene,   GSI / I.C.Arsene@gsi.de             #
14 //#   Julian    Book,     Uni Ffm / Julian.Book@cern.ch       #
15 //#   Frederick Kramer,   Uni Ffm, / Frederick.Kramer@cern.ch #
16 //#   Magnus    Mager,    CERN / Magnus.Mager@cern.ch         #
17 //#   WooJin J. Park,     GSI / W.J.Park@gsi.de               #
18 //#   Jens      Wiechula, Uni HD / Jens.Wiechula@cern.ch      #
19 //#                                                           #
20 //#############################################################
21
22
23
24 #include <TNamed.h>
25 #include <TVectorDfwd.h>
26 #include "AliDielectronVarManager.h"
27
28 class AliAnalysisCuts;
29 class AliAnalysisFilter;
30 class AliCFContainer;
31 class AliDielectronPair;
32 class TObjArray;
33
34 class AliDielectronCF : public TNamed {
35 public:
36   enum {kNmaxAddSteps=50};
37   
38   AliDielectronCF();
39   AliDielectronCF(const char* name, const char* title);
40   virtual ~AliDielectronCF();
41
42   void SetStepForMCtruth(Bool_t steps=kTRUE)           { fStepForMCtruth=steps;           }
43   void SetStepForNoCutsMCmotherPid(Bool_t steps=kTRUE) { fStepForNoCutsMCmotherPid=steps; }
44   void SetStepForAfterAllCuts(Bool_t steps=kTRUE)      { fStepForAfterAllCuts=steps;      }
45   void SetStepForPreFilter(Bool_t steps=kTRUE)         { fStepForPreFilter=steps;         }
46   void SetStepsForEachCut(Bool_t steps=kTRUE)          { fStepsForEachCut=steps;          }
47   void SetStepsForCutsIncreasing(Bool_t steps=kTRUE)   { fStepsForCutsIncreasing=steps;   }
48   void SetStepsForSignal(Bool_t steps=kTRUE)           { fStepsForSignal=steps;           }
49   void SetStepsForBackground(Bool_t steps=kTRUE)       { fStepsForBackground=steps;       }
50   
51   void SetPdgMother(Int_t pdg) { fPdgMother=pdg; }
52   
53   void AddStepMask(UInt_t mask)                  { fStepMasks[fNStepMasks++]=mask; }
54   
55   void AddVariable(AliDielectronVarManager::ValueTypes type, Int_t nbins,
56                    Double_t min, Double_t max, Bool_t leg=kFALSE, Bool_t log=kFALSE);
57   void AddVariable(AliDielectronVarManager::ValueTypes type, const char* binLimitStr, Bool_t leg=kFALSE);
58   void AddVariable(AliDielectronVarManager::ValueTypes type, TVectorD *binLimits, Bool_t leg=kFALSE);
59   
60   void InitialiseContainer(const AliAnalysisFilter& filter);
61   
62 //   void Fill(UInt_t mask, const TObject *particle);
63   void Fill(UInt_t mask, const AliDielectronPair *particle);
64   void FillMC(const TObject *particle);
65   
66   AliCFContainer* GetContainer() const { return fCfContainer; }
67   
68 private:
69   UInt_t          fVariables[AliDielectronVarManager::kNMaxValues]; //configured variables
70   UInt_t          fVariablesLeg[AliDielectronVarManager::kNMaxValues]; //configured variables for the legs
71   
72   Int_t           fNSteps;                     // number of selection steps
73   
74   Int_t           fNVars;                      // number of variables
75   TObjArray      *fVarBinLimits;               // array of bin limits
76   
77   Int_t           fNVarsLeg;                   // number of variables for the legs
78   TObjArray      *fVarBinLimitsLeg;            //  array of bin limits of the legs
79   
80   Int_t           fNCuts;                         // Number of cuts in the filter concerned
81
82   Double_t        *fValues;                       //! Value array for filling the container
83   
84   Bool_t fStepForMCtruth;               //create a step for the MC truth
85   Bool_t fStepForNoCutsMCmotherPid;     //create a step for before cuts, but with MC truth of the mother
86   Bool_t fStepForAfterAllCuts;          //create a step for before cuts, but with MC truth of the mother
87   Bool_t fStepForPreFilter;             //create a step after PreFilter application
88   Bool_t fStepsForEachCut;              //create steps for each cut?
89   Bool_t fStepsForCutsIncreasing;       //create steps for increasing cut combinatons?
90                                         //e.g. cut1&cut2, cut1&cut2&cut3 ...
91   Bool_t fStepsForSignal;               //steps for pure signal
92   Bool_t fStepsForBackground;           //steps for pure background
93   
94   UInt_t fStepMasks[kNmaxAddSteps];      //steps for additional cut combinatons
95   UInt_t fNStepMasks;                    //number of configured step masks
96
97   Int_t fPdgMother;                      //Pdg code of MCtruth validation
98   AliCFContainer* fCfContainer;          //the CF container
99
100   Bool_t fHasMC;                         //if MC info is available
101   Int_t  fNAddSteps;                     //number of additional MC related steps per cut step
102
103   TVectorD* MakeLogBinning(Int_t nbinsX, Double_t xmin, Double_t xmax) const;
104   TVectorD* MakeLinBinning(Int_t nbinsX, Double_t xmin, Double_t xmax) const;
105   
106   AliDielectronCF(const AliDielectronCF &c);
107   AliDielectronCF &operator=(const AliDielectronCF &c);
108   
109   ClassDef(AliDielectronCF,4)  //Dielectron Correction Framework handler
110 };
111
112 #endif