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