* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Rec Point in the PHOS EM calorimeter
-//*-- Author : Dmitri Peressounko RRC KI
-//////////////////////////////////////////////////////////////////////////////
+// RecPoint implementation for PHOS-EMC
+// An EmcRecPoint is a cluster of digits
+//
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
+
// --- ROOT system ---
#include "TPad.h"
fLocPos.SetX(1000000.) ; //Local position should be evaluated
}
-//____________________________________________________________________________
-AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint()
-{
- // dtor
-}
-
//____________________________________________________________________________
void AliPHOSEmcRecPoint::AddDigit(AliDigitNew & digit, Float_t Energy)
{
- // adds a digit to the digits list
- // and accumulates the total amplitude and the multiplicity
+ // Adds a digit to the RecPoint
+ // and accumulates the total amplitude and the multiplicity
if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists
fMaxDigit*=2 ;
//____________________________________________________________________________
Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 )
{
+ // Tells if (true) or not (false) two digits are neighbors)
Bool_t aren = kFALSE ;
//____________________________________________________________________________
Int_t AliPHOSEmcRecPoint::Compare(TObject * obj)
{
+ // Compares two RecPoints according to their position in the PHOS modules
+
Int_t rv ;
AliPHOSEmcRecPoint * clu = (AliPHOSEmcRecPoint *)obj ;
//______________________________________________________________________________
void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
{
- //Execute action corresponding to one event
+ // Execute action corresponding to one event
// This member function is called when a AliPHOSRecPoint is clicked with the locator
//
// If Left button is clicked on AliPHOSRecPoint, the digits are switched on
//____________________________________________________________________________
Float_t AliPHOSEmcRecPoint::GetDispersion()
{
+ // Calculates the dispersion of the shower at the origine of the RecPoint
+
Float_t d = 0 ;
Float_t wtot = 0 ;
GetLocalPosition(locpos);
Float_t x = locpos.X() ;
Float_t z = locpos.Z() ;
- // Int_t i = GetPHOSMod() ;
AliPHOSDigit * digit ;
AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
//____________________________________________________________________________
void AliPHOSEmcRecPoint::GetElipsAxis(Float_t * lambda)
{
+ // Calculates the axis of the shower ellipsoid
+
Float_t wtot = 0. ;
Float_t x = 0.;
Float_t z = 0.;
lambda[1] = TMath::Sqrt( 0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ) ;
}
+//____________________________________________________________________________
+void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos)
+{
+ // Calculates the center of gravity in the local PHOS-module coordinates
+
+ if( fLocPos.X() < 1000000.) { // already evaluated
+ LPos = fLocPos ;
+ return ;
+ }
+
+ Float_t wtot = 0. ;
+
+ Int_t relid[4] ;
+
+ Float_t x = 0. ;
+ Float_t z = 0. ;
+
+ AliPHOSDigit * digit ;
+
+ AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
+
+ Int_t iDigit;
+
+
+ for(iDigit=0; iDigit<fMulDigit; iDigit++) {
+ digit = (AliPHOSDigit *) fDigitsList[iDigit];
+
+ Float_t xi ;
+ Float_t zi ;
+ phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
+ phosgeom->RelPosInModule(relid, xi, zi);
+ Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
+ x += xi * w ;
+ z += zi * w ;
+ wtot += w ;
+
+ }
+
+ x /= wtot ;
+ z /= wtot ;
+ fLocPos.SetX(x) ;
+ fLocPos.SetY(0.) ;
+ fLocPos.SetZ(z) ;
+
+ LPos = fLocPos ;
+}
+
//____________________________________________________________________________
Float_t AliPHOSEmcRecPoint::GetMaximalEnergy(void)
{
+ // Finds the maximum energy in the cluster
+
Float_t menergy = 0. ;
Int_t iDigit;
//____________________________________________________________________________
Int_t AliPHOSEmcRecPoint::GetMultiplicityAtLevel(Float_t H)
{
+ // Calculates the multiplicity of digits with energy larger than H*energy
+
Int_t multipl = 0 ;
Int_t iDigit ;
for(iDigit=0; iDigit<fMulDigit; iDigit++) {
//____________________________________________________________________________
Int_t AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t * maxAt, Float_t * maxAtEnergy)
{
+ // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
+ // energy difference between two local maxima
+
AliPHOSDigit * digit ;
AliPHOSDigit * digitN ;
return iDigitN ;
}
-//____________________________________________________________________________
-void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos)
-{
- if( fLocPos.X() < 1000000.) { // already evaluated
- LPos = fLocPos ;
- return ;
- }
-
- Float_t wtot = 0. ;
-
- Int_t relid[4] ;
-
- Float_t x = 0. ;
- Float_t z = 0. ;
-
- AliPHOSDigit * digit ;
-
- AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
-
- Int_t iDigit;
-
-
- for(iDigit=0; iDigit<fMulDigit; iDigit++) {
- digit = (AliPHOSDigit *) fDigitsList[iDigit];
-
- Float_t xi ;
- Float_t zi ;
- phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
- phosgeom->RelPosInModule(relid, xi, zi);
- Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
- x += xi * w ;
- z += zi * w ;
- wtot += w ;
-
- }
-
- x /= wtot ;
- z /= wtot ;
- fLocPos.SetX(x) ;
- fLocPos.SetY(0.) ;
- fLocPos.SetZ(z) ;
-
- LPos = fLocPos ;
-}
// //____________________________________________________________________________
// AliPHOSEmcRecPoint& AliPHOSEmcRecPoint::operator = (AliPHOSEmcRecPoint Clu)
//____________________________________________________________________________
void AliPHOSEmcRecPoint::Print(Option_t * option)
{
+ // Print the list of digits belonging to the cluster
+
cout << "AliPHOSEmcRecPoint: " << endl ;
AliPHOSDigit * digit ;
//______________________________________________________________________________
void AliPHOSEmcRecPoint::Streamer(TBuffer &R__b)
{
- // Stream an object of class AliPHOSEmcRecPoint.
-
+ // Stream an object of class AliPHOSEmcRecPoint.
+ // Needed because of the array fEnergyList
+
if (R__b.IsReading()) {
Version_t R__v = R__b.ReadVersion(); if (R__v) { }
AliPHOSRecPoint::Streamer(R__b);