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