#include "AliLog.h"
//____________________________________________________________________________
- AliPHOSRecParticle::AliPHOSRecParticle(): fPHOSTrackSegment(0) , fDebug( kFALSE )
+AliPHOSRecParticle::AliPHOSRecParticle():
+ fPHOSTrackSegment(0),
+ fDebug(kFALSE),
+ fPos()
{
// ctor
const Int_t nSPECIES = AliPID::kSPECIESN;
//____________________________________________________________________________
- AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp)
- : AliPHOSFastRecParticle(rp)
+AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp):
+ AliPHOSFastRecParticle(rp),
+ fPHOSTrackSegment(rp.fPHOSTrackSegment),
+ fDebug(kFALSE),
+ fPos()
{
// copy ctor
-
- fPHOSTrackSegment = rp.fPHOSTrackSegment ;
- fDebug = kFALSE ;
fType = rp.fType ;
fIndexInList = rp.fIndexInList ;
Int_t module ;
const AliPHOSGeometry * geom = gime->PHOSGeometry() ;
Double_t x,z ;
- geom->ImpactOnEmc(static_cast<double>(Theta()),static_cast<double>(Phi()), module,z,x);
+//DP to be fixed: Why do we use this method here??? M.B. use RecPoint???
+ Double_t vtx[3]={0.,0.,0.} ;
+ geom->ImpactOnEmc(vtx,static_cast<double>(Theta()),static_cast<double>(Phi()), module,z,x);
Int_t amp = 0 ;
Int_t iPrim=-1 ;
if(module != 0){
bestDigitIndex = iDigit;
}
}
- digit = gime->Digit(digitList[bestDigitIndex]);
+ if (bestDigitIndex>-1)
+ digit = gime->Digit(digitList[bestDigitIndex]);
+ if (digit==0) return -12345;
+
// Get the list of primary tracks producing this digit
// and find which track has more track energy.
AliPHOSHit *hit = 0;
TClonesArray *hits = gime->Hits();
+ if (hits==0) return -12345;
+
Double_t maxedep = 0;
Int_t maxtrack = -1;
Int_t nHits = hits ->GetEntries();