Update master to aliroot
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTOFHeader.h
CommitLineData
f858b00e 1#ifndef ALITOFHEADER_H
2#define ALITOFHEADER_H
3/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------
9// Class for TOF event times, time resolution and T0spread
10// for the Event Data Summary Class
11// Origin: A.De Caro, Salerno, decaro@sa.infn.it
12//-------------------------------------------------------
13
14/**************************************************************
15 * *
16 * This class deals with: *
17 * event time estimated by TOF combinatorial algorithm; *
18 * event time resolution; *
19 * TOF time resolution as written in TOF OCDB; *
20 * T0spread as written in GRP. *
21 * *
22 **************************************************************/
23
24#include "TObject.h"
25//#include "TArrayF.h"
26//#include "TArrayI.h"
49a1368d 27#include "AliTOFTriggerMask.h"
f858b00e 28
29class TArrayI;
30class TArrayF;
31
32class AliTOFHeader : public TObject {
33
34 public:
35
36 AliTOFHeader();
37 AliTOFHeader(Float_t defEvTime, Float_t defResEvTime,
38 Int_t nDifPbins, Float_t *times, Float_t *res,
39 Int_t *nPbin, Float_t tofTimeRes, Float_t t0spread);
40 AliTOFHeader(const AliTOFHeader &source);
41 AliTOFHeader &operator=(const AliTOFHeader &source);
42 virtual void Copy(TObject &obj) const;
43
44 virtual ~AliTOFHeader();
45
46 void SetTOFResolution(Float_t res) {fTOFtimeResolution=res;}
cb2442a7 47 Float_t GetTOFResolution() const {return fTOFtimeResolution;}
f858b00e 48
cb2442a7 49 void SetT0spread(Float_t res) {fT0spread=res;}
50 Float_t GetT0spread() const {return fT0spread;}
f858b00e 51
52 Float_t GetDefaultEventTimeVal() const {return fDefaultEventTimeValue;}
53 Float_t GetDefaultEventTimeRes() const {return fDefaultEventTimeRes;}
54 TArrayF *GetEventTimeValues() const {return fEventTimeValues;}
55 TArrayF *GetEventTimeRes() const {return fEventTimeRes;}
56 TArrayI *GetNvalues() const {return fNvalues;}
cb2442a7 57 Int_t GetNbins() const {return fNvalues ? fNvalues->GetSize() : 0;}
49a1368d 58 Int_t GetNumberOfTOFclusters() const {return fNumberOfTOFclusters;}
59 Int_t GetNumberOfTOFtrgPads() const {return fNumberOfTOFtrgPads;}
60 Int_t GetNumberOfTOFmaxipad() const {if(fTrigMask) return fTrigMask->GetNumberMaxiPadOn(); else return 0;}
61 AliTOFTriggerMask *GetTriggerMask() const {return fTrigMask;}
f858b00e 62
63 void SetDefaultEventTimeVal(Float_t val) {fDefaultEventTimeValue=val;}
64 void SetDefaultEventTimeRes(Float_t res) {fDefaultEventTimeRes=res;}
65 void SetEventTimeValues(TArrayF *arr);
66 void SetEventTimeRes(TArrayF *arr);
67 void SetNvalues(TArrayI *arr);
68 void SetNbins(Int_t nbins);
49a1368d 69 void SetNumberOfTOFclusters(Int_t a) {fNumberOfTOFclusters=a;}
70 void SetNumberOfTOFtrgPads(Int_t a) {fNumberOfTOFtrgPads=a;}
71 void SetTriggerMask(AliTOFTriggerMask *trigmask) {if(fTrigMask) *fTrigMask=*trigmask; else fTrigMask=new AliTOFTriggerMask(*trigmask);}
f858b00e 72
73 protected:
74
75 Float_t fDefaultEventTimeValue; // TOF event time value more frequent
76 Float_t fDefaultEventTimeRes; // TOF event time res more frequent
77 Int_t fNbins; // number of bins with TOF event
78 // time values different from
79 // default one
4d1e4016 80 TArrayF *fEventTimeValues; // array for TOF event time values
81 // different from default one
82 TArrayF *fEventTimeRes; // array for TOF event time resolutions
83 TArrayI *fNvalues; // array for order numbers of momentum bin
f858b00e 84 Float_t fTOFtimeResolution; // TOF time resolution as written in TOF OCDB
85 Float_t fT0spread; // t0spread as written in TOF OCDB
49a1368d 86 Int_t fNumberOfTOFclusters; //[0,170000,18] number of reconstructed TOF clusters
87 Int_t fNumberOfTOFtrgPads; //[0,170000,18] number of reconstructed TOF trigger pads
88 AliTOFTriggerMask *fTrigMask; // Trigger mask
f858b00e 89
90 private:
91
49a1368d 92 ClassDef(AliTOFHeader,3) // Class for TOF event times and so on
f858b00e 93};
94
95#endif