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