Getting event number from gAlice instead of header to make it
[u/mrichter/AliRoot.git] / ITS / AliITSdigitSDD.h
CommitLineData
e869281d 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 */
7d62fb64 5////////////////////////////////////////////////////////
6// Digit class for SDD //
7////////////////////////////////////////////////////////
e869281d 8#include <AliITSdigit.h>
9
7f1a504b 10class AliITSresponseSDD;
11
e869281d 12//______________________________________________________________________
13class AliITSdigitSDD: public AliITSdigit {
14
15 public:
16 AliITSdigitSDD(); //default creator
7f1a504b 17 //standard c.tor with digits and "phys"
e869281d 18 AliITSdigitSDD(Float_t phys,const Int_t *digits);
7f1a504b 19 //standard c.tor with digits, tracls, hits, "phys", and charge
e869281d 20 AliITSdigitSDD( Float_t phys,const Int_t *digits,const Int_t *tracks,
21 const Int_t *hits,const Float_t *charges);
7f1a504b 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 AliITSresponseSDD
26 AliITSdigitSDD( Float_t phys,const Int_t *digits,const Int_t *tracks,
27 const Int_t *hits,const Float_t *charges,
28 AliITSresponseSDD *resp);
e869281d 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
7d62fb64 33 virtual Int_t *GetTracks() {return &fTracks[0];}
e869281d 34 // returns the pointer to the array of hits which made this digit
7d62fb64 35 virtual Int_t *GetHits() {return &fHits[0];}
7f1a504b 36 virtual Int_t GetSignal() const {return fSignalExpanded;}
37 virtual Int_t GetCompressedSignal() const {return fSignal;}
e869281d 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;}
7f1a504b 56 void SetSignalExpanded(Int_t sig){fSignalExpanded = sig;}
d2f55a22 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);}
e869281d 61
62 protected:
7f1a504b 63 void InitObject(Float_t phys,const Int_t *tracks,
64 const Int_t *hits,const Float_t *charges);
e869281d 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
7f1a504b 73 Int_t fSignalExpanded; // 10 bit signal
74 ClassDef(AliITSdigitSDD,3) // Simulated digit object for SDD
e869281d 75
76};
77// Input and output functions for standard C++ input/output.
78ostream &operator<<(ostream &os,AliITSdigitSDD &source);
79istream &operator>>(istream &os,AliITSdigitSDD &source);
80
81#endif