/************************************************************************** * 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() : TObject(), fTracksMatched(0x0), fLabels(0x0), fNCells(0), fCellsAbsId(0x0), fCellsAmpFraction(0x0), fDigitAmplitude(0x0),//not in use fDigitTime(0x0),//not in use fDigitIndex(0x0),//not in use fEnergy(0), fDispersion(0), fChi2(0), fM20(0), fM02(0), fM11(0), fEmcCpvDistance(1024), fDistToBadChannel(1024), fID(0), fNExMax(0), fClusterType(kUndef) { // // The default ESD constructor // fGlobalPos[0] = fGlobalPos[1] = fGlobalPos[2] = 0.; for(Int_t i=0; i 0) { if(clus.fCellsAbsId){ fCellsAbsId = new UShort_t[clus.fNCells]; for (Int_t i=0; i 0) { if(source.fCellsAbsId){ fCellsAbsId = new UShort_t[source.fNCells]; 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) ; }