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 */
8 //_________________________________________________________________________
9 // A Particle modified by PHOS response and produced by AliPHOSvFast
10 // To become a general class of AliRoot ?
12 //*-- Author: Yves Schutz (SUBATECH)
14 // --- ROOT system ---
16 #include "TParticle.h"
19 // --- Standard library ---
21 // --- AliRoot header files ---
23 class AliPHOSFastRecParticle : public TParticle {
27 AliPHOSFastRecParticle() ;
29 AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ; // ctor
30 AliPHOSFastRecParticle(const TParticle & p) ; // ctor
31 virtual ~AliPHOSFastRecParticle(){
34 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ;
35 virtual void Draw(Option_t *option) ;
36 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
37 Int_t GetIndexInList() const {
38 // returns the index of this in the list
41 virtual const Int_t GetNPrimaries() const {return 0 ;}
42 virtual const TParticle * GetPrimary(Int_t index=0) const {return 0 ;}
44 const Int_t GetType() const {
45 // returns the type of the particle
49 void SetPIDBit(UInt_t fSet)
54 Bool_t TestPIDBit(UInt_t fTest){
55 if (fType & (1<<fTest) )
61 Bool_t IsPhotonHiPu_LoEf() {
63 if(TestPIDBit(8)&&TestPIDBit(7)&&TestPIDBit(6)&& //PCA
64 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
65 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0)) //RCPV
69 Bool_t IsPhotonMed_Pu_Ef(){
71 if(TestPIDBit(7)&&TestPIDBit(6)&& //PCA
72 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
73 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0)) //RCPV
78 Bool_t IsPhotonHiEf_LoPu() {
80 if(TestPIDBit(6)&& //PCA
81 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
82 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0)) //RCPV
89 if(IsPhotonHiEf_LoPu()) pid = kTRUE ;
93 Bool_t IsFastChargedHadron() {
95 if(TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)) //TOF
99 Bool_t IsSlowChargedHadron() {
101 if(TestPIDBit(1)||TestPIDBit(0)) //CPV
105 Bool_t IsFastNeutralHadron() {
107 if(TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
108 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0))//RCPV
112 Bool_t IsSlowNeutralHadron() {
114 if(TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0))//RCPV
119 Bool_t IsFastChargedEM() {
121 if((TestPIDBit(8)||TestPIDBit(7)||TestPIDBit(6))&&
122 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3))//TOF
127 Bool_t IsSlowChargedEM() {
129 if(TestPIDBit(8)||TestPIDBit(7)||TestPIDBit(6))
135 virtual void Paint(Option_t * option="");
136 virtual void Print(const char * opt) ;
138 void SetType(Int_t type) {
139 // sets the particle type
143 void SetIndexInList(Int_t val) {
144 // sets the value of the index in the list
147 enum EParticleType { kUNDEFINED=-1,
148 kNEUTRALEMFAST, kNEUTRALHAFAST, kNEUTRALEMSLOW, kNEUTRALHASLOW,
149 kCHARGEDEMFAST, kCHARGEDHAFAST, kCHARGEDEMSLOW, kCHARGEDHASLOW } ;
152 typedef TClonesArray FastRecParticlesList ;
156 Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
157 Int_t fType ; // particle type obtained by "virtual" reconstruction
162 ClassDef(AliPHOSFastRecParticle,2) // Reconstructed Particle produced by the fast simulation
166 #endif // AliPHOSFASTRECPARTICLE_H