]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/vertexingHF/AliHFSystErr.h
Enable usage of compatibility band for PID (A. Rossi)
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / AliHFSystErr.h
1 #ifndef ALIHFSYSTERR_H
2 #define ALIHFSYSTERR_H
3 /* Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */ 
7
8 //***********************************************************
9 // Class AliRDHFSystErr
10 // to handle systematic errors for charm hadrons
11 // Author: A.Dainese, andrea.dainese@pd.infn.it
12 //***********************************************************
13
14 #include <TNamed.h>
15 #include <TString.h>
16 #include <TH1F.h>
17 #include "AliLog.h"
18 #include "TGraphAsymmErrors.h"
19
20
21 class AliHFSystErr : public TNamed 
22 {
23  public:
24
25   AliHFSystErr(const Char_t* name="HFSystErr", const Char_t* title="");
26   
27   virtual ~AliHFSystErr();
28   
29   void DrawErrors(TGraphAsymmErrors *grErrFeeddown=0) const; 
30
31   Double_t GetNormErr() const {return (fNorm ? fNorm->GetBinContent(0) : 0.);}
32   Double_t GetBRErr() const {return (fBR ? fBR->GetBinContent(0) : 0.);}
33   Double_t GetCutsEffErr(Double_t pt) const;
34   Double_t GetMCPtShapeErr(Double_t pt) const;
35   Double_t GetSeleEffErr(Double_t pt) const;
36   Double_t GetPartAntipartErr(Double_t pt) const;
37   Double_t GetPIDEffErr(Double_t pt) const;
38   Double_t GetRawYieldErr(Double_t pt) const;
39   Double_t GetTrackingEffErr(Double_t pt) const;
40   Double_t GetTotalSystErr(Double_t pt,Double_t feeddownErr=0) const;
41
42   // Setting  the run number
43   //  set the two last numbers of the year (is 10 for 2010)
44   void SetRunNumber(Int_t number) { 
45     fRunNumber = number; 
46     AliInfo(Form(" Settings for run year 20%2d",fRunNumber));
47   }
48   Int_t GetRunNumber() const { return fRunNumber; }
49   // Setting the collision type
50   //  0 is pp, 1 is PbPb, 2 is pPb
51   void SetCollisionType(Int_t type) { 
52     fCollisionType = type; 
53     if (fCollisionType==0) { AliInfo(" Settings for p-p collisions"); }
54     else if(fCollisionType==1) { AliInfo(" Settings for Pb-Pb collisions"); }
55     else if(fCollisionType==2) { AliInfo(" Settings for p-Pb collisions"); }
56   }
57   Int_t GetCollisionType() const { return fCollisionType; }
58   // Setting for the centrality class
59   //  0100 for MB, 020 (4080) for 0-20 (40-80) CC and so on
60   void SetCentrality(TString centrality) { 
61     fCentralityClass = centrality; 
62     AliInfo(Form(" Settings for centrality class %s",fCentralityClass.Data()));
63   }
64   void SetIsLowEnergy(Bool_t flag) { 
65     fIsLowEnergy = flag; 
66     AliInfo(" Settings for the low energy run");
67   }
68   void SetIsPbPb2010EnergyScan(Bool_t flag) {
69     fIsCentScan = flag;
70     AliInfo(" Settings for the PbPb 2010 energy scan");
71   }
72
73   // Settings of rapidity ranges for pPb 0-100% CC
74   void SetRapidity(TString rapidity) {
75     fRapidityRange = rapidity;
76     AliInfo(Form(" Settings for rapidity interval %s",fRapidityRange.Data()));
77   }
78   void SetIspPb2011RapidityScan(Bool_t flag){
79     fIsRapidityScan = flag; 
80     AliInfo("Settings for the pPb vs y measurement");
81   }
82
83
84   // Function to initialize the variables/histograms
85   void Init(Int_t decay);
86
87   void InitD0toKpi2010PbPb010CentScan();
88   void InitD0toKpi2010PbPb1020CentScan();
89   void InitD0toKpi2010PbPb2040CentScan();
90   void InitD0toKpi2010PbPb4060CentScan();
91   void InitD0toKpi2010PbPb6080CentScan();
92
93   void InitD0toKpi2011PbPb3050InPlane();
94   void InitD0toKpi2011PbPb3050OutOfPlane();
95
96   void InitDplustoKpipi2010PbPb010CentScan();
97   void InitDplustoKpipi2010PbPb1020CentScan();
98   void InitDplustoKpipi2010PbPb2040CentScan();
99   void InitDplustoKpipi2010PbPb4060CentScan();
100   void InitDplustoKpipi2010PbPb6080CentScan();
101
102   void InitDstartoD0pi2010PbPb010CentScan();
103   void InitDstartoD0pi2010PbPb1020CentScan();
104   void InitDstartoD0pi2010PbPb2040CentScan();
105   void InitDstartoD0pi2010PbPb4060CentScan();
106   void InitDstartoD0pi2010PbPb6080CentScan();
107
108   void InitD0toKpi2011PbPb010CentScan();
109   void InitD0toKpi2011PbPb1020CentScan();
110   void InitD0toKpi2011PbPb2030CentScan();
111   void InitD0toKpi2011PbPb3040CentScan();
112   void InitD0toKpi2011PbPb4050CentScan();
113   void InitD0toKpi2010PbPb5080CentScan();
114
115   void InitDplustoKpipi2011PbPb010CentScan();
116   void InitDplustoKpipi2011PbPb1020CentScan();
117   void InitDplustoKpipi2011PbPb2030CentScan();
118   void InitDplustoKpipi2011PbPb3040CentScan();
119   void InitDplustoKpipi2011PbPb4050CentScan();
120   void InitDplustoKpipi2010PbPb5080CentScan();
121
122   void InitDstartoD0pi2011PbPb010CentScan();
123   void InitDstartoD0pi2011PbPb1020CentScan();
124   void InitDstartoD0pi2011PbPb2030CentScan();
125   void InitDstartoD0pi2011PbPb3040CentScan();
126   void InitDstartoD0pi2011PbPb4050CentScan();
127   void InitDstartoD0pi2010PbPb5080CentScan();
128
129   void InitD0toKpi2013pPb0100RapScan0804();
130   void InitD0toKpi2013pPb0100RapScan0401();
131   void InitD0toKpi2013pPb0100RapScan0101();
132   void InitD0toKpi2013pPb0100RapScan0104();
133   void InitD0toKpi2013pPb0100RapScan0408();
134
135   void InitDplustoKpipi2013pPb0100RapScan0804();
136   void InitDplustoKpipi2013pPb0100RapScan0401();
137   void InitDplustoKpipi2013pPb0100RapScan0101();
138   void InitDplustoKpipi2013pPb0100RapScan0104();
139   void InitDplustoKpipi2013pPb0100RapScan0408();
140
141   void InitDstartoD0pi2013pPb0100RapScan0804();
142   void InitDstartoD0pi2013pPb0100RapScan0401();
143   void InitDstartoD0pi2013pPb0100RapScan0101();
144   void InitDstartoD0pi2013pPb0100RapScan0104();
145   void InitDstartoD0pi2013pPb0100RapScan0408();
146
147  private:
148
149   AliHFSystErr(const AliHFSystErr& source);
150   AliHFSystErr& operator=(const AliHFSystErr& source); 
151  
152   void InitD0toKpi2010pp();
153   void InitD0toKpi2010ppLowEn();
154   void InitD0toKpi2011PbPb07half();
155   void InitD0toKpi2010PbPb020();
156   void InitD0toKpi2010PbPb4080();
157
158   void InitDplustoKpipi2010pp();
159   void InitDplustoKpipi2010ppLowEn();
160   void InitDplustoKpipi2011PbPb07half();
161   void InitDplustoKpipi2010PbPb020();
162   void InitDplustoKpipi2010PbPb4080();
163
164   void InitDstartoD0pi2010pp();
165   void InitDstartoD0pi2010ppLowEn();
166   void InitDstartoD0pi2011PbPb07half();
167   void InitDstartoD0pi2010PbPb020();
168   void InitDstartoD0pi2010PbPb2040();
169   void InitDstartoD0pi2010PbPb4080();
170
171   void InitDstoKKpi2010pp();
172   void InitDstoKKpi2011PbPb07half();
173
174   void InitLctopKpi2010pp();
175
176   void InitD0toKpi2013pPb0100();
177   void InitDplustoKpipi2013pPb0100();
178   void InitDstartoD0pi2013pPb0100();
179   void InitDstoKKpi2013pPb0100();
180   void InitLctopK0S2010pp();
181
182
183   TH1F* ReflectHisto(TH1F *hin) const;
184
185   TH1F *fNorm;            // normalization
186   TH1F *fRawYield;        // raw yield 
187   TH1F *fTrackingEff;     // tracking efficiency
188   TH1F *fBR;              // branching ratio
189   TH1F *fCutsEff;         // cuts efficiency
190   TH1F *fPIDEff;          // PID efficiency
191   TH1F *fMCPtShape;       // MC dNdpt
192   TH1F *fPartAntipart;    // particle=antiparticle
193
194   Int_t fRunNumber;        // Run Number (year)
195   Int_t fCollisionType;    // Collision type: pp=0, PbPb=1
196   TString fCentralityClass;  // Centrality class
197                            // MB:0100, 0-10:010, 0-20:020 ...40-80:4080...
198   TString fRapidityRange;  // Rapidity range fot y measurements 
199
200   Bool_t fIsLowEnergy;     // flag for the low energy (2.76TeV) run
201   Bool_t fIsCentScan;      // flag fot the PbPb centrality scan
202   Bool_t fIsRapidityScan;  // flag for the pPb vs y measurement  
203  
204   ClassDef(AliHFSystErr,5);  // class for systematic errors of charm hadrons
205 };
206
207 #endif
208