]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSdigitSDD.h
Changes done in order to remove compilation warnings
[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 #include <AliITSdigit.h>
7
8 class AliITSresponseSDD;
9
10 //______________________________________________________________________
11 class AliITSdigitSDD: public AliITSdigit {
12
13  public:
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     virtual void Print(ostream *os); // Class ascii print function
56     virtual void Read(istream *os);  // Class ascii read function
57     virtual void Print(Option_t *option="") const {TObject::Print(option);}
58     virtual Int_t Read(const char *name) {return TObject::Read(name);}
59
60  protected:
61     void InitObject(Float_t phys,const Int_t *tracks,
62                     const Int_t *hits,const Float_t *charges);
63     static const Int_t fgkSsdd = 10; // size of fTracks and fHits arrays
64     
65     // debugging  -- goes to the dictionary
66     Int_t   fTracks[fgkSsdd];   //[fgkSsdd] tracks making this digit 
67     Int_t   fHits[fgkSsdd];     //[fgkSsdd] hits associated to the tracks
68                             // 3 hits temporarily - it will be only 1
69     Float_t fTcharges[fgkSsdd];   //[fgkSsdd] charge per track making this digit 
70     Float_t fPhysics;       // signal particles contribution to signal
71     Int_t fSignalExpanded;  // 10 bit signal
72     ClassDef(AliITSdigitSDD,3)   // Simulated digit object for SDD
73
74 };
75 // Input and output functions for standard C++ input/output.
76 ostream &operator<<(ostream &os,AliITSdigitSDD &source);
77 istream &operator>>(istream &os,AliITSdigitSDD &source);
78
79 #endif