New version of PID
[u/mrichter/AliRoot.git] / PHOS / AliPHOSFastRecParticle.h
CommitLineData
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
10// To become a general class of AliRoot ?
11//
12//*-- Author: Yves Schutz (SUBATECH)
a73f33f0 13
14// --- ROOT system ---
15
16#include "TParticle.h"
17#include "TVector3.h"
18
19// --- Standard library ---
20
21// --- AliRoot header files ---
22
a73f33f0 23class AliPHOSFastRecParticle : public TParticle {
24
88714635 25 public:
a73f33f0 26
03c03c49 27 AliPHOSFastRecParticle() ;
78022019 28
a73f33f0 29 AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ; // ctor
30 AliPHOSFastRecParticle(const TParticle & p) ; // ctor
88714635 31 virtual ~AliPHOSFastRecParticle(){
32 // 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 }
78022019 41 Int_t GetPrimary(){return fPrimary;}
6a40c29e 42
7b7c1533 43 const Int_t GetType() const {
88714635 44 // returns the type of the particle
45 return fType ;
46 }
6a40c29e 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 }
03c03c49 59
60 Bool_t GetPhotonHiPu_LoEf() {
61 Bool_t pid=kFALSE ;
62 if(TestPIDBit(8)&&TestPIDBit(7)&&TestPIDBit(6)&& //PCA
63 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
64 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0)) //RCPV
65 pid = kTRUE;
66 return pid ;
67 }
68 Bool_t GetPhotonMed_Pu_Ef(){
69 Bool_t pid=kFALSE ;
70 if(TestPIDBit(7)&&TestPIDBit(6)&& //PCA
71 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
72 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0)) //RCPV
73 pid = kTRUE ;
74 return pid ;
75 }
76 Bool_t GetPhotonHiEf_LoPu() {
77 Bool_t pid=kFALSE ;
78 if(TestPIDBit(6)&& //PCA
79 TestPIDBit(5)&&TestPIDBit(4)&&TestPIDBit(3)&& //TOF
80 TestPIDBit(2)&&TestPIDBit(1)&&TestPIDBit(0)) //RCPV
81 pid = kTRUE ;
82 return pid ;
83 }
84
a73f33f0 85 TString Name() ;
86 virtual void Paint(Option_t * option="");
2f04ed65 87 virtual void Print(const char * opt) ;
78022019 88 void SetPrimary(Int_t index) { // sets the primary particle index
88714635 89 fPrimary = index ;
90 }
6a40c29e 91
88714635 92 void SetType(Int_t type) {
93 // sets the particle type
94 fType = type ;
6a40c29e 95 }
96
88714635 97 void SetIndexInList(Int_t val) {
98 // sets the value of the index in the list
99 fIndexInList = val ;
100 }
101
03c03c49 102 enum EParticleType { kUNDEFINED=-1,
103 kCHARGEDHASLOW, kNEUTRALHASLOW, kCHARGEDHAFAST, kNEUTRALHAFAST,
104 kCHARGEDEMSLOW, kNEUTRALEMSLOW, kCHARGEDEMFAST, kNEUTRALEMFAST} ;
9ec91567 105
c0d5b57d 106 typedef TClonesArray FastRecParticlesList ;
107
88714635 108 protected:
a73f33f0 109
83974468 110 Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
6a40c29e 111 Int_t fPrimary ; // primary particle index
83974468 112 Int_t fType ; // particle type obtained by "virtual" reconstruction
a73f33f0 113
88714635 114 private:
115
88714635 116
b2a60966 117 ClassDef(AliPHOSFastRecParticle,1) // Reconstructed Particle produced by the fast simulation
a73f33f0 118
119};
120
121#endif // AliPHOSFASTRECPARTICLE_H