]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliRecPoint.cxx
Debug print statements removed.
[u/mrichter/AliRoot.git] / STEER / AliRecPoint.cxx
CommitLineData
2a33668d 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
712d6528 18Revision 1.3 2000/03/20 14:22:25 fca
19New version to support new PHOS code
20
65a2d2b0 21Revision 1.2 2000/02/15 09:43:54 fca
22Corrections
23- a bug in the streamer (wrong size of the arrays)
24- replace Read/WriteArray by Read/WriteFastArray (suggestion R.Brun)
25
dad18d4d 26Revision 1.1 1999/12/17 09:01:14 fca
27Y.Schutz new classes for reconstruction
28
2a33668d 29*/
30
31//-*-C++-*-
32//_________________________________________________________________________
33// Base Class of Cluster (empty cxx needed by Root)
34//*-- Author : Yves Schutz SUBATECH
35//////////////////////////////////////////////////////////////////////////////
36
37// --- ROOT system ---
38
39#include "TObjArray.h"
40
41// --- Standard library ---
42
43// --- AliRoot header files ---
44
45#include "AliRecPoint.h"
46
47ClassImp(AliRecPoint)
48
49
50//____________________________________________________________________________
51AliRecPoint::AliRecPoint()
52{
53 // ctor
54 fAmp = 0.0 ;
55
56 fLocPos.SetXYZ(0., 0., 0.) ;
65a2d2b0 57 fLocPosM = new TMatrix(3,3) ;
58 fMaxDigit = 100 ;
59 fMulDigit = 0 ;
60 fDigitsList = new int[fMaxDigit]; ;
61 fMaxTrack = 5 ;
62 fMulTrack = 0 ;
63 fTracksList = new int[fMaxTrack]; ;
64 fIndexInList = -1 ; // to be set when the point is already stored
2a33668d 65}
66
67//____________________________________________________________________________
68AliRecPoint::~AliRecPoint()
69{
70 // dtor
71
72 delete fLocPosM ;
dad18d4d 73 if ( fDigitsList )
74 delete fDigitsList ;
75 if ( fTracksList )
76 delete fTracksList ;
2a33668d 77
78}
79
80//____________________________________________________________________________
81void AliRecPoint::AddDigit(AliDigitNew & digit)
82{
83 // adds a digit to the digits list
84 // and accumulates the total amplitude and the multiplicity
85
86
87 if ( fMulDigit >= fMaxDigit ) { // increase the size of the list
88 int * tempo = new ( int[fMaxDigit*=2] ) ;
89
90 Int_t index ;
91
92 for ( index = 0 ; index < fMulDigit ; index++ )
93 tempo[index] = fDigitsList[index] ;
94
95 delete fDigitsList ;
96 fDigitsList = tempo ;
97 }
98
65a2d2b0 99 fDigitsList[fMulDigit] = digit.GetIndexInList() ;
100 fMulDigit++ ;
2a33668d 101 fAmp += digit.GetAmp() ;
102}
103
104//____________________________________________________________________________
105// void AliRecPoint::AddTrack(AliTrack & track)
106// {
107// // adds a digit to the digits list
108// // and accumulates the total amplitude and the multiplicity
109
110
111// if ( fMulTrack >= fMaxTrack ) { // increase the size of the list
112// int * tempo = new int[fMaxTrack*=2] ;
113// Int_t index ;
114// for ( index = 0 ; index < fMulTrack ; index++ )
115// tempo[index] = fTracksList[index] ;
116// delete fTracksList ;
117// fTracksList = tempo ;
118// }
119
120// fTracksList[fMulTrack++]= (int) &Track ;
121// }
122
123//____________________________________________________________________________
124void AliRecPoint::GetCovarianceMatrix(TMatrix & mat)
125{
126 // returns the covariant matrix for the local position
127
128 mat = *fLocPosM ;
129
130}
131
132//____________________________________________________________________________
133void AliRecPoint::GetLocalPosition(TVector3 & pos)
134{
135 // returns the position of the cluster in the local reference system of the sub-detector
136
137 pos = fLocPos;
138
139
140}
141
142//____________________________________________________________________________
143void AliRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrix & gmat)
144{
145 // returns the position of the cluster in the global reference system of ALICE
146 // and the uncertainty on this position
147
148
149 fGeom->GetGlobal(this, gpos, gmat) ;
150
151}
152
65a2d2b0 153