]>
Commit | Line | Data |
---|---|---|
e869281d | 1 | #ifndef ALIITSDIGITSSD_H |
2 | #define ALIITSDIGITSSD_H | |
3 | /* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
7d62fb64 | 5 | //////////////////////////////////////////////////////// |
6 | // Digit class for SSD // | |
7 | //////////////////////////////////////////////////////// | |
e869281d | 8 | |
9 | #include <AliITSdigit.h> | |
10 | ||
11 | //______________________________________________________________________ | |
12 | class AliITSdigitSSD: public AliITSdigit { | |
13 | ||
14 | public: | |
15 | AliITSdigitSSD(); //default constructor | |
16 | //Standard constructor with digits | |
17 | AliITSdigitSSD(const Int_t *digits); | |
18 | //Standard constructor with digits, tracks, and hits | |
19 | AliITSdigitSSD(const Int_t *digits,const Int_t *tracks,const Int_t *hits); | |
20 | virtual ~AliITSdigitSSD(){/* destructor */} | |
21 | // returns the array size used to store Tracks and Hits | |
22 | static Int_t GetNTracks() {return fgkSssd;} | |
23 | Int_t GetSignal() const {/* returns signal*/return fSignal;} | |
24 | Int_t GetStripNumber() const {/* returns strip number*/return fCoord2;} | |
25 | //returns 1 when side P and 0 when side N | |
14a74335 | 26 | Int_t IsSideP() const {if(fCoord1==0) return 1; else return 0; } |
e869281d | 27 | // returns pointer to the array of tracks which make this digit |
28 | virtual Int_t *GetTracks() {return &fTracks[0];} | |
29 | // returns the pointer to the array of hits which made this digit | |
30 | virtual Int_t *GetHits() {return &fHits[0];} | |
31 | // returns track number kept in the array element i of fTracks | |
32 | virtual Int_t GetTrack(Int_t i) const {return fTracks[i];} | |
33 | // returns hit number kept in the array element i of fHits | |
34 | virtual Int_t GetHit(Int_t i) const {return fHits[i];} | |
35 | // returns TArrayI of unduplicated track numbers (summed over hits). | |
36 | virtual Int_t GetListOfTracks(TArrayI &t); | |
37 | //copy the array trks[fgkSssd] into fTracks | |
38 | virtual void SetTracks(const Int_t *trks){ | |
39 | for(Int_t i=0;i<fgkSssd;i++) fTracks[i]=trks[i];} | |
40 | //copy the array hits[fgkSssd] into fHits | |
41 | virtual void SetHits(const Int_t *hits){ | |
42 | for(Int_t i=0;i<fgkSssd;i++) fHits[i]=hits[i];} | |
43 | //set array element i of fTracks to trk. | |
44 | virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;} | |
45 | //set array element i of fHits to hit. | |
46 | virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;} | |
47 | void Print(ostream *os); // Class ascii print function | |
48 | void Read(istream *os); // Class ascii read function | |
d2f55a22 | 49 | virtual void Print(Option_t *option="") const {TObject::Print(option);} |
50 | virtual Int_t Read(const char *name) {return TObject::Read(name);} | |
51 | ||
e869281d | 52 | |
53 | protected: | |
54 | static const Int_t fgkSssd = 10; // size of fTracks and fHits arrays | |
55 | ||
56 | // debugging -- goes to the dictionary | |
57 | Int_t fTracks[fgkSssd]; //[fgkSssd] tracks making this digit | |
58 | Int_t fHits[fgkSssd]; //[fgkSssd] hits associated to the tracks | |
59 | // 3 hits temporarily - it will be only 1 | |
60 | ||
61 | ClassDef(AliITSdigitSSD,2) // Simulated digit object for SSD | |
62 | ||
63 | }; | |
64 | // Input and output functions for standard C++ input/output. | |
65 | ostream &operator<<(ostream &os,AliITSdigitSSD &source); | |
66 | istream &operator>>(istream &os,AliITSdigitSSD &source); | |
67 | ||
68 | #endif |