]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSdigitSPD.h
Introducing the possibility to refit an ESD track to an arbitrary ESD vertex (Yu...
[u/mrichter/AliRoot.git] / ITS / AliITSdigitSPD.h
1 #ifndef ALIITSDIGITSPD_H
2 #define ALIITSDIGITSPD_H
3 /* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /////////////////////////////////////////////////////////////
6 // Digit class for SPD                                     //
7 /////////////////////////////////////////////////////////////
8 #include <AliITSdigit.h>
9
10 //______________________________________________________________________
11 class AliITSdigitSPD: public AliITSdigit {
12
13  public:
14     AliITSdigitSPD(); //default creator
15     AliITSdigitSPD(const Int_t *digits);//standard creator digits only
16     //standard creator with digits, tracks, and hits
17     AliITSdigitSPD(const Int_t *digits,const Int_t *tracks,const Int_t *hits);
18     virtual ~AliITSdigitSPD(){/*destructor*/}
19     // returns the array size used to store Tracks and Hits
20     static Int_t GetNTracks() {return fgkSspd;}
21     // returns the signal in electrons
22     Int_t GetSignalSPD() const {return fSignalSPD;}
23     // returns pointer to the array of tracks which make this digit
24     virtual Int_t *GetTracks()  {return &fTracks[0];}
25      //returns the pointer to the array of hits which made this digit
26     virtual Int_t *GetHits() {return &fHits[0];}
27     // returns track number kept in the array element i of fTracks 
28     virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
29     // returns hit number kept in the array element i of fHits 
30     virtual Int_t GetHit(Int_t i) const {return fHits[i];}
31     // returns TArrayI of unduplicated track numbers (summed over hits).
32     virtual Int_t GetListOfTracks(TArrayI &t);
33     //copy the array trks[fgkSspd] into fTracks
34     virtual void SetTracks(const Int_t *trks){
35         for(Int_t i=0;i<fgkSspd;i++) fTracks[i]=trks[i];}
36     // set signal in electrons
37     void SetSignalSPD(Int_t sig) {fSignalSPD = sig;}
38     //copy the array hits[fgkSspd] into fHits
39     virtual void SetHits(const Int_t *hits){
40         for(Int_t i=0;i<fgkSspd;i++) fHits[i]=hits[i];}
41     //set array element i of fTracks to trk.
42     virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
43     //set array element i of fHits to hit.
44     virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
45     virtual void Print(ostream *os); // Class ascii print function
46     virtual void Print(Option_t *option="") const {TObject::Print(option);}
47     virtual void Read(istream *os);  // Class ascii read function
48     virtual Int_t Read(const char *name) {return TObject::Read(name);}
49
50  protected:
51     static const Int_t fgkSspd = 10; // size of fTracks and fHits arrays
52     
53     // debugging  -- goes to the dictionary
54     Int_t fTracks[fgkSspd]; //[fgkSspd] tracks making this digit 
55     Int_t fHits[fgkSspd];   //[fgkSspd] hits associated to the tracks
56     Int_t fSignalSPD;   // Signal in electrons
57
58     ClassDef(AliITSdigitSPD,2)   // Simulated digit object for SPD
59
60 };
61 // Input and output functions for standard C++ input/output.
62 ostream &operator<<(ostream &os,AliITSdigitSPD &source);
63 istream &operator>>(istream &os,AliITSdigitSPD &source);
64
65 #endif