]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSDigit.h
Now the full chain includes raw data.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigit.h
1 #ifndef ALIPHOSDIGIT_H
2 #define ALIPHOSDIGIT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 /* History of cvs commits:
9  *
10  * $Log$
11  */
12
13 //_________________________________________________________________________
14 //  PHOS digit: Id
15 //              energy
16 //              3 identifiers for the primary particle(s) at the origine of the digit
17 //  The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
18 //  It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesArray,
19 //   it is not possible to stream such an array... (beyond my understqnding!)
20 //
21 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
22
23 // --- ROOT system ---
24
25 //#include "TObject.h" 
26
27 // --- Standard library ---
28
29 // --- AliRoot header files ---
30
31 #include "AliDigitNew.h"
32
33 class AliPHOSDigit : public AliDigitNew {
34
35   friend ostream& operator << ( ostream& , const AliPHOSDigit&) ;
36
37  public:
38   
39   AliPHOSDigit() ;
40   AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy, Float_t Time, Int_t index = -1) ;
41   AliPHOSDigit(const AliPHOSDigit & digit) ;
42   virtual ~AliPHOSDigit() ;
43
44   Bool_t operator==(const AliPHOSDigit &rValue) const;
45   AliPHOSDigit& operator+(AliPHOSDigit const &rValue) ;
46   AliPHOSDigit& operator*(Float_t factor) ; 
47   //  AliPHOSDigit& operator=(const AliPHOSDigit) {
48   //  Fatal("operator = ", "not implemented") ; return *this ; } 
49   Int_t   Compare(const TObject * obj) const ;  
50   Int_t   GetNprimary() const { return fNprimary ; }
51   Int_t   GetPrimary(Int_t index) const ; 
52   Float_t GetTime(void) const {return fTime ;}
53   Float_t GetTimeR(void) const {return fTimeR ;}
54   Bool_t  IsSortable() const { return kTRUE ; }
55   void    Print(const Option_t * = "") const;
56   void    SetAmp(Int_t Amp) { fAmp=Amp ; } 
57   void    SetTime(Float_t time) {fTime = time ;}
58   void    SetTimeR(Float_t time) {fTimeR = time ;}
59   void    ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging
60
61  private:
62
63   Int_t fNprimary ;        // Number of primaries
64   Int_t * fPrimary ;       //[fNprimary] Array of primaries      
65   Float_t fTime ;          // Calculcated time 
66   Float_t fTimeR ;         // Earliest time: to be used by Digits2Raw
67     
68   ClassDef(AliPHOSDigit,3)   // Digit in PHOS 
69
70 } ;
71
72 #endif //  ALIPHOSDIGIT_H