]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PHOS/AliPHOSFastRecParticle.h
syst. check that reads the MC information for the case of TPC-only
[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/* History of cvs commits:
9 *
10 * $Log$
11 * Revision 1.36 2005/05/28 14:19:04 schutz
12 * Compilation warnings fixed by T.P.
13 *
14 */
15
16//_________________________________________________________________________
17// A Particle modified by PHOS response and produced by AliPHOSvFast
18// This is also a base class for AliPHOSRecParticle produced by AliPHOSPIDv1
19// Defines the particle type
20// To become a general class of AliRoot ?
21//--
22//*-- Author: Yves Schutz (SUBATECH)
23
24// --- ROOT system ---
25
26class TClonesArray;
27#include "TParticle.h"
28#include "AliPID.h"
29// --- Standard library ---
30
31// --- AliRoot header files ---
32
33class AliPHOSFastRecParticle : public TParticle {
34
35 public:
36
37 AliPHOSFastRecParticle() ;
38
39 AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ; // ctor
40 AliPHOSFastRecParticle(const TParticle & p) ; // ctor
41 virtual ~AliPHOSFastRecParticle(){ } //dtor
42
43 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ;
44 virtual void Draw(Option_t *option) ;
45 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
46 Int_t GetIndexInList() const {
47 // returns the index of this in the list
48 return fIndexInList ;
49 }
50 virtual Int_t GetNPrimaries() const {return 0 ;}
51 virtual const TParticle * GetPrimary(Int_t) const {return 0 ;}
52 Int_t GetType() const {
53 // returns the type of the particle
54 return fType ;
55 }
56
57 void SetPIDBit(UInt_t fSet) {
58 // Set PID bit number fSet
59 fType |= (1<<fSet) ;
60 }
61
62 Bool_t TestPIDBit(UInt_t fTest) const {
63 // Check PID bit number fTest
64 if (fType & (1<<fTest) ) return kTRUE ;
65 else return kFALSE ;
66 }
67
68 Bool_t IsPhoton (TString purity = "low") const;
69 Bool_t IsPi0 (TString purity = "low") const;
70 Bool_t IsElectron (TString purity = "low") const;
71 Bool_t IsHardPhoton () const;
72 Bool_t IsHardPi0 () const;
73 Bool_t IsHadron () const;
74 Bool_t IsChargedHadron () const;
75 Bool_t IsNeutralHadron () const;
76 Bool_t IsFastChargedHadron() const;
77 Bool_t IsSlowChargedHadron() const;
78 Bool_t IsFastNeutralHadron() const;
79 Bool_t IsSlowNeutralHadron() const;
80 Bool_t IsEleCon(TString purity = "low") const;
81
82 TString Name() const ;
83 virtual void Paint(Option_t * option="");
84 virtual void Print(const Option_t * = "") const ;
85
86 void SetTof(Float_t tof) { fTof = tof ; }
87 Float_t ToF() const { return fTof ; }
88 void SetType(Int_t type) ;
89
90 void SetIndexInList(Int_t val) {
91 // sets the value of the index in the list
92 fIndexInList = val ;
93 }
94 //This has to disappear
95 enum EParticleType { kTYPE = 8,
96 kUNDEFINED=-1,
97 kNEUTRALEMFAST, kNEUTRALHAFAST, kNEUTRALEMSLOW, kNEUTRALHASLOW,
98 kCHARGEDEMFAST, kCHARGEDHAFAST, kCHARGEDEMSLOW, kCHARGEDHASLOW } ;
99
100 typedef TClonesArray FastRecParticlesList ;
101
102 protected:
103
104 Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
105 Float_t fTof ; // time of fliht
106 Int_t fType ; // particle type obtained by "virtual" reconstruction
107 Float_t fPID[AliPID::kSPECIESN] ; // PID probability densities
108
109 private:
110
111 ClassDef(AliPHOSFastRecParticle,2) // Reconstructed Particle produced by the fast simulation
112
113};
114
115#endif // AliPHOSFASTRECPARTICLE_H