]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRecParticle.h
coverity #24434 #24433, add check on nullness of primary particles pointer, default...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecParticle.h
index 0e0c0161ccca0f18d4e0c1da3a71b156cac4c6d1..337131432baff256d5477a6d4bbe09be1b67fb4b 100644 (file)
@@ -8,48 +8,54 @@
 //_________________________________________________________________________
 //  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"
 
+class TParticle ;
+#include  "TVector3.h"  
+
 class AliPHOSRecParticle : public AliPHOSFastRecParticle {
 
-public:
+ public:
   
-  AliPHOSRecParticle() {
-    // ctor
-  }
-  AliPHOSRecParticle(AliPHOSTrackSegment * ts) ;  // ctor
+  AliPHOSRecParticle() ; 
   AliPHOSRecParticle(const AliPHOSRecParticle & rp) ;  // ctor
-  virtual ~AliPHOSRecParticle(){
-    // dtor
-  }
-  AliPHOSTrackSegment * GetPHOSTrackSegment() const ; 
-  Int_t                 GetPHOSTrackSegmentIndex(){
-    // Getter 
-    return fPHOSTrackSegment ;
-  }
-  Int_t *               GetPrimaries(Int_t & number) ;
+  virtual ~AliPHOSRecParticle(){  }
+
+  Int_t   GetPHOSTSIndex()const {    return fPHOSTrackSegment ;  }
+  virtual Int_t GetNPrimariesToRecParticles() const ;
+  virtual Int_t GetNPrimaries() const ;
+  TVector3 GetPos() const { return fPos ; } 
+  virtual const TParticle * GetPrimary(Int_t index) const ;
+  virtual const TParticle * GetPrimary() const ;
+  Int_t GetPrimaryIndex() const ;
+  const Float_t *GetPID() { return fPID ; }
+  void    SetDebug() { fDebug = kTRUE ; } 
+  void    SetPID(Int_t type, Float_t weight) ; 
+  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:
+  AliPHOSRecParticle & operator = (const AliPHOSRecParticle & /*rp*/);
 
-  Int_t fPHOSTrackSegment ; // pointer to the associated track segment in PHOS  
-
-  typedef TClonesArray RecParticlesList ; 
+private:
 
+  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 
 
-  ClassDef(AliPHOSRecParticle,1)  // Reconstructed Particle
+  ClassDef(AliPHOSRecParticle,3)  // Reconstructed Particle
 };
 
 #endif // AliPHOSRECPARTICLE_H