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