]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSFastRecParticle.h
Base Particle Cuts moved to the separate file. Property eneum defined namespace of...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSFastRecParticle.h
1 #ifndef ALIPHOSFASTRECPARTICLE_H
2 #define ALIPHOSFASTRECPARTICLE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 //  A  Particle modified by PHOS response and produced by AliPHOSvFast
10 //  This is also a base class for AliPHOSRecParticle produced by AliPHOSPIDv1
11 //  Defines the particle type
12 //  To become a general class of AliRoot ?    
13 //--               
14 //*-- Author: Yves Schutz (SUBATECH)
15
16 // --- ROOT system ---
17
18 class TClonesArray;
19 #include "TParticle.h"
20 #include "AliESDtrack.h" 
21
22 // --- Standard library ---
23
24 // --- AliRoot header files ---
25
26 class AliPHOSFastRecParticle : public TParticle {
27   
28  public:
29   
30   AliPHOSFastRecParticle() ;
31   
32   AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ;  // ctor
33   AliPHOSFastRecParticle(const TParticle & p) ;  // ctor
34   virtual ~AliPHOSFastRecParticle(){ } //dtor
35
36   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ; 
37   virtual void Draw(Option_t *option) ;  
38   virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
39   Int_t GetIndexInList() const { 
40     // returns the index of this in the list
41     return fIndexInList ; 
42   } 
43   virtual const Int_t GetNPrimaries() const {return 0 ;}
44   virtual const TParticle * GetPrimary(Int_t) const  {return 0 ;} 
45   const Int_t GetType() const { 
46     // returns the type of the particle
47     return fType ; 
48   } 
49   
50   void SetPIDBit(UInt_t fSet) {
51     // Set PID bit number fSet
52     fType |= (1<<fSet) ; 
53   } 
54   
55   Bool_t TestPIDBit(UInt_t fTest) const {
56     // Check PID bit number fTest
57     if (fType & (1<<fTest) ) return  kTRUE ;    
58     else return kFALSE ;
59   }
60   
61   Bool_t IsPhoton           (TString purity = "low") const;
62   Bool_t IsPi0              (TString purity = "low") const;
63   Bool_t IsElectron         (TString purity = "low") const;
64   Bool_t IsHardPhoton       () const;
65   Bool_t IsHardPi0          () const;
66   Bool_t IsHadron           () const;
67   Bool_t IsChargedHadron    () const;
68   Bool_t IsNeutralHadron    () const;
69   Bool_t IsFastChargedHadron() const;
70   Bool_t IsSlowChargedHadron() const;
71   Bool_t IsFastNeutralHadron() const;
72   Bool_t IsSlowNeutralHadron() const;
73   Bool_t IsEleCon(TString purity = "low") const; 
74
75   TString Name() const ; 
76   virtual void Paint(Option_t * option="");
77   virtual void Print() const ; 
78   
79   void SetTof(Float_t tof) { fTof = tof ; } 
80   Float_t ToF() const { return fTof ; } 
81   void SetType(Int_t type) ;
82   
83   void SetIndexInList(Int_t val) { 
84     // sets the value of the index in the list 
85     fIndexInList = val ; 
86   }
87   //This has to disappear
88   enum EParticleType { kTYPE = 8, 
89                        kUNDEFINED=-1, 
90                        kNEUTRALEMFAST, kNEUTRALHAFAST,  kNEUTRALEMSLOW, kNEUTRALHASLOW, 
91                        kCHARGEDEMFAST, kCHARGEDHAFAST,  kCHARGEDEMSLOW, kCHARGEDHASLOW } ; 
92   
93   typedef TClonesArray  FastRecParticlesList ; 
94   
95  protected:
96
97   Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
98   Float_t fTof ;       // time of fliht
99   Int_t fType ;        // particle type obtained by "virtual" reconstruction
100   Double_t fPID[AliESDtrack::kSPECIESN] ; // PID probability densities
101
102  private:
103
104   ClassDef(AliPHOSFastRecParticle,2)  // Reconstructed Particle produced by the fast simulation 
105
106 };
107
108 #endif // AliPHOSFASTRECPARTICLE_H