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