1 #ifndef ALITOFRESPONSEPARAMS_H
2 #define ALITOFRESPONSEPARAMS_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
11 // * this class defines the TOF object to be stored
12 // * in OCDB in order to have TOF response correction
13 // * and actual resolution
24 class AliTOFResponseParams :
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=
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
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
43 Double_t EvalTExpCorr(Int_t ipart, Double_t p); // eval corr
44 TGraph *DrawGraph(Int_t ipart, Option_t* option = ""); // draw
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)
53 ClassDef(AliTOFResponseParams, 1);
56 #endif /* ALITOFRESPONSEPARAMS_H */