}
+//____________________________________________________________________________
+AliPHOSEmcRecPoint::AliPHOSEmcRecPoint(const char * opt) : AliPHOSRecPoint(opt)
+{
+ // ctor
+
+ fMulDigit = 0 ;
+ fAmp = 0. ;
+ fCoreEnergy = 0 ;
+ fEnergyList = 0 ;
+ fTime = -1. ;
+ fLocPos.SetX(1000000.) ; //Local position should be evaluated
+
+}
+
//____________________________________________________________________________
AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint()
{
TH2F * histo = 0 ;
TCanvas * histocanvas ;
- TClonesArray * digits = gime->Digits() ;
+ const TClonesArray * digits = gime->Digits() ;
switch (event) {
EvalElipsAxis(logWeight, digits) ;
EvalDispersion(logWeight, digits) ;
EvalCoreEnergy(logWeight, digits);
+ EvalTime(digits) ;
}
//____________________________________________________________________________
void AliPHOSEmcRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digits)
xoL = xo*TMath::Cos(phi)-yo*TMath::Sin(phi) ;
yoL = xo*TMath::Sin(phi)+yo*TMath::Cos(phi) ;
- Float_t radius = TMath::Sqrt((xoL-x)*(xoL-x)+
- (phosgeom->GetIPtoCrystalSurface()-yoL)*(phosgeom->GetIPtoCrystalSurface()-yoL)+
- (zo-z)*(zo-z));
+ Float_t radius = phosgeom->GetIPtoCrystalSurface()-yoL;
Float_t incidencephi = TMath::ATan((x-xoL ) / radius) ;
Float_t incidencetheta = TMath::ATan((z-zo) / radius) ;
Float_t depthx = ( para * TMath::Log(fAmp) + parb ) * TMath::Sin(incidencephi) ;
Float_t depthz = ( para * TMath::Log(fAmp) + parb ) * TMath::Sin(incidencetheta) ;
-
fLocPos.SetX(x - depthx) ;
fLocPos.SetY(0.) ;
}
//____________________________________________________________________________
-Int_t AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t * maxAt, Float_t * maxAtEnergy,
+Int_t AliPHOSEmcRecPoint::GetNumberOfLocalMax( AliPHOSDigit ** maxAt, Float_t * maxAtEnergy,
Float_t locMaxCut,TClonesArray * digits) const
{
// Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
Int_t iDigit ;
for(iDigit = 0; iDigit < fMulDigit; iDigit++)
- maxAt[iDigit] = (Int_t) digits->At(fDigitsList[iDigit]) ;
+ maxAt[iDigit] = (AliPHOSDigit*) digits->At(fDigitsList[iDigit]) ;
for(iDigit = 0 ; iDigit < fMulDigit; iDigit++) {
- if(maxAt[iDigit] != -1) {
- digit = (AliPHOSDigit *) maxAt[iDigit] ;
+ if(maxAt[iDigit]) {
+ digit = maxAt[iDigit] ;
for(iDigitN = 0; iDigitN < fMulDigit; iDigitN++) {
digitN = (AliPHOSDigit *) digits->At(fDigitsList[iDigitN]) ;
if ( AreNeighbours(digit, digitN) ) {
if (fEnergyList[iDigit] > fEnergyList[iDigitN] ) {
- maxAt[iDigitN] = -1 ;
+ maxAt[iDigitN] = 0 ;
// but may be digit too is not local max ?
if(fEnergyList[iDigit] < fEnergyList[iDigitN] + locMaxCut)
- maxAt[iDigit] = -1 ;
+ maxAt[iDigit] = 0 ;
}
else {
- maxAt[iDigit] = -1 ;
+ maxAt[iDigit] = 0 ;
// but may be digitN too is not local max ?
if(fEnergyList[iDigit] > fEnergyList[iDigitN] - locMaxCut)
- maxAt[iDigitN] = -1 ;
+ maxAt[iDigitN] = 0 ;
}
} // if Areneighbours
} // while digitN
iDigitN = 0 ;
for(iDigit = 0; iDigit < fMulDigit; iDigit++) {
- if(maxAt[iDigit] != -1){
+ if(maxAt[iDigit]){
maxAt[iDigitN] = maxAt[iDigit] ;
maxAtEnergy[iDigitN] = fEnergyList[iDigit] ;
iDigitN++ ;