]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEBeautySpectrumQA.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEBeautySpectrumQA.h
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 *                                                                        *
4 * Author: The ALICE Off-line Project.                                    *
5 * Contributors are mentioned in the code where appropriate.              *
6 *                                                                        *
7 * Permission to use, copy, modify and distribute this software and its   *
8 * documentation strictly for non-commercial purposes is hereby granted   *
9 * without fee, provided that the above copyright notice appears in all   *
10 * copies and that both the copyright notice and this permission notice   *
11 * appear in the supporting documentation. The authors make no claims     *
12 * about the suitability of this software for any purpose. It is          *
13 * provided "as is" without express or implied warranty.                  *
14 **************************************************************************/
15 //
16 // Class for spectrum correction
17 // Subtraction of hadronic background, Unfolding of the data and
18 // Renormalization done here
19 // For more information see the implementation file
20 //
21 #ifndef ALIHFEBEAUTYSPECTRUMQA_H
22 #define ALIHFEBEAUTYSPECTRUMQA_H
23
24 #ifndef ROOT_TNamed
25 #include <TNamed.h>
26 #endif
27
28
29 class TObjArray;
30 class TGraphErrors;
31 class TObject;
32
33
34 class AliHFEBeautySpectrumQA : public TNamed{
35  public:
36
37   enum Results_t{
38     kDataProjection = 0,
39     kCMProjection = 1,
40     kBeforeSC = 2,
41     kAfterSC = 3,
42     kBeforePE = 4,
43     kAfterPE = 5,
44     kPEfficiency = 6,
45     kBeforeMCE = 7,
46     kAfterMCE = 8,
47     kMCEfficiency = 9,
48     kBeforeU = 10,
49     kAfterU = 11,
50     kResidualU = 12,
51     kUEfficiency = 13,
52     kFinalResultUnfolded = 14,
53     kFinalResultDirectEfficiency = 15,
54     kFinalResultUnfSparse = 16,
55     kFinalResultDirectEffSparse = 17,
56     kMeasBG = 18,
57     kNResults = 19
58   };
59
60
61   enum EfficiencyCorrection_t{
62     kMC = 0,
63     kParametrized = 1,
64     kNTypeEfficiency = 2
65   };
66    
67   void AddResultAt(TObject *obj,Int_t index);
68   TObject *GetResult(Int_t index);
69   
70   void DrawProjections() const;
71   void DrawSubtractContamination() const;
72   void DrawCorrectWithEfficiency(Int_t typeeff) const;
73   void DrawUnfolding() const;
74   void DrawResult();
75   
76   void SetStyle() const;
77   void SetWriteToFile(Bool_t writetofile) {fWriteToFile=writetofile; };
78   void SetPtMax(Double_t ptmax) {fPtMax = ptmax; };
79
80
81   TH1D *DivideSpectra(TGraphErrors *ga, TGraphErrors *gb);
82   
83
84   AliHFEBeautySpectrumQA();
85   AliHFEBeautySpectrumQA(const char* name);
86   ~AliHFEBeautySpectrumQA();
87   
88   protected:
89   
90   private:
91
92   static const Char_t* fgkNameCanvas[kNTypeEfficiency];     // Name of canvas
93
94     AliHFEBeautySpectrumQA(const AliHFEBeautySpectrumQA &);
95     AliHFEBeautySpectrumQA &operator=(const AliHFEBeautySpectrumQA &);
96  
97     Double_t   fPtMax;             // Pt max to plot
98     TObjArray *fListOfResult;     // ListOfResults
99     Bool_t fWriteToFile;           // Write plots to eps files
100    
101     ClassDef(AliHFEBeautySpectrumQA, 1) 
102 };
103 #endif
104