-#ifndef ITSDIGIT_H
-#define ITSDIGIT_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+#ifndef ALIITSDIGIT_H
+#define ALIITSDIGIT_H
+/* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
/* $Id$ */
-#include "AliDigit.h"
-#include "AliITS.h"
-#include "AliITSgeom.h"
+////////////////////////////////////////////////
+// Digits classes for all ITS detectors //
+////////////////////////////////////////////////
+#include <Riostream.h>
+#include <Riostream.h>
+#include <TObject.h>
-//___________________________________________
-class AliITSdigit: public AliDigit {
-////////////////////////////////////////////////////////////////////////
-// Version: 0
-// Written by Rene Brun, Federico Carminati, and Roberto Barbera
-// Minor modifications made and documented by Bjorn S. Nilsen
-// July 11 1999
-//
-// The default ITS digit structure. This should either be replaced
-// or added on to later with the proper digit structure defined for
-// each detector type. See the proposed Digit structure defined by
-// Bjorn S. Nilsen for an example.
-//
-// Data members:
-//
-// Int_t fTracks[3]
-// See AliDigit for a full description. The track numbers, up to 3,
-// that make up this digit.
-//
-// Int_t fEvent
-// The event number for this digit. This information is probably
-// kept someplace else already (via the TTree structure already in use).
-//
-// Int_t fLayer
-// The layer number of this digit. This is part of the information
-// that determines the detector where this digit is located (layer, ladder,
-// and detector numbers).
-//
-// Int_t fLadder
-// The ladder number of this digit. This is part of the information
-// that determines the detector where this digit is located (layer, ladder,
-// and detector numbers).
-//
-// Int_t fDet
-// The detector number of this digit. This is part of the information
-// that determines the detector where this digit is located (layer, ladder,
-// and detector numbers).
-//
-// Int_t fNoverl
-// The number of hits that make up this digit.
-//
-// Member functions:
-//
-// int *GetTracks()
-// See AliDigit for a full description. Returns a pointer to the
-// array fTracks where the tracks number of the tracks that make up
-// this digit are stored.
-//
-// AliITSdigit()
-// The default creator for the AliITSdigit class.
-//
-// AliITSdigit(Int_t *tracks, Int_t *digits)
-// The creator for the AliITSdigit class. This routine fills the
-// AliITSdigit data members from the array digits. The array of track
-// numbers are passed to the AliDigit creator. The order of the elements
-// in the digits array are fEvent = digits[0], fLayer = digits[1],
-// fLadder = digits[2], fDet = digits[3], and fNoverl = digits[4].
-// Therefore the array digits is expected to be at least 5 elements long.
-//
-// ~AliITSdigit()
-// The destructor for the AliITSdigit class. At present the default
-// destructor is used.
-////////////////////////////////////////////////////////////////////////
- public:
- Int_t fEvent; // Event number
- Int_t fLayer; // Layer number
- Int_t fLadder; // Ladder number
- Int_t fDet; // Detector number
- Int_t fNoverl; // Number of overflow
+class TObjArray;
+class TArrayI;
+class TArrayF;
+
+using std::ostream;
+using std::istream;
+
+//______________________________________________________________________
+class AliITSdigit: public TObject {
public:
- AliITSdigit() {}
- AliITSdigit(Int_t *tracks, Int_t *digits);
- virtual ~AliITSdigit() {}
+ AliITSdigit();
+ //Standard Constructor. Fills class from array digits
+ AliITSdigit(const Int_t *digits);
+ //Destructor
+ virtual ~AliITSdigit() { }
+ // returns the array size used to store Tracks and Hits
+ static Int_t GetNTracks() {return fgkSize;}
+ //returns pointer to array of tracks numbers
+ virtual Int_t *GetTracks() {return &fTracks[0];}
+ // returns pointer to array of hits numbers for this module (as given by
+ // AliITSmodule).
+ virtual Int_t *GetHits() {return &fHits[0];}
+ // returns track number kept in the array element i of fTracks
+ virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
+ // returns hit number kept in the array element i of fHits
+ virtual Int_t GetHit(Int_t i) const {return fHits[i];}
+ virtual Int_t GetCoord1() const {return fCoord1;} // returns fCoord1
+ virtual Int_t GetCoord2() const {return fCoord2;} // returns fCoord2
+ virtual Int_t GetSignal() const {return fSignal;} // returns fSignal
+ virtual Int_t GetCompressedSignal() const {return GetSignal();} // overloaded in AliITSdigitSDD
+ virtual void SetCoord1(Int_t i){fCoord1 = i;} // Sets fCoord1 value
+ virtual void SetCoord2(Int_t i){fCoord2 = i;} // Sets fCoord12value
+ virtual void SetSignal(Int_t i){fSignal = i;} // Sets fSignal value
+ virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
+ virtual void SetTracks(const Int_t *trks){
+ for(Int_t i=0;i<fgkSize;i++) fTracks[i]=trks[i];}
+ virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
+ virtual void SetHits(const Int_t *hits){
+ for(Int_t i=0;i<fgkSize;i++) fHits[i]=hits[i];}
+ virtual void Print(Option_t *option="") const {TObject::Print(option);}
+ virtual void Print(ostream *os); // Class ascii print function
+ virtual Int_t Read(const char *name) {return TObject::Read(name);}
+ virtual void Read(istream *os); // Class ascii read function
+
+ protected:
+ static const Int_t fgkSize = 10;//array size
+ Int_t fTracks[fgkSize]; //[fgkSize] tracks making this digit
+ Int_t fHits[fgkSize]; //[fgkSize] hits associated to the tracks
+
+ Int_t fCoord1; // Cell number on Z axis (SPD+SDD), flag for side type (SSD)
+ Int_t fCoord2; // Cell number on X axis (SPD+SDD), strip number (SSD)
+ Int_t fSignal; // Signal in ADC counts
+
+ ClassDef(AliITSdigit,2) // Real data digit object for set:ITS
- ClassDef(AliITSdigit,1) //Digit (Header) object for set:ITS
};
+// Input and output functions for standard C++ input/output.
+ostream &operator<<(ostream &os,AliITSdigit &source);
+istream &operator>>(istream &os,AliITSdigit &source);
+
#endif