]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSEmcRecPoint.cxx
3f1ecd3c6a93d9eded749a11bfacb7b81a395832
[u/mrichter/AliRoot.git] / PHOS / AliPHOSEmcRecPoint.cxx
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 /* $Id$ */
17
18 //_________________________________________________________________________
19 //  RecPoint implementation for PHOS-EMC 
20 //  An EmcRecPoint is a cluster of digits   
21 //           
22 //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
23
24
25 // --- ROOT system ---
26 #include "TPad.h"
27 #include "TH2.h"
28 #include "TMath.h" 
29 #include "TCanvas.h" 
30
31 // --- Standard library ---
32
33 #include <iostream.h> 
34
35 // --- AliRoot header files ---
36
37 #include "AliPHOSGeometry.h"
38 #include "AliPHOSEmcRecPoint.h"
39 #include "AliRun.h"
40 #include "AliPHOSIndexToObject.h"
41
42 ClassImp(AliPHOSEmcRecPoint)
43
44 //____________________________________________________________________________
45 AliPHOSEmcRecPoint::AliPHOSEmcRecPoint(Float_t W0, Float_t LocMaxCut)
46   : AliPHOSRecPoint()
47 {
48   // ctor
49
50   fMulDigit   = 0 ;  
51   fAmp   = 0. ;   
52   fEnergyList = new Float_t[fMaxDigit]; 
53   fGeom = AliPHOSGeometry::GetInstance() ;
54   fDelta     =  ((AliPHOSGeometry *) fGeom)->GetCrystalSize(0) ; 
55   fW0        = W0 ;          
56   fLocMaxCut = LocMaxCut ; 
57   fLocPos.SetX(1000000.)  ;      //Local position should be evaluated
58   
59 }
60
61 //____________________________________________________________________________
62 AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint()
63 {
64   // dtor
65   if ( fEnergyList )
66     delete[] fEnergyList ; 
67 }
68
69 //____________________________________________________________________________
70 void AliPHOSEmcRecPoint::AddDigit(AliPHOSDigit & digit, Float_t Energy)
71 {
72   // Adds a digit to the RecPoint
73   //  and accumulates the total amplitude and the multiplicity 
74   
75   if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists 
76     fMaxDigit*=2 ; 
77     Int_t * tempo = new ( Int_t[fMaxDigit] ) ; 
78     Float_t * tempoE =  new ( Float_t[fMaxDigit] ) ;
79
80     Int_t index ;     
81     for ( index = 0 ; index < fMulDigit ; index++ ){
82       tempo[index]  = fDigitsList[index] ;
83       tempoE[index] = fEnergyList[index] ; 
84     }
85     
86     delete [] fDigitsList ; 
87     fDigitsList =  new ( Int_t[fMaxDigit] ) ;
88  
89     delete [] fEnergyList ;
90     fEnergyList =  new ( Float_t[fMaxDigit] ) ;
91
92     for ( index = 0 ; index < fMulDigit ; index++ ){
93       fDigitsList[index] = tempo[index] ;
94       fEnergyList[index] = tempoE[index] ; 
95     }
96  
97     delete [] tempo ;
98     delete [] tempoE ; 
99   } // if
100   
101   fDigitsList[fMulDigit]   = digit.GetIndexInList()  ; 
102   fEnergyList[fMulDigit]   = Energy ;
103   fMulDigit++ ; 
104   fAmp += Energy ; 
105 }
106
107 //____________________________________________________________________________
108 Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) const
109 {
110   // Tells if (true) or not (false) two digits are neighbors)
111   
112   Bool_t aren = kFALSE ;
113   
114   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
115   Int_t relid1[4] ; 
116   phosgeom->AbsToRelNumbering(digit1->GetId(), relid1) ; 
117
118   Int_t relid2[4] ; 
119   phosgeom->AbsToRelNumbering(digit2->GetId(), relid2) ; 
120   
121   Int_t rowdiff = TMath::Abs( relid1[2] - relid2[2] ) ;  
122   Int_t coldiff = TMath::Abs( relid1[3] - relid2[3] ) ;  
123
124   if (( coldiff <= 1 )  && ( rowdiff <= 1 ) && (coldiff + rowdiff > 0)) 
125     aren = kTRUE ;
126   
127   return aren ;
128 }
129
130 //____________________________________________________________________________
131 Int_t AliPHOSEmcRecPoint::Compare(const TObject * obj) const
132 {
133   // Compares two RecPoints according to their position in the PHOS modules
134
135   Int_t rv ; 
136
137   AliPHOSEmcRecPoint * clu = (AliPHOSEmcRecPoint *)obj ; 
138
139  
140   Int_t phosmod1 = GetPHOSMod() ;
141   Int_t phosmod2 = clu->GetPHOSMod() ;
142
143   TVector3 locpos1; 
144   this->GetLocalPosition(locpos1) ;
145   TVector3 locpos2;  
146   clu->GetLocalPosition(locpos2) ;  
147
148   if(phosmod1 == phosmod2 ) {
149     Int_t rowdif = (Int_t)TMath::Ceil(locpos1.X()/fDelta)-(Int_t)TMath::Ceil(locpos2.X()/fDelta) ;
150     if (rowdif> 0) 
151       rv = -1 ;
152      else if(rowdif < 0) 
153        rv = 1 ;
154     else if(locpos1.Z()>locpos2.Z()) 
155       rv = -1 ;
156     else 
157       rv = 1 ; 
158      }
159
160   else {
161     if(phosmod1 < phosmod2 ) 
162       rv = -1 ;
163     else 
164       rv = 1 ;
165   }
166
167   return rv ; 
168 }
169
170 //______________________________________________________________________________
171 void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
172 {
173   // Execute action corresponding to one event
174   //  This member function is called when a AliPHOSRecPoint is clicked with the locator
175   //
176   //  If Left button is clicked on AliPHOSRecPoint, the digits are switched on    
177   //  and switched off when the mouse button is released.
178   //
179
180   //   static Int_t pxold, pyold;
181
182   AliPHOSIndexToObject * please =  AliPHOSIndexToObject::GetInstance() ; 
183   
184   static TGraph *  digitgraph = 0 ;
185   
186   if (!gPad->IsEditable()) return;
187   
188   TH2F * histo = 0 ;
189   TCanvas * histocanvas ; 
190   
191   switch (event) {
192     
193   case kButton1Down: {
194     AliPHOSDigit * digit ;
195     AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
196     Int_t iDigit;
197     Int_t relid[4] ;
198     
199     const Int_t kMulDigit = AliPHOSEmcRecPoint::GetDigitsMultiplicity() ; 
200     Float_t * xi = new Float_t[kMulDigit] ; 
201     Float_t * zi = new Float_t[kMulDigit] ; 
202     
203     // create the histogram for the single cluster 
204     // 1. gets histogram boundaries
205     Float_t ximax = -999. ; 
206     Float_t zimax = -999. ; 
207     Float_t ximin = 999. ; 
208     Float_t zimin = 999. ;
209     
210     for(iDigit=0; iDigit<kMulDigit; iDigit++) {
211       digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
212       phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
213       phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]);
214       if ( xi[iDigit] > ximax )
215         ximax = xi[iDigit] ; 
216       if ( xi[iDigit] < ximin )
217         ximin = xi[iDigit] ; 
218       if ( zi[iDigit] > zimax )
219         zimax = zi[iDigit] ; 
220       if ( zi[iDigit] < zimin )
221         zimin = zi[iDigit] ;     
222     }
223     ximax += phosgeom->GetCrystalSize(0) / 2. ;
224     zimax += phosgeom->GetCrystalSize(2) / 2. ;
225     ximin -= phosgeom->GetCrystalSize(0) / 2. ;
226     zimin -= phosgeom->GetCrystalSize(2) / 2. ;
227     Int_t xdim = (int)( (ximax - ximin ) / phosgeom->GetCrystalSize(0) + 0.5  ) ; 
228     Int_t zdim = (int)( (zimax - zimin ) / phosgeom->GetCrystalSize(2) + 0.5 ) ;
229     
230     // 2. gets the histogram title
231     
232     Text_t title[100] ; 
233     sprintf(title,"Energy=%1.2f GeV ; Digits ; %d ", GetEnergy(), GetDigitsMultiplicity()) ;
234     
235     if (!histo) {
236       delete histo ; 
237       histo = 0 ; 
238     }
239     histo = new TH2F("cluster3D", title,  xdim, ximin, ximax, zdim, zimin, zimax)  ;
240     
241     Float_t x, z ; 
242     for(iDigit=0; iDigit<kMulDigit; iDigit++) {
243       digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
244       phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
245       phosgeom->RelPosInModule(relid, x, z);
246       histo->Fill(x, z, fEnergyList[iDigit] ) ;
247     }
248     
249     if (!digitgraph) {
250       digitgraph = new TGraph(kMulDigit,xi,zi);
251       digitgraph-> SetMarkerStyle(5) ; 
252       digitgraph-> SetMarkerSize(1.) ;
253       digitgraph-> SetMarkerColor(1) ;
254       digitgraph-> Paint("P") ;
255     }
256     
257     Print() ;
258     histocanvas = new TCanvas("cluser", "a single cluster", 600, 500) ; 
259     histocanvas->Draw() ; 
260     histo->Draw("lego1") ; 
261     
262     delete[] xi ; 
263     delete[] zi ; 
264     
265     break;
266   }
267   
268   case kButton1Up: 
269     if (digitgraph) {
270       delete digitgraph  ;
271       digitgraph = 0 ;
272     }
273     break;
274   
275    }
276 }
277
278 //____________________________________________________________________________
279 Float_t  AliPHOSEmcRecPoint::GetDispersion() const
280 {
281   // Calculates the dispersion of the shower at the origine of the RecPoint
282
283   AliPHOSIndexToObject * please =  AliPHOSIndexToObject::GetInstance() ; 
284
285   Float_t d    = 0 ;
286   Float_t wtot = 0 ;
287
288   TVector3 locpos;
289   GetLocalPosition(locpos);
290   Float_t x = locpos.X() ;
291   Float_t z = locpos.Z() ;
292
293   AliPHOSDigit * digit ;
294   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
295   
296   Int_t iDigit;
297   for(iDigit=0; iDigit < fMulDigit; iDigit++) {
298     digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
299     Int_t relid[4] ;
300     Float_t xi ;
301     Float_t zi ;
302     phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
303     phosgeom->RelPosInModule(relid, xi, zi);
304     Float_t w = TMath::Max(0.,fW0+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ;
305     d += w*((xi-x)*(xi-x) + (zi-z)*(zi-z) ) ; 
306     wtot+=w ;
307   }
308
309   d /= wtot ;
310
311   return TMath::Sqrt(d) ;
312 }
313 //______________________________________________________________________________
314 Float_t AliPHOSEmcRecPoint::CoreEnergy()
315 {
316   //This function calculates energy in the core, 
317   //i.e. within radius rad = 3cm. Beyond this radius
318   //in accoradnce with shower profile energy deposition 
319   // should be less than 2%
320
321   AliPHOSIndexToObject * please =  AliPHOSIndexToObject::GetInstance() ; 
322
323   Float_t eCore = 0 ;
324   Float_t coreRadius = 3 ;
325
326   TVector3 locpos;
327   GetLocalPosition(locpos);
328   Float_t x = locpos.X() ;
329   Float_t z = locpos.Z() ;
330
331   AliPHOSDigit * digit ;
332   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
333   
334   Int_t iDigit;
335   for(iDigit=0; iDigit < fMulDigit; iDigit++) {
336     digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
337     Int_t relid[4] ;
338     Float_t xi ;
339     Float_t zi ;
340     phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
341     phosgeom->RelPosInModule(relid, xi, zi);    
342     Float_t distance = TMath::Sqrt((xi-x)*(xi-x)+(zi-z)*(zi-z)) ;
343     if(distance < coreRadius)
344       eCore += fEnergyList[iDigit] ;
345   }
346
347 return eCore ;
348 }
349
350 //____________________________________________________________________________
351 void  AliPHOSEmcRecPoint::GetElipsAxis(Float_t * lambda)
352 {
353   // Calculates the axis of the shower ellipsoid
354
355   AliPHOSIndexToObject * please =  AliPHOSIndexToObject::GetInstance() ; 
356
357   Double_t wtot = 0. ;
358   Double_t x    = 0.;
359   Double_t z    = 0.;
360   Double_t dxx  = 0.;
361   Double_t dzz  = 0.;
362   Double_t dxz  = 0.;
363
364   AliPHOSDigit * digit ;
365   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
366   Int_t iDigit;
367
368   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
369     digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
370     Int_t relid[4] ;
371     Float_t xi ;
372     Float_t zi ;
373     phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
374     phosgeom->RelPosInModule(relid, xi, zi);
375     Double_t w = TMath::Max(0.,fW0+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ;
376     dxx  += w * xi * xi ;
377     x    += w * xi ;
378     dzz  += w * zi * zi ;
379     z    += w * zi ; 
380     dxz  += w * xi * zi ; 
381     wtot += w ;
382   }
383   dxx /= wtot ;
384   x   /= wtot ;
385   dxx -= x * x ;
386   dzz /= wtot ;
387   z   /= wtot ;
388   dzz -= z * z ;
389   dxz /= wtot ;
390   dxz -= x * z ;
391
392 //   //Apply correction due to non-perpendicular incidence
393 //   Double_t CosX ;
394 //   Double_t CosZ ;
395 //   Double_t DistanceToIP= (Double_t ) ((AliPHOSGeometry *) fGeom)->GetIPtoCrystalSurface() ;
396   
397 //   CosX = DistanceToIP/TMath::Sqrt(DistanceToIP*DistanceToIP+x*x) ;
398 //   CosZ = DistanceToIP/TMath::Sqrt(DistanceToIP*DistanceToIP+z*z) ;
399
400 //   dxx = dxx/(CosX*CosX) ;
401 //   dzz = dzz/(CosZ*CosZ) ;
402 //   dxz = dxz/(CosX*CosZ) ;
403
404
405   lambda[0] =  0.5 * (dxx + dzz) + TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz )  ;
406   if(lambda[0] > 0)
407     lambda[0] = TMath::Sqrt(lambda[0]) ;
408
409   lambda[1] =  0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz )  ;
410   if(lambda[1] > 0) //To avoid exception if numerical errors lead to negative lambda.
411     lambda[1] = TMath::Sqrt(lambda[1]) ;
412   else
413     lambda[1]= 0. ;
414 }
415
416 //____________________________________________________________________________
417 void AliPHOSEmcRecPoint::EvalAll(void )
418 {
419   AliPHOSRecPoint::EvalAll() ;
420   EvalLocalPosition() ;
421 }
422 //____________________________________________________________________________
423 void AliPHOSEmcRecPoint::EvalLocalPosition(void )
424 {
425   // Calculates the center of gravity in the local PHOS-module coordinates 
426
427   AliPHOSIndexToObject * please =  AliPHOSIndexToObject::GetInstance() ; 
428
429   Float_t wtot = 0. ;
430  
431   Int_t relid[4] ;
432
433   Float_t x = 0. ;
434   Float_t z = 0. ;
435   
436   AliPHOSDigit * digit ;
437
438   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
439
440   Int_t iDigit;
441
442   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
443     digit = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigit]) );
444
445     Float_t xi ;
446     Float_t zi ;
447     phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
448     phosgeom->RelPosInModule(relid, xi, zi);
449     Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
450     x    += xi * w ;
451     z    += zi * w ;
452     wtot += w ;
453
454   }
455
456   x /= wtot ;
457   z /= wtot ;
458
459   // Correction for the depth of the shower starting point (TDR p 127)  
460   Float_t para = 0.925 ; 
461   Float_t parb = 6.52 ; 
462
463   Float_t xo,yo,zo ; //Coordinates of the origin
464   gAlice->Generator()->GetOrigin(xo,yo,zo) ;
465
466   Float_t phi = fGeom->GetPHOSAngle(relid[0]) ;
467
468   //Transform to the local ref.frame
469   Float_t xoL,yoL ;
470   xoL = xo*TMath::Cos(phi)-yo*TMath::Sin(phi) ;
471   yoL = xo*TMath::Sin(phi)+yo*TMath::Cos(phi) ;
472   
473   Float_t radius = TMath::Sqrt((xoL-x)*(xoL-x)+
474                                (fGeom->GetIPtoCrystalSurface()-yoL)*(fGeom->GetIPtoCrystalSurface()-yoL)+
475                                (zoL-z)*(zoL-z));
476  
477   Float_t incidencephi = TMath::ATan((x-xoL ) / radius) ; 
478   Float_t incidencetheta = TMath::ATan((z-zo) / radius) ;
479  
480   Float_t depthx =  ( para * TMath::Log(fAmp) + parb ) * TMath::Sin(incidencephi) ; 
481   Float_t depthz =  ( para * TMath::Log(fAmp) + parb ) * TMath::Sin(incidencetheta) ; 
482   
483
484   fLocPos.SetX(x - depthx)  ;
485   fLocPos.SetY(0.) ;
486   fLocPos.SetZ(z - depthz)  ;
487
488 }
489
490 //____________________________________________________________________________
491 Float_t AliPHOSEmcRecPoint::GetMaximalEnergy(void) const
492 {
493   // Finds the maximum energy in the cluster
494   
495   Float_t menergy = 0. ;
496
497   Int_t iDigit;
498
499   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
500  
501     if(fEnergyList[iDigit] > menergy) 
502       menergy = fEnergyList[iDigit] ;
503   }
504   return menergy ;
505 }
506
507 //____________________________________________________________________________
508 Int_t AliPHOSEmcRecPoint::GetMultiplicityAtLevel(const Float_t H) const
509 {
510   // Calculates the multiplicity of digits with energy larger than H*energy 
511   
512   Int_t multipl   = 0 ;
513   Int_t iDigit ;
514   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
515
516     if(fEnergyList[iDigit] > H * fAmp) 
517       multipl++ ;
518   }
519   return multipl ;
520 }
521
522 //____________________________________________________________________________
523 Int_t  AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t *  maxAt, Float_t * maxAtEnergy) const
524
525   // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
526   //  energy difference between two local maxima
527
528   AliPHOSIndexToObject * please =  AliPHOSIndexToObject::GetInstance() ; 
529
530   AliPHOSDigit * digit ;
531   AliPHOSDigit * digitN ;
532   
533
534   Int_t iDigitN ;
535   Int_t iDigit ;
536
537   for(iDigit = 0; iDigit < fMulDigit; iDigit++){
538     maxAt[iDigit] = (Int_t) ( please->GimeDigit(fDigitsList[iDigit]) ) ;
539   }
540   
541   for(iDigit = 0 ; iDigit < fMulDigit; iDigit++) {   
542     if(maxAt[iDigit] != -1) {
543       digit = (AliPHOSDigit *) maxAt[iDigit] ;
544           
545       for(iDigitN = 0; iDigitN < fMulDigit; iDigitN++) {        
546         digitN = (AliPHOSDigit *) ( please->GimeDigit(fDigitsList[iDigitN]) ) ; 
547         
548         if ( AreNeighbours(digit, digitN) ) {
549           if (fEnergyList[iDigit] > fEnergyList[iDigitN] ) {    
550             maxAt[iDigitN] = -1 ;
551             // but may be digit too is not local max ?
552             if(fEnergyList[iDigit] < fEnergyList[iDigitN] + fLocMaxCut) 
553               maxAt[iDigit] = -1 ;
554           }
555           else {
556             maxAt[iDigit] = -1 ;
557             // but may be digitN too is not local max ?
558             if(fEnergyList[iDigit] > fEnergyList[iDigitN] - fLocMaxCut) 
559               maxAt[iDigitN] = -1 ; 
560           } 
561         } // if Areneighbours
562       } // while digitN
563     } // slot not empty
564   } // while digit
565   
566   iDigitN = 0 ;
567   for(iDigit = 0; iDigit < fMulDigit; iDigit++) { 
568     if(maxAt[iDigit] != -1){
569       maxAt[iDigitN] = maxAt[iDigit] ;
570       maxAtEnergy[iDigitN] = fEnergyList[iDigit] ;
571       iDigitN++ ; 
572     }
573   }
574   return iDigitN ;
575 }
576
577
578 // //____________________________________________________________________________
579 // AliPHOSEmcRecPoint& AliPHOSEmcRecPoint::operator = (AliPHOSEmcRecPoint Clu) 
580 // {
581 //   int * dl = Clu.GetDigitsList() ; 
582  
583 //  if(fDigitsList) 
584 //     delete fDigitsList  ;
585
586 //   AliPHOSDigit * digit ;
587  
588 //   Int_t iDigit;
589
590 //   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
591 //     digit = (AliPHOSDigit *) dl[iDigit];
592 //     AddDigit(*digit) ;
593 //   }
594
595 //   fAmp       = Clu.GetEnergy() ;
596 //   fGeom      = Clu.GetGeom() ;
597 //   TVector3 locpos;
598 //   Clu.GetLocalPosition(locpos) ;
599 //   fLocPos    = locpos;
600 //   fMulDigit       = Clu.GetMultiplicity() ;
601 //   fMaxDigit  = Clu.GetMaximumMultiplicity() ;
602 //   fPHOSMod   = Clu.GetPHOSMod() ;
603 //   fW0        = Clu.GetLogWeightCut() ; 
604 //   fDelta     = Clu.GetDelta() ;
605 //   fLocMaxCut = Clu.GetLocMaxCut() ;
606   
607 //   delete dl ; 
608  
609 //   return *this ;
610 // }
611
612 //____________________________________________________________________________
613 void AliPHOSEmcRecPoint::Print(Option_t * option) 
614 {
615   // Print the list of digits belonging to the cluster
616   
617   cout << "AliPHOSEmcRecPoint: " << endl ;
618
619   AliPHOSDigit * digit ; 
620   Int_t iDigit;
621   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
622
623   Float_t xi ;
624   Float_t zi ;
625   Int_t relid[4] ; 
626   
627   AliPHOSIndexToObject * please =  AliPHOSIndexToObject::GetInstance() ; 
628
629   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
630     digit = please->GimeDigit( fDigitsList[iDigit] ) ; 
631     phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
632     phosgeom->RelPosInModule(relid, xi, zi);
633     cout << " Id = " << digit->GetId() ;  
634     cout << "   module  = " << relid[0] ;  
635     cout << "   x  = " << xi ;  
636     cout << "   z  = " << zi ;  
637     cout << "   Energy = " << fEnergyList[iDigit] << endl ;
638   }
639   cout << "       Multiplicity    = " << fMulDigit  << endl ;
640   cout << "       Cluster Energy  = " << fAmp << endl ;
641   cout << "       Stored at position " << GetIndexInList() << endl ; 
642  
643 }
644 //______________________________________________________________________________
645 // void AliPHOSEmcRecPoint::Streamer(TBuffer &R__b)
646 // {
647 //    // Stream an object of class AliPHOSEmcRecPoint.
648
649 //    if (R__b.IsReading()) {
650 //       Version_t R__v = R__b.ReadVersion(); if (R__v) { }
651 //       AliPHOSRecPoint::Streamer(R__b);
652 //       R__b >> fDelta;
653 //       fEnergyList = new Float_t[fMulDigit] ; 
654 //       R__b.ReadFastArray(fEnergyList, fMulDigit);
655 //       R__b >> fLocMaxCut;
656 //       R__b >> fW0;
657 //    } else {
658 //       R__b.WriteVersion(AliPHOSEmcRecPoint::IsA());
659 //       AliPHOSRecPoint::Streamer(R__b);
660 //       R__b << fDelta;
661 //       R__b.WriteFastArray(fEnergyList, fMulDigit);
662 //       R__b << fLocMaxCut;
663 //       R__b << fW0;
664 //    }
665 // }
666