////////////////////////////////////////////////
#include "TObject.h"
+#include "TClonesArray.h"
+
+typedef TClonesArray DigitsList ;
class AliDigitNew : public TObject {
AliDigitNew() ;
~AliDigitNew() {;}
Int_t GetAmp() const { return fAmp ; }
- Int_t GetId() const { return fId ; }
-
+ Int_t GetId() const { return fId ; }
+ Int_t GetIndexInList() const { return fIndexInList ; }
+ void SetIndexInList(Int_t val) { fIndexInList = val ; }
+
protected:
- Int_t fId ; // absolute id
Int_t fAmp ; // digitalized energy
-
+ Int_t fId ; // absolute id
+ Int_t fIndexInList ; // the index of this digit in the list stored in TreeD
+
ClassDef(AliDigitNew,1) //Base class for all Alice digits
} ;
/*
$Log$
+Revision 1.2 2000/02/15 09:43:54 fca
+Corrections
+- a bug in the streamer (wrong size of the arrays)
+- replace Read/WriteArray by Read/WriteFastArray (suggestion R.Brun)
+
Revision 1.1 1999/12/17 09:01:14 fca
Y.Schutz new classes for reconstruction
fAmp = 0.0 ;
fLocPos.SetXYZ(0., 0., 0.) ;
- fLocPosM = new TMatrix(3,3) ;
- fMaxDigit = 100 ;
- fMulDigit = 0 ;
- fDigitsList = new int[fMaxDigit]; ;
- fMaxTrack = 5 ;
- fMulTrack = 0 ;
- fTracksList = new int[fMaxTrack]; ;
+ fLocPosM = new TMatrix(3,3) ;
+ fMaxDigit = 100 ;
+ fMulDigit = 0 ;
+ fDigitsList = new int[fMaxDigit]; ;
+ fMaxTrack = 5 ;
+ fMulTrack = 0 ;
+ fTracksList = new int[fMaxTrack]; ;
+ fIndexInList = -1 ; // to be set when the point is already stored
}
//____________________________________________________________________________
fDigitsList = tempo ;
}
- fDigitsList[fMulDigit++]= (int) &digit ;
+ fDigitsList[fMulDigit] = digit.GetIndexInList() ;
+ fMulDigit++ ;
fAmp += digit.GetAmp() ;
}
//______________________________________________________________________________
void AliRecPoint::Streamer(TBuffer &R__b)
{
- // Stream an object of class AliRecPoint.
-
- if (R__b.IsReading()) {
+ // Stream an object of class AliRecPoint.
+ if (R__b.IsReading()) {
Version_t R__v = R__b.ReadVersion(); if (R__v) { }
TObject::Streamer(R__b);
R__b >> fAmp;
+ R__b >> fIndexInList;
R__b >> fMulDigit;
fDigitsList = new Int_t[fMulDigit] ;
R__b.ReadFastArray(fDigitsList, fMulDigit);
R__b.WriteVersion(AliRecPoint::IsA());
TObject::Streamer(R__b);
R__b << fAmp;
+ R__b << fIndexInList;
R__b << fMulDigit;
R__b.WriteFastArray(fDigitsList, fMulDigit);
R__b << fGeom;
R__b.WriteFastArray(fTracksList, fMulTrack);
}
}
+
#include "TObject.h"
#include "TVector3.h"
#include "TMatrix.h"
+#include "TClonesArray.h"
// --- Standard library ---
AliRecPoint() ; // ctor
virtual ~AliRecPoint() ; // dtor
- virtual void AddDigit(AliDigitNew & digit) ; // add a digit to the digits list
+ virtual void AddDigit(AliDigitNew & digit) ; // add a digit to the digit's indexes list
// virtual void AddTrack(AliTrack & track) ; // add a track to the tracks list
virtual void GetCovarianceMatrix(TMatrix & mat) ;
virtual AliGeometry * GetGeom() const { return fGeom; }
virtual Float_t GetEnergy() {return fAmp; }
virtual void GetLocalPosition(TVector3 & pos) ;
virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
+ Int_t GetIndexInList() const { return fIndexInList ; }
virtual Int_t GetMaximumDigitMultiplicity() const { return fMaxDigit; }
virtual Int_t GetMaximumTrackMultiplicity() const { return fMaxTrack; }
virtual Int_t GetTracksMultiplicity(void) const { return fMulTrack ; }
virtual void Print(Option_t * opt = "void") = 0 ;
+ void SetIndexInList(Int_t val) { fIndexInList = val ; }
protected:
Float_t fAmp ; // summed amplitude of digits
- int * fDigitsList ; // list of digits from which the point was reconstructed
- AliGeometry * fGeom ; // pointer to the geometry class
+ Int_t * fDigitsList ; // list of digit's indexes from which the point was reconstructed
+ AliGeometry * fGeom ; //! pointer to the geometry class
+ Int_t fIndexInList ;// the index of this RecPoint in the list stored in TreeR (to be set by analysis)
TVector3 fLocPos ; // local position in the sub-detector coordinate
TMatrix * fLocPosM ; // covariance matrix ;
Int_t fMaxDigit ; //! max initial size of digits array (not saved)
Int_t fMulDigit ; // total multiplicity of digits
Int_t fMaxTrack ; //! max initial size of tracks array (not saved)
Int_t fMulTrack ; // total multiplicity of tracks
- int * fTracksList ; // list of tracks to which the point was assigned
-
+ Int_t * fTracksList ; // list of tracks to which the point was assigned
+
public: