]>
Commit | Line | Data |
---|---|---|
70da6c5a | 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 | // Toolkit containing various usefull things | |
17 | // Usable everywhere in the hfe software package | |
18 | // For more information see the cxx file | |
19 | // | |
c2690925 | 20 | #ifndef ALIHFETOOLS_H |
21 | #define ALIHFETOOLS_H | |
22 | ||
70da6c5a | 23 | #include <TObject.h> |
24 | ||
0e30407a | 25 | class TArrayD; |
70da6c5a | 26 | class TParticle; |
27 | class AliAODMCParticle; | |
8c1c76e9 | 28 | class AliPIDResponse; |
3a72645a | 29 | class AliVParticle; |
a8ef1999 | 30 | class TGraph; |
31 | class TGraphErrors; | |
d4894cf3 | 32 | class TGraphAsymmErrors; |
a8ef1999 | 33 | class TH1D; |
d4894cf3 | 34 | class TH1; |
cedf0381 | 35 | class TF1; |
a8ef1999 | 36 | class TString; |
70da6c5a | 37 | |
38 | class AliHFEtools : public TObject{ | |
39 | public: | |
40 | AliHFEtools(); | |
41 | ~AliHFEtools() {}; | |
42 | ||
43 | static Double_t *MakeLinearBinning(Int_t nBins, Double_t ymin, Double_t ymax); | |
44 | static Double_t *MakeLogarithmicBinning(Int_t nBins, Double_t ymin, Double_t ymax); | |
0e30407a | 45 | static void FillLinearBinning(TArrayD &bins, Int_t nBins, Double_t ymin, Double_t ymax); |
46 | static void FillLogarithmicBinning(TArrayD &bins, Int_t nBins, Double_t ymin, Double_t ymax); | |
70da6c5a | 47 | Bool_t BinLogAxis(TObject *o, Int_t dim); |
3a72645a | 48 | static Float_t GetRapidity(const TParticle *part); |
49 | static Float_t GetRapidity(const AliAODMCParticle *part); // return rapidity | |
50 | static Int_t GetPdg(const AliVParticle *track); | |
51 | static Int_t PDG2AliPID(Int_t pdg); | |
8c1c76e9 | 52 | static AliPIDResponse *GetDefaultPID(Bool_t isMC = kTRUE, Bool_t isESD = kTRUE); |
faee3b18 | 53 | static void DestroyDefaultPID(); |
54 | static void SetLogLevel(Int_t loglevel) { fgLogLevel = loglevel ;} | |
a8ef1999 | 55 | static TH1D* GraphErrorsToHist(TGraphErrors* g = 0, Double_t firstBinWidth = -1, Bool_t exchange=kFALSE, Int_t markerstyle=8, Int_t markercolor=2, Float_t markersize=0.7); |
56 | static TH1D* GraphToHist(TGraph* g = 0, Double_t firstBinWidth = -1, Bool_t exchange=kFALSE, Int_t markerstyle=8, Int_t markercolor=2, Float_t markersize=0.7); | |
57 | static Bool_t ExchangeXYGraph(TGraph* g = 0); | |
58 | static Bool_t ExchangeXYGraphErrors(TGraphErrors* g = 0); | |
cedf0381 | 59 | static void BinParameterisation(const TF1 &fun, const TArrayD &xbins, TArrayD &bincontent); |
cddc311d | 60 | static TList *GetHFEResultList(const TString str); |
4437a0d2 | 61 | static TList *GetHFEQAList(const TString str); |
d4894cf3 | 62 | static void NormaliseBinWidth(TH1 *histo); |
63 | static void NormaliseBinWdith(TGraphErrors *graph); | |
64 | static void NormaliseBinWdithAsymm(TGraphAsymmErrors *graph); | |
faee3b18 | 65 | |
66 | private: | |
c2690925 | 67 | AliHFEtools(const AliHFEtools &); |
68 | AliHFEtools &operator=(const AliHFEtools &); | |
8c1c76e9 | 69 | static AliPIDResponse *fgDefaultPID; // Default PID object |
3a72645a | 70 | static Int_t fgLogLevel; // Log Level |
70da6c5a | 71 | |
72 | ClassDef(AliHFEtools, 0) | |
73 | }; | |
74 | #endif |