]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/STEERBase/AliTRDdEdxParams.h
Commit message
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTRDdEdxParams.h
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 //  Xianguo Lu <lu@physi.uni-heidelberg.de>
17 //
18
19 #ifndef ALITRDDEDXPARAMS_H
20 #define ALITRDDEDXPARAMS_H
21
22 #include "TNamed.h"
23 #include "TVectorT.h"
24 #include "TString.h"
25
26 //maximum number of paticle types
27 #define MAXNPAR 10
28
29 class AliTRDdEdxParams: public TNamed
30 {
31  public:
32   AliTRDdEdxParams(const TString name="name", const TString title="title");
33   void Print(Option_t* option = "") const;
34
35   const TVectorF& GetMeanParameter(const Int_t itype) const { return GetParameter(fMeanPar, itype);}
36   const TVectorF& GetSigmaParameter(const Int_t itype) const { return GetParameter(fSigmaPar, itype);}
37
38   void SetMeanParameter(const Int_t itype, const Int_t npar, const Float_t vals[]){ SetParameter(fMeanPar, itype, npar, vals); }
39   void SetSigmaParameter(const Int_t itype, const Int_t npar, const Float_t vals[]){ SetParameter(fSigmaPar, itype, npar, vals); } 
40
41  private:
42   const TVectorF& GetParameter(const TVectorF par[], const Int_t itype) const;
43   void SetParameter(TVectorF par[], const Int_t itype, const Int_t npar, const Float_t vals[]);
44
45   TVectorF fMeanPar[MAXNPAR];
46   TVectorF fSigmaPar[MAXNPAR];
47
48   void CheckType(const Int_t itype, const TString tag) const;
49
50   ClassDef(AliTRDdEdxParams,1);
51 };
52
53 #endif