added slewing correction by data
[u/mrichter/AliRoot.git] / TRD / AliTRDdEdxCalibUtils.h
CommitLineData
6951a056 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//
17//
18// Xianguo Lu
19// lu@physi.uni-heidelberg.de
20// Xianguo.Lu@cern.ch
21//
22/*
23grep " AliTRDdEdxCalibUtils::" AliTRDdEdxCalibUtils.cxx | grep "=" -v | grep -v "[6]" | grep -v printf |wc
24grep "(" AliTRDdEdxCalibUtils.h | grep ";" | grep -v grep | grep -v ClassDef | grep -v "{" | grep -v typedef | wc
25*/
26
27
28#ifndef ALITRDDEDXCALIBUTILS_H
29#define ALITRDDEDXCALIBUTILS_H
30
31#ifndef TVECTORD_H
32#include "TVectorD.h"
33#endif
34
35#ifndef THNSPARSE_H
36#include "THnBase.h"
37#endif
38
39#ifndef TTREESTREAM_H
40#include "TTreeStream.h"
41#endif
42
43#ifndef ALITRDDEDXCALIBHISTARRAY_H
44#include "AliTRDdEdxCalibHistArray.h"
45#endif
46
47class TH1D;
48class TH2D;
49class TObjArray;
50
51class AliESDEvent;
52class AliESDtrack;
53class AliTRDcluster;
54class AliTRDtrackV1;
55class AliTRDseedV1;
56
57class AliTRDdEdxCalibUtils
58{
59 public:
60
61 static void SetObjArray(TObjArray * obj){fgObjArray = obj;}
62 static TObjArray * GetObjArray();
63 static TObjArray * GetObj(const Bool_t kinvq, const Double_t mag, const Int_t charge);
64 static TObjArray* HistToObj(const THnBase *hh, Int_t run=-999, TList *lout=0x0, TTreeSRedirector *calibStream=0x0);
65 static void DeleteObjArray();
687aa844 66 static Bool_t GenerateOCDB(const Int_t run=-1, const TString path="local://./");
6951a056 67
68 static AliTRDdEdxCalibHistArray * GetHistArray(){return fgHistArray;}
69 static THnBase * GetHistAt(const Int_t iter);
70 static void IniHistArray(TList *list, const Bool_t kNoInv);
71 static Bool_t ReadHistArray(const TString filename, const TString listname);
72 static void FillHist(const AliTRDtrackV1 *trdv1, const Bool_t kinvq, const Double_t mag, const Int_t charge, const Double_t scale) ;
73 static void DeleteHistArray();
74
75 static Double_t GetCalibTPCscale(const Int_t tpcncls, const Double_t tpcsig);
6951a056 76
77 private:
78 static void FillHist(const Int_t ncls, const TVectorD *arrayQ, const TVectorD *arrayX, THnBase * hcalib, const Double_t scale);
79 static void GetPHCountMeanRMS(const TH1D *hnor, TH1D *&hmean);
80
81
82 static AliTRDdEdxCalibHistArray * fgHistArray; //array containing 8 THnBase!
83 static TObjArray * fgObjArray; //array containing 8 TObjArray!
84
85};
86
87#endif