New method SetNCarlos in order to set the number of CARLOS chips connected to the...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALHistoUtilities.h
CommitLineData
315d1c64 1#ifndef AliEMCALHistoUtilities_H
2#define AliEMCALHistoUtilities_H
3/* Copyright(c) 1998-2002, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//_________________________________________________________________________
14ce0a6e 9// This is a set of histogram
10// utilities for the EMCAL
11// to make some common
12// functions easier
315d1c64 13//
14//*-- Authors: J.L. Klay (LLNL) & Aleksei Pavlinov (WSU)
15
16#include <TNamed.h>
af303720 17
315d1c64 18class TList;
c2d4c7af 19class TH1;
af303720 20class TF1;
21class TLatex;
22class TChain;
23class TLorentzVector;
24
25class AliESDCaloCluster;
26class AliEMCALRecPoint;
315d1c64 27
28class AliEMCALHistoUtilities: public TNamed {
29 public:
d434833b 30 AliEMCALHistoUtilities(const char *name="emcalUtilitiesRoutines",
31 const char *tit="EMCAL utility routines");
315d1c64 32 AliEMCALHistoUtilities(const AliEMCALHistoUtilities &) : TNamed("", ""){
33 Fatal("cpy ctor", "not implemented") ; }
34 virtual ~AliEMCALHistoUtilities();
35
315d1c64 36 // service routine
37 static TList *MoveHistsToList(const char* name="ListOfHists", Bool_t putToBrowser=kTRUE);
38 static void FillH1(TList *l=0, Int_t ind=0, Double_t x=-99999., Double_t w=1.);
39 static void FillH2(TList *l=0, Int_t ind=0, Double_t x=-99999., Double_t y=-99999., Double_t w=1.);
4800667c 40 static int SaveListOfHists(TList *mylist=0, const char* name="test", Bool_t kSingleKey=kFALSE,
315d1c64 41 const char* opt="RECREATE");
c2d4c7af 42 static void AddToNameAndTitle(TH1 *h=0, const char *name=0, const char *title=0);
43 static void AddToNameAndTitleToList(TList *l=0, const char *name=0, const char *title=0);
af303720 44 static TLatex *lat(const char *text="", Float_t x=0.0,Float_t y=0.0, Int_t align=12, Float_t tsize=0.05, short tcolor = 1);
45 // TChain
46 static void InitChain(TChain *chain=0, const char* nameListOfFiles=0, Int_t nFileMax=0);
d434833b 47 //
48 static int ParseString(const TString &topt, TObjArray &Opt);
af303720 49 // Analysis utilites
50 static Bool_t GetLorentzVectorFromESDCluster(TLorentzVector &v, const AliESDCaloCluster *cl);
51 static Bool_t GetLorentzVectorFromRecPoint(TLorentzVector &v, const AliEMCALRecPoint *rp);
52 // Drawing
53 static void DrawHist(TH1* hid=0,int lineWidth=1,int lineColor=1,const char* opt="",int lineStyle=1);
54 // Fitting:
55 static TF1* Gausi(const char *addName, double xmi, double xma, double N, double mean, double sig,
56 double width);
57 static TF1* Gausi(const char *addName, double xmi, double xma, TH1 *h);
58
59 static TF1* GausiPol2(const char *addName, double xmi, double xma, TF1 *g, TF1* bg);
60 //
61 static Double_t Gi(Double_t *x, Double_t *par);
62 static Double_t GiPol2(Double_t *x, Double_t *par);
315d1c64 63
64 AliEMCALHistoUtilities & operator = (const AliEMCALHistoUtilities &) {
65 Fatal("operator =", "not implemented") ; return *this ; }
66
d434833b 67 ClassDef(AliEMCALHistoUtilities,1) // EMCAL utility routines
315d1c64 68};
69
70#endif // AliEMCALHistoUtilities_H