Fixing a little overlap. Adding flags to perform material budget studies (Mario)
[u/mrichter/AliRoot.git] / ITS / AliITSdigit.h
3bd79107 1#ifndef 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
fe7d86eb 19using std::ostream;
20using std::istream;
e56160b8 21
f8dece8d 22//______________________________________________________________________
3bd79107 23class AliITSdigit: public TObject {
f8dece8d 24
25 public:
e56160b8 26 AliITSdigit();
f8dece8d 27 //Standard Constructor. Fills class from array digits
28 AliITSdigit(const Int_t *digits);
29 //Destructor
30 virtual ~AliITSdigit() { }
7e743662 31 // returns the array size used to store Tracks and Hits
0599a018 32 static Int_t GetNTracks() {return fgkSize;}
7e743662 33 //returns pointer to array of tracks numbers
0599a018 34 virtual Int_t *GetTracks() {return &fTracks[0];}
7e743662 35 // returns pointer to array of hits numbers for this module (as given by
36 // AliITSmodule).
0599a018 37 virtual Int_t *GetHits() {return &fHits[0];}
f8dece8d 38 // returns track number kept in the array element i of fTracks
0599a018 39 virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
f8dece8d 40 // returns hit number kept in the array element i of fHits
0599a018 41 virtual Int_t GetHit(Int_t i) const {return fHits[i];}
f8dece8d 42 virtual Int_t GetCoord1() const {return fCoord1;} // returns fCoord1
43 virtual Int_t GetCoord2() const {return fCoord2;} // returns fCoord2
44 virtual Int_t GetSignal() const {return fSignal;} // returns fSignal
7f1a504b 45 virtual Int_t GetCompressedSignal() const {return GetSignal();} // overloaded in AliITSdigitSDD
f8dece8d 46 virtual void SetCoord1(Int_t i){fCoord1 = i;} // Sets fCoord1 value
47 virtual void SetCoord2(Int_t i){fCoord2 = i;} // Sets fCoord12value
48 virtual void SetSignal(Int_t i){fSignal = i;} // Sets fSignal value
0599a018 49 virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
50 virtual void SetTracks(const Int_t *trks){
51 for(Int_t i=0;i<fgkSize;i++) fTracks[i]=trks[i];}
52 virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
53 virtual void SetHits(const Int_t *hits){
54 for(Int_t i=0;i<fgkSize;i++) fHits[i]=hits[i];}
d2f55a22 55 virtual void Print(Option_t *option="") const {TObject::Print(option);}
56 virtual void Print(ostream *os); // Class ascii print function
57 virtual Int_t Read(const char *name) {return TObject::Read(name);}
58 virtual void Read(istream *os); // Class ascii read function
f8dece8d 59
ecee53fc 60 protected:
0599a018 61 static const Int_t fgkSize = 10;//array size
62 Int_t fTracks[fgkSize]; //[fgkSize] tracks making this digit
63 Int_t fHits[fgkSize]; //[fgkSize] hits associated to the tracks
f8dece8d 65 Int_t fCoord1; // Cell number on Z axis (SPD+SDD), flag for side type (SSD)
66 Int_t fCoord2; // Cell number on X axis (SPD+SDD), strip number (SSD)
67 Int_t fSignal; // Signal in ADC counts
0599a018 69 ClassDef(AliITSdigit,2) // Real data digit object for set:ITS
f8dece8d 70
72// Input and output functions for standard C++ input/output.
73ostream &operator<<(ostream &os,AliITSdigit &source);
74istream &operator>>(istream &os,AliITSdigit &source);
58005f18 75
58005f18 76#endif