]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSFastRecParticle.h
Removing useless flag.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSFastRecParticle.h
index 1a5aa93a45c158b79934769f45cc395842d7700a..d9a55e165f449f4573e0d36af61cdb0b743e5514 100644 (file)
 
 /* $Id$ */
 
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.36  2005/05/28 14:19:04  schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
 //_________________________________________________________________________
 //  A  Particle modified by PHOS response and produced by AliPHOSvFast
+//  This is also a base class for AliPHOSRecParticle produced by AliPHOSPIDv1
+//  Defines the particle type
 //  To become a general class of AliRoot ?    
-//               
+//--               
 //*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
+class TClonesArray;
 #include "TParticle.h"
-#include "TVector3.h"
-
+#include "AliPID.h"
 // --- Standard library ---
 
 // --- AliRoot header files ---
 
-typedef TClonesArray  FastRecParticlesList ; 
-
-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 AliPHOSFastRecParticle : public TParticle {
-
-public:
   
-  AliPHOSFastRecParticle() {};          // ctor
+ public:
+  
+  AliPHOSFastRecParticle() ;
+  
   AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ;  // ctor
   AliPHOSFastRecParticle(const TParticle & p) ;  // ctor
-  virtual ~AliPHOSFastRecParticle(){}  // dtor
+  virtual ~AliPHOSFastRecParticle(){ } //dtor
+  AliPHOSFastRecParticle & operator = (const AliPHOSFastRecParticle & /*rp*/);
 
   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ; 
   virtual void Draw(Option_t *option) ;  
   virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
-  virtual Int_t * GetPrimaries(Int_t & number) ;
-  Int_t GetType() { return fType ; } 
-  TString Name() ; 
+  Int_t GetIndexInList() const { 
+    // returns the index of this in the list
+    return fIndexInList ; 
+  } 
+  virtual Int_t GetNPrimaries() const {return 0 ;}
+  virtual const TParticle * GetPrimary(Int_t) const  {return 0 ;} 
+  Int_t GetType() const { 
+    // returns the type of the particle
+    return fType ; 
+  } 
+  
+  void SetPIDBit(UInt_t fSet) {
+    // Set PID bit number fSet
+    fType |= (1<<fSet) ; 
+  } 
+  
+  Bool_t TestPIDBit(UInt_t fTest) const {
+    // Check PID bit number fTest
+    if (fType & (1<<fTest) ) return  kTRUE ;   
+    else return kFALSE ;
+  }
+  
+  Bool_t IsPhoton           (TString purity = "low") const;
+  Bool_t IsPi0              (TString purity = "low") const;
+  Bool_t IsElectron         (TString purity = "low") const;
+  Bool_t IsHardPhoton       () const;
+  Bool_t IsHardPi0          () const;
+  Bool_t IsHadron           () const;
+  Bool_t IsChargedHadron    () const;
+  Bool_t IsNeutralHadron    () const;
+  Bool_t IsFastChargedHadron() const;
+  Bool_t IsSlowChargedHadron() const;
+  Bool_t IsFastNeutralHadron() const;
+  Bool_t IsSlowNeutralHadron() const;
+  Bool_t IsEleCon(TString purity = "low") const; 
+
+  TString Name() const ; 
   virtual void Paint(Option_t * option="");
-  void Print() ; 
-  void SetPrimary(Int_t index) { fPrimary = index ; }
-  void SetType(Int_t type) { fType = type ; } 
+  virtual void Print(const Option_t * = "") const ; 
+  
+  void SetTof(Float_t tof) { fTof = tof ; } 
+  Float_t ToF() const { return fTof ; } 
+  void SetType(Int_t type) ;
+  
+  void SetIndexInList(Int_t val) { 
+    // sets the value of the index in the list 
+    fIndexInList = val ; 
+  }
+  //This has to disappear
+  enum EParticleType { kTYPE = 8, 
+                       kUNDEFINED=-1, 
+                      kNEUTRALEMFAST, kNEUTRALHAFAST,  kNEUTRALEMSLOW, kNEUTRALHASLOW, 
+                      kCHARGEDEMFAST, kCHARGEDHAFAST,  kCHARGEDEMSLOW, kCHARGEDHASLOW } ; 
+  
+  typedef TClonesArray  FastRecParticlesList ; 
+  
+ protected:
 
-protected:
+  Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
+  Float_t fTof ;       // time of fliht
+  Int_t fType ;        // particle type obtained by "virtual" reconstruction
+  Float_t fPID[AliPID::kSPECIESCN] ; // PID probability densities
 
-  Int_t fType ;    // particle type obtained by "virtual" reconstruction
-  Int_t fPrimary ; // (unique) primary particle index 
+ private:
 
-  ClassDef(AliPHOSFastRecParticle,1)  // Reconstructed Particle produced by the fast simulation 
+  ClassDef(AliPHOSFastRecParticle,2)  // Reconstructed Particle produced by the fast simulation 
 
 };