Line data Source code
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 :
19 : class TGraph;
20 :
21 : #include "TObject.h"
22 : #include "AliPID.h"
23 :
24 : class AliTOFResponseParams :
25 : public 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 0 : Int_t GetNPoints(Int_t ipart) const {return ipart < AliPID::kSPECIES ? fNPoints[ipart] : 0;}; // getter
37 0 : Double_t GetP(Int_t ipart, Int_t ipoint) const {return ipart < AliPID::kSPECIES && ipoint < fNPoints[ipart] ? fP[ipart][ipoint] : 0.;}; // getter
38 0 : Double_t GetTExpCorr(Int_t ipart, Int_t ipoint) const {return ipart < AliPID::kSPECIES && ipoint < fNPoints[ipart] ? fTExpCorr[ipart][ipoint] : 0.;}; // getter
39 :
40 0 : 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 0 : 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 40 : ClassDef(AliTOFResponseParams, 1);
54 : };
55 :
56 : #endif /* ALITOFRESPONSEPARAMS_H */
|