--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-2007, 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$ */
+
+#include "AliPHOSLogbackCluster.h"
+
+ClassImp(AliPHOSLogbackCluster)
+
+//______________________________________________________________________________
+AliPHOSLogbackCluster::AliPHOSLogbackCluster(AliVCluster* cluster)
+: fE( cluster->E() )
+{
+ //TODO: fCoreE
+
+ cluster->GetPosition( fPosition );
+}
+
+AliPHOSLogbackCluster::~AliPHOSLogbackCluster()
+{
+}
+
+
+TLorentzVector AliPHOSLogbackCluster::GetMomentum(Double_t * vertex)
+{
+ // Returns TLorentzVector with momentum of the cluster. Only valid for clusters
+ // identified as photons or pi0 (overlapped gamma) produced on the vertex
+ // Vertex can be recovered with esd pointer doing:
+ //" Double_t vertex[3] ; esd->GetVertex()->GetXYZ(vertex) ; "
+
+ Double_t pos[3]={ fPosition[0] - vertex[0],
+ fPosition[1] - vertex[1],
+ fPosition[2] - vertex[2] };
+
+ Double_t r = TMath::Sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2] ) ;
+
+ return TLorentzVector( fEnergy*pos[0]/r, fEnergy*pos[1]/r, fEnergy*pos[2]/r, fEnergy) ;
+}
--- /dev/null
+#ifndef AliAODCaloCluster_H
+#define AliAODCaloCluster_H
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// AOD calorimeter cluster class (for PHOS and EMCAL)
+// Author: Markus Oldenburg, CERN,
+// Gustavo Conesa, INFN
+//-------------------------------------------------------------------------
+
+#include "TObject.h"
+#include "TLorentzVector.h"
+
+class AliPHOSLogbackCluster : public TObject {
+ public:
+ AliPHOSLogbackCluster(AliVCluster* cluster);
+
+ virtual ~AliPHOSLogbackCluster();
+
+ virtual Double_t E() const {return fE;}
+ virtual Double_t CoreE() const {return fCoreE;}
+
+ virtual TLorentzVector GetMomentum(TLorentzVector &momentum, Double_t * vertex);
+
+ protected:
+ AliPHOSLogbackCluster(const AliPHOSLogbackCluster& clus);
+ AliPHOSLogbackCluster& operator=(const AliPHOSLogbackCluster& clus);
+
+ Double_t fE;
+ Double_t fCoreE;
+ Double_t fPosition[3];
+
+ ClassDef(AliPHOSLogbackCluster,1);
+};
+
+#endif