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 **************************************************************************/
16 //_________________________________________________________________________
17 // Reconstructed Points for the EMCAL
18 // A RecPoint is a cluster of digits
19 //*-- Author: Yves Schutz (SUBATECH)
20 //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
21 //*-- Author: Heather Gray (LBL) merged AliEMCALRecPoint and AliEMCALTowerRecPoint 02/04
23 // --- ROOT system ---
26 #include "TPaveText.h"
27 #include "TClonesArray.h"
30 // --- Standard library ---
32 // --- AliRoot header files ---
33 #include "AliGenerator.h"
34 #include "AliEMCALGeometry.h"
35 #include "AliEMCALDigit.h"
36 #include "AliEMCALRecPoint.h"
38 ClassImp(AliEMCALRecPoint)
40 //____________________________________________________________________________
41 AliEMCALRecPoint::AliEMCALRecPoint()
54 fLocPos.SetX(0.) ; //Local position should be evaluated
55 fCoreRadius = 10; //HG Check this
58 //____________________________________________________________________________
59 AliEMCALRecPoint::AliEMCALRecPoint(const char * opt) : AliRecPoint(opt)
69 fParentsList = new Int_t[fMaxParent];
71 fLocPos.SetX(1000000.) ; //Local position should be evaluated
72 fCoreRadius = 10; //HG Check this
74 //____________________________________________________________________________
75 AliEMCALRecPoint::~AliEMCALRecPoint()
79 delete[] fEnergyList ;
81 delete[] fParentsList;
84 //____________________________________________________________________________
85 void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t Energy)
87 // Adds a digit to the RecPoint
88 // and accumulates the total amplitude and the multiplicity
91 fEnergyList = new Float_t[fMaxDigit];
93 if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists
95 Int_t * tempo = new Int_t[fMaxDigit];
96 Float_t * tempoE = new Float_t[fMaxDigit];
99 for ( index = 0 ; index < fMulDigit ; index++ ){
100 tempo[index] = fDigitsList[index] ;
101 tempoE[index] = fEnergyList[index] ;
104 delete [] fDigitsList ;
105 fDigitsList = new Int_t[fMaxDigit];
107 delete [] fEnergyList ;
108 fEnergyList = new Float_t[fMaxDigit];
110 for ( index = 0 ; index < fMulDigit ; index++ ){
111 fDigitsList[index] = tempo[index] ;
112 fEnergyList[index] = tempoE[index] ;
119 fDigitsList[fMulDigit] = digit.GetIndexInList() ;
120 fEnergyList[fMulDigit] = Energy ;
125 //____________________________________________________________________________
126 Bool_t AliEMCALRecPoint::AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const
128 // Tells if (true) or not (false) two digits are neighbours
129 // A neighbour is defined as being two digits which share a corner
131 Bool_t areNeighbours = kFALSE ;
133 //AliEMCALGeometry * geom = (AliEMCALGetter::Instance())->EMCALGeometry();
134 AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
137 //copied for shish-kebab geometry, ieta,iphi is cast as float as eta,phi conversion
138 // for this geometry does not exist
139 int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
141 geom->GetCellIndex(digit1->GetId(), nSupMod,nTower,nIphi,nIeta);
142 geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
145 // geom->AbsToRelNumbering(digit1->GetId(), relid1) ;
148 //copied for shish-kebab geometry, ieta,iphi is cast as float as eta,phi conversion
149 // for this geometry does not exist
150 int nSupMod1=0, nTower1=0, nIphi1=0, nIeta1=0;
151 int iphi1=0, ieta1=0;
152 geom->GetCellIndex(digit2->GetId(), nSupMod1,nTower1,nIphi1,nIeta1);
153 geom->GetCellPhiEtaIndexInSModule(nSupMod1,nTower1,nIphi1,nIeta1, iphi1,ieta1);
156 // geom->AbsToRelNumbering(digit2->GetId(), relid2) ;
158 Int_t rowdiff = TMath::Abs( relid1[0] - relid2[0] ) ;
159 Int_t coldiff = TMath::Abs( relid1[1] - relid2[1] ) ;
161 if (( coldiff <= 1 ) && ( rowdiff <= 1 ) && (coldiff + rowdiff > 0))
162 areNeighbours = kTRUE ;
164 return areNeighbours;
167 //____________________________________________________________________________
168 Int_t AliEMCALRecPoint::Compare(const TObject * obj) const
170 // Compares two RecPoints according to their position in the EMCAL modules
172 Float_t delta = 1 ; //Width of "Sorting row". If you change this
173 //value (what is senseless) change as well delta in
174 //AliEMCALTrackSegmentMakerv* and other RecPoints...
177 AliEMCALRecPoint * clu = (AliEMCALRecPoint *)obj ;
180 GetLocalPosition(locpos1);
182 clu->GetLocalPosition(locpos2);
184 Int_t rowdif = (Int_t)TMath::Ceil(locpos1.X()/delta)-(Int_t)TMath::Ceil(locpos2.X()/delta) ;
189 else if(locpos1.Y()>locpos2.Y())
197 //____________________________________________________________________________
198 Int_t AliEMCALRecPoint::DistancetoPrimitive(Int_t px, Int_t py)
200 // Compute distance from point px,py to a AliEMCALRecPoint considered as a Tmarker
201 // Compute the closest distance of approach from point px,py to this marker.
202 // The distance is computed in pixels units.
203 // HG Still need to update -> Not sure what this should achieve
205 TVector3 pos(0.,0.,0.) ;
206 GetLocalPosition(pos) ;
207 Float_t x = pos.X() ;
208 Float_t y = pos.Y() ;
209 const Int_t kMaxDiff = 10;
210 Int_t pxm = gPad->XtoAbsPixel(x);
211 Int_t pym = gPad->YtoAbsPixel(y);
212 Int_t dist = (px-pxm)*(px-pxm) + (py-pym)*(py-pym);
214 if (dist > kMaxDiff) return 9999;
218 //___________________________________________________________________________
219 void AliEMCALRecPoint::Draw(Option_t *option)
221 // Draw this AliEMCALRecPoint with its current attributes
226 //______________________________________________________________________________
227 void AliEMCALRecPoint::ExecuteEvent(Int_t /*event*/, Int_t, Int_t)
229 // Execute action corresponding to one event
230 // This member function is called when a AliEMCALRecPoint is clicked with the locator
232 // If Left button is clicked on AliEMCALRecPoint, the digits are switched on
233 // and switched off when the mouse button is released.
235 // static Int_t pxold, pyold;
237 /* static TGraph * digitgraph = 0 ;
238 static TPaveText* clustertext = 0 ;
240 if (!gPad->IsEditable()) return;
246 AliEMCALDigit * digit ;
247 AliEMCALGeometry * emcalgeom = (AliEMCALGetter::Instance())->EMCALGeometry() ;
252 const Int_t kMulDigit=AliEMCALRecPoint::GetDigitsMultiplicity() ;
253 Float_t * xi = new Float_t [kMulDigit] ;
254 Float_t * zi = new Float_t [kMulDigit] ;
256 for(iDigit = 0; iDigit < kMulDigit; iDigit++) {
257 Fatal("AliEMCALRecPoint::ExecuteEvent", " -> Something wrong with the code");
258 digit = 0 ; //dynamic_cast<AliEMCALDigit *>((fDigitsList)[iDigit]);
259 emcalgeom->AbsToRelNumbering(digit->GetId(), relid) ;
260 emcalgeom->PosInAlice(relid, xi[iDigit], zi[iDigit]) ;
264 digitgraph = new TGraph(fMulDigit,xi,zi);
265 digitgraph-> SetMarkerStyle(5) ;
266 digitgraph-> SetMarkerSize(1.) ;
267 digitgraph-> SetMarkerColor(1) ;
268 digitgraph-> Draw("P") ;
272 TVector3 pos(0.,0.,0.) ;
273 GetLocalPosition(pos) ;
274 clustertext = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ;
277 sprintf(line1,"Energy=%1.2f GeV",GetEnergy()) ;
278 sprintf(line2,"%d Digits",GetDigitsMultiplicity()) ;
279 clustertext ->AddText(line1) ;
280 clustertext ->AddText(line2) ;
281 clustertext ->Draw("");
305 //____________________________________________________________________________
306 void AliEMCALRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits)
308 // Evaluates all shower parameters
310 EvalLocalPosition(logWeight, digits) ;
311 // printf("eval position done\n");
312 EvalElipsAxis(logWeight, digits) ;
313 // printf("eval axis done\n");
314 EvalDispersion(logWeight, digits) ;
315 // printf("eval dispersion done\n");
316 // EvalCoreEnergy(logWeight, digits);
317 // printf("eval energy done\n");
319 // printf("eval time done\n");
321 EvalPrimaries(digits) ;
322 // printf("eval pri done\n");
324 // printf("eval parent done\n");
327 //____________________________________________________________________________
328 void AliEMCALRecPoint::EvalDispersion(Float_t logWeight, TClonesArray * digits)
330 // Calculates the dispersion of the shower at the origin of the RecPoint
335 AliEMCALDigit * digit ;
337 //AliEMCALGeometry * geom = (AliEMCALGetter::Instance())->EMCALGeometry();
338 AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
340 // Calculates the centre of gravity in the local EMCAL-module coordinates
343 if (!fLocPos.X() || !fLocPos.Y())
344 EvalLocalPosition(logWeight, digits) ;
346 //Sub const Float_t kDeg2Rad = TMath::DegToRad() ;
348 Float_t cluEta = fLocPos.X() ;
349 Float_t cluPhi = fLocPos.Y() ;
350 Float_t cluR = fLocPos.Z() ;
353 printf("EvalDispersion: eta,phi,r = %f,%f,%f", cluEta, cluPhi, cluR) ;
355 // Calculates the dispersion in coordinates
357 for(iDigit=0; iDigit < fMulDigit; iDigit++) {
358 digit = (AliEMCALDigit *) digits->At(fDigitsList[iDigit]) ;
361 //copied for shish-kebab geometry, ieta,iphi is cast as float as eta,phi conversion
362 // for this geometry does not exist
363 int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
365 geom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
366 geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
369 // printf("%f,%d,%d \n", fAmp, ieta, iphi) ;
372 geom->EtaPhiFromIndex(digit->GetId(), etai, phii);
373 phii = phii * kDeg2Rad;
375 ///////////////////////////
376 // if(fAmp>0)printf("%f %d %f", fAmp,iDigit,fEnergyList[iDigit]) ;
377 /////////////////////////
380 printf("EvalDispersion: id = %d, etai,phii = %f,%f", digit->GetId(), etai, phii) ;
382 Float_t w = TMath::Max(0.,logWeight+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ;
383 d += w * ( (etai-cluEta)*(etai-cluEta) + (phii-cluPhi)*(phii-cluPhi) ) ;
392 fDispersion = TMath::Sqrt(d) ;
393 // printf("Dispersion: = %f", fDispersion) ;
396 //____________________________________________________________________________
397 void AliEMCALRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digits)
399 // Calculates the center of gravity in the local EMCAL-module coordinates
404 AliEMCALDigit * digit ;
405 //AliEMCALGeometry * geom = (AliEMCALGetter::Instance())->EMCALGeometry();
406 AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
410 //Sub const Float_t kDeg2Rad = TMath::DegToRad();
412 for(iDigit=0; iDigit<fMulDigit; iDigit++) {
413 digit = dynamic_cast<AliEMCALDigit *>(digits->At(fDigitsList[iDigit])) ;
417 //copied for shish-kebab geometry, ieta,iphi is cast as float as eta,phi conversion
418 // for this geometry does not exist
419 int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
421 geom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
422 geom->GetCellPhiEtaIndexInSModule(nSupMod, nTower,nIphi,nIeta, iphi,ieta); //19-oct-05
425 //Sub geom->EtaPhiFromIndex(digit->GetId(), etai, phii);
426 //Sub phii = phii * kDeg2Rad;
427 Float_t w = TMath::Max( 0., logWeight + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
428 cluEta += (etai * w) ;
429 cluPhi += (phii * w );
441 fLocPos.SetX(cluEta);
442 fLocPos.SetY(cluPhi);
443 fLocPos.SetZ(geom->GetIP2ECASection());
446 // printf("EvalLocalPosition: eta,phi,r = %f,%f,%f", fLocPos.X(), fLocPos.Y(), fLocPos.Z()) ;
450 //______________________________________________________________________________
451 void AliEMCALRecPoint::EvalCoreEnergy(Float_t logWeight, TClonesArray * digits)
453 // This function calculates energy in the core,
454 // i.e. within a radius rad = 3cm around the center. Beyond this radius
455 // in accordance with shower profile the energy deposition
456 // should be less than 2%
458 AliEMCALDigit * digit ;
459 const Float_t kDeg2Rad = TMath::DegToRad() ;
460 //AliEMCALGeometry * geom = (AliEMCALGetter::Instance())->EMCALGeometry();
461 AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
465 if (!fLocPos.X() || !fLocPos.Y() ) {
466 EvalLocalPosition(logWeight, digits);
469 for(iDigit=0; iDigit < fMulDigit; iDigit++) {
470 digit = (AliEMCALDigit *) ( digits->At(fDigitsList[iDigit]) ) ;
473 geom->PosInAlice(digit->GetId(), etai, phii);
474 phii = phii * kDeg2Rad;
476 Float_t distance = TMath::Sqrt((etai-fLocPos.X())*(etai-fLocPos.X())+(phii-fLocPos.Y())*(phii-fLocPos.Y())) ;
477 if(distance < fCoreRadius)
478 fCoreEnergy += fEnergyList[iDigit] ;
482 //____________________________________________________________________________
483 void AliEMCALRecPoint::EvalElipsAxis(Float_t logWeight,TClonesArray * digits)
485 // Calculates the axis of the shower ellipsoid in eta and phi
494 const Float_t kDeg2Rad = TMath::DegToRad();
495 AliEMCALDigit * digit ;
497 //AliEMCALGeometry * geom = (AliEMCALGetter::Instance())->EMCALGeometry();
498 AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
499 TString gn(geom->GetName());
503 for(iDigit=0; iDigit<fMulDigit; iDigit++) {
504 digit = (AliEMCALDigit *) digits->At(fDigitsList[iDigit]) ;
507 if(gn.Contains("SHISH")) {
508 //copied for shish-kebab geometry, ieta,iphi is cast as float as eta,phi conversion
509 // for this geometry does not exist
510 int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
512 geom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
513 geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
517 geom->EtaPhiFromIndex(digit->GetId(), etai, phii);
518 phii = phii * kDeg2Rad;
521 Double_t w = TMath::Max(0.,logWeight+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ;
523 dxx += w * etai * etai ;
525 dzz += w * phii * phii ;
528 dxz += w * etai * phii ;
543 fLambda[0] = 0.5 * (dxx + dzz) + TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ;
545 fLambda[0] = TMath::Sqrt(fLambda[0]) ;
549 fLambda[1] = 0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ;
551 if(fLambda[1] > 0) //To avoid exception if numerical errors lead to negative lambda.
552 fLambda[1] = TMath::Sqrt(fLambda[1]) ;
560 // printf("Evalaxis: lambdas = %f,%f", fLambda[0],fLambda[1]) ;
564 //______________________________________________________________________________
565 void AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits)
567 // Constructs the list of primary particles (tracks) which have contributed to this RecPoint
569 AliEMCALDigit * digit ;
570 Int_t * tempo = new Int_t[fMaxTrack] ;
573 for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
574 digit = dynamic_cast<AliEMCALDigit *>(digits->At( fDigitsList[index] )) ;
575 Int_t nprimaries = digit->GetNprimary() ;
576 if ( nprimaries == 0 ) continue ;
577 Int_t * newprimaryarray = new Int_t[nprimaries] ;
579 for ( ii = 0 ; ii < nprimaries ; ii++)
580 newprimaryarray[ii] = digit->GetPrimary(ii+1) ;
583 for ( jndex = 0 ; jndex < nprimaries ; jndex++ ) { // all primaries in digit
584 if ( fMulTrack > fMaxTrack ) {
585 fMulTrack = fMaxTrack ;
586 Error("GetNprimaries", "increase fMaxTrack ") ;
589 Int_t newprimary = newprimaryarray[jndex] ;
591 Bool_t already = kFALSE ;
592 for ( kndex = 0 ; kndex < fMulTrack ; kndex++ ) { //check if not already stored
593 if ( newprimary == tempo[kndex] ){
598 if ( !already && (fMulTrack < fMaxTrack)) { // store it
599 tempo[fMulTrack] = newprimary ;
602 } // all primaries in digit
603 delete [] newprimaryarray ;
607 fTracksList = new Int_t[fMulTrack] ;
608 for(index = 0; index < fMulTrack; index++)
609 fTracksList[index] = tempo[index] ;
615 //______________________________________________________________________________
616 void AliEMCALRecPoint::EvalParents(TClonesArray * digits)
618 // Constructs the list of parent particles (tracks) which have contributed to this RecPoint
620 AliEMCALDigit * digit ;
621 Int_t * tempo = new Int_t[fMaxParent] ;
624 for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
625 digit = dynamic_cast<AliEMCALDigit *>(digits->At( fDigitsList[index] )) ;
626 Int_t nparents = digit->GetNiparent() ;
627 if ( nparents == 0 ) continue ;
628 Int_t * newparentarray = new Int_t[nparents] ;
630 for ( ii = 0 ; ii < nparents ; ii++)
631 newparentarray[ii] = digit->GetIparent(ii+1) ;
634 for ( jndex = 0 ; jndex < nparents ; jndex++ ) { // all primaries in digit
635 if ( fMulParent > fMaxParent ) {
637 Error("GetNiparent", "increase fMaxParent") ;
640 Int_t newparent = newparentarray[jndex] ;
642 Bool_t already = kFALSE ;
643 for ( kndex = 0 ; kndex < fMulParent ; kndex++ ) { //check if not already stored
644 if ( newparent == tempo[kndex] ){
649 if ( !already && (fMulTrack < fMaxTrack)) { // store it
650 tempo[fMulParent] = newparent ;
653 } // all parents in digit
654 delete [] newparentarray ;
658 fParentsList = new Int_t[fMulParent] ;
659 for(index = 0; index < fMulParent; index++)
660 fParentsList[index] = tempo[index] ;
667 //____________________________________________________________________________
668 void AliEMCALRecPoint::GetLocalPosition(TVector3 & lpos) const
670 // returns the position of the cluster in the local reference system of ALICE
671 // X = eta, Y = phi, Z = r (a constant for the EMCAL)
673 lpos.SetX(fLocPos.X()) ;
674 lpos.SetY(fLocPos.Y()) ;
675 lpos.SetZ(fLocPos.Z()) ;
678 //____________________________________________________________________________
679 void AliEMCALRecPoint::GetGlobalPosition(TVector3 & gpos) const
681 // returns the position of the cluster in the global reference system of ALICE
682 // These are now the Cartesian X, Y and Z
684 //AliEMCALGeometry * geom = (AliEMCALGetter::Instance())->EMCALGeometry();
685 AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
686 Int_t absid = geom->TowerIndexFromEtaPhi(fLocPos.X(), TMath::RadToDeg()*fLocPos.Y());
687 geom->XYZFromIndex(absid, gpos);
690 //____________________________________________________________________________
691 Float_t AliEMCALRecPoint::GetMaximalEnergy(void) const
693 // Finds the maximum energy in the cluster
695 Float_t menergy = 0. ;
699 for(iDigit=0; iDigit<fMulDigit; iDigit++) {
701 if(fEnergyList[iDigit] > menergy)
702 menergy = fEnergyList[iDigit] ;
707 //____________________________________________________________________________
708 Int_t AliEMCALRecPoint::GetMultiplicityAtLevel(Float_t H) const
710 // Calculates the multiplicity of digits with energy larger than H*energy
714 for(iDigit=0; iDigit<fMulDigit; iDigit++) {
716 if(fEnergyList[iDigit] > H * fAmp)
722 //____________________________________________________________________________
723 Int_t AliEMCALRecPoint::GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
724 Float_t locMaxCut,TClonesArray * digits) const
726 // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
727 // energy difference between two local maxima
729 AliEMCALDigit * digit ;
730 AliEMCALDigit * digitN ;
735 for(iDigit = 0; iDigit < fMulDigit; iDigit++)
736 maxAt[iDigit] = (AliEMCALDigit*) digits->At(fDigitsList[iDigit]) ;
738 for(iDigit = 0 ; iDigit < fMulDigit; iDigit++) {
740 digit = maxAt[iDigit] ;
742 for(iDigitN = 0; iDigitN < fMulDigit; iDigitN++) {
743 digitN = (AliEMCALDigit *) digits->At(fDigitsList[iDigitN]) ;
745 if ( AreNeighbours(digit, digitN) ) {
746 if (fEnergyList[iDigit] > fEnergyList[iDigitN] ) {
748 // but may be digit too is not local max ?
749 if(fEnergyList[iDigit] < fEnergyList[iDigitN] + locMaxCut)
754 // but may be digitN too is not local max ?
755 if(fEnergyList[iDigit] > fEnergyList[iDigitN] - locMaxCut)
758 } // if Areneighbours
764 for(iDigit = 0; iDigit < fMulDigit; iDigit++) {
766 maxAt[iDigitN] = maxAt[iDigit] ;
767 maxAtEnergy[iDigitN] = fEnergyList[iDigit] ;
773 //____________________________________________________________________________
774 void AliEMCALRecPoint::EvalTime(TClonesArray * digits){
775 // time is set to the time of the digit with the maximum energy
779 for(Int_t idig=0; idig < fMulDigit; idig++){
780 if(fEnergyList[idig] > maxE){
781 maxE = fEnergyList[idig] ;
785 fTime = ((AliEMCALDigit*) digits->At(fDigitsList[maxAt]))->GetTime() ;
789 //______________________________________________________________________________
790 void AliEMCALRecPoint::Paint(Option_t *)
792 // Paint this ALiRecPoint as a TMarker with its current attributes
794 TVector3 pos(0.,0.,0.) ;
795 GetLocalPosition(pos) ;
796 Coord_t x = pos.X() ;
797 Coord_t y = pos.Z() ;
798 Color_t markercolor = 1 ;
799 Size_t markersize = 1. ;
800 Style_t markerstyle = 5 ;
802 if (!gPad->IsBatch()) {
803 gVirtualX->SetMarkerColor(markercolor) ;
804 gVirtualX->SetMarkerSize (markersize) ;
805 gVirtualX->SetMarkerStyle(markerstyle) ;
807 gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
808 gPad->PaintPolyMarker(1,&x,&y,"") ;
811 //______________________________________________________________________________
812 Float_t AliEMCALRecPoint::EtaToTheta(Float_t arg) const
814 //Converts Theta (Radians) to Eta(Radians)
815 return (2.*TMath::ATan(TMath::Exp(-arg)));
818 //______________________________________________________________________________
819 Float_t AliEMCALRecPoint::ThetaToEta(Float_t arg) const
821 //Converts Eta (Radians) to Theta(Radians)
822 return (-1 * TMath::Log(TMath::Tan(0.5 * arg)));
825 //____________________________________________________________________________
826 void AliEMCALRecPoint::Print(Option_t *) const
828 // Print the list of digits belonging to the cluster
831 message = "AliPHOSEmcRecPoint:\n" ;
832 message += " digits # = " ;
833 Info("Print", message.Data()) ;
836 for(iDigit=0; iDigit<fMulDigit; iDigit++)
837 printf(" %d ", fDigitsList[iDigit] ) ;
839 Info("Print", " Energies = ") ;
840 for(iDigit=0; iDigit<fMulDigit; iDigit++)
841 printf(" %f ", fEnergyList[iDigit] ) ;
843 Info("Print", " Primaries ") ;
844 for(iDigit = 0;iDigit < fMulTrack; iDigit++)
845 printf(" %d ", fTracksList[iDigit]) ;
847 message = " Multiplicity = %d" ;
848 message += " Cluster Energy = %f" ;
849 message += " Core energy = %f" ;
850 message += " Core radius = %f" ;
851 message += " Number of primaries %d" ;
852 message += " Stored at position %d" ;
854 Info("Print", message.Data(), fMulDigit, fAmp, fCoreEnergy, fCoreRadius, fMulTrack, GetIndexInList() ) ;