Fix for savannah entry #81839
[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>
15#include <TH1F.h>
5541b811 16#include "AliLog.h"
8998180c 17#include "TGraphAsymmErrors.h"
1cad7456 18
19
20class AliHFSystErr : public TNamed
21{
22 public:
23
24 AliHFSystErr(const Char_t* name="HFSystErr", const Char_t* title="");
1cad7456 25
26 virtual ~AliHFSystErr();
27
8998180c 28 void DrawErrors(TGraphAsymmErrors *grErrFeeddown=0) const;
1cad7456 29
30 Double_t GetNormErr() const {return (fNorm ? fNorm->GetBinContent(0) : 0.);}
31 Double_t GetBRErr() const {return (fBR ? fBR->GetBinContent(0) : 0.);}
32 Double_t GetCutsEffErr(Double_t pt) const;
33 Double_t GetMCPtShapeErr(Double_t pt) const;
34 Double_t GetSeleEffErr(Double_t pt) const;
35 Double_t GetPartAntipartErr(Double_t pt) const;
36 Double_t GetPIDEffErr(Double_t pt) const;
37 Double_t GetRawYieldErr(Double_t pt) const;
38 Double_t GetTrackingEffErr(Double_t pt) const;
39 Double_t GetTotalSystErr(Double_t pt,Double_t feeddownErr=0) const;
40
5541b811 41 // Setting the run number
42 // set the two last numbers of the year (is 10 for 2010)
43 void SetRunNumber(Int_t number) {
44 fRunNumber = number;
45 AliInfo(Form(" Settings for run year 20%2d",fRunNumber));
46 }
47 // Setting the collision type
48 // 0 is pp, 1 is PbPb
49 void SetCollisionType(Int_t type) {
50 fCollisionType = type;
51 if (fCollisionType==0) { AliInfo(" Settings for p-p collisions"); }
52 else if(fCollisionType==1) { AliInfo(" Settings for Pb-Pb collisions"); }
53 }
54 // Setting for the centrality class
55 // 0100 for MB, 020 (4080) for 0-20 (40-80) CC and so on
56 void SetCentrality(Int_t centrality) {
57 fCentralityClass = centrality;
58 AliInfo(Form(" Settings for centrality class %d",fCentralityClass));
59 }
60
61 // Function to initialize the variables/histograms
62 void Init(Int_t decay);
1cad7456 63
64 private:
65
66 AliHFSystErr(const AliHFSystErr& source);
67 AliHFSystErr& operator=(const AliHFSystErr& source);
68
5541b811 69 void InitD0toKpi2010pp();
70 void InitDplustoKpipi2010pp();
71 void InitDstartoD0pi2010pp();
72
73 void InitD0toKpi2010PbPb020();
74 void InitDplustoKpipi2010PbPb020();
75 void InitDstartoD0pi2010PbPb020();
76
77 void InitD0toKpi2010PbPb4080();
78 void InitDplustoKpipi2010PbPb4080();
79 void InitDstartoD0pi2010PbPb4080();
1cad7456 80
1cad7456 81
f968ef30 82 TH1F* ReflectHisto(TH1F *hin) const;
83
1cad7456 84 TH1F *fNorm; // normalization
85 TH1F *fRawYield; // raw yield
86 TH1F *fTrackingEff; // tracking efficiency
87 TH1F *fBR; // branching ratio
88 TH1F *fCutsEff; // cuts efficiency
89 TH1F *fPIDEff; // PID efficiency
90 TH1F *fMCPtShape; // MC dNdpt
91 TH1F *fPartAntipart; // particle=antiparticle
92
5541b811 93 Int_t fRunNumber; // Run Number (year)
94 Int_t fCollisionType; // Collision type: pp=0, PbPb=1
95 Int_t fCentralityClass; // Centrality class
96 // MB:0100, 0-10:010, 0-20:020 ...40-80:4080...
97
1cad7456 98 ClassDef(AliHFSystErr,1); // class for systematic errors of charm hadrons
99};
100
101#endif
102