]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSdigitSDD.h
A simple readme file for all the files stored in this dir.
[u/mrichter/AliRoot.git] / ITS / AliITSdigitSDD.h
1 #ifndef ALIITSDIGITSDD_H
2 #define ALIITSDIGITSDD_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 SDD                                //
7 ////////////////////////////////////////////////////////
8 #include <AliITSdigit.h>
9
10 class AliITSCalibrationSDD;
11
12 //______________________________________________________________________
13 class AliITSdigitSDD: public AliITSdigit {
14
15  public:
16     AliITSdigitSDD(); //default creator
17     //standard c.tor  with digits and "phys"
18     AliITSdigitSDD(Float_t phys,const Int_t *digits);
19     //standard c.tor with digits, tracls, hits, "phys", and charge
20     AliITSdigitSDD( Float_t phys,const Int_t *digits,const Int_t *tracks,
21                     const Int_t *hits,const Float_t *charges);
22     //constructor setting also fSignalExpanded
23     AliITSdigitSDD( Float_t phys,const Int_t *digits,const Int_t *tracks,
24                     const Int_t *hits,const Float_t *charges, Int_t sige);
25     //constructor setting fSignalExpanded through AliITSCalibrationSDD
26     AliITSdigitSDD( Float_t phys,const Int_t *digits,const Int_t *tracks,
27                     const Int_t *hits,const Float_t *charges, 
28                     AliITSCalibrationSDD *resp);
29     virtual ~AliITSdigitSDD(){/* destructor*/}
30     // returns the array size used to store Tracks and Hits
31     static Int_t GetNTracks() {return fgkSsdd;}
32     // returns pointer to the array of tracks which make this digit
33     virtual Int_t *GetTracks()  {return &fTracks[0];}
34     // returns the pointer to the array of hits which made this digit
35     virtual Int_t *GetHits()  {return &fHits[0];}
36     virtual Int_t GetSignal() const {return fSignalExpanded;}
37     virtual Int_t GetCompressedSignal() const {return fSignal;}
38     // returns track number kept in the array element i of fTracks 
39     virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
40     // returns hit number kept in the array element i of fHits 
41     virtual Int_t GetHit(Int_t i) const {return fHits[i];}
42     // Return charge deposited by this track/hit
43     virtual Float_t GetCharge(Int_t i) const {return fTcharges[i];}
44     // returns TArrayI of unduplicated track numbers (summed over hits).
45     virtual Int_t GetListOfTracks(TArrayI &t,TArrayF &c);
46     //copy the array trks[fgkSsdd] into fTracks
47     virtual void SetTracks(const Int_t *trks){
48         for(Int_t i=0;i<fgkSsdd;i++) fTracks[i]=trks[i];}
49     //copy the array hits[fgkSsdd] into fHits
50     virtual void SetHits(const Int_t *hits){
51         for(Int_t i=0;i<fgkSsdd;i++) fHits[i]=hits[i];}
52     //set array element i of fTracks to trk.
53     virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
54     //set array element i of fHits to hit.
55     virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
56     void SetSignalExpanded(Int_t sig){fSignalExpanded = sig;}
57     virtual void Print(ostream *os); // Class ascii print function
58     virtual void Read(istream *os);  // Class ascii read function
59     virtual void Print(Option_t *option="") const {TObject::Print(option);}
60     virtual Int_t Read(const char *name) {return TObject::Read(name);}
61
62  protected:
63     void InitObject(Float_t phys,const Int_t *tracks,
64                     const Int_t *hits,const Float_t *charges);
65     static const Int_t fgkSsdd = 10; // size of fTracks and fHits arrays
66     
67     // debugging  -- goes to the dictionary
68     Int_t   fTracks[fgkSsdd];   //[fgkSsdd] tracks making this digit 
69     Int_t   fHits[fgkSsdd];     //[fgkSsdd] hits associated to the tracks
70                             // 3 hits temporarily - it will be only 1
71     Float_t fTcharges[fgkSsdd];   //[fgkSsdd] charge per track making this digit 
72     Float_t fPhysics;       // signal particles contribution to signal
73     Int_t fSignalExpanded;  // 10 bit signal
74     ClassDef(AliITSdigitSDD,3)   // Simulated digit object for SDD
75
76 };
77 // Input and output functions for standard C++ input/output.
78 ostream &operator<<(ostream &os,AliITSdigitSDD &source);
79 istream &operator>>(istream &os,AliITSdigitSDD &source);
80
81 #endif