X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliRecPoint.cxx;h=b074af3f864ae5d74dcf3f7db8bda763c28a8fe6;hb=acd848976f35aa0d797a794f59e7d83f4bfa2c8c;hp=13cc66c2c2db1244b8cfdc6070c4d5cc83446923;hpb=aee8290b9e98b230f8f38596bffd47ca1abfbf9d;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliRecPoint.cxx b/STEER/AliRecPoint.cxx index 13cc66c2c2d..b074af3f864 100644 --- a/STEER/AliRecPoint.cxx +++ b/STEER/AliRecPoint.cxx @@ -13,62 +13,83 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.4 2000/05/16 08:30:02 fca -Using automatic streamer for c arrays - -Revision 1.3 2000/03/20 14:22:25 fca -New version to support new PHOS code - -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 - -*/ +/* $Id$ */ //-*-C++-*- //_________________________________________________________________________ -// Base Class of Cluster (empty cxx needed by Root) +// Base Class for reconstructed space points +// usually coming from the clusterisation algorithms +// run on the digits +// //*-- Author : Yves Schutz SUBATECH ////////////////////////////////////////////////////////////////////////////// -// --- ROOT system --- -#include "TObjArray.h" +// --- ROOT system --- // --- Standard library --- // --- AliRoot header files --- #include "AliRecPoint.h" +#include "AliGeometry.h" +#include "AliDigitNew.h" ClassImp(AliRecPoint) -//____________________________________________________________________________ -AliRecPoint::AliRecPoint() +//_______________________________________________________________________ +AliRecPoint::AliRecPoint(): + fAmp(0), + fGeom(0), + fIndexInList(-1), // to be set when the point is already stored + fLocPos(0,0,0), + fLocPosM(0), + fMaxDigit(100), + fMulDigit(0), + fMaxTrack(5), + fMulTrack(0), + fDigitsList(0), + fTracksList(0) { - // ctor - 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]; ; - fIndexInList = -1 ; // to be set when the point is already stored + // + // default ctor + // } -//____________________________________________________________________________ -AliRecPoint::AliRecPoint(const AliRecPoint& recp) +//_______________________________________________________________________ +AliRecPoint::AliRecPoint(const char * ): + fAmp(0), + fGeom(0), + fIndexInList(-1), // to be set when the point is already stored + fLocPos(0,0,0), + fLocPosM(new TMatrix(3,3)), + fMaxDigit(100), + fMulDigit(0), + fMaxTrack(5), + fMulTrack(0), + fDigitsList(new int[fMaxDigit]), + fTracksList(new int[fMaxTrack]) +{ + // + // Standard ctor + // +} + +//_______________________________________________________________________ +AliRecPoint::AliRecPoint(const AliRecPoint& recp): + TObject(recp), + fAmp(0), + fGeom(0), + fIndexInList(-1), // to be set when the point is already stored + fLocPos(0,0,0), + fLocPosM(0), + fMaxDigit(100), + fMulDigit(0), + fMaxTrack(5), + fMulTrack(0), + fDigitsList(0), + fTracksList(0) { // // Copy constructor @@ -76,20 +97,18 @@ AliRecPoint::AliRecPoint(const AliRecPoint& recp) recp.Copy(*this); } -//____________________________________________________________________________ +//_______________________________________________________________________ AliRecPoint::~AliRecPoint() { // dtor delete fLocPosM ; - if ( fDigitsList ) - delete fDigitsList ; - if ( fTracksList ) - delete fTracksList ; + delete [] fDigitsList ; + delete [] fTracksList ; } -//____________________________________________________________________________ +//_______________________________________________________________________ void AliRecPoint::AddDigit(AliDigitNew & digit) { // adds a digit to the digits list @@ -113,7 +132,7 @@ void AliRecPoint::AddDigit(AliDigitNew & digit) fAmp += digit.GetAmp() ; } -//____________________________________________________________________________ +//_______________________________________________________________________ // void AliRecPoint::AddTrack(AliTrack & track) // { // // adds a digit to the digits list @@ -132,7 +151,7 @@ void AliRecPoint::AddDigit(AliDigitNew & digit) // fTracksList[fMulTrack++]= (int) &Track ; // } -//____________________________________________________________________________ +//_______________________________________________________________________ void AliRecPoint::Copy(AliRecPoint& recp) const { // @@ -140,7 +159,7 @@ void AliRecPoint::Copy(AliRecPoint& recp) const // // Copy all first if(this != &recp) { - ((TObject*) this)->Copy((TObject&)recp); + ((TObject*) this)->Copy(dynamic_cast(recp)); recp.fAmp = fAmp; recp.fGeom = fGeom; recp.fIndexInList = fIndexInList; @@ -159,8 +178,8 @@ void AliRecPoint::Copy(AliRecPoint& recp) const } } -//____________________________________________________________________________ -void AliRecPoint::GetCovarianceMatrix(TMatrix & mat) +//_______________________________________________________________________ +void AliRecPoint::GetCovarianceMatrix(TMatrix & mat) const { // returns the covariant matrix for the local position @@ -169,7 +188,7 @@ void AliRecPoint::GetCovarianceMatrix(TMatrix & mat) } //____________________________________________________________________________ -void AliRecPoint::GetLocalPosition(TVector3 & pos) +void AliRecPoint::GetLocalPosition(TVector3 & pos) const { // returns the position of the cluster in the local reference system of the sub-detector @@ -179,15 +198,7 @@ void AliRecPoint::GetLocalPosition(TVector3 & pos) } //____________________________________________________________________________ -AliRecPoint & AliRecPoint::operator= (const AliRecPoint &recp) -{ - recp.Copy(*this); - return (*this); -} - - -//____________________________________________________________________________ -void AliRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrix & gmat) +void AliRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrix & gmat) const { // returns the position of the cluster in the global reference system of ALICE // and the uncertainty on this position