Adding OADB to EINCLUDE
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliHFSystErr.h
CommitLineData
1cad7456 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
27de2dfb 6/* $Id$ */
7
1cad7456 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>
aebba8df 15#include <TString.h>
1cad7456 16#include <TH1F.h>
5541b811 17#include "AliLog.h"
8998180c 18#include "TGraphAsymmErrors.h"
1cad7456 19
20
21class AliHFSystErr : public TNamed
22{
23 public:
24
25 AliHFSystErr(const Char_t* name="HFSystErr", const Char_t* title="");
1cad7456 26
27 virtual ~AliHFSystErr();
28
8998180c 29 void DrawErrors(TGraphAsymmErrors *grErrFeeddown=0) const;
1cad7456 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
5541b811 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 // Setting the collision type
49 // 0 is pp, 1 is PbPb
50 void SetCollisionType(Int_t type) {
51 fCollisionType = type;
52 if (fCollisionType==0) { AliInfo(" Settings for p-p collisions"); }
53 else if(fCollisionType==1) { AliInfo(" Settings for Pb-Pb collisions"); }
54 }
55 // Setting for the centrality class
56 // 0100 for MB, 020 (4080) for 0-20 (40-80) CC and so on
aebba8df 57 void SetCentrality(TString centrality) {
5541b811 58 fCentralityClass = centrality;
aebba8df 59 AliInfo(Form(" Settings for centrality class %s",fCentralityClass.Data()));
5541b811 60 }
61
62 // Function to initialize the variables/histograms
63 void Init(Int_t decay);
1cad7456 64
65 private:
66
67 AliHFSystErr(const AliHFSystErr& source);
68 AliHFSystErr& operator=(const AliHFSystErr& source);
69
5541b811 70 void InitD0toKpi2010pp();
71 void InitDplustoKpipi2010pp();
72 void InitDstartoD0pi2010pp();
73
74 void InitD0toKpi2010PbPb020();
75 void InitDplustoKpipi2010PbPb020();
76 void InitDstartoD0pi2010PbPb020();
77
78 void InitD0toKpi2010PbPb4080();
79 void InitDplustoKpipi2010PbPb4080();
80 void InitDstartoD0pi2010PbPb4080();
1cad7456 81
1cad7456 82
f968ef30 83 TH1F* ReflectHisto(TH1F *hin) const;
84
1cad7456 85 TH1F *fNorm; // normalization
86 TH1F *fRawYield; // raw yield
87 TH1F *fTrackingEff; // tracking efficiency
88 TH1F *fBR; // branching ratio
89 TH1F *fCutsEff; // cuts efficiency
90 TH1F *fPIDEff; // PID efficiency
91 TH1F *fMCPtShape; // MC dNdpt
92 TH1F *fPartAntipart; // particle=antiparticle
93
5541b811 94 Int_t fRunNumber; // Run Number (year)
95 Int_t fCollisionType; // Collision type: pp=0, PbPb=1
aebba8df 96 TString fCentralityClass; // Centrality class
5541b811 97 // MB:0100, 0-10:010, 0-20:020 ...40-80:4080...
98
aebba8df 99 ClassDef(AliHFSystErr,2); // class for systematic errors of charm hadrons
1cad7456 100};
101
102#endif
103