1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // Toolkit containing various usefull things
17 // Usable everywhere in the hfe software package
18 // For more information see the cxx file
26 class AliAODMCParticle;
34 class AliHFEtools : public TObject{
39 static Double_t *MakeLinearBinning(Int_t nBins, Double_t ymin, Double_t ymax);
40 static Double_t *MakeLogarithmicBinning(Int_t nBins, Double_t ymin, Double_t ymax);
41 Bool_t BinLogAxis(TObject *o, Int_t dim);
42 static Float_t GetRapidity(const TParticle *part);
43 static Float_t GetRapidity(const AliAODMCParticle *part); // return rapidity
44 static Int_t GetPdg(const AliVParticle *track);
45 static Int_t PDG2AliPID(Int_t pdg);
46 static AliPIDResponse *GetDefaultPID(Bool_t isMC = kTRUE, Bool_t isESD = kTRUE);
47 static void DestroyDefaultPID();
48 static void SetLogLevel(Int_t loglevel) { fgLogLevel = loglevel ;}
49 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);
50 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);
51 static Bool_t ExchangeXYGraph(TGraph* g = 0);
52 static Bool_t ExchangeXYGraphErrors(TGraphErrors* g = 0);
55 AliHFEtools(const AliHFEtools &);
56 AliHFEtools &operator=(const AliHFEtools &);
57 static AliPIDResponse *fgDefaultPID; // Default PID object
58 static Int_t fgLogLevel; // Log Level
60 ClassDef(AliHFEtools, 0)