1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.3 2000/03/20 14:22:25 fca
19 New version to support new PHOS code
21 Revision 1.2 2000/02/15 09:43:54 fca
23 - a bug in the streamer (wrong size of the arrays)
24 - replace Read/WriteArray by Read/WriteFastArray (suggestion R.Brun)
26 Revision 1.1 1999/12/17 09:01:14 fca
27 Y.Schutz new classes for reconstruction
32 //_________________________________________________________________________
33 // Base Class of Cluster (empty cxx needed by Root)
34 //*-- Author : Yves Schutz SUBATECH
35 //////////////////////////////////////////////////////////////////////////////
37 // --- ROOT system ---
39 #include "TObjArray.h"
41 // --- Standard library ---
43 // --- AliRoot header files ---
45 #include "AliRecPoint.h"
50 //____________________________________________________________________________
51 AliRecPoint::AliRecPoint()
56 fLocPos.SetXYZ(0., 0., 0.) ;
57 fLocPosM = new TMatrix(3,3) ;
60 fDigitsList = new int[fMaxDigit]; ;
63 fTracksList = new int[fMaxTrack]; ;
64 fIndexInList = -1 ; // to be set when the point is already stored
67 //____________________________________________________________________________
68 AliRecPoint::~AliRecPoint()
80 //____________________________________________________________________________
81 void AliRecPoint::AddDigit(AliDigitNew & digit)
83 // adds a digit to the digits list
84 // and accumulates the total amplitude and the multiplicity
87 if ( fMulDigit >= fMaxDigit ) { // increase the size of the list
88 int * tempo = new ( int[fMaxDigit*=2] ) ;
92 for ( index = 0 ; index < fMulDigit ; index++ )
93 tempo[index] = fDigitsList[index] ;
99 fDigitsList[fMulDigit] = digit.GetIndexInList() ;
101 fAmp += digit.GetAmp() ;
104 //____________________________________________________________________________
105 // void AliRecPoint::AddTrack(AliTrack & track)
107 // // adds a digit to the digits list
108 // // and accumulates the total amplitude and the multiplicity
111 // if ( fMulTrack >= fMaxTrack ) { // increase the size of the list
112 // int * tempo = new int[fMaxTrack*=2] ;
114 // for ( index = 0 ; index < fMulTrack ; index++ )
115 // tempo[index] = fTracksList[index] ;
116 // delete fTracksList ;
117 // fTracksList = tempo ;
120 // fTracksList[fMulTrack++]= (int) &Track ;
123 //____________________________________________________________________________
124 void AliRecPoint::GetCovarianceMatrix(TMatrix & mat)
126 // returns the covariant matrix for the local position
132 //____________________________________________________________________________
133 void AliRecPoint::GetLocalPosition(TVector3 & pos)
135 // returns the position of the cluster in the local reference system of the sub-detector
142 //____________________________________________________________________________
143 void AliRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrix & gmat)
145 // returns the position of the cluster in the global reference system of ALICE
146 // and the uncertainty on this position
149 fGeom->GetGlobal(this, gpos, gmat) ;