Fixes for std:: need with the trunk of Root (Jochen, Yves)
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUSDigit.h
CommitLineData
451f5018 1#ifndef ALIITSUSDIGIT_H
2#define ALIITSUSDIGIT_H
3/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6#include <TObject.h>
7
e61afb80 8using std::istream;
451f5018 9
10class AliITSUSDigit: public TObject
11{
12 public:
13 enum {kBuffSize=10};
14 //
15 AliITSUSDigit();
16 AliITSUSDigit(Int_t track,Int_t hit,UInt_t module,UInt_t index,Double_t signal);
17 AliITSUSDigit(UInt_t module,UInt_t index,Double_t noise);
18 AliITSUSDigit(const AliITSUSDigit &source);
19 AliITSUSDigit& operator=(const AliITSUSDigit &source);
20 virtual ~AliITSUSDigit() {}
21 Double_t GetSignal(Int_t i) const {return ( (i>=0&&i<kBuffSize) ? fSignal[i] : 0.0);}
22 Double_t GetSignal() const {return fTsignal;}
23 Double_t GetSignalAfterElect() const {return fSignalAfterElect;}
24 Double_t GetSumSignal() const {return fTsignal+fNoise;}
25 Double_t GetNoise() const {return fNoise;}
26 Int_t GetNsignals() const {return kBuffSize;}
27 void AddSignal(Int_t track,Int_t hit,Double_t signal);
28 void AddSignalAfterElect(Double_t signal) {fSignalAfterElect += signal;}
29 void AddNoise(Double_t noise) {fNoise += noise;}
30 void SetNoise(Double_t noise) {fNoise = noise;}
31 Int_t GetTrack(Int_t i) const {return ((i>=0&&i<kBuffSize) ? fTrack[i] : 0);}
32 Int_t GetHit(Int_t i) const {return ((i>=0&&i<kBuffSize) ? fHits[i] : 0);}
33 Int_t GetModule() const {return fModule;}
34 Int_t GetNTracks() const {return fNTracks;}
35 //
36 void Add(const AliITSUSDigit *pl);
37 void AddTo(Int_t fileIndex, const AliITSUSDigit *pl);
38 void ShiftIndices(Int_t fileIndex);
451f5018 39 void Print(Option_t *option="") const;
40 Int_t Read(const char *name) {return TObject::Read(name);}
41 //
42 virtual Bool_t IsSortable() const {return kTRUE;}
43 virtual Bool_t IsEqual(const TObject* obj) const {return GetUniqueID()==obj->GetUniqueID();}
44 virtual Int_t Compare(const TObject* obj) const;
45
46 //
47 static Int_t GetBuffSize() {return kBuffSize;};
48 //
49 private:
50 UShort_t fModule; // module number
51 UShort_t fNTracks; // number of tracks contributing
52 Int_t fTrack[kBuffSize]; // track Number
53 Int_t fHits[kBuffSize]; // hit number
54 Float_t fSignal[kBuffSize]; // Signals
55 Float_t fTsignal; // Total signal (no noise)
56 Float_t fNoise; // Total noise, coupling, ...
57 Float_t fSignalAfterElect; // Signal after electronics
58 //
59 ClassDef(AliITSUSDigit,1) // Item list of signals and track numbers
60};
61
451f5018 62
63
64#endif