]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEInclusiveSpectrumQA.h
Fix of sigmaZ for crossing tracklets from Alex
[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     kBeforeSCND = 21,
60     kAfterSCND = 22,
61     kHadronContaminationND = 23,
62     kBeforeV0ND = 24,
63     kAfterV0ND = 25,
64     kV0EfficiencyND = 26,
65     kBeforePEND = 27,
66     kAfterPEND = 28,
67     kPEfficiencyND = 29,
68     kBeforeMCEND = 30,
69     kAfterMCEND = 31,
70     kMCEfficiencyND = 32,
71     kNResults = 33
72   };
73
74
75   enum EfficiencyCorrection_t{
76     kV0 = 0,
77     kMC = 1,
78     kParametrized = 2,
79     kNTypeEfficiency = 3
80   };
81    
82   void AddResultAt(TObject *obj,Int_t index);
83   TObject *GetResult(Int_t index);
84   
85   void DrawProjections() const;
86   void DrawSubtractContamination() const;
87   void DrawSubtractContaminationND() const;
88   void DrawSubtractPhotonicBackground() const;
89   void DrawCorrectWithEfficiency(Int_t typeeff) const;
90   void DrawCorrectWithEfficiencyND(Int_t typeeff) const;
91   void DrawUnfolding() const;
92   void DrawResult();
93   
94   void SetStyle() const;
95   void SetWriteToFile(Bool_t writetofile) {fWriteToFile=writetofile; };
96   void SetPtMax(Double_t ptmax) {fPtMax = ptmax; };
97
98
99   TH1D *DivideSpectra(TGraphErrors *ga, TGraphErrors *gb);
100   
101
102   AliHFEInclusiveSpectrumQA();
103   AliHFEInclusiveSpectrumQA(const char* name);
104   ~AliHFEInclusiveSpectrumQA();
105   
106   protected:
107   
108   private:
109
110   static const Char_t* fgkNameCanvas[kNTypeEfficiency];     // Name of canvas
111   static const Char_t* fgkNameCanvasND[kNTypeEfficiency];     // Name of canvas
112
113     AliHFEInclusiveSpectrumQA(const AliHFEInclusiveSpectrumQA &);
114     AliHFEInclusiveSpectrumQA &operator=(const AliHFEInclusiveSpectrumQA &);
115  
116     Double_t   fPtMax;             // Pt max to plot
117     TObjArray *fListOfResult;     // ListOfResults
118     Bool_t fWriteToFile;           // Write plots to eps files
119    
120     ClassDef(AliHFEInclusiveSpectrumQA, 1) 
121 };
122 #endif
123