]>
Commit | Line | Data |
---|---|---|
d15a28e7 | 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 | ||
6ad0bfa0 | 6 | /* $Id$ */ |
7 | ||
702ab87e | 8 | /* History of cvs commits: |
9 | * | |
10 | * $Log$ | |
3663622c | 11 | * Revision 1.34 2006/04/22 10:30:17 hristov |
12 | * Add fEnergy to AliPHOSDigit and operate with EMC amplitude in energy units (Yu.Kharlov) | |
13 | * | |
27a73a5d | 14 | * Revision 1.33 2005/05/28 14:19:04 schutz |
15 | * Compilation warnings fixed by T.P. | |
16 | * | |
702ab87e | 17 | */ |
18 | ||
b2a60966 | 19 | //_________________________________________________________________________ |
20 | // PHOS digit: Id | |
21 | // energy | |
22 | // 3 identifiers for the primary particle(s) at the origine of the digit | |
23 | // The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell | |
184569b0 | 24 | // It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesArray, |
b2a60966 | 25 | // it is not possible to stream such an array... (beyond my understqnding!) |
26 | // | |
27 | //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH) | |
d15a28e7 | 28 | |
29 | // --- ROOT system --- | |
30 | ||
e957fea8 | 31 | //#include "TObject.h" |
d15a28e7 | 32 | |
33 | // --- Standard library --- | |
34 | ||
35 | // --- AliRoot header files --- | |
36 | ||
37 | #include "AliDigitNew.h" | |
52d2af54 | 38 | using std::ostream; |
d15a28e7 | 39 | |
40 | class AliPHOSDigit : public AliDigitNew { | |
6c370def | 41 | |
5cf7bbad | 42 | friend ostream& operator << ( ostream& , const AliPHOSDigit&) ; |
6c370def | 43 | |
88714635 | 44 | public: |
45 | ||
cf239357 | 46 | AliPHOSDigit() ; |
9688c1dd | 47 | AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy, Float_t Time, Int_t index = -1) ; |
27a73a5d | 48 | AliPHOSDigit(Int_t primary, Int_t id, Float_t energy , Float_t Time, Int_t index = -1) ; |
cf239357 | 49 | AliPHOSDigit(const AliPHOSDigit & digit) ; |
2e5c3041 | 50 | virtual ~AliPHOSDigit() ; |
d15a28e7 | 51 | |
b27d82c8 | 52 | Bool_t operator==(const AliPHOSDigit &rValue) const; |
3663622c | 53 | |
54 | AliPHOSDigit& operator += (AliPHOSDigit const &rValue) ; | |
55 | AliPHOSDigit& operator *= (Float_t factor) ; | |
56 | ||
57 | public: | |
58 | ||
54ac223e | 59 | Int_t Compare(const TObject * obj) const ; |
60 | Int_t GetNprimary() const { return fNprimary ; } | |
61 | Int_t GetPrimary(Int_t index) const ; | |
62 | Float_t GetEnergy(void) const {return fEnergy ;} | |
63 | Float_t GetTime(void) const {return fTime ;} | |
64 | Float_t GetTimeR(void) const {return fTimeR ;} | |
65 | Int_t GetNSamplesHG() const {return fNSamplesHG;} | |
66 | Int_t GetNSamplesLG() const {return fNSamplesLG;} | |
67 | UShort_t *GetSamplesHG() const {return fSamplesHG;} | |
68 | UShort_t *GetSamplesLG() const {return fSamplesLG;} | |
69 | Bool_t IsSortable() const { return kTRUE ; } | |
f1731579 | 70 | Bool_t IsLG() const {return fIsLG ;} |
54ac223e | 71 | void Print(const Option_t * = "") const; |
72 | void SetAmp(Int_t Amp) {fAmp = Amp ;} | |
73 | void SetEnergy(Float_t E) {fEnergy= E ;} | |
74 | void SetTime(Float_t time) {fTime = time ;} | |
75 | void SetTimeR(Float_t time) {fTimeR = time ;} | |
76 | void SetALTROSamplesHG(Int_t nSamplesHG, Int_t *samplesHG); | |
77 | void SetALTROSamplesLG(Int_t nSamplesLG, Int_t *samplesLG); | |
78 | void ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging | |
f1731579 | 79 | void SetLG(Bool_t inLG){fIsLG=inLG;} //mark digits produced from LG when HG in overflow |
6c8ba828 | 80 | private: |
81 | AliPHOSDigit & operator = (const AliPHOSDigit & /*digit*/); | |
82 | ||
83 | private: | |
f1731579 | 84 | Bool_t fIsLG; //If this digit created from HG or LG channels |
54ac223e | 85 | Int_t fNprimary ; // Number of primaries |
86 | Int_t * fPrimary ; //[fNprimary] Array of primaries | |
87 | Float_t fEnergy ; // Deposited energy in ADC counts | |
88 | Float_t fTime ; // Calculcated time | |
89 | Float_t fTimeR ; // Earliest time: to be used by Digits2Raw | |
90 | Int_t fNSamplesHG; // Number of high-gain ALTRO samples | |
91 | Int_t fNSamplesLG; // Number of low-gain ALTRO samples | |
92 | UShort_t *fSamplesHG; //[fNSamplesHG] Array of high-gain ALTRO samples | |
93 | UShort_t *fSamplesLG; //[fNSamplesLG] Array of low-gain ALTRO samples | |
94 | ||
f1731579 | 95 | ClassDef(AliPHOSDigit,7) // Digit in PHOS |
d15a28e7 | 96 | |
97 | } ; | |
98 | ||
99 | #endif // ALIPHOSDIGIT_H |