]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFSDigit.h
Coding conventions (Annalisa)
[u/mrichter/AliRoot.git] / TOF / AliTOFSDigit.h
CommitLineData
5919c40c 1#ifndef ALITOFSDIGIT_H
2#define ALITOFSDIGIT_H
3
0e46b9ae 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
5919c40c 7////////////////////////////////////////////////
8// //
9// Class for TOF SDigits //
10// //
11////////////////////////////////////////////////
12
5919c40c 13/* $Id$ */
14
0e46b9ae 15#include "TObject.h"
5919c40c 16#include "TArrayF.h"
17#include "TArrayI.h"
5919c40c 18
d3c7bfac 19class AliTOFGeometry;
5919c40c 20
5919c40c 21class AliTOFSDigit : public TObject {
22
23 //overloading of the streamer << operator
d3c7bfac 24 //friend ostream& operator << ( ostream& , const AliTOFSDigit&) ;
5919c40c 25
26 public:
d3c7bfac 27 AliTOFSDigit();
5919c40c 28 AliTOFSDigit(Int_t tracknum, Int_t* vol, Float_t* digit);
29// new ctor for sdigits
30 AliTOFSDigit(Int_t sector, Int_t plate, Int_t strip, Int_t padx, Int_t padz, Float_t tdc, Float_t adc);
31// copy ctor
32 AliTOFSDigit(const AliTOFSDigit & digit) ;
7aeeaf38 33 AliTOFSDigit& operator=(const AliTOFSDigit & digit) ;
5919c40c 34 virtual ~AliTOFSDigit();
35 void GetLocation(Int_t* Loc) const;
d3c7bfac 36 Int_t GetTotPad(AliTOFGeometry *tofGeom) const;
5919c40c 37
b213b8bd 38 void Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track);
8e72349e 39 void Update(AliTOFSDigit* sdig);
5919c40c 40
41// getters for AliTOFSDigit object
42 Int_t GetNDigits() const {return fNDigits;}
43 Float_t GetTdc(Int_t i) const {return fTdc->At(i);}
44 Float_t GetAdc(Int_t i) const {return fAdc->At(i);}
45// Int_t GetNTracks(Int_t i) const {return fTracks[i]->GetSize();}
46 Int_t GetTrack(Int_t i, Int_t j) const {return fTracks->At(i*kMAXDIGITS+j);}
47 Int_t GetSector() const {return fSector;}
48 Int_t GetPlate() const {return fPlate;}
49 Int_t GetStrip() const {return fStrip;}
50 Int_t GetPadx() const {return fPadx;}
51 Int_t GetPadz() const {return fPadz;}
52
7aeeaf38 53 enum {
54 kMAXDIGITS = 3 // number 3 is a legacy from AliDigit object
55 };
56
5919c40c 57protected:
7aeeaf38 58
5919c40c 59 Int_t fSector; // number of sector
60 Int_t fPlate; // number of plate
61 Int_t fStrip; // number of strip
62 Int_t fPadx; // number of pad along x
63 Int_t fPadz; // number of pad along z
64 Int_t fNDigits; // dimension of fTdc array
65 TArrayF *fTdc; // tdc values for sdigit
66 TArrayF *fAdc; // adc values for sdigit
67 TArrayI *fTracks; // contributing tracks, kMAXDIGITS entries per
68 // 1 tdc value
69
70// Float_t *fTdc; //[fNDigits] tdc values for sdigit
71// Float_t *fAdc; //[fNDigits] adc values for sdigit
72// Int_t **fTracks; //[fNDigits] contributing tracks, pointers to
d3c7bfac 73 //arrays with track indices
74
5919c40c 75 ClassDef(AliTOFSDigit,1) // SDigit for Time Of Flight
76};
77
78#endif /* ALITOFSDIGIT_H */