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