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