/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ /* $Log $ */ //----------------------------------------------------------------- // Implementation of the ESD Calorimeter cluster class // ESD = Event Summary Data // This is the class to deal with during the phisics analysis of data // // J.L. Klay (LLNL) //----------------------------------------------------------------- #include #include "AliESDCaloCluster.h" ClassImp(AliESDCaloCluster) //_______________________________________________________________________ AliESDCaloCluster::AliESDCaloCluster() : fID(0), fClusterType(-1), fEMCALCluster(kFALSE), fPHOSCluster(kFALSE), fEnergy(-1), fDispersion(-1), fChi2(-1), fM20(0), fM02(0), fM11(0), fNExMax(0), fEmcCpvDistance(9999), fDistToBadChannel(9999), fTracksMatched(0x0), fLabels(0x0), fDigitAmplitude(0x0), fDigitTime(0x0), fDigitIndex(0x0) { // // The default ESD constructor // fGlobalPos[0] = fGlobalPos[1] = fGlobalPos[2] = 0.; for(Int_t i=0; i=0) { sum+=p[i]; fPID[i] = p[i]; } else { fPID[i] = 0; } if(sum>0) for (Int_t i=0; iGetVertex()->GetXYZ(vertex) ; " if(vertex){//calculate direction from vertex fGlobalPos[0]-=vertex[0]; fGlobalPos[1]-=vertex[1]; fGlobalPos[2]-=vertex[2]; } Double_t r = TMath::Sqrt(fGlobalPos[0]*fGlobalPos[0]+ fGlobalPos[1]*fGlobalPos[1]+ fGlobalPos[2]*fGlobalPos[2] ) ; p.SetPxPyPzE( fEnergy*fGlobalPos[0]/r, fEnergy*fGlobalPos[1]/r, fEnergy*fGlobalPos[2]/r, fEnergy) ; }