]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRecParticle.h
Initialitation of fPID data member in default constructor to avoid f.p.e.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecParticle.h
index fbc47ccfeb284264d70124f59721c2b5f20db8ce..ea400c75d9dc4d2787cac35dd40e6e518b129f1e 100644 (file)
@@ -5,56 +5,53 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  A Reconstructed Particle in PHOS          //
-//  Yves Schutz SUBATECH                      //
-//  To become a general class of AliRoot ?    //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  A Reconstructed Particle in PHOS    
+//  To become a general class of AliRoot ?        
+//  why not      
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
-#include "TParticle.h"
-#include "TVector3.h"
-
 // --- Standard library ---
 
 // --- AliRoot header files ---
 
-#include "AliPHOSTrackSegment.h"
+#include "AliPHOSFastRecParticle.h"
+#include "AliESDtrack.h" 
 
-const static Int_t kUNDEFINED     = -1; 
-const static Int_t kGAMMA         = 0 ; 
-const static Int_t kELECTRON      = 1 ;
-const static Int_t kNEUTRAL       = 2 ;  
-const static Int_t kCHARGED       = 3 ;  
-const static Int_t kCHARGEDHADRON = 4 ;  
-const static Int_t kNEUTRALHADRON = 5 ;  
-const static Int_t kNEUTRALEM     = 6 ;  
-const static Int_t kGAMMAHADRON   = 7 ; 
+class TParticle ;
+#include  "TVector3.h"  
 
-class AliPHOSRecParticle : public TParticle {
+class AliPHOSRecParticle : public AliPHOSFastRecParticle {
 
-public:
+ public:
   
-  AliPHOSRecParticle() {};          // ctor
-  AliPHOSRecParticle(AliPHOSTrackSegment * ts) ;  // ctor
-
-  virtual ~AliPHOSRecParticle(){} ; // dtor
-
-  AliPHOSTrackSegment * GetPHOSTrackSegment() { return fPHOSTrackSegment ; } 
-  Int_t GetType() { return fType ; } 
-  TString Name() ; 
-  void Print() ; 
-  void SetType(Int_t type) { fType = type ; } 
-
-private:
-
-  AliPHOSTrackSegment * fPHOSTrackSegment ; // pointer to the associated track segment in PHOS  
-  Int_t fType ;                             // identified particle type
+  AliPHOSRecParticle() ; 
+  AliPHOSRecParticle(const AliPHOSRecParticle & rp) ;  // ctor
+  virtual ~AliPHOSRecParticle(){  }
+
+  Int_t   GetPHOSTSIndex()const {    return fPHOSTrackSegment ;  }
+  virtual const Int_t GetNPrimariesToRecParticles() const ;
+  virtual const Int_t GetNPrimaries() const ;
+  TVector3 GetPos() const { return fPos ; } 
+  virtual const TParticle * GetPrimary(Int_t index) const ;
+  const Double_t *GetPID();
+  void    SetDebug() { fDebug = kTRUE ; } 
+  void    SetPos(TVector3 pos) { fPos.SetXYZ( pos.X(), pos.Y(), pos.Z() ); } 
+  void    UnsetDebug() { fDebug = kFALSE ; }
+  void    SetTrackSegment(Int_t index){fPHOSTrackSegment = index; }
+
+  typedef TClonesArray RecParticlesList ; 
+  
+ private:
 
-  ClassDef(AliPHOSRecParticle,1)  // Reconstructed Particle, version 1
+  Int_t fPHOSTrackSegment ; // pointer to the associated track segment in PHOS  
+  Bool_t fDebug ; // to steer debug output
+  TVector3 fPos ; // position in the global alice coordinate system 
+  Double_t fPID[AliESDtrack::kSPECIES+4] ; // PID probability densities
 
+  ClassDef(AliPHOSRecParticle,3)  // Reconstructed Particle
 };
 
 #endif // AliPHOSRECPARTICLE_H