a73f33f0 |
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 | |
b2a60966 |
8 | //_________________________________________________________________________ |
9 | // A Particle modified by PHOS response and produced by AliPHOSvFast |
3f6cb8ae |
10 | // This is also a base class for AliPHOSRecParticle produced by AliPHOSPIDv1 |
11 | // Defines the particle type |
b2a60966 |
12 | // To become a general class of AliRoot ? |
3f6cb8ae |
13 | //-- |
b2a60966 |
14 | //*-- Author: Yves Schutz (SUBATECH) |
a73f33f0 |
15 | |
16 | // --- ROOT system --- |
17 | |
18 | #include "TParticle.h" |
a73f33f0 |
19 | |
20 | // --- Standard library --- |
21 | |
22 | // --- AliRoot header files --- |
23 | |
a73f33f0 |
24 | class AliPHOSFastRecParticle : public TParticle { |
cfeebab6 |
25 | |
88714635 |
26 | public: |
a73f33f0 |
27 | |
03c03c49 |
28 | AliPHOSFastRecParticle() ; |
cfeebab6 |
29 | |
a73f33f0 |
30 | AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ; // ctor |
31 | AliPHOSFastRecParticle(const TParticle & p) ; // ctor |
3f6cb8ae |
32 | virtual ~AliPHOSFastRecParticle(){ } //dtor |
33 | |
a73f33f0 |
34 | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ; |
35 | virtual void Draw(Option_t *option) ; |
b2a60966 |
36 | virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ; |
88714635 |
37 | Int_t GetIndexInList() const { |
38 | // returns the index of this in the list |
39 | return fIndexInList ; |
40 | } |
794c2bc3 |
41 | virtual const Int_t GetNPrimaries() const {return 0 ;} |
42 | virtual const TParticle * GetPrimary(Int_t index=0) const {return 0 ;} |
7b7c1533 |
43 | const Int_t GetType() const { |
88714635 |
44 | // returns the type of the particle |
45 | return fType ; |
46 | } |
6a40c29e |
47 | |
3f6cb8ae |
48 | void SetPIDBit(UInt_t fSet) { |
49 | // Set PID bit number fSet |
50 | fType |= (1<<fSet) ; |
51 | } |
cfeebab6 |
52 | |
3f6cb8ae |
53 | Bool_t TestPIDBit(UInt_t fTest) const { |
54 | // Check PID bit number fTest |
55 | if (fType & (1<<fTest) ) return kTRUE ; |
56 | else return kFALSE ; |
a3d4377c |
57 | } |
794c2bc3 |
58 | |
3d8b8082 |
59 | Bool_t IsPhoton (TString purity = "low") const; |
60 | Bool_t IsPi0 (TString purity = "low") const; |
61 | Bool_t IsElectron (TString purity = "low") const; |
3f6cb8ae |
62 | Bool_t IsHadron () const; |
63 | Bool_t IsChargedHadron () const; |
64 | Bool_t IsNeutralHadron () const; |
65 | Bool_t IsFastChargedHadron() const; |
66 | Bool_t IsSlowChargedHadron() const; |
67 | Bool_t IsFastNeutralHadron() const; |
68 | Bool_t IsSlowNeutralHadron() const; |
a3d4377c |
69 | |
14f6a871 |
70 | TString Name() const ; |
a73f33f0 |
71 | virtual void Paint(Option_t * option=""); |
3f6cb8ae |
72 | virtual void Print(Option_t * option="") const ; |
6a40c29e |
73 | |
14f6a871 |
74 | void SetType(Int_t type) ; |
cfeebab6 |
75 | |
88714635 |
76 | void SetIndexInList(Int_t val) { |
77 | // sets the value of the index in the list |
78 | fIndexInList = val ; |
cfeebab6 |
79 | } |
80 | //This has to disappear |
a3d4377c |
81 | enum EParticleType { kUNDEFINED=-1, |
82 | kNEUTRALEMFAST, kNEUTRALHAFAST, kNEUTRALEMSLOW, kNEUTRALHASLOW, |
83 | kCHARGEDEMFAST, kCHARGEDHAFAST, kCHARGEDEMSLOW, kCHARGEDHASLOW } ; |
84 | |
c0d5b57d |
85 | typedef TClonesArray FastRecParticlesList ; |
cfeebab6 |
86 | |
88714635 |
87 | protected: |
a73f33f0 |
88 | |
83974468 |
89 | Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis) |
83974468 |
90 | Int_t fType ; // particle type obtained by "virtual" reconstruction |
88714635 |
91 | private: |
92 | |
794c2bc3 |
93 | ClassDef(AliPHOSFastRecParticle,2) // Reconstructed Particle produced by the fast simulation |
a73f33f0 |
94 | |
95 | }; |
96 | |
97 | #endif // AliPHOSFASTRECPARTICLE_H |