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 ;}
43 const Int_t GetType() const {
44 // returns the type of the particle
48 void SetPIDBit(UInt_t fSet)
53 Bool_t TestPIDBit(UInt_t fTest){
54 if (fType & (1<<fTest) )
60 Bool_t IsPhotonHiPu_LoEf() {
62 if(TestPIDBit(8)&& //PCA
69 Bool_t IsPhotonMed_Pu_Ef(){
71 if(TestPIDBit(7)&& //PCA
78 Bool_t IsPhotonHiEf_LoPu() {
80 if(TestPIDBit(6)&& //PCA
88 if(IsPhotonHiEf_LoPu()) pid = kTRUE ;
92 Bool_t IsFastChargedHadron() {
94 if(TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)) //TOF
98 Bool_t IsSlowChargedHadron() {
100 if(TestPIDBit(1)||TestPIDBit(0)) //CPV
104 Bool_t IsFastNeutralHadron() {
106 if(TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
107 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0))//RCPV
111 Bool_t IsSlowNeutralHadron() {
113 if(TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0))//RCPV
118 Bool_t IsFastChargedEM() {
120 if( (TestPIDBit(8)||TestPIDBit(7)||TestPIDBit(6))&& // PCA
121 (TestPIDBit(5)||TestPIDBit(4)||TestPIDBit(3))&& // TOF
122 !(TestPIDBit(2)||TestPIDBit(1)||TestPIDBit(0))) // !CPV
127 Bool_t IsSlowChargedEM() {
129 if(TestPIDBit(8)||TestPIDBit(7)||TestPIDBit(6))
134 TString Name() const ;
135 virtual void Paint(Option_t * option="");
136 virtual void Print(Option_t * option = "") const ;
138 void SetType(Int_t type) ;
140 void SetIndexInList(Int_t val) {
141 // sets the value of the index in the list
144 //This has to disappear
145 enum EParticleType { kUNDEFINED=-1,
146 kNEUTRALEMFAST, kNEUTRALHAFAST, kNEUTRALEMSLOW, kNEUTRALHASLOW,
147 kCHARGEDEMFAST, kCHARGEDHAFAST, kCHARGEDEMSLOW, kCHARGEDHASLOW } ;
150 typedef TClonesArray FastRecParticlesList ;
154 Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
155 Int_t fType ; // particle type obtained by "virtual" reconstruction
159 ClassDef(AliPHOSFastRecParticle,2) // Reconstructed Particle produced by the fast simulation
163 #endif // AliPHOSFASTRECPARTICLE_H