/* $Id$ */
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.41 2007/08/28 12:55:08 policheh
+ * Loaders removed from the reconstruction code (C.Cheshkov)
+ *
+ * Revision 1.40 2007/08/07 14:12:03 kharlov
+ * Quality assurance added (Yves Schutz)
+ *
+ * Revision 1.39 2007/07/11 13:43:30 hristov
+ * New class AliESDEvent, backward compatibility with the old AliESD (Christian)
+ *
+ * Revision 1.38 2007/04/01 15:40:15 kharlov
+ * Correction for actual vertex position implemented
+ *
+ * Revision 1.37 2006/08/29 11:41:19 kharlov
+ * Missing implementation of ctors and = operator are added
+ *
+ * Revision 1.36 2006/08/25 16:00:53 kharlov
+ * Compliance with Effective C++AliPHOSHit.cxx
+ *
+ * Revision 1.35 2005/05/28 14:19:04 schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
//_________________________________________________________________________
// Algorithm class for the identification of particles detected in PHOS
// base class
//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
-
-#include "TTask.h"
-#include "AliConfig.h"
-
-class TFormula ;
-class TClonesArray ;
+#include "TObject.h"
+class TTree;
// --- Standard library ---
// --- AliRoot header files ---
-
+class AliESDEvent ;
class AliPHOSGeometry ;
class AliPHOSClusterizer ;
class AliPHOSTrackSegmentMaker ;
-class AliPHOSPID : public TTask {
+class AliPHOSPID : public TObject {
public:
AliPHOSPID() ; // ctor
- AliPHOSPID (const TString alirunFileName, const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ;
- AliPHOSPID(const AliPHOSPID & pid) : TTask(pid) {;}
+ AliPHOSPID (AliPHOSGeometry *geom);
+ AliPHOSPID(const AliPHOSPID & pid) ;
virtual ~AliPHOSPID() ; // dtor
+ AliPHOSPID & operator = (const AliPHOSPID & /*rvalue*/) {
+ Fatal("operator =", "not implemented") ; return *this ; }
- virtual void Exec(Option_t * option) { Warning("Exec", "not defined" ) ; }
- virtual const Int_t GetRecParticlesInRun() const { Warning("GetRecParticlesInRun", "not defined" ) ; return 0 ;}
- virtual void Print() const { Warning("Print", "not defined" ) ;}
- virtual void SetCpvtoEmcDistanceCut(Float_t Cluster_En, TString Eff_Pur,Float_t cut ) { Warning("SetCpvtoEmcDistanceCut", "not defined" ) ;}
- void SetEventFolderName(TString name) { fEventFolderName = name ; }
- virtual void SetTimeGate(Float_t Cluster_En, TString Eff_Pur, Float_t gate) { Warning("SetTimeGate", "not defined" ) ; }
- virtual const char * Version() const { Warning("Version", "not defined" ) ; return 0 ; }
- virtual void WriteRecParticles(Int_t event) { Warning("WriteRecParticles", "not defined" ) ; }
+ virtual void TrackSegments2RecParticles(Option_t * option) = 0;
-private:
- virtual void Init() { Warning("Init", "not defined" ) ; }
+ void SetInput(TTree *clustersTree, TClonesArray *trackSegments);
+ TClonesArray* GetRecParticles() const { return fRecParticles; }
+
+ virtual void Print(const Option_t * = "") const = 0;
+
+ void SetESD(AliESDEvent *esd) { fESD = esd; }
+
+ void SetEnergyCorrectionOn(Bool_t on=kTRUE) {fEnergyCorrectionOn = on;}
+ const Bool_t GetEnergyCorrectionOn() const {return fEnergyCorrectionOn;}
+
+ virtual const char * Version() const = 0;
protected:
- TString fEventFolderName ; // event folder name
- ClassDef(AliPHOSPID,3) // Particle Identifier algorithm (base class)
+ AliPHOSGeometry * fGeom; //! Pointer to PHOS Geometry
+ AliESDEvent * fESD; //! ESD object
+
+ TObjArray *fEMCRecPoints; //!Array with EMC clusters
+ TObjArray *fCPVRecPoints; //!Array with CPV clusters
+
+ TClonesArray *fTrackSegments; //!Array with found track segments
+ TClonesArray *fRecParticles; //!Array with reconstructed particles (PID)
+
+ Bool_t fEnergyCorrectionOn; // Do energy correction in GetCalibratedEnergy()
+
+private:
+
+ ClassDef(AliPHOSPID,7) // Particle Identifier algorithm (base class)
} ;