]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/dielectron/AliDielectronCF.h
Updates and additions: Classes for signal and spectrum extraction; saving of
[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 "AliDielectronVarManager.h"
26
27 class AliAnalysisCuts;
28 class AliAnalysisFilter;
29 class AliCFContainer;
30 class AliDielectronPair;
31
32 class AliDielectronCF : public TNamed {
33 public:
34   enum {kNmaxAddSteps=50};
35   
36   AliDielectronCF();
37   AliDielectronCF(const char* name, const char* title);
38   virtual ~AliDielectronCF();
39
40   void SetStepForMCtruth(Bool_t steps=kTRUE)           { fStepForMCtruth=steps;           }
41   void SetStepForNoCutsMCmotherPid(Bool_t steps=kTRUE) { fStepForNoCutsMCmotherPid=steps; }
42   void SetStepForAfterAllCuts(Bool_t steps=kTRUE)      { fStepForAfterAllCuts=steps;      }
43   void SetStepsForEachCut(Bool_t steps=kTRUE)          { fStepsForEachCut=steps;          }
44   void SetStepsForCutsIncreasing(Bool_t steps=kTRUE)   { fStepsForCutsIncreasing=steps;   }
45   void SetStepsForSignal(Bool_t steps=kTRUE)           { fStepsForSignal=steps;           }
46   void SetStepsForBackground(Bool_t steps=kTRUE)       { fStepsForBackground=steps;       }
47   
48   void SetPdgMother(Int_t pdg) { fPdgMother=pdg; }
49   
50   void AddStepMask(UInt_t mask)                  { fStepMasks[fNStepMasks++]=mask; }
51   
52   void AddVariable(AliDielectronVarManager::ValueTypes type, Int_t nbins, Double_t min, Double_t max, Bool_t leg=kFALSE);
53
54   void InitialiseContainer(const AliAnalysisFilter& filter);
55   
56 //   void Fill(UInt_t mask, const TObject *particle);
57   void Fill(UInt_t mask, const AliDielectronPair *particle);
58   void FillMC(const TObject *particle);
59   
60   AliCFContainer* GetContainer() const { return fCfContainer; }
61   
62 private:
63   UInt_t          fVariables[AliDielectronVarManager::kNMaxValues]; //configured variables
64   UInt_t          fVariablesLeg[AliDielectronVarManager::kNMaxValues]; //configured variables for the legs
65   
66   Int_t           fNSteps;                     // number of selection steps
67   
68   Int_t           fNVars;                      // number of variables
69   Int_t           fNBins[kNmaxAddSteps];       // array of numbers ob bins of the vars
70   Double_t        fVarLoLimit[kNmaxAddSteps];  // array of the lower limits of the vars
71   Double_t        fVarUpLimit[kNmaxAddSteps];  // array of the upper limits of the vars
72
73   Int_t           fNVarsLeg;                      // number of variables for the legs
74   Int_t           fNBinsLeg[kNmaxAddSteps];       // array of numbers ob bins of the vars for the legs
75   Double_t        fVarLoLimitLeg[kNmaxAddSteps];  // array of the lower limits of the vars for the legs
76   Double_t        fVarUpLimitLeg[kNmaxAddSteps];  // array of the upper limits of the vars for the legs
77   
78   Int_t           fNCuts;                         // Number of cuts in the filter concerned
79
80   Double_t        *fValues;                       //! Value array for filling the container
81   
82   Bool_t fStepForMCtruth;               //create a step for the MC truth
83   Bool_t fStepForNoCutsMCmotherPid;     //create a step for before cuts, but with MC truth of the mother
84   Bool_t fStepForAfterAllCuts;          //create a step for before cuts, but with MC truth of the mother
85   Bool_t fStepsForEachCut;              //create steps for each cut?
86   Bool_t fStepsForCutsIncreasing;       //create steps for increasing cut combinatons?
87                                         //e.g. cut1&cut2, cut1&cut2&cut3 ...
88   Bool_t fStepsForSignal;               //steps for pure signal
89   Bool_t fStepsForBackground;           //steps for pure background
90   
91   UInt_t fStepMasks[kNmaxAddSteps];      //steps for additional cut combinatons
92   UInt_t fNStepMasks;                    //number of configured step masks
93
94   Int_t fPdgMother;                      //Pdg code of MCtruth validation
95   AliCFContainer* fCfContainer;          //the CF container
96
97   Bool_t fHasMC;                         //if MC info is available
98   Int_t  fNAddSteps;                     //number of additional MC related steps per cut step
99   
100   AliDielectronCF(const AliDielectronCF &c);
101   AliDielectronCF &operator=(const AliDielectronCF &c);
102   
103   ClassDef(AliDielectronCF,3)  //Dielectron Correction Framework handler
104 };
105
106 #endif