Update for Ds
[u/mrichter/AliRoot.git] / ITS / AliITSdigit.h
CommitLineData
3bd79107 1#ifndef ALIITSDIGIT_H
2#define ALIITSDIGIT_H
e869281d 3/* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
f8dece8d 4 * See cxx source for full Copyright notice */
88cb7938 5
f8dece8d 6/* $Id$ */
88cb7938 7
3bd79107 8////////////////////////////////////////////////
f8dece8d 9// Digits classes for all ITS detectors //
3bd79107 10////////////////////////////////////////////////
4ae5bbc4 11#include <Riostream.h>
12#include <Riostream.h>
92c19c36 13#include <TObject.h>
ff116811 14
15class TObjArray;
16class TArrayI;
17class TArrayF;
92c19c36 18
e56160b8 19
f8dece8d 20//______________________________________________________________________
3bd79107 21class AliITSdigit: public TObject {
f8dece8d 22
23 public:
e56160b8 24 AliITSdigit();
f8dece8d 25 //Standard Constructor. Fills class from array digits
26 AliITSdigit(const Int_t *digits);
27 //Destructor
28 virtual ~AliITSdigit() { }
7e743662 29 // returns the array size used to store Tracks and Hits
0599a018 30 static Int_t GetNTracks() {return fgkSize;}
7e743662 31 //returns pointer to array of tracks numbers
0599a018 32 virtual Int_t *GetTracks() {return &fTracks[0];}
7e743662 33 // returns pointer to array of hits numbers for this module (as given by
34 // AliITSmodule).
0599a018 35 virtual Int_t *GetHits() {return &fHits[0];}
f8dece8d 36 // returns track number kept in the array element i of fTracks
0599a018 37 virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
f8dece8d 38 // returns hit number kept in the array element i of fHits
0599a018 39 virtual Int_t GetHit(Int_t i) const {return fHits[i];}
f8dece8d 40 virtual Int_t GetCoord1() const {return fCoord1;} // returns fCoord1
41 virtual Int_t GetCoord2() const {return fCoord2;} // returns fCoord2
42 virtual Int_t GetSignal() const {return fSignal;} // returns fSignal
7f1a504b 43 virtual Int_t GetCompressedSignal() const {return GetSignal();} // overloaded in AliITSdigitSDD
f8dece8d 44 virtual void SetCoord1(Int_t i){fCoord1 = i;} // Sets fCoord1 value
45 virtual void SetCoord2(Int_t i){fCoord2 = i;} // Sets fCoord12value
46 virtual void SetSignal(Int_t i){fSignal = i;} // Sets fSignal value
0599a018 47 virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
48 virtual void SetTracks(const Int_t *trks){
49 for(Int_t i=0;i<fgkSize;i++) fTracks[i]=trks[i];}
50 virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
51 virtual void SetHits(const Int_t *hits){
52 for(Int_t i=0;i<fgkSize;i++) fHits[i]=hits[i];}
d2f55a22 53 virtual void Print(Option_t *option="") const {TObject::Print(option);}
54 virtual void Print(ostream *os); // Class ascii print function
55 virtual Int_t Read(const char *name) {return TObject::Read(name);}
56 virtual void Read(istream *os); // Class ascii read function
f8dece8d 57
ecee53fc 58 protected:
0599a018 59 static const Int_t fgkSize = 10;//array size
60 Int_t fTracks[fgkSize]; //[fgkSize] tracks making this digit
61 Int_t fHits[fgkSize]; //[fgkSize] hits associated to the tracks
62
f8dece8d 63 Int_t fCoord1; // Cell number on Z axis (SPD+SDD), flag for side type (SSD)
64 Int_t fCoord2; // Cell number on X axis (SPD+SDD), strip number (SSD)
65 Int_t fSignal; // Signal in ADC counts
66
0599a018 67 ClassDef(AliITSdigit,2) // Real data digit object for set:ITS
f8dece8d 68
69};
70// Input and output functions for standard C++ input/output.
71ostream &operator<<(ostream &os,AliITSdigit &source);
72istream &operator>>(istream &os,AliITSdigit &source);
58005f18 73
58005f18 74#endif