]>
Commit | Line | Data |
---|---|---|
f04b3a69 | 1 | #ifndef ALITOFRUNPARAMS_H |
2 | #define ALITOFRUNPARAMS_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 on a run-by-run basis in order to have the measurement | |
13 | // * of the time evolution of T0 and of TOF resolution including | |
14 | // * average T0 uncertainty | |
15 | // * | |
16 | // * | |
17 | // * | |
18 | ||
19 | #include "TObject.h" | |
20 | ||
21 | class AliTOFRunParams : | |
22 | public TObject | |
23 | { | |
24 | ||
25 | public: | |
26 | ||
27 | AliTOFRunParams(); // default constructor | |
28 | AliTOFRunParams(Int_t nPoints); // standard constructor | |
29 | virtual ~AliTOFRunParams(); // default destructor | |
30 | AliTOFRunParams(const AliTOFRunParams &source); // copy constructor | |
31 | AliTOFRunParams &operator=(const AliTOFRunParams &source); // operator= | |
32 | ||
33 | Int_t GetNPoints() const {return fNPoints;}; // getter | |
b46109cf | 34 | UInt_t GetTimestamp(Int_t i) const {return fTimestamp && i < fNPoints ? fTimestamp[i] : 0;}; // getter |
f04b3a69 | 35 | Float_t GetT0(Int_t i) const {return fT0 && i < fNPoints ? fT0[i] : 0.;}; // getter |
36 | Float_t GetTOFResolution(Int_t i) const {return fTOFResolution && i < fNPoints ? fTOFResolution[i] : 0.;}; // getter | |
37 | Float_t GetT0Spread(Int_t i) const {return fT0Spread && i < fNPoints ? fT0Spread[i] : 0.;}; // getter | |
38 | ||
39 | void SetTimestamp(UInt_t *value) {if (fTimestamp) for (Int_t i = 0; i < fNPoints; i++) fTimestamp[i] = value[i];}; // setter | |
40 | void SetT0(Float_t *value) {if (fT0) for (Int_t i = 0; i < fNPoints; i++) fT0[i] = value[i];}; // setter | |
41 | void SetTOFResolution(Float_t *value) {if (fTOFResolution) for (Int_t i = 0; i < fNPoints; i++) fTOFResolution[i] = value[i];}; // setter | |
42 | void SetT0Spread(Float_t *value) {if (fT0Spread) for (Int_t i = 0; i < fNPoints; i++) fT0Spread[i] = value[i];}; // setter | |
43 | ||
44 | Float_t EvalT0(UInt_t timestamp); // eval T0 | |
45 | Float_t EvalTOFResolution(UInt_t timestamp); // eval TOF resolution | |
46 | Float_t EvalT0Spread(UInt_t timestamp); // eval T0 spread | |
47 | ||
48 | private: | |
49 | ||
50 | Int_t fNPoints; | |
51 | UInt_t *fTimestamp; //[fNPoints] time stamp | |
52 | Float_t *fT0; //[fNPoints] average T0 (ps) | |
53 | Float_t *fTOFResolution; //[fNPoints] average TOF resolution (T0 uncertainty included) (ps) | |
54 | Float_t *fT0Spread; //[fNPoints] estimated T0 spread (from vertex spread z) (ps) | |
55 | ||
56 | ClassDef(AliTOFRunParams, 1); | |
57 | }; | |
58 | ||
59 | #endif /* ALITOFRUNPARAMS_H */ |