]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliHFEpidBase.h
Update of the HFE package
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpidBase.h
CommitLineData
809a4336 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
7* Permission to use, copy, modify and distribute this software and its *
8* documentation strictly for non-commercial purposes is hereby granted *
9* without fee, provided that the above copyright notice appears in all *
10* copies and that both the copyright notice and this permission notice *
11* appear in the supporting documentation. The authors make no claims *
12* about the suitability of this software for any purpose. It is *
13* provided "as is" without express or implied warranty. *
14**************************************************************************/
50685501 15//
16// Base Class for Detector PID Objects
17// For more information see the implementation file
18//
c2690925 19#ifndef ALIHFEPIDBASE_H
20#define ALIHFEPIDBASE_H
21
809a4336 22 #ifndef ROOT_TNamed
23 #include <TNamed.h>
24 #endif
25
26class TList;
3a72645a 27class AliAODpidUtil;
faee3b18 28class AliESDpid;
809a4336 29class AliVParticle;
722347d8 30class AliMCParticle;
3a72645a 31class AliHFEpidQAmanager;
722347d8 32
3a72645a 33class AliHFEpidObject{
34 public:
722347d8 35 typedef enum{
36 kESDanalysis,
37 kAODanalysis
38 }AnalysisType_t;
3a72645a 39 AliHFEpidObject():
40 fkRecTrack(NULL),
41 fAnalysisType(kESDanalysis),
42 fAbInitioPID(-1),
e156c3bb 43 fCentrality(99),
44 fIsPbPb(kFALSE) // Default: pp
3a72645a 45 {
46 }
47 AliHFEpidObject(const AliHFEpidObject &ref):
48 fkRecTrack(ref.fkRecTrack),
49 fAnalysisType(ref.fAnalysisType),
50 fAbInitioPID(ref.fAbInitioPID),
e156c3bb 51 fCentrality(ref.fCentrality),
52 fIsPbPb(ref.fIsPbPb)
3a72645a 53 {
54 }
55 AliHFEpidObject &operator=(const AliHFEpidObject &ref);
56 ~AliHFEpidObject(){};
57
58 void SetRecTrack(const AliVParticle * recTrack) {fkRecTrack = recTrack; }
59 void SetMCTrack(const AliVParticle * mcTrack);
60 void SetAnalysisType(AnalysisType_t type) { fAnalysisType = type; }
61 void SetAbInitioPID(Int_t abInitioPID) { fAbInitioPID = abInitioPID; }
e156c3bb 62 void SetCentrality(Int_t centrality) { fCentrality = centrality; }
63 void SetPbPb() { fIsPbPb = kTRUE; }
64 void SetPP() { fIsPbPb = kFALSE; }
3a72645a 65
66 const AliVParticle *GetRecTrack() const { return fkRecTrack; }
67 Int_t GetAbInitioPID() const { return fAbInitioPID; }
e156c3bb 68 Int_t GetCentrality() const { return fCentrality; }
3a72645a 69 Bool_t IsAODanalysis() const { return fAnalysisType == static_cast<UChar_t>(kAODanalysis); }
70 Bool_t IsESDanalysis() const { return fAnalysisType == static_cast<UChar_t>(kESDanalysis); }
e156c3bb 71 Bool_t IsPbPb() const { return fIsPbPb; }
3a72645a 72
73 private:
e156c3bb 74 const AliVParticle *fkRecTrack; // Reconstructed track
75 UChar_t fAnalysisType; // Analysis Mode (ESD or AOD)
76 Int_t fAbInitioPID; // AbInitio PID
77 Int_t fCentrality; // Centrality Information
78 Bool_t fIsPbPb; // Collision type
722347d8 79};
809a4336 80
81class AliHFEpidBase : public TNamed{
809a4336 82 public:
faee3b18 83 AliHFEpidBase();
809a4336 84 AliHFEpidBase(const Char_t *name);
85 AliHFEpidBase(const AliHFEpidBase &c);
86 AliHFEpidBase &operator=(const AliHFEpidBase &c);
87 virtual ~AliHFEpidBase() {};
88 // Framework functions that have to be implemented by the detector PID classes
89 virtual Bool_t InitializePID() = 0;
6555e2ad 90 virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa = NULL) const = 0;
809a4336 91
809a4336 92 Bool_t HasMCData() const { return TestBit(kHasMCData); };
93
faee3b18 94 void SetESDpid(AliESDpid * const pid) { fESDpid = pid; }
3a72645a 95 void SetAODpid(AliAODpidUtil * const pid) { fAODpid = pid; }
809a4336 96 void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); };
809a4336 97
6555e2ad 98 AliESDpid *GetESDpid() const { return fESDpid; };
99
809a4336 100 protected:
6555e2ad 101 AliESDpid *fESDpid; //! ESD PID object
102 AliAODpidUtil *fAODpid; //! AOD PID object
809a4336 103 void Copy(TObject &ref) const;
3a72645a 104
809a4336 105 private:
50685501 106 enum{
3a72645a 107 kHasMCData = BIT(14)
50685501 108 };
109
3a72645a 110 ClassDef(AliHFEpidBase, 2) // Base class for detector Electron ID
809a4336 111};
809a4336 112#endif