]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEInclusiveSpectrumQA.h
Small update
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEInclusiveSpectrumQA.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 ALIHFEINCLUSIVESPECTRUMQA_H
22 #define ALIHFEINCLUSIVESPECTRUMQA_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 AliHFEInclusiveSpectrumQA : public TNamed{
35  public:
36
37   enum Results_t{
38     kDataProjection = 0,
39     kCMProjection = 1,
40     kBeforeSC = 2,
41     kAfterSC = 3,
42     kBeforeV0 = 4,
43     kAfterV0 = 5,
44     kV0Efficiency = 6,
45     kBeforePE = 7,
46     kAfterPE = 8,
47     kPEfficiency = 9,
48     kBeforeMCE = 10,
49     kAfterMCE = 11,
50     kMCEfficiency = 12,
51     kBeforeU = 13,
52     kAfterU = 14,
53     kResidualU = 15,
54     kUEfficiency = 16,
55     kFinalResultUnfolded = 17,
56     kFinalResultDirectEfficiency = 18,
57     kBeforeSPB = 19,
58     kAfterSPB = 20,
59     kNResults = 21
60   };
61
62
63   enum EfficiencyCorrection_t{
64     kV0 = 0,
65     kMC = 1,
66     kParametrized = 2,
67     kNTypeEfficiency = 3
68   };
69    
70   void AddResultAt(TObject *obj,Int_t index);
71   TObject *GetResult(Int_t index);
72   
73   void DrawProjections() const;
74   void DrawSubtractContamination() const;
75   void DrawSubtractPhotonicBackground() const;
76   void DrawCorrectWithEfficiency(Int_t typeeff) const;
77   void DrawUnfolding() const;
78   void DrawResult();
79   
80   void SetStyle() const;
81   void SetWriteToFile(Bool_t writetofile) {fWriteToFile=writetofile; };
82   void SetPtMax(Double_t ptmax) {fPtMax = ptmax; };
83
84
85   TH1D *DivideSpectra(TGraphErrors *ga, TGraphErrors *gb);
86   
87
88   AliHFEInclusiveSpectrumQA();
89   AliHFEInclusiveSpectrumQA(const char* name);
90   ~AliHFEInclusiveSpectrumQA();
91   
92   protected:
93   
94   private:
95
96   static const Char_t* fgkNameCanvas[kNTypeEfficiency];     // Name of canvas
97
98     AliHFEInclusiveSpectrumQA(const AliHFEInclusiveSpectrumQA &);
99     AliHFEInclusiveSpectrumQA &operator=(const AliHFEInclusiveSpectrumQA &);
100  
101     Double_t   fPtMax;             // Pt max to plot
102     TObjArray *fListOfResult;     // ListOfResults
103     Bool_t fWriteToFile;           // Write plots to eps files
104    
105     ClassDef(AliHFEInclusiveSpectrumQA, 1) 
106 };
107 #endif
108