warning fix
[u/mrichter/AliRoot.git] / TOF / AliTOFResponseParams.h
CommitLineData
5b4ed716 1#ifndef ALITOFRESPONSEPARAMS_H
2#define ALITOFRESPONSEPARAMS_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6/* $Id$ */
7
8// *
9// *
10// *
11// * this class defines the TOF object to be stored
12// * in OCDB in order to have TOF response correction
13// * and actual resolution
14// *
15// *
16// *
17// *
18
19class TGraph;
20
21#include "TObject.h"
22#include "AliPID.h"
23
24class AliTOFResponseParams :
25public TObject
26{
27
28 public:
29
30 AliTOFResponseParams(); // default constructor
31 AliTOFResponseParams(Int_t *nPoints); // standard constructor
32 virtual ~AliTOFResponseParams(); // default destructor
33 AliTOFResponseParams(const AliTOFResponseParams &source); // copy constructor
34 AliTOFResponseParams &operator=(const AliTOFResponseParams &source); // operator=
35
36 Int_t GetNPoints(Int_t ipart) const {return ipart < AliPID::kSPECIES ? fNPoints[ipart] : 0;}; // getter
37 Double_t GetP(Int_t ipart, Int_t ipoint) const {return ipart < AliPID::kSPECIES && ipoint < fNPoints[ipart] ? fP[ipart][ipoint] : 0.;}; // getter
38 Double_t GetTExpCorr(Int_t ipart, Int_t ipoint) const {return ipart < AliPID::kSPECIES && ipoint < fNPoints[ipart] ? fTExpCorr[ipart][ipoint] : 0.;}; // getter
39
40 void SetP(Int_t ipart, Double_t *value) {if (ipart < AliPID::kSPECIES) for (Int_t ipoint = 0; ipoint < fNPoints[ipart]; ipoint++) fP[ipart][ipoint] = value[ipoint];}; // setter
41 void SetTExpCorr(Int_t ipart, Double_t *value) {if (ipart < AliPID::kSPECIES) for (Int_t ipoint = 0; ipoint < fNPoints[ipart]; ipoint++) fTExpCorr[ipart][ipoint] = value[ipoint];}; // setter
42
43 Double_t EvalTExpCorr(Int_t ipart, Double_t p); // eval corr
44 TGraph *DrawGraph(Int_t ipart, Option_t* option = ""); // draw
45
46 private:
47
48 static const Int_t fgkMaxPoints = 20; // max number of points
49 Int_t fNPoints[AliPID::kSPECIES]; // number of points
50 Double_t fP[AliPID::kSPECIES][fgkMaxPoints]; // average momentum (GeV/c)
51 Double_t fTExpCorr[AliPID::kSPECIES][fgkMaxPoints]; // expected time correction (ps)
52
53 ClassDef(AliTOFResponseParams, 1);
54};
55
56#endif /* ALITOFRESPONSEPARAMS_H */