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 ---
24 #include <Riostream.h>
27 #include <TPaveText.h>
28 #include <TClonesArray.h>
31 // --- Standard library ---
33 // --- AliRoot header files ---
34 #include "AliGenerator.h"
35 #include "AliEMCALGeometry.h"
36 #include "AliEMCALDigit.h"
37 #include "AliEMCALRecPoint.h"
39 ClassImp(AliEMCALRecPoint)
41 //____________________________________________________________________________
42 AliEMCALRecPoint::AliEMCALRecPoint()
58 // fLocPos.SetX(1.e+6) ; //Local position should be evaluated
59 fCoreRadius = 10; //HG Check this
60 fGeom = AliEMCALGeometry::GetInstance();
61 fGeom->GetTransformationForSM(); // Global <-> Local
64 //____________________________________________________________________________
65 AliEMCALRecPoint::AliEMCALRecPoint(const char * opt) : AliRecPoint(opt)
78 fParentsList = new Int_t[fMaxParent];
80 //fLocPos.SetX(1.e+6) ; //Local position should be evaluated
81 fCoreRadius = 10; //HG Check this
82 fGeom = AliEMCALGeometry::GetInstance();
83 fGeom->GetTransformationForSM(); // Global <-> Local
85 //____________________________________________________________________________
86 AliEMCALRecPoint::~AliEMCALRecPoint()
90 delete[] fEnergyList ;
96 delete[] fParentsList;
99 //____________________________________________________________________________
100 void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t Energy)
102 // Adds a digit to the RecPoint
103 // and accumulates the total amplitude and the multiplicity
106 fEnergyList = new Float_t[fMaxDigit];
108 fTimeList = new Float_t[fMaxDigit];
109 if(fAbsIdList == 0) {
110 fAbsIdList = new Int_t[fMaxDigit];
111 fSuperModuleNumber = fGeom->GetSuperModuleNumber(digit.GetId());
114 if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists
116 Int_t * tempo = new Int_t[fMaxDigit];
117 Float_t * tempoE = new Float_t[fMaxDigit];
118 Float_t * tempoT = new Float_t[fMaxDigit];
119 Int_t * tempoId = new Int_t[fMaxDigit];
122 for ( index = 0 ; index < fMulDigit ; index++ ){
123 tempo[index] = fDigitsList[index] ;
124 tempoE[index] = fEnergyList[index] ;
125 tempoT[index] = fTimeList[index] ;
126 tempoId[index] = fAbsIdList[index] ;
129 delete [] fDigitsList ;
130 fDigitsList = new Int_t[fMaxDigit];
132 delete [] fEnergyList ;
133 fEnergyList = new Float_t[fMaxDigit];
135 delete [] fTimeList ;
136 fTimeList = new Float_t[fMaxDigit];
138 delete [] fAbsIdList ;
139 fAbsIdList = new Int_t[fMaxDigit];
141 for ( index = 0 ; index < fMulDigit ; index++ ){
142 fDigitsList[index] = tempo[index] ;
143 fEnergyList[index] = tempoE[index] ;
144 fTimeList[index] = tempoT[index] ;
145 fAbsIdList[index] = tempoId[index] ;
154 fDigitsList[fMulDigit] = digit.GetIndexInList() ;
155 fEnergyList[fMulDigit] = Energy ;
156 fTimeList[fMulDigit] = digit.GetTime() ;
157 fAbsIdList[fMulDigit] = digit.GetId();
162 //____________________________________________________________________________
163 Bool_t AliEMCALRecPoint::AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const
165 // Tells if (true) or not (false) two digits are neighbours
166 // A neighbour is defined as being two digits which share a corner
168 static Bool_t areNeighbours = kFALSE ;
169 static Int_t nSupMod=0, nTower=0, nIphi=0, nIeta=0;
170 static int nSupMod1=0, nTower1=0, nIphi1=0, nIeta1=0;
171 static Int_t relid1[2] , relid2[2] ; // ieta, iphi
172 static Int_t rowdiff=0, coldiff=0;
174 areNeighbours = kFALSE ;
176 fGeom->GetCellIndex(digit1->GetId(), nSupMod,nTower,nIphi,nIeta);
177 fGeom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, relid1[0],relid1[1]);
179 fGeom->GetCellIndex(digit2->GetId(), nSupMod1,nTower1,nIphi1,nIeta1);
180 fGeom->GetCellPhiEtaIndexInSModule(nSupMod1,nTower1,nIphi1,nIeta1, relid2[0],relid2[1]);
182 rowdiff = TMath::Abs( relid1[0] - relid2[0] ) ;
183 coldiff = TMath::Abs( relid1[1] - relid2[1] ) ;
185 if (( coldiff <= 1 ) && ( rowdiff <= 1 ) && (coldiff + rowdiff > 0))
186 areNeighbours = kTRUE ;
188 return areNeighbours;
191 //____________________________________________________________________________
192 Int_t AliEMCALRecPoint::Compare(const TObject * obj) const
194 // Compares two RecPoints according to their position in the EMCAL modules
196 Float_t delta = 1 ; //Width of "Sorting row". If you change this
197 //value (what is senseless) change as well delta in
198 //AliEMCALTrackSegmentMakerv* and other RecPoints...
201 AliEMCALRecPoint * clu = (AliEMCALRecPoint *)obj ;
204 GetLocalPosition(locpos1);
206 clu->GetLocalPosition(locpos2);
208 Int_t rowdif = (Int_t)(TMath::Ceil(locpos1.X()/delta)-TMath::Ceil(locpos2.X()/delta)) ;
213 else if(locpos1.Y()>locpos2.Y())
221 //____________________________________________________________________________
222 Int_t AliEMCALRecPoint::DistancetoPrimitive(Int_t px, Int_t py)
224 // Compute distance from point px,py to a AliEMCALRecPoint considered as a Tmarker
225 // Compute the closest distance of approach from point px,py to this marker.
226 // The distance is computed in pixels units.
227 // HG Still need to update -> Not sure what this should achieve
229 TVector3 pos(0.,0.,0.) ;
230 GetLocalPosition(pos) ;
231 Float_t x = pos.X() ;
232 Float_t y = pos.Y() ;
233 const Int_t kMaxDiff = 10;
234 Int_t pxm = gPad->XtoAbsPixel(x);
235 Int_t pym = gPad->YtoAbsPixel(y);
236 Int_t dist = (px-pxm)*(px-pxm) + (py-pym)*(py-pym);
238 if (dist > kMaxDiff) return 9999;
242 //___________________________________________________________________________
243 void AliEMCALRecPoint::Draw(Option_t *option)
245 // Draw this AliEMCALRecPoint with its current attributes
250 //______________________________________________________________________________
251 void AliEMCALRecPoint::ExecuteEvent(Int_t /*event*/, Int_t, Int_t)
253 // Execute action corresponding to one event
254 // This member function is called when a AliEMCALRecPoint is clicked with the locator
256 // If Left button is clicked on AliEMCALRecPoint, the digits are switched on
257 // and switched off when the mouse button is released.
259 // static Int_t pxold, pyold;
261 /* static TGraph * digitgraph = 0 ;
262 static TPaveText* clustertext = 0 ;
264 if (!gPad->IsEditable()) return;
270 AliEMCALDigit * digit ;
271 AliEMCALGeometry * emcalgeom = (AliEMCALGetter::Instance())->EMCALGeometry() ;
276 const Int_t kMulDigit=AliEMCALRecPoint::GetDigitsMultiplicity() ;
277 Float_t * xi = new Float_t [kMulDigit] ;
278 Float_t * zi = new Float_t [kMulDigit] ;
280 for(iDigit = 0; iDigit < kMulDigit; iDigit++) {
281 Fatal("AliEMCALRecPoint::ExecuteEvent", " -> Something wrong with the code");
282 digit = 0 ; //dynamic_cast<AliEMCALDigit *>((fDigitsList)[iDigit]);
283 emcalgeom->AbsToRelNumbering(digit->GetId(), relid) ;
284 emcalgeom->PosInAlice(relid, xi[iDigit], zi[iDigit]) ;
288 digitgraph = new TGraph(fMulDigit,xi,zi);
289 digitgraph-> SetMarkerStyle(5) ;
290 digitgraph-> SetMarkerSize(1.) ;
291 digitgraph-> SetMarkerColor(1) ;
292 digitgraph-> Draw("P") ;
296 TVector3 pos(0.,0.,0.) ;
297 GetLocalPosition(pos) ;
298 clustertext = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ;
301 sprintf(line1,"Energy=%1.2f GeV",GetEnergy()) ;
302 sprintf(line2,"%d Digits",GetDigitsMultiplicity()) ;
303 clustertext ->AddText(line1) ;
304 clustertext ->AddText(line2) ;
305 clustertext ->Draw("");
329 //____________________________________________________________________________
330 void AliEMCALRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits)
332 // Evaluates all shower parameters
334 EvalLocalPosition(logWeight, digits) ;
335 // printf("eval position done\n");
336 EvalElipsAxis(logWeight, digits) ;
337 // printf("eval axis done\n");
338 EvalDispersion(logWeight, digits) ;
339 // printf("eval dispersion done\n");
340 // EvalCoreEnergy(logWeight, digits);
341 // printf("eval energy done\n");
343 // printf("eval time done\n");
345 EvalPrimaries(digits) ;
346 // printf("eval pri done\n");
348 // printf("eval parent done\n");
351 //____________________________________________________________________________
352 void AliEMCALRecPoint::EvalDispersion(Float_t logWeight, TClonesArray * digits)
354 // Calculates the dispersion of the shower at the origin of the RecPoint
356 Double_t d = 0., wtot = 0., w = 0., xyzi[3], diff=0.;
357 Int_t iDigit=0, nstat=0, i=0;
358 AliEMCALDigit * digit ;
360 // Calculates the centre of gravity in the local EMCAL-module coordinates
362 EvalLocalPosition(logWeight, digits) ;
364 // Calculates the dispersion in coordinates
365 for(iDigit=0; iDigit < fMulDigit; iDigit++) {
366 digit = (AliEMCALDigit *) digits->At(fDigitsList[iDigit]) ;
368 fGeom->RelPosCellInSModule(digit->GetId(), xyzi[0], xyzi[1], xyzi[2]);
369 w = TMath::Max(0.,logWeight+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ;
374 for(i=0; i<3; i++ ) {
375 diff = xyzi[i] - double(fLocPos[i]);
381 if ( wtot > 0 && nstat>1) d /= wtot ;
384 fDispersion = TMath::Sqrt(d) ;
387 //____________________________________________________________________________
388 void AliEMCALRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digits)
390 // Calculates the center of gravity in the local EMCAL-module coordinates
391 // Info("Print", " logWeight %f : cluster energy %f ", logWeight, fAmp); // for testing
393 AliEMCALDigit * digit;
395 Double_t clXYZ[3]={0.,0.,0.}, clRmsXYZ[3]={0.,0.,0.}, xyzi[3], wtot=0., w=0.;
397 for(Int_t iDigit=0; iDigit<fMulDigit; iDigit++) {
398 digit = dynamic_cast<AliEMCALDigit *>(digits->At(fDigitsList[iDigit])) ;
400 fGeom->RelPosCellInSModule(digit->GetId(), xyzi[0], xyzi[1], xyzi[2]);
401 // printf(" Id %i : Local x,y,z %f %f %f \n", digit->GetId(), xyzi[0], xyzi[1], xyzi[2]);
403 if(logWeight > 0.0) w = TMath::Max( 0., logWeight + TMath::Log( fEnergyList[iDigit] / fAmp ));
404 else w = fEnergyList[iDigit]; // just energy
409 for(i=0; i<3; i++ ) {
410 clXYZ[i] += (w*xyzi[i]);
411 clRmsXYZ[i] += (w*xyzi[i]*xyzi[i]);
415 // cout << " wtot " << wtot << endl;
417 // xRMS = TMath::Sqrt(x2m - xMean*xMean);
418 for(i=0; i<3; i++ ) {
421 clRmsXYZ[i] /= (wtot*wtot);
422 clRmsXYZ[i] = clRmsXYZ[i] - clXYZ[i]*clXYZ[i];
423 if(clRmsXYZ[i] > 0.0) {
424 clRmsXYZ[i] = TMath::Sqrt(clRmsXYZ[i]);
425 } else clRmsXYZ[i] = 0;
426 } else clRmsXYZ[i] = 0;
429 for(i=0; i<3; i++ ) {
430 clXYZ[i] = clRmsXYZ[i] = -1.;
434 fLocPos.SetX(clXYZ[0]);
435 fLocPos.SetY(clXYZ[1]);
436 fLocPos.SetZ(clXYZ[2]);
439 // printf("EvalLocalPosition: eta,phi,r = %f,%f,%f", fLocPos.X(), fLocPos.Y(), fLocPos.Z()) ;
440 fLocPosM = 0 ; // covariance matrix
443 //void AliEMCALRecPoint::EvalLocalPositionSimple()
444 //{ // Weight is proportional of cell energy
447 //______________________________________________________________________________
448 void AliEMCALRecPoint::EvalCoreEnergy(Float_t logWeight, TClonesArray * digits)
450 // This function calculates energy in the core,
451 // i.e. within a radius rad = 3cm around the center. Beyond this radius
452 // in accordance with shower profile the energy deposition
453 // should be less than 2%
455 AliEMCALDigit * digit ;
456 const Float_t kDeg2Rad = TMath::DegToRad() ;
460 if (!fLocPos.Mag()) {
461 EvalLocalPosition(logWeight, digits);
464 for(iDigit=0; iDigit < fMulDigit; iDigit++) {
465 digit = (AliEMCALDigit *) ( digits->At(fDigitsList[iDigit]) ) ;
468 fGeom->PosInAlice(digit->GetId(), etai, phii);
469 phii = phii * kDeg2Rad;
471 Float_t distance = TMath::Sqrt((etai-fLocPos.X())*(etai-fLocPos.X())+(phii-fLocPos.Y())*(phii-fLocPos.Y())) ;
472 if(distance < fCoreRadius)
473 fCoreEnergy += fEnergyList[iDigit] ;
477 //____________________________________________________________________________
478 void AliEMCALRecPoint::EvalElipsAxis(Float_t logWeight,TClonesArray * digits)
480 // Calculates the axis of the shower ellipsoid in eta and phi
489 const Float_t kDeg2Rad = TMath::DegToRad();
490 AliEMCALDigit * digit ;
492 TString gn(fGeom->GetName());
496 for(iDigit=0; iDigit<fMulDigit; iDigit++) {
497 digit = (AliEMCALDigit *) digits->At(fDigitsList[iDigit]) ;
500 if(gn.Contains("SHISH")) { // have to be change - Feb 28, 2006
501 //copied for shish-kebab geometry, ieta,iphi is cast as float as eta,phi conversion
502 // for this geometry does not exist
503 int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
505 fGeom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
506 fGeom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
510 fGeom->EtaPhiFromIndex(digit->GetId(), etai, phii);
511 phii = phii * kDeg2Rad;
514 Double_t w = TMath::Max(0.,logWeight+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ;
516 dxx += w * etai * etai ;
518 dzz += w * phii * phii ;
521 dxz += w * etai * phii ;
536 fLambda[0] = 0.5 * (dxx + dzz) + TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ;
538 fLambda[0] = TMath::Sqrt(fLambda[0]) ;
542 fLambda[1] = 0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ;
544 if(fLambda[1] > 0) //To avoid exception if numerical errors lead to negative lambda.
545 fLambda[1] = TMath::Sqrt(fLambda[1]) ;
553 // printf("Evalaxis: lambdas = %f,%f", fLambda[0],fLambda[1]) ;
557 //______________________________________________________________________________
558 void AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits)
560 // Constructs the list of primary particles (tracks) which have contributed to this RecPoint
562 AliEMCALDigit * digit ;
563 Int_t * tempo = new Int_t[fMaxTrack] ;
566 for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
567 digit = dynamic_cast<AliEMCALDigit *>(digits->At( fDigitsList[index] )) ;
568 Int_t nprimaries = digit->GetNprimary() ;
569 if ( nprimaries == 0 ) continue ;
570 Int_t * newprimaryarray = new Int_t[nprimaries] ;
572 for ( ii = 0 ; ii < nprimaries ; ii++)
573 newprimaryarray[ii] = digit->GetPrimary(ii+1) ;
576 for ( jndex = 0 ; jndex < nprimaries ; jndex++ ) { // all primaries in digit
577 if ( fMulTrack > fMaxTrack ) {
578 fMulTrack = fMaxTrack ;
579 Error("GetNprimaries", "increase fMaxTrack ") ;
582 Int_t newprimary = newprimaryarray[jndex] ;
584 Bool_t already = kFALSE ;
585 for ( kndex = 0 ; kndex < fMulTrack ; kndex++ ) { //check if not already stored
586 if ( newprimary == tempo[kndex] ){
591 if ( !already && (fMulTrack < fMaxTrack)) { // store it
592 tempo[fMulTrack] = newprimary ;
595 } // all primaries in digit
596 delete [] newprimaryarray ;
600 fTracksList = new Int_t[fMulTrack] ;
601 for(index = 0; index < fMulTrack; index++)
602 fTracksList[index] = tempo[index] ;
608 //______________________________________________________________________________
609 void AliEMCALRecPoint::EvalParents(TClonesArray * digits)
611 // Constructs the list of parent particles (tracks) which have contributed to this RecPoint
613 AliEMCALDigit * digit ;
614 Int_t * tempo = new Int_t[fMaxParent] ;
617 for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
618 digit = dynamic_cast<AliEMCALDigit *>(digits->At( fDigitsList[index] )) ;
619 Int_t nparents = digit->GetNiparent() ;
620 if ( nparents == 0 ) continue ;
621 Int_t * newparentarray = new Int_t[nparents] ;
623 for ( ii = 0 ; ii < nparents ; ii++)
624 newparentarray[ii] = digit->GetIparent(ii+1) ;
627 for ( jndex = 0 ; jndex < nparents ; jndex++ ) { // all primaries in digit
628 if ( fMulParent > fMaxParent ) {
630 Error("GetNiparent", "increase fMaxParent") ;
633 Int_t newparent = newparentarray[jndex] ;
635 Bool_t already = kFALSE ;
636 for ( kndex = 0 ; kndex < fMulParent ; kndex++ ) { //check if not already stored
637 if ( newparent == tempo[kndex] ){
642 if ( !already && (fMulTrack < fMaxTrack)) { // store it
643 tempo[fMulParent] = newparent ;
646 } // all parents in digit
647 delete [] newparentarray ;
651 fParentsList = new Int_t[fMulParent] ;
652 for(index = 0; index < fMulParent; index++)
653 fParentsList[index] = tempo[index] ;
660 //____________________________________________________________________________
661 void AliEMCALRecPoint::GetLocalPosition(TVector3 & lpos) const
663 // returns the position of the cluster in the local reference system of ALICE
665 lpos.SetX(fLocPos.X()) ;
666 lpos.SetY(fLocPos.Y()) ;
667 lpos.SetZ(fLocPos.Z()) ;
670 //____________________________________________________________________________
671 void AliEMCALRecPoint::GetGlobalPosition(TVector3 & gpos) const
673 // returns the position of the cluster in the global reference system of ALICE
674 // These are now the Cartesian X, Y and Z
675 // cout<<" geom "<<geom<<endl;
676 fGeom->GetGlobal(fLocPos, gpos, fSuperModuleNumber);
679 //____________________________________________________________________________
680 Float_t AliEMCALRecPoint::GetMaximalEnergy(void) const
682 // Finds the maximum energy in the cluster
684 Float_t menergy = 0. ;
688 for(iDigit=0; iDigit<fMulDigit; iDigit++) {
690 if(fEnergyList[iDigit] > menergy)
691 menergy = fEnergyList[iDigit] ;
696 //____________________________________________________________________________
697 Int_t AliEMCALRecPoint::GetMultiplicityAtLevel(Float_t H) const
699 // Calculates the multiplicity of digits with energy larger than H*energy
703 for(iDigit=0; iDigit<fMulDigit; iDigit++) {
705 if(fEnergyList[iDigit] > H * fAmp)
711 //____________________________________________________________________________
712 Int_t AliEMCALRecPoint::GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
713 Float_t locMaxCut,TClonesArray * digits) const
715 // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
716 // energy difference between two local maxima
718 AliEMCALDigit * digit ;
719 AliEMCALDigit * digitN ;
724 for(iDigit = 0; iDigit < fMulDigit; iDigit++)
725 maxAt[iDigit] = (AliEMCALDigit*) digits->At(fDigitsList[iDigit]) ;
727 for(iDigit = 0 ; iDigit < fMulDigit; iDigit++) {
729 digit = maxAt[iDigit] ;
731 for(iDigitN = 0; iDigitN < fMulDigit; iDigitN++) {
732 digitN = (AliEMCALDigit *) digits->At(fDigitsList[iDigitN]) ;
734 if ( AreNeighbours(digit, digitN) ) {
735 if (fEnergyList[iDigit] > fEnergyList[iDigitN] ) {
737 // but may be digit too is not local max ?
738 if(fEnergyList[iDigit] < fEnergyList[iDigitN] + locMaxCut)
743 // but may be digitN too is not local max ?
744 if(fEnergyList[iDigit] > fEnergyList[iDigitN] - locMaxCut)
747 } // if Areneighbours
753 for(iDigit = 0; iDigit < fMulDigit; iDigit++) {
755 maxAt[iDigitN] = maxAt[iDigit] ;
756 maxAtEnergy[iDigitN] = fEnergyList[iDigit] ;
762 //____________________________________________________________________________
763 void AliEMCALRecPoint::EvalTime(TClonesArray * digits){
764 // time is set to the time of the digit with the maximum energy
768 for(Int_t idig=0; idig < fMulDigit; idig++){
769 if(fEnergyList[idig] > maxE){
770 maxE = fEnergyList[idig] ;
774 fTime = ((AliEMCALDigit*) digits->At(fDigitsList[maxAt]))->GetTime() ;
778 //______________________________________________________________________________
779 void AliEMCALRecPoint::Paint(Option_t *)
781 // Paint this ALiRecPoint as a TMarker with its current attributes
783 TVector3 pos(0.,0.,0.) ;
784 GetLocalPosition(pos) ;
785 Coord_t x = pos.X() ;
786 Coord_t y = pos.Z() ;
787 Color_t markercolor = 1 ;
788 Size_t markersize = 1. ;
789 Style_t markerstyle = 5 ;
791 if (!gPad->IsBatch()) {
792 gVirtualX->SetMarkerColor(markercolor) ;
793 gVirtualX->SetMarkerSize (markersize) ;
794 gVirtualX->SetMarkerStyle(markerstyle) ;
796 gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
797 gPad->PaintPolyMarker(1,&x,&y,"") ;
800 //______________________________________________________________________________
801 Float_t AliEMCALRecPoint::EtaToTheta(Float_t arg) const
803 //Converts Theta (Radians) to Eta(Radians)
804 return (2.*TMath::ATan(TMath::Exp(-arg)));
807 //______________________________________________________________________________
808 Float_t AliEMCALRecPoint::ThetaToEta(Float_t arg) const
810 //Converts Eta (Radians) to Theta(Radians)
811 return (-1 * TMath::Log(TMath::Tan(0.5 * arg)));
814 //____________________________________________________________________________
815 void AliEMCALRecPoint::Print(Option_t *) const
817 // Print the list of digits belonging to the cluster
820 message = "AliEMCALRecPoint:\n" ;
821 message += " digits # = " ;
822 Info("Print", message.Data()) ;
825 for(iDigit=0; iDigit<fMulDigit; iDigit++)
826 printf(" %d ", fDigitsList[iDigit] ) ;
829 Info("Print", " Energies = ") ;
830 for(iDigit=0; iDigit<fMulDigit; iDigit++)
831 printf(" %f ", fEnergyList[iDigit] ) ;
834 Info("Print", "\n Abs Ids = ") ;
835 for(iDigit=0; iDigit<fMulDigit; iDigit++)
836 printf(" %i ", fAbsIdList[iDigit] ) ;
839 Info("Print", " Primaries ") ;
840 for(iDigit = 0;iDigit < fMulTrack; iDigit++)
841 printf(" %d ", fTracksList[iDigit]) ;
843 printf("\n Local x %6.2f y %7.2f z %7.1f \n", fLocPos[0], fLocPos[1], fLocPos[2]);
845 message = " ClusterType = %d" ;
846 message += " Multiplicity = %d" ;
847 message += " Cluster Energy = %f" ;
848 message += " Core energy = %f" ;
849 message += " Core radius = %f" ;
850 message += " Number of primaries %d" ;
851 message += " Stored at position %d" ;
852 Info("Print", message.Data(), fClusterType, fMulDigit, fAmp, fCoreEnergy, fCoreRadius, fMulTrack, GetIndexInList() ) ;