#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){
}
//____________________________________________________________________________
-const Int_t AliPHOSRecParticle::GetPrimaryIndex() const
+Int_t AliPHOSRecParticle::GetPrimaryIndex() const
{
// Get the primary track index in TreeK which deposits the most energy
// in Digits which forms EmcRecPoint, which produces TrackSegment,
AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
if (!gime)
AliError(Form("Getter not yet instantiated")) ;
- // gime->Event(gime->EventNumber(), "DRTX") ;
+ //PH gime->Event(gime->EventNumber(), "DRTX") ;
gime->Event(gime->EventNumber(), "DRT") ;
// Get TrackSegment corresponding to this RecParticle
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();
}
//____________________________________________________________________________
-void AliPHOSRecParticle::SetPID(Int_t type, Double_t weight)
+void AliPHOSRecParticle::SetPID(Int_t type, Float_t weight)
{
// Set the probability densities that this reconstructed particle
// has a type of i: