]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSFastRecParticle.h
Added ToF as data member
[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
21 // --- Standard library ---
22
23 // --- AliRoot header files ---
24
25 class AliPHOSFastRecParticle : public TParticle {
26   
27  public:
28   
29   AliPHOSFastRecParticle() ;
30   
31   AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ;  // ctor
32   AliPHOSFastRecParticle(const TParticle & p) ;  // ctor
33   virtual ~AliPHOSFastRecParticle(){ } //dtor
34
35   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ; 
36   virtual void Draw(Option_t *option) ;  
37   virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
38   Int_t GetIndexInList() const { 
39     // returns the index of this in the list
40     return fIndexInList ; 
41   } 
42   virtual const Int_t GetNPrimaries() const {return 0 ;}
43   virtual const TParticle * GetPrimary(Int_t) const  {return 0 ;} 
44   const Int_t GetType() const { 
45     // returns the type of the particle
46     return fType ; 
47   } 
48   
49   void SetPIDBit(UInt_t fSet) {
50     // Set PID bit number fSet
51     fType |= (1<<fSet) ; 
52   } 
53   
54   Bool_t TestPIDBit(UInt_t fTest) const {
55     // Check PID bit number fTest
56     if (fType & (1<<fTest) ) return  kTRUE ;    
57     else return kFALSE ;
58   }
59   
60   Bool_t IsPhoton           (TString purity = "low") const;
61   Bool_t IsPi0              (TString purity = "low") const;
62   Bool_t IsElectron         (TString purity = "low") const;
63   Bool_t IsHardPhoton       () const;
64   Bool_t IsHardPi0          () const;
65   Bool_t IsHadron           () const;
66   Bool_t IsChargedHadron    () const;
67   Bool_t IsNeutralHadron    () const;
68   Bool_t IsFastChargedHadron() const;
69   Bool_t IsSlowChargedHadron() const;
70   Bool_t IsFastNeutralHadron() const;
71   Bool_t IsSlowNeutralHadron() const;
72   Bool_t IsEleCon(TString purity = "low") const; 
73
74   TString Name() const ; 
75   virtual void Paint(Option_t * option="");
76   virtual void Print() const ; 
77   
78   void SetTof(Float_t tof) { fTof = tof ; } 
79   Float_t ToF() const { return fTof ; } 
80   void SetType(Int_t type) ;
81   
82   void SetIndexInList(Int_t val) { 
83     // sets the value of the index in the list 
84     fIndexInList = val ; 
85   }
86   //This has to disappear
87   enum EParticleType { kTYPE = 8, 
88                        kUNDEFINED=-1, 
89                        kNEUTRALEMFAST, kNEUTRALHAFAST,  kNEUTRALEMSLOW, kNEUTRALHASLOW, 
90                        kCHARGEDEMFAST, kCHARGEDHAFAST,  kCHARGEDEMSLOW, kCHARGEDHASLOW } ; 
91   
92   typedef TClonesArray  FastRecParticlesList ; 
93   
94  protected:
95
96   Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
97   Float_t fTof ;       // time of fliht
98   Int_t fType ;        // particle type obtained by "virtual" reconstruction
99  private:
100
101   ClassDef(AliPHOSFastRecParticle,2)  // Reconstructed Particle produced by the fast simulation 
102
103 };
104
105 #endif // AliPHOSFASTRECPARTICLE_H