]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PHOS/AliPHOSFastRecParticle.h
First commit.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSFastRecParticle.h
... / ...
CommitLineData
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//_________________________________________________________________________
9// A Particle modified by PHOS response and produced by AliPHOSvFast
10// To become a general class of AliRoot ?
11//
12//*-- Author: Yves Schutz (SUBATECH)
13
14// --- ROOT system ---
15
16#include "TParticle.h"
17#include "TVector3.h"
18
19// --- Standard library ---
20
21// --- AliRoot header files ---
22
23class AliPHOSFastRecParticle : public TParticle {
24
25 public:
26
27 AliPHOSFastRecParticle() ;
28
29 AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ; // ctor
30 AliPHOSFastRecParticle(const TParticle & p) ; // ctor
31 virtual ~AliPHOSFastRecParticle(){
32 // dtor
33 }
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
39 return fIndexInList ;
40 }
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
45 return fType ;
46 }
47
48 void SetPIDBit(UInt_t fSet)
49 {
50 fType |= (1<<fSet) ;
51 }
52
53 Bool_t TestPIDBit(UInt_t fTest){
54 if (fType & (1<<fTest) )
55 return kTRUE ;
56 else
57 return kFALSE ;
58 }
59
60 Bool_t IsPhotonHiPu_LoEf() {
61 Bool_t pid=kFALSE ;
62 if(TestPIDBit(8)&& //PCA
63 TestPIDBit(5)&& //TOF
64 TestPIDBit(2)) //RCPV
65 pid = kTRUE;
66 return pid ;
67 }
68
69 Bool_t IsPhotonMed_Pu_Ef(){
70 Bool_t pid=kFALSE ;
71 if(TestPIDBit(7)&& //PCA
72 TestPIDBit(4)&& //TOF
73 TestPIDBit(1)) //RCPV
74 pid = kTRUE ;
75 return pid ;
76 }
77
78 Bool_t IsPhotonHiEf_LoPu() {
79 Bool_t pid=kFALSE ;
80 if(TestPIDBit(6)&& //PCA
81 TestPIDBit(3)&& //TOF
82 TestPIDBit(0)) //RCPV
83 pid = kTRUE ;
84 return pid ;
85 }
86 Bool_t IsPhoton() {
87 Bool_t pid=kFALSE ;
88 if(IsPhotonHiEf_LoPu()) pid = kTRUE ;
89 return pid ;
90 }
91
92 Bool_t IsFastChargedHadron() {
93 Bool_t pid=kFALSE ;
94 if(TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)) //TOF
95 pid = kTRUE ;
96 return pid ;
97 }
98 Bool_t IsSlowChargedHadron() {
99 Bool_t pid=kFALSE ;
100 if(TestPIDBit(1)||TestPIDBit(0)) //CPV
101 pid = kTRUE ;
102 return pid ;
103 }
104 Bool_t IsFastNeutralHadron() {
105 Bool_t pid=kFALSE ;
106 if(TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
107 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0))//RCPV
108 pid = kTRUE ;
109 return pid ;
110 }
111 Bool_t IsSlowNeutralHadron() {
112 Bool_t pid=kFALSE ;
113 if(TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0))//RCPV
114 pid = kTRUE ;
115 return pid ;
116 }
117
118 Bool_t IsFastChargedEM() {
119 Bool_t pid=kFALSE ;
120 if((TestPIDBit(8)||TestPIDBit(7)||TestPIDBit(6))&&
121 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3))//TOF
122 pid = kTRUE ;
123 return pid ;
124 }
125
126 Bool_t IsSlowChargedEM() {
127 Bool_t pid=kFALSE ;
128 if(TestPIDBit(8)||TestPIDBit(7)||TestPIDBit(6))
129 pid = kTRUE ;
130 return pid ;
131 }
132
133 TString Name() ;
134 virtual void Paint(Option_t * option="");
135 virtual void Print(const char * opt) ;
136
137 void SetType(Int_t type) {
138 // sets the particle type
139 fType = type ;
140 }
141
142 void SetIndexInList(Int_t val) {
143 // sets the value of the index in the list
144 fIndexInList = val ;
145 }
146 //This has to disappear
147 enum EParticleType { kUNDEFINED=-1,
148 kNEUTRALEMFAST, kNEUTRALHAFAST, kNEUTRALEMSLOW, kNEUTRALHASLOW,
149 kCHARGEDEMFAST, kCHARGEDHAFAST, kCHARGEDEMSLOW, kCHARGEDHASLOW } ;
150
151
152 typedef TClonesArray FastRecParticlesList ;
153
154 protected:
155
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
158 private:
159
160
161 ClassDef(AliPHOSFastRecParticle,2) // Reconstructed Particle produced by the fast simulation
162
163};
164
165#endif // AliPHOSFASTRECPARTICLE_H